Hacker News new | past | comments | ask | show | jobs | submit login

The kernel is simple and sanely designed and interfacing with it is done through the filesystem in, again, a very simple and sane way. Your displays are configured by a simple <10 line shell script at boot time that writes plaintext to a device file, rather than a gargantuan graphics stack that's controlled with binary device files and ioctls. Filesystem namespaces are lovely, and make the filesystem cleanly organized and customized to the logged in user's needs and desires. I have a little script that clears my current terminal window: `echo -n "" > /dev/text`. The libc is small and focused (non-POSIX), and there are only a handful of syscalls. The process model is really sane and straightforward as well. Playing an mp3 file is `mp3dec < file.mp3 > /dev/audio`.

To open a TCP connection, you use the dial(3) function, which basically does the following: write "tcp!name!port" to /net/cs and read out "1.2.3.4!80" (/net/cs resolves the name), then you write "connect 1.2.3.4" to /net/tcp/clone and read out a connection ID, and open /net/tcp/:id/data which is now a full-duplex TCP stream.

There's this emphasis on simple, sane ways of fulfilling tasks on plan9 that permeates the whole system. It's beautiful.




Actually, I can kinda see the advantages there - but isn't insanity just a natural result of trying to work in lots of contexts?

I mean, consider something like vim. It's a nice program, well designed - but undoubtedly insane, just because it's supposed to work in every imaginable context.

It strikes me that plan9 wouldn't be immune to the same phenomenon.


It is all about keeping the OS sane to give the users and applications a chance to be sane, rather than causing madness from the get-go.

However, if the system permits arbitrary applications to be executed (which plan9 does), then it cannot be shielded from madness. Proof: plan9 has a POSIX compatibility layer (APE), a vt100 terminal emulator and a vim port. It even has an aging full-on linux emulator. I think it could run a really old version of Firefox, but the memory is vague. People swear by Mothra these days anyway.


It also has a virtual machine system down served by vmx(1) http://man.cat-v.org/9front/1/vmx.


That's new. Haven't used 9front for a while.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: