133 points · by wtbob · 12y ago · 80 comments
Its C-inspired programming language is also pretty primitive. I'd much rather have seen it built around scheme, lisp, or even a modern statically-typed language like OCaml, Haskell, or SML.
Moreover OSes designed with higher level languages tend to end up in a very different place even if they start with superficially similar assumptions—compare for example the early Lisp Machine OSes with TOPS-20, or ITS. "Everything's a filesystem" tends to mean "everything's a stream of bytes", which is in some ways a defeat for strong typing at the OS level for all that it can be convenient. I know I've had to write text level parsers for things like the output of multipath -ll (which is not standardized and is intended for human readibility and so changes radically every now and again, but is still the best source of some of that data). Now with Plan 9's FS structure you can arguably turn tree-structured data into a filesystem with files as the leaves, but this doesn't generalize well to non-tree-structured data.
That said I really like the OS, and I'm even willing to admit that Acme is pretty good (just not to my Emacs-tainted taste). But I can't imagine what a relational DB would look like in that idiom, unless it's "SQL query as filename". Individual tables, fine, but joins? Transactions?
It's not meant to be built around any language. If there's a language you want to use, just start using it. All you need is access to the system calls. The whole point of making everything a file system is so that you don't have to cram everything together in the same address space. There's no foreign function interfaces or calling conventions you have to deal with if you want to use a new language with the system. It's all reads and writes. Ocaml, Haskell, and ML all have read and write, so if you want to use a less primitive language, there's nothing stopping you.
Nonetheless, I might try a vm of plan9, for fun.
Notes here: http://the.taoofmac.com/space/blog/2014/05/04/2230#diving-in...
http://en.wikipedia.org/wiki/Object_Manager_(Windows)
Try out WinObj.exe (Microsoft): http://technet.microsoft.com/en-us/sysinternals/bb896657.asp... (best with admin privileges)
eg, you couldn't use Notepad to edit those NT objects, where as you could with Plan 9's design since.
Some of them are the limited MAX_PATH, which is defined as 260 characters, reserved characters in file names, 8.3 filename aliasing (fixed), etc. - see: http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...
Unfortunately, the Windows shell (explorer.exe/shell32.dll & cmd.exe) are more limited than what you can do with Win32API. One can access the NT object tree from C/C++
You can use CreateFile(), ReadFile(), WriteFile(), etc. Win32API function to work on NT objects (not just files but real NT objects, the name is just inherited from Win16API) - http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... , http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... , http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...
Some NT path examples:
"\\.\PhysicalDrive2" ... opens third physical drive
"\\.\C:\" ... opens the file system of the C: volume
"\\.\COM1" ... opens serial port 1
"\\.\pipe\pipename" ... opens named pipe
"\\.\mailslot\sample" ... open mailslot
"\\?\UNC\server\share" ... opens universal UNC path
"\\?\C:\" ... opens C:, you can exceed the MAX_PATH limits
screenshot of WinObj that corresponds to the last example: http://s1.postimg.org/ckhs6xedr/ntobject.pngInstead of further improving Win32API, as they have done like ReadFileEx() (http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... ), Microsoft toys around with several dotNet API layers on top of Win32API and now a WinRT API that stills sits on top of the Win32 subsystem. Windows NT would support several subsystems (like there are POSIX, OS/2, Xbox subsystems for WinNT/ReactOS).
Berkeley sockets introduced in Win3.1 for Workgroups and later as WinSocks for IE 1 (based on Mosaic) came late (Bill Gates vision was the Microsoft Network based on Win95 GUI, later renamed was MSN as dial-up network): http://en.wikipedia.org/wiki/Berkeley_sockets , http://en.wikipedia.org/wiki/Microsoft_Network#MSN_Classic
It's actually very beautiful. It's just so damned simple. Despite Plan 9's huge codebase, if you open an arbitrary source file, chances are you can read and grok it in one sitting.
It's shocking especially if you're used to the needlessly complicated modern codebases of today (particularly ones that copiously use GLib, D-Bus, etc. on Linux), but once the initial shock dies down, it's a breath of fresh air.
My money is on the former.
For me, the missing tools would be a good up to date browser (google chrome or firefox) and something like virtualbox for virtual machines. I think the browser can not work correctly without good video drivers. Libre Office would be a bonus.
see also 9front, a plan9 fork with stuff included that's not been blessed by the Labs (which is just Jim & Geoff nowadays I think).
drivers are a given though. i'm not sure what their philosophy on virtualization is though.
A system could, in theory, be both (although you end up with a least-common-denominator situation), but they are separate.
The reason it was posted here is because in Computer Science more then any other field the line between professional and research is blurred more then ever.
I still use Acme occasionally and some of the bunch of scripts I use are in rc. Acme is a beautiful editor that doesn't get in my way much, but the mouse-only interface is fairly clunky and I don't have the time and energy to keep my own patches over it for sane (ahem, emacs) bindings. I use it, occasionally, as a distraction when working on a more boring project, or when I just have to write long streams of text that don't require much jumping around.
As people have said browser support is an issue, there is linuxemu + firefox but I prefer to remote desktop/vnc to a windows/linux VM that my work's IT dept look after.
In this day and age throwing another VM at the problem is not a big deal, and is definitely easier than porting webkit.
I write C code for embedded and server side code so I can write this in portable C and run it on windows, Linux, plan9 or embedded under threadx.
Its an environment I am used to and I like it, I find I am productive with it.
-Steve
I'm a huge fan of the principles behind Plan9 but I've never done much more with it than install it, play around with it for a bit, read documentation and newsgroups on what makes it tick. Other than that I've de-installed it... And I would probably use it, maybe even on a (light) production box to see how well it would fare in real life given a chance.
But the amount of stuff that is missing compared to vanilla unix makes that a non-starter.
* Plan 9's approach on terminal is entirely decoupled from the TTY idea. The terminal is basically a program that takes commands, has a shell run them, and pipes back the result, with none of the VT-whatever stuff. Even getting ncurses-based tools to run would require some effort.
* There's no X11
There are some graphical tools for Plan 9 (including more or less barebones web browsers), but there is just enough difference from Linux and BSD environments that people aren't quite willing to cope with it.
I'd love to use, learn more about, and improve Plan9, but the lack of the above make it pretty painful.
This is why Hurd is probably far more likely to gain traction in the foreseeable future than Plan9.
Don't you find annoying the lack of built-in file browser and powerful regex-based transformation language?
Don't you find annoying the lack of quick access to search/navigate/execute/copy-paste mechanics via mouse click?
In Acme, all text is hypertext. The difference between Acme and previous generation editors (Vim, EMACS etc.) is like between The Web and a library of paper books.
I think code completion is more of a mixed bag. It's useful when you're stuck in ugly environments with FrameworksAndLibraries[withFunctionsLikeThese], but I just avoid those environments.
Also, people have built external commands that do code completion. They're not as nicely integrated, but could be improved enough to be quite comfortable, if that's what you're after. (syntax highlighting couldn't ever really work in acme or sam)
Anyone here in the know on the current state of browsers on plan9?
It might be feasible to swap out Abaco's HTML parsers and such with a "modern" rendering engine like Gecko or Webkit while retaining its webfs-based approach to navigating the world wide web.
Going back to other environments is like going back to stone tools.
But a nice status update to see if the project is still alive, where is it heading, who uses it for serious work?
[1] http://iwp9.org/
Approximately everyone else in the entire world: No, we don't.
Main difference:
Plan 9 has a virtual memory system and Inferno just uses
a flat address space. [...] User space tends to be
completely different as Inferno's user space is entirely
within the virtual machine. Plan 9 can run [...]
generic binaries.
-- http://www.osnews.com/thread?249033Inferno repo: https://code.google.com/p/inferno-os/source/list (latest commit May 25, 2014); http://en.wikipedia.org/wiki/Inferno_(operating_system)
Plan 9 repo: http://plan9.bell-labs.com/sources/ (latest commit May 26, 2014); http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs
I imagine this mascot reflects the developer demographic, but compared to common mascots it's a bit raw.