I used Plan9 for a while, I had a project going with some other people that involved a lot of distributed access, and Plan9 was pitched as solving a lot of our problems from the start, that we would have to hack around if we used anything else. (I describe the project down below, for the curious.)
The title, "Plan9: why no compelling successor to Unix has gotten of the ground" presumes that Plan9 is better than Unix. Plan9 sucks, and is a waste of your time.
The thesis of this article is that Plan9 was better than Linux, but Linux was good enough no one had a big enough reason to switch to go to the trouble; this fails to take into account that Plan9 was dead before Linux ever got out the door.
One reason for that was the license. For a while it was under some Bell Labs license that no one was sure was "open source" or not. As the Lucent took over the labs, and then had troubles itself, there was a lot of uncertainty about it. At some point the license was changed or clarified or something, and the new license could possibly be interpreted as allowing you to re-license it under the GPL, and there were rumours and hints that Rob Pike or some other iconic figure had told someone the goal of the license was to allow that, but it was obfuscated to get it past corporate lawyers. That didn't inspire confidence.
At one point in my life, I am embarassed to say, my goal was to spend the next year sitting down and reading every single source file in Plan9, putting a GPL or LGPL license on it, and then re-distribute "Plan9-GPL". I was convinced the license allowed it, and I figured that if I did it and was the obvious target for a law suit from Lucent and I was not sued, then Plan9 would take off. One good thing about Plan9 is that the total number of lines of code is low, one person could do that. However, like other powerful computer systems, sometimes there is a lot packed in few lines.
The user interface is worse than TWM. It's main editor basically requires that you constantly have one hand on the mouse and hunt and peck keys with the other hand, as if it was designed by one of those old computer illiterate people who can't type and clutch the mouse in a death grip the entire time they are in front of the computer. Certain people in the Plan9 "community" talk about rio like it is something better than Windows 2.0 or Commodore 64 GEM, and make a lot of jwz-like snarky comments about X, but it isn't.
I suspect the reason for this is that no one actually uses Plan9 on a daily basis. The headers of emails on the 9fans mailing list indicate that everyone except for a few holdouts uses Outlook. I think they edit their files in windows, and copy them to Plan9 via ftp or samba.
I wanted to document how to set up a "node" for our project in painstaking detail. As a result, I repeatedly wipped a disk using dd if=/dev/zero from tom's root boot floppy, and re-installed again. A few weeks into my experimenting, they updated Plan9 and it lost the ability to write the MBR, so I had to fdisk from a linux each time. This remained a bug for nearly two years, causing me to realize that in all probability, no one in the Plan9 developer community was installing any new computers.
That was a shock to me, as I had invested a lot of money in hardware that would run Plan9 (specific video cards and wireless cards, mostly) and a HUGE amount of time. When I saw some poor dude post on the 9fans mailing list 18 months later or whatever wondering why Plan 9 wouldn't boot after a clean disk install, I knew it was dead and that all that time was wasted.
I believe that most instances of Plan9 are currently run in VMWare on Windows desktops. If you are doing operating system research, and operating systems are the interface between application code and hardware, and you need a two layers of closed source between you and the hardware just to get started, you have failed.
It may have once been a framework for some cutting edge experiments in operating systems, and maybe still is. The C compiler it has is fast and nice, at least compared to gcc of the 2002 era or so. If I had some reason to write a C compiler, I would dig up the 9c code and take a look at it, and possibly start there.
I liked a lot of Plan9's ideas, but the whole experience made me appreciate linux a lot more. I don't think that Linux needs to take the best ideas from Plan9, Plan9 needs to steal the mediocre ideas from Linux -- like command completion, how about porting emacs or vi or nano, the basic stuff that allows you to get to working on the cool stuff.
The people involved with Plan9 seem very interested in the interface between application code and the operating system, and less interested in the operating system -- that's why they run Plan9 in Xen on a Linux computer. However, for people interested in that, they don't seem write much code that uses that interaction.
========
P.S.: The project was to make this giant tit-for-tat resources trading system - we were starting with wireless access, so that if a person put up a wireless access point, you could use it only if you had a wireless access point at your house that was also open to the first person to use; next we were going to do offsite storage, so you would make a few gigs available to the system, and get a quota of a few back, but your stuff would be distributed and replicated accross many other people's drives thus resistent to disasters; and then a cpu trading thing similar to folding@home type systems; and so on. There was no business plan, our goal was to change the world not get rich (the participants came out of Austin's Cypherpunks group). We had a lot of excitement and hype going on, and it died due to interpersonal fighting (if you know the Cypherpunks from that time period you know what I'm talking about).
Plan 9 admittedly sucks in many ways. It has limited hardware support,
a weird user interface, and no active community. But also has
redeeming qualities that I miss every day that I have to program on
linux.
In Plan 9 every process has a namespace associated with it that
represents all the resources it has access to. For example, /dev/mouse
represents the mouse in Plan 9. But typically it isn't provided by the
kernel but by the window manager, rio. So when you open rio it opens
the mouse and then provides a new /dev/mouse for each process launched
within it. Every process has a different /dev/mouse that only
activates when the mouse is in that process's window(if it has one).
To draw to the screen there is one function: draw(). You pass it two
rasters and some coordinates and it draws one on top of the
other. That's it. Everything works across networks and architectures.
The thread library is wonderful. Threads in Plan 9 are non-preemptive
and run in a round-robin fashion. They communicate using CSP
channels. CSP can greatly simplify the design of many programs.
In a few of the programs I wrote would access the mouse and keyboard
in seperate threads. You could use the regular open() and read() calls
from each thread and there was no need to worry about locks. When I
wanted something to run on both cpus I forked a process, which is very
cheap.
The text editor, acme, is different and probably sucked for you. But
that is because you misunderstood what it was. In linux and windows
programs are islands. These islands are expected to provide everything
the program does in one executable. Acme is not an island. It does not
have a builtin spell checker or word counter. What it does have is a
namespace that allows you to access its resources.
Plan 9 is a system which was deliberately made by very smart
people. It has serious issues which make it not often a realistic
choice, but it has a clarity and consistency of design that linux will
never know.
Thanks for your insights. I agree that from the point of view of a developer writing complex applications simply, Plan 9 is on the right path. What I read of the cleaner operating system interface is what attracted me to Plan 9 at the start.
I think a lot of the "new" things in programming are also attempts to fill that same need, of a cleaner, simpler interface to the underlying computer. All the "frameworks" out there, Android even, are attempting to clear that tangle of OS interface that has grown up underneath the applications.
However, to have any of the nice design and brain-work come to real usefulness, Plan 9 has to actually address the grundgy parts of the problem. The hardware support must be there -- not for all hardware out there, but you have to get the items that have huge market share and are cheap. The user interface needs to be improved of course, and I think the community is actually pretty active and helpful for it's size -- if other issues were attacked, that would take care of itself.
Thinking over how Plan 9 failed, I am reminded of rms's assertion that there is a GNU operating system, and that there was so much work to do GNU ended up writing everything else except the kernel, and thus GNU is most often used with the Linux kernel from somewhere else. Plan 9 is kind of what an operating system that just has a kernel looks like. They need to copy large parts of GNU as quickly as possible.
I realized what acme was, but I never even attempted any spell-checking or fancy features. I may not have tried hard enough, but I had problems simple placing the cursor where I expected, and simple stuff like that. I never gave it hours uninterrupted learning and experimentation, which is what I did when I decided to become as good at vi as I am with emacs; given the whole Plan 9 system seemed dead, it didn't seem worth it.
If I had infinite money and were dictator of the world and etc, here is what I would do to make Plan 9 happen:
-- Make sure that the cheapest Dell laptop had complete hardware support. Note that this is something that Linux often fails at, and even Windows has problems in this area.
-- Re-license it under the GPL (maybe BSD) licenses. If that is not allowed under the current license, it is conceivable that a small number of smart people could re-write it in a year, using the Lucent as a template, and possibly improving certain areas as they went. Even if they tossed the hard features, once a self-hosting, working, useable system was available under the GPL, a larger community could re-address the problem areas.
Ha, I agree with you, really. Reality is crufty and getting things done involves compromise.
Still, I think there is value in studying other ways of doing things. For example, my studies of Plan 9 introduced me to CSP, erlang style concurrency, which is a great way to structure some types of programs.
And don't forget that some problems can only be solved by introducing simplicity at some level. For example, google achieved high levels of reliability and scalability by using a simpler computational model: map-reduce.
It looks like your assessment of Plan 9 is the same as Rob Pike's: the effort (and impact) of making an OS actually work (drivers, usable GUI, etc.) totally overshadows the effort (and impact) of implementing better abstractions.
That sounds pretty much like why PHP won; the effort of making a programming language work (ie the standard library) overshadows the effort of implementing better abstractions.
The title, "Plan9: why no compelling successor to Unix has gotten of the ground" presumes that Plan9 is better than Unix. Plan9 sucks, and is a waste of your time.
The thesis of this article is that Plan9 was better than Linux, but Linux was good enough no one had a big enough reason to switch to go to the trouble; this fails to take into account that Plan9 was dead before Linux ever got out the door.
One reason for that was the license. For a while it was under some Bell Labs license that no one was sure was "open source" or not. As the Lucent took over the labs, and then had troubles itself, there was a lot of uncertainty about it. At some point the license was changed or clarified or something, and the new license could possibly be interpreted as allowing you to re-license it under the GPL, and there were rumours and hints that Rob Pike or some other iconic figure had told someone the goal of the license was to allow that, but it was obfuscated to get it past corporate lawyers. That didn't inspire confidence.
At one point in my life, I am embarassed to say, my goal was to spend the next year sitting down and reading every single source file in Plan9, putting a GPL or LGPL license on it, and then re-distribute "Plan9-GPL". I was convinced the license allowed it, and I figured that if I did it and was the obvious target for a law suit from Lucent and I was not sued, then Plan9 would take off. One good thing about Plan9 is that the total number of lines of code is low, one person could do that. However, like other powerful computer systems, sometimes there is a lot packed in few lines.
The user interface is worse than TWM. It's main editor basically requires that you constantly have one hand on the mouse and hunt and peck keys with the other hand, as if it was designed by one of those old computer illiterate people who can't type and clutch the mouse in a death grip the entire time they are in front of the computer. Certain people in the Plan9 "community" talk about rio like it is something better than Windows 2.0 or Commodore 64 GEM, and make a lot of jwz-like snarky comments about X, but it isn't.
I suspect the reason for this is that no one actually uses Plan9 on a daily basis. The headers of emails on the 9fans mailing list indicate that everyone except for a few holdouts uses Outlook. I think they edit their files in windows, and copy them to Plan9 via ftp or samba.
I wanted to document how to set up a "node" for our project in painstaking detail. As a result, I repeatedly wipped a disk using dd if=/dev/zero from tom's root boot floppy, and re-installed again. A few weeks into my experimenting, they updated Plan9 and it lost the ability to write the MBR, so I had to fdisk from a linux each time. This remained a bug for nearly two years, causing me to realize that in all probability, no one in the Plan9 developer community was installing any new computers.
That was a shock to me, as I had invested a lot of money in hardware that would run Plan9 (specific video cards and wireless cards, mostly) and a HUGE amount of time. When I saw some poor dude post on the 9fans mailing list 18 months later or whatever wondering why Plan 9 wouldn't boot after a clean disk install, I knew it was dead and that all that time was wasted.
I believe that most instances of Plan9 are currently run in VMWare on Windows desktops. If you are doing operating system research, and operating systems are the interface between application code and hardware, and you need a two layers of closed source between you and the hardware just to get started, you have failed.
It may have once been a framework for some cutting edge experiments in operating systems, and maybe still is. The C compiler it has is fast and nice, at least compared to gcc of the 2002 era or so. If I had some reason to write a C compiler, I would dig up the 9c code and take a look at it, and possibly start there.
I liked a lot of Plan9's ideas, but the whole experience made me appreciate linux a lot more. I don't think that Linux needs to take the best ideas from Plan9, Plan9 needs to steal the mediocre ideas from Linux -- like command completion, how about porting emacs or vi or nano, the basic stuff that allows you to get to working on the cool stuff.
The people involved with Plan9 seem very interested in the interface between application code and the operating system, and less interested in the operating system -- that's why they run Plan9 in Xen on a Linux computer. However, for people interested in that, they don't seem write much code that uses that interaction.
========
P.S.: The project was to make this giant tit-for-tat resources trading system - we were starting with wireless access, so that if a person put up a wireless access point, you could use it only if you had a wireless access point at your house that was also open to the first person to use; next we were going to do offsite storage, so you would make a few gigs available to the system, and get a quota of a few back, but your stuff would be distributed and replicated accross many other people's drives thus resistent to disasters; and then a cpu trading thing similar to folding@home type systems; and so on. There was no business plan, our goal was to change the world not get rich (the participants came out of Austin's Cypherpunks group). We had a lot of excitement and hype going on, and it died due to interpersonal fighting (if you know the Cypherpunks from that time period you know what I'm talking about).