News for hackers. Stuff that matters.
Re:Plan 9 from Bell Labs by bastawhiz on Monday December 08, 2014 @09:44PM (#8720680)
Can someone explain why Plan 9 matters? I mean this legitimately. How is this differentiated from yet another flavor of *nix? I'm sure it was hot shit back in the early 90s, but I don't see much of an appeal other than as a curiosity like OS/2.
Re:Plan 9 from Bell Labs by black_knight on Tuesday December 09, 2014 @04:45AM (#8721904)
What I find most amazing is how the kernel is more like a file system multiplexer. Its job is to present a file system to each process built from mounting virtual file systems from all sorts of programs and remote machines.

If I want to access files from a remote machine — mount its file system. Want to play my music from my laptop using the speakers connected to my stationary computer — mount its sound card into my device folder. If want to use another machine as a network gateway — I mount its /net.

Even the editor acme has its own file system, which makes writing a script doing something fancy in my editor really easy. The file system gives easy access (read/write) to anything from the currently selected text in each window, to the "menu" at the top (called the tag). And if I write a script, it is executed anywhere in acme by middle clicking its name.

What makes this all work smoothly is that mounted file systems can overlap, and that each process is presented its own name space. This completely removes the need for symbolic links and unix sockets.

Re:Plan 9 from Bell Labs by Dewie on Tuesday December 09, 2014 @01:15PM (#8724505)
> What I find most amazing is how the kernel is more like a file system multiplexer. Its job is to present a file system to each process built from mounting virtual file systems from all sorts of programs and remote machines.

Wow, that sounds really powerful. I've just read a bit about inter-process communication and sharing in Linux, and that seems like much more of a hassle than this.

> Even the editor acme has its own file system, which makes writing a script doing something fancy in my editor really easy. The file system gives easy access (read/write) to anything from the currently selected text in each window, to the "menu" at the top (called the tag). And if I write a script, it is executed anywhere in acme by middle clicking its name.

That sounds like it might be the answer (an answer) to something I've been wondering about: how to let another process - outside the editor - have access to the contents of the editor. Like for example synchronizing the editing/viewing of a file, instead of the outside process only using the file stored on the disk, and reloading whenever the editor saves the file. Could one use the file system of Acme to have another process view for example the file that it is being used to edit, in real time? I'm thinking that something like that might be useful for collaborative editing (at the least, letting one person edit the file while the other person watches the editing, maybe in the same kind of editor but hopefully through whichever editor or program that she wishes to use).

Re:Plan 9 from Bell Labs by black_knight on Wednesday December 10, 2014 @03:14AM (#8728205)
Yes. It sounds very much like you want to checkout Acme (and Plan 9). You can test Acme on other operating systems to get an idea. On Linux (or Mac I think), you can even mount the file system using fuse, or access it using a special program called 9p.

Here is a video of using Acme, and a port of Plan 9 userspace tools to other systems:

• http://research.swtch.com/acme

• http://swtch.com/plan9port

Re:Plan 9 from Bell Labs by donatj on Monday December 08, 2014 @09:46PM (#8720684)
It's more *nix than unix. Everything is a file. UI interaction is done via files. It doesn't cut corners at it - it takes it to the extreme.

It is the logical successor to unix that never took off because unix is "good enough"

Re:Plan 9 from Bell Labs by soong on Tuesday December 09, 2014 @05:59AM (#8722113)
Yes, one can't stress enough how much Plan 9 is not Unix. When Bell Labs eventually gave up on Research Unix and started from scratch they deliberately broke with almost every standard and convention in existence.

The programming language (Plan 9 has its own C dialect), breaking with POSIX, abolishing the process/thread dualism and doing away with the root user just to name a few.

By getting rid of all these inherited liabilities they were able to create a much slicker, much more uniform and most importantly truly network centric OS, which in many aspects (not necessarily in terms of performance) still surpasses modern unix-derived operating systems(you know...the usual suspects). On the other hand the lack of backwards compatibility and the high barrier of entry prevented Plan 9's widespread adoption outside the research community.

On the contrary if we need new functionality today the way to go seems to be piling new layers of abstraction on top of the already overly complex stuff we gatherd over the years until everything becomes an incomprehensible mess of special cases(16 million loc linux kernel, anyone?). That of course is a good ol' tradition, which started when we first fumbled network support into the unix kernel and thereby broke the open-read-write-close interface convention.

To summerize: Plan 9 is not Unix. Thankfully...

Re:Plan 9 from Bell Labs by feld on Monday December 08, 2014 @11:02PM (#8720955)
Lots of interesting concepts that solve security problems like everyone getting their own filesystem namespaces: /tmp looks unique to every user.

Access everything like a local filesystem: ftp, ssh, etc. it's all built-in and just works.

Re:Plan 9 from Bell Labs by maggit on Tuesday December 09, 2014 @06:24AM (#8722180)
Your comparison to OS/2 may be apt. The details are a bit murky for me, but as far as I can tell from Wikipedia[1], OS/2 3.0 was at some point simply renamed to Windows NT, which of course is the underlying technology for Windows as we know it today.

That is; Plan 9 is a research project and it is relevant the way research is relevant: For the future.

[1]: http://en.wikipedia.org/wiki/OS/2

Re:Plan 9 from Bell Labs by twoodfin on Tuesday December 09, 2014 @10:52AM (#8723396)
That's not at all what happened. NT was a completely new OS foundation, unless you think Dave Cutler borrowed pieces of his own VMS work at Digital.

In some alternate Microsoft strategic universe it might have been released as "OS/2 3.0", but it has effectively no inheritance from the OS/2 1.x/2.x/3.x code base.

Re:Plan 9 from Bell Labs by vezzy-fnord on Monday December 08, 2014 @11:32PM (#8721046)
First of all: Plan 9 is not another flavor of nix. If you expect it to be like Unix, you will* have a bad time.

With that said:

* All services are network-enabled file servers speaking a common protocol called 9P.

* UI makes heavy use of mouse chording, is inspired by Oberon and old school Smalltalk environments. Supports seamless interaction through an inter-application messaging mechanism called plumber (e.g. you can write a rule that will make all ISBN numbers in a desktop application automatically act as a hyperlink to a web application).

* The rc shell fixes a lot of deficiencies in the Bourne shell.

* Per-process namespaces obsolete a whole lot of things like symlinks.

* There is no superuser (root account). This is obsoleted by an auth server called Factotum.

* Uses its own compiler suite that makes cross-compilation particularly easy, compared to the mess of doing so with GCC. It also uses its own much cleaner libc routines that are quite distinct from POSIX or the messy glibc additions of today. Has its own thread library, as well.

* All network information is held in a text file database mounted on a file server.

* The default file system (Venti) is inherently versioned, introspectable and has backup built into it. You can do things like swap in libraries from cache and revert changes without a hitch.

* Everything is statically linked.

* Uses mk instead of make.

* A lot of things like recursive copy and find aren't built into the standard commands. It's expected you actually chain together commands instead of reinventing the wheel for every single operation. The canonical example is the use of du to walk the file system tree, for everything. This replaces find and other things.

* Designed not just to be multi-user, but multi-tenant. Makes many uses for containers and access controls unneeded because of its core design.

* So much more.

Try it. It's more relevant now than ever.

Re:Plan 9 from Bell Labs by soong on Tuesday December 09, 2014 @08:13AM (#8722487)
The irony here is, that being statically linked isn't even considered an advantage by many people these days.