4 ms·
Plan9's underlying "everything is a filesystem" paradigm is wonderful, but as a hardcore user of vim/emacs and fan of tiling window managers like i3, the mouse-
by pmoriarty 12y ago
Plan9's underlying "everything is a filesystem" paradigm is wonderful, but as a hardcore user of vim/emacs and fan of tiling window managers like i3, the mouse-centric Rio/Acme interfaces seem to be pretty clunky and inefficient.
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.
- noobermin 12y agoYeah, the wm didn't look that great by modern standards. However, the whole underlying idea is pretty compelling. I'd like to see something like plan9 or inferno retrofitted with a more modern interface, loaded with modern tools and, yes, being built around a more modern language. Nonetheless, I might try a vm of plan9, for fun.
- rcarmo 12y agoI've been messing around with Inferno for a while (link below for completeness). I would love to have, say, Clojure, Python or something else with a sizable set of built-in libraries running on it, but (at least where Inferno is concerned) I had a lot of trouble finding anything to bootstrap that kind of environment (Inferno uses the `dis` VM, and there is a GSOC project that sort of gets Java running around that, but, again, no readily usable stuff). Notes here: http://the.taoofmac.com/space/blog/2014/05/04/2230#diving-into-inferno http://the.taoofmac.com/space/blog/2014/05/04/2230#diving-in...
- gchpaco 12y agoUnfortunately that would be tantamount to wanting it designed and written by completely different people; Pike and Thompson are clearly comfortable with that level of abstraction, to judge by Go. 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?
- smorrow 12y agoThe same way you would on any other OS. No-one said everything has to be a file, even in Plan 9. Only if it makes sense to be a file. Semaphores aren't files, grep isn't a 9p server, neither is malloc, ...
- frik 12y agoWindows NT series architecture (XP, 8.1, Xbox, etc.) has the same wonderful "everything is a filesystem" paradigm. http://en.wikipedia.org/wiki/Object_Manager_(Windows) http://en.wikipedia.org/wiki/Object_Manager_(Windows) Try out WinObj.exe (Microsoft): http://technet.microsoft.com/en-us/sysinternals/bb896657.aspx http://technet.microsoft.com/en-us/sysinternals/bb896657.asp... (best with admin privileges)
- laumars 12y agoNT might have system objects structured in a tree for privileged access, but it's not quite the same thing as having everything as a file system object that's transparently accessible by any application. eg, you couldn't use Notepad to edit those NT objects, where as you could with Plan 9's design since.
- frik 12y agoThe problem is backwards compatibility. To make the code transition from Win16API to Win32API very easy in 1994-95 era Microsoft made several design decisions for Win32API, that don't make sense anymore - 20 years later. 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/aa365247(v=vs.85).aspx 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/aa363858(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... , http://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... , http://msdn.microsoft.com/en-us/library/windows/desktop/aa365467(v=vs.85).aspx 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.png http://s1.postimg.org/ckhs6xedr/ntobject.png Instead of further improving Win32API, as they have done like ReadFileEx() (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365468(v=vs.85).aspx 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).
- p9idf 12y ago"I'd much rather have seen it built around scheme, [...]" 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.
- vezzy-fnord 12y agoIts C-inspired programming language is also pretty primitive. 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.