DSL describing Plan9-like devices

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
arseniuss
Member
Member
Posts: 32
Joined: Tue Aug 10, 2010 12:13 am
Location: Latvia
Contact:

DSL describing Plan9-like devices

Post by arseniuss »

Hello, everyone!

I was reading in Wikipedia critique about Plan9: "Plan 9 constrains everything to look like a file. In most cases the real interface type comprises the protocol of messages that must be written to, and read from, a file descriptor. This is difficult to specify and document, and prohibits any automatic type checking at all, except for file errors at run time. (...)"

And I was wondering if you have seen any descriptive protocol language (something like protobuf) which could describe a device in Plan9 and generate C boilerplate to counter critique mentioned above?

If not how would you declare Plan9 device like vga: https://plan9.io/magic/man2html/3/vga
Hobby stuff (suckless libs, compilators, game engines, kernels): github. Work @ zabbix: arseniuss@zabbix
User avatar
eekee
Member
Member
Posts: 827
Joined: Mon May 22, 2017 5:56 am
Freenode IRC: eekee
Location: Hyperspace
Contact:

Re: DSL describing Plan9-like devices

Post by eekee »

I was attracted to Plan 9 by its simple interfaces with (mostly) clear documentation, so I'm not too sure about that critique. "The protocol of messages" is exactly what I want to know; formal grammars and what-not do more to confuse me than help. However, I can see how it prevents automated safety checks. Type checking certainly is left to run-time errors. I found this acceptable, but I was only shell scripting.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Post Reply