
The Unix spirit set free: Plan 9 from Bell Labs (2006) [pdf] - wtbob
http://docs.huihoo.com/plan9/Plan9.pdf
======
pmoriarty
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.

~~~
frik
Windows 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.asp...](http://technet.microsoft.com/en-
us/sysinternals/bb896657.aspx) (best with admin privileges)

~~~
laumars
NT 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
The 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/aa36...](http://msdn.microsoft.com/en-
us/library/windows/desktop/aa365247\(v=vs.85\).aspx)

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/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)

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/aa36...](http://msdn.microsoft.com/en-
us/library/windows/desktop/aa365468\(v=vs.85\).aspx) ), 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).

------
pohl
This makes me wonder: imagine ten years from now, when Rust is a mature
systems language (or some other language shooting for safety sans GC that
arises in the meantime) and the open source community – tired of dragging
around C/C++ security issues – decides to rally around an open source
operating system all over again...what's more likely, that we'll just
reimplement UNIX all over again for the umpteenth time (but in a safer systems
language) or that we'll actually aspire to something better?

My money is on the former.

------
username42
I love the slide where plan9 is compared to Linux (37 syscalls, 148,787 lines
of code).

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.

~~~
calvin_
are you sure you even get Plan 9? the point is to avoid bloatmonsters like LO
and most browsers, with smaller alternatives that work well with the team of
the core utilities.

drivers are a given though. i'm not sure what their philosophy on
virtualization is though.

~~~
freehunter
I don't think it's too unreasonable to wish for a Plan9 that could be usable
on the desktop. Why let such a cool system go to waste?

~~~
p9idf
It's completely unreasonable. Why would someone want to waste a bunch of their
time and money writing word processors and web browsers to win a pointless
popularity contest? What would a word processor or web browser on Plan 9
enable you to do that you can't do already on Windows? Mass appeal is not the
only way to evaluate the merits of a computer operating system, and Plan 9
isn't going to go to waste because it wasn't the most popular way to watch
Youtube videos and write TPS reports.

~~~
angersock
_writing word processors and web browsers to win a pointless popularity
contest_

Get off your high horse.

Nobody will give two shits about your toy operating system if it consistently
fails to be useful for day-to-day work.

(Which is a shame, because P9 is quite cool.)

~~~
p9idf
This discussion is becoming a little uncivil, but I'll try to stay on-track.

"Nobody will [care] about your [...] operating system if it consistently fails
to be useful for day-to-day work."

Nobody except those who already find it useful for their day-to-day work, some
of whom have already explained the system's utility to them in this thread.
Only if you think popularity is the only way to judge the utility of a
computer operating system can you so easily dismiss such a large and
influential body of work.

I posed a question earlier which you didn't address, and if you think chasing
after mass appeal isn't pointless you should have an answer for: What would a
word processor or web browser on Plan 9 (which everyone here seems to agree is
cool) enable you to do that you can't already do elsewhere?

~~~
smorrow
You're the only one that thinks anyone is talking about popularity. The fact
is that if you had something similar to a word processor (for example)
natively on Plan 9, you'd be able to read and write rich text, and still have
it be in the idiom of Plan 9, the plumber, chords, tools, etc. and not have to
switch over to the other OS.

It's totally possible to have a (for this example) word processor without
having to have icons, nested menus, clippy, bloat, or whatever it is that
you're objecting to.

~~~
p9idf
I'm not objecting to bloat or Clippies or any of that other stuff. I'm
objecting to this frame of mind that people have which laments the lack of web
browsers, has no interest or intent to write one themselves, but then wonders
why no one has spontaneously written one for them free of charge, and then
decides Plan 9 is a waste or non-starter on account of it. I don't mind if
someone decides Plan 9 sucks† or isn't right for them, but the logic some
people in this thread have used to arrive at that conclusion is unreasonable.
There's no money in it, and the marginal utility of a word processor on Plan 9
over a word processor on Windows is evidently negligible enough that no one
has taken a personal interest in writing one for themselves.

All of the features fantasized about in this thread you could write yourself
if you wanted to and had the time and money. If the person lamenting the lack
of a spreadsheet program lacks either the time or money or interest to write
it, it shouldn't be much surprise that everyone else lacks them too. It is
unreasonable to dismiss a system because no uncommonly charitable programmer
has donated their time to write programs that they don't personally need or
get paid for. Toilets are valuable enough that people pay plumbers to put them
in their houses so they don't have to piss on their mattresses, but apparently
no one can think of anything valuable enough about a Plan 9 word processor
that they would be willing to do anything that would make it a reality.

Really none of this is specific to Plan 9 or even to computers. Maybe I should
have bit my tongue, rolled my eyes, and kept quiet like I normally do.

† It does.

~~~
angersock
Plan 9 doesn't seem to have any compelling articulated arguments for any use
cases that make it worth looking at beyond mere academic interest.

If we want to look at it from a non-academic standpoint, the lack of these
tools makes it unpleasant, and the lack of use cases makes it seem a waste of
time to investigate.

The argument of "If you want these features, write them yourself" is not
wrong, but it ain't winning any friends either.

A simple thing that the Plan 9 fans could do would be to explain what cases
would justify picking it over some other *nix--that alone might be enough to
get some of us busier programmers to justify sinking our (small) free time
into adding stuff to it.

~~~
p9idf
I guess I didn't explain my popularity contest arguments from earlier very
well because since this is where all Plan 9 discussions end up, I took it for
granted, but this winning friends and evangelizing stuff is what I was talking
about.

Among programmers, Plan 9 is not so obscure. Anyone with an interest in
programming something besides a commodity system has stumbled across it or
seen it mentioned somewhere. Plan 9 was built to be practical and its authors
wrote about its practical advantages at length, so anyone who cares can just
go to the web site and read about it. Anyone who wants or has an interest in
what Plan 9 offers already has everything they need.

Instead of telling people what they either don't care about or already know,
I'd rather spend my own time writing my own programs. Unless someone is waving
dollar bills in front of my face, I have no interest in convincing people that
they should use a research operating system that doesn't fit their needs so
they can write programs for it to fit their needs. Unless I'm getting paid or
feeling uncharacteristically generous with my time, I'm not going to take too
close an interest with what other people do with their computers.

~~~
angersock
So, I'll be more blunt:

For a system that is supposed to be so pragmatic and practical, it seems quite
odd that there isn't a list of reasons to use it in production or a list of
people using it for actual business.

I'm going to call bullshit on Plan 9 as a practical operating system without
at least one of those pieces of information.

I know of at least one company (name escapes me) that uses the 9P format for
practical communication and file work. I know of nobody (none) using either
Inferno or Plan 9 as a system, unless you count a sad effort by /g/ or a few
loons on IRC.

It's not simply enough to talk about namespaces, or simplicity of porting
things, or the awesomeness of the everything-is-a-file-no-really-we-mean-it-
this-time, unless you tie that back into the real world and show how it is a
clear improvement over the existing tech.

That nobody has done this, and that nobody cares enough to evangelize it,
means that the Plan 9 community will be nothing more than an interesting
footnote until it is forgotten entirely.

~~~
p9idf
You were blunt enough the first time. I don't care what you do on your
computer. I can continue happily writing programs after you've forgotten about
Plan 9. If people stop nagging me to write them a stupid web browser, and I
stop nagging people to use my stupid toy operating system, everyone can be
happy that way.

------
matthewbauer
Does anyone on HN use Plan 9 for day to day coding? I've been wanting to hear
practical experience with Plan 9 - likes, dislikes, etc.

~~~
RBerenguel
I've used Acme for long stretches for go programming. But native Plan9 (or VM
P9) just lacks too many of the tools I use regularly, pity.

~~~
zura
I'm always interested to hear opinions from Acme/Sam users. While these
"editors" have some unique features, don't you find annoying the lack of basic
code completion and syntax highlighting?

~~~
dexen
Not really.

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.

~~~
fmoralesc
> Don't you find annoying the lack of quick access to
> search/navigate/execute/copy-paste mechanics via mouse click?

Yes, which is why I've written some acme emulation for vim _twice_.
(Incidentally, I was working on that yesterday before this link was posted:
[https://github.com/fmoralesc/plan9-for-
vimspace](https://github.com/fmoralesc/plan9-for-vimspace) I have to improve
the button 2 functionality, and chords are still not supported, but I'm on it.
A plumbing system is planned, although I'm not sure if its best to reuse
plan9port's plumber or reimplement it.)

> In Acme, all text is hypertext.

Exactly. Which is why, even though I am a serious vim junkie, I love acme so
much.

~~~
vdm
nice work. it would also be cool to use acme window management heuristics for
splits, maybe even for tmux.

~~~
fmoralesc
I'll improve them, at least for the supported actions. The problem I have is
vim doesn't keep track of the windows layout, afaict.

------
fhs
Here is the video of the presentation:
[https://www.youtube.com/watch?v=VJSlvoUFkBA](https://www.youtube.com/watch?v=VJSlvoUFkBA)

------
reirob
Very interesting read and very intriguing. I would be very interested to see
what happened since 2006. On [1] you can see that there have been 7 workshops
since.

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/](http://iwp9.org/)

------
justin66
Some guy: _Yes, you really want to use a 3 button mouse._

Approximately everyone else in the entire world: _No, we don 't._

------
0xdeadbeefbabe
plan9 tools are available on linux with plan9 from user space[0]. Does this go
without saying? Why hasn't anyone mentioned it.

[0] [http://swtch.com/plan9port/](http://swtch.com/plan9port/)

------
frik
_Plan 9_ and its successor/spin-off _Inferno_ are both in active development.

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?249033](http://www.osnews.com/thread?249033)

Inferno repo: [https://code.google.com/p/inferno-
os/source/list](https://code.google.com/p/inferno-os/source/list) (latest
commit May 25, 2014);
[http://en.wikipedia.org/wiki/Inferno_(operating_system)](http://en.wikipedia.org/wiki/Inferno_\(operating_system\))

Plan 9 repo: [http://plan9.bell-labs.com/sources/](http://plan9.bell-
labs.com/sources/) (latest commit May 26, 2014);
[http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs](http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs)

~~~
angersock
Anyone know why they picked one system over the other?

------
guard-of-terra
Be careful: the last time a spirit was left walking freely, it caused quite a
mess.

------
guard-of-terra
Btw, I always considered Plan 9's mascot to be middle-aged and with creepy
mustache. Kind of like Larry Wall.

I imagine this mascot reflects the developer demographic, but compared to
common mascots it's a bit raw.

~~~
enneff
Out of interest: compared to which other mascots?

~~~
guard-of-terra
KDE dragon, Tux, FreeBSD demon (old one).

~~~
icantthinkofone
The FreeBSD mascot is the best one out there.

