TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Plan 9: The way the future was

197 pointsby niyazpkover 13 years ago

16 comments

jbarhamover 13 years ago
Unsurprisingly given the common pedigree, a number of ideas from Plan 9 have made their way into Go. E.g., compare <a href="http://golang.org/pkg/net/#Dial" rel="nofollow">http://golang.org/pkg/net/#Dial</a> and <a href="http://plan9.bell-labs.com/magic/man2html/2/dial" rel="nofollow">http://plan9.bell-labs.com/magic/man2html/2/dial</a>.<p>Go's approach to concurrency is familiar in the Plan 9 world from Alef (<a href="http://en.wikipedia.org/wiki/Alef_(programming_language)" rel="nofollow">http://en.wikipedia.org/wiki/Alef_(programming_language)</a>, <a href="http://swtch.com/~rsc/thread/alef.pdf" rel="nofollow">http://swtch.com/~rsc/thread/alef.pdf</a>) and Limbo (<a href="http://www.vitanuova.com/inferno/papers/limbo.html" rel="nofollow">http://www.vitanuova.com/inferno/papers/limbo.html</a>), the language used to implement Inferno, a Plan 9 spinoff.
评论 #3537541 未加载
habermanover 13 years ago
Am I the only one who doesn't get excited about the idea of absolutely everything being a file?<p>People seem to like the idea of being able to say things like "cat file.wav &#62; /dev/dsp". But a sound card is a complex thing that can be configured in umpteen different ways; what if the file has a different sample rate than the card is currently running at? Even if you gerry-rigged a kernel driver that could handle this case (by, for example, noticing when the file had been open()'d and expecting the next bytes to be a WAV header, which it uses to reconfigure the card), you're left with something that doesn't have even the most basic functionality that you'd expect from a sound player; for example, "pause."<p>So what has representing /dev/dsp as a file really bought you? It doesn't help you know what devices are available, because there's tons of crap in /dev that doesn't necessarily have a kernel driver loaded for it. It's not that useful as an end-user interface for selecting a sound card, because users don't want to choose between /dev/dsp and /dev/dsp2, they want to see nice names like "Internal Speaker" or "Apogee Duet."<p>Files give you a simple API for lots of common operations, which is nice, but the fact that all files are not created equal means that operations sometimes don't work like you expect. For example, how would you guess that "tail -f" is implemented? If you're like me, you would have expected that it works by calling poll/select/etc. and waiting for the file to become read-ready. But this approach doesn't actually work for monitoring growing files; the select() will just return immediately with read-ready even if you're at EOF. So what "tail -f" actually does is a loop that alternates between sleep() and fstat(). I'm serious! <a href="http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/tail.c;h=29ddabd62c650c4b0c9ed9b52bb3270e25f1bb90;hb=02551d8a62d84b8788a8793de121c2f1e5212d63#l1071" rel="nofollow">http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f...</a>
评论 #3537514 未加载
评论 #3537503 未加载
评论 #3537877 未加载
评论 #3537590 未加载
评论 #3538068 未加载
评论 #3537509 未加载
评论 #3539212 未加载
评论 #3537753 未加载
评论 #3537751 未加载
thristianover 13 years ago
The impression I got was that the guys behind Unix were annoyed when their operating-systems research was stalled in the name of "API compatibility", so they started Plan 9 and actively resisted commercialisation for as long as possible (for example, they gave it the least marketable name they could think of).<p>There's so many interesting ideas in Plan 9, I'm occasionally tempted to install it and try it out... but then I read things like the list of keyboard shortcuts in the standard editor acme¹, and I get cold feet.<p>¹: <a href="http://acme.cat-v.org/keyboard" rel="nofollow">http://acme.cat-v.org/keyboard</a> - in particular, note that there are no keyboard shortcuts for 'move the cursor to the next/previous line'. Think about <i>that</i>.
评论 #3537408 未加载
评论 #3539478 未加载
评论 #3540130 未加载
pavpanchekhaover 13 years ago
First, one should note that this is a chapter (or section) of "The Art of Unix Programming", by esr; it is a fantastic book (I'm going through it now, on chapter 9 of 20, and the wisdom has been near-palpable).<p>As for the specifics of the article. Plan 9 did indeed do many things right; in fact, many things are done in a very Unixy way. For example, the networking stack is build precisely where it ought to be: as a detail below a powerful network protocol (9P) which can be made as transparent or concrete as necessary (one can easily write individual TCP or UDP packets using the file system; just as easily, you can network-export any file system).<p>Similarly, Plan 9's handling of security, in particular the elimination of the superuser, was fantastic. And while I in particular disagree with the approach Plan 9 takes to the GUI, it is certainly a consistent, powerful, and inspired model. And a variety of its other ideas, such as UTF-8 and the /proc and /sys file systems, have worked their way into modern Unixes such as Linux.<p>Now, Plan 9's failure has been aptly explained elsewhere, in particular in the article linked. But, being somewhat old (2004, I believe; though when that particular section was written I do not know), it makes the prediction that Unixes will eventually come to absorb all of the Plan 9 features. Instead, it looks like the Linux kernel, at least, has mostly given up on ever implementing union mounts (one of the most inspired of Plan 9's innovations, at least in my view). And while the /net file system is incredibly useful, its power is much diminished when you can't assume that the world speaks 9P, which will seemingly never be the case. And a variety of Plan 9's choices are impossible without ignoring POSIX compatibility, which causes problems of its own.<p>Unix rode the growth of servers in the seventies and eighties, and is by now rather entrenched (see the History chapter in Art of Unix Programming); much like the WIMP GUI metaphor rode the personal computing wave. I think both of these areas are by now too old and entrenched for us to simply replace the current monopolies there. And I've come to terms with the fact that Plan 9 will never, ever become the standard OS --- it is simply not designed for any battlegrounds except those it has already lost in. But I strongly urge anyone designing an OS (or, really, any sort of all-encompassing computer system) to look over the innovations and ideas of Plan 9. Luckily, I don't think anything like Windows or Unix will win in a totally new environment, because Windows and Unix aren't made for any environments but their own. So while Plan 9 never won, I think its ideas have a good chance of living on. And I await an exciting time of innovation in Operating Systems in the coming century.
评论 #3537367 未加载
评论 #3538024 未加载
shimon_eover 13 years ago
The real shame is that inferno never became android. It was around early enough. Had the right feature set. I guess it was not in Google's backyard (America) and had lost it's backbone a little to early.<p>I guess when Google was shopping for mobile OS they were also looking for a talent grab. With Inferno by 2005 most had already left.
评论 #3538147 未加载
评论 #3539660 未加载
gioeleover 13 years ago
Plan 9 was and is too good to be ignored. Indeed many of its features are now a must in Linux systems (for example good support for private namespaces) and the p9fs, designed to be virtualizable and distributed, is getting serious traction in the virtualization world (see 9p virtio).<p>And Plan 9 also has the best mascot around!
评论 #3537900 未加载
mhwover 13 years ago
I've often thought that Plan 9's everything-is-a-file system with a consistent API for access is the missing link between Unix's everything-is-a-file and REST's consistent interface constraint. I think it's certainly arguable that Plan 9 shares many features with RESTful architectures.
rbanffyover 13 years ago
This need updating. "The Room", a film that came after the article was written, is obviously worse than either "Manos" or "Plan 9", as anyone who saw even its first minutes will readily attest.<p>edit: I'm sorry. I often forget my colleagues are humourless at this time in the morning.
评论 #3539054 未加载
runjakeover 13 years ago
Plan 9 wasn't a failure and it wasn't the future, directly.<p>It was a research OS that was never even close to being positioned to market, be it consumers, servers, etc -- although technology coming out of Plan 9 did make it into some commercial applications.<p>Indirectly, Plan 9 technologies (or inspired successors) made their way into real products. Linux's procfs is one notable example.
wladimirover 13 years ago
It seems that (almost?) everything that was planned out for plan9 is finding its way into operating systems.<p>The ideas were good, but somehow they had to take the long way around. It was way ahead of its time.
评论 #3537337 未加载
mhdover 13 years ago
I always find it pretty sad that while everybody speaks about the integrated environments of Smalltalk and Plan 9, Niklaus Wirth's Oberon is almost left forgotten…
评论 #3539419 未加载
评论 #3538860 未加载
gosubover 13 years ago
<p><pre><code> &#62; There is a lesson here for ambitious system architects: the &#62; most dangerous enemy of a better solution is an existing &#62; codebase that is just good enough. </code></pre> Isn't this concept applicable to every system once it incorporates programmability?
6renover 13 years ago
Ugly now beats beautiful later.<p>An elegant solution requires a deep understanding of a problem, and that understanding takes a lot of data (awareness of cases), and then a lot of time and effort to create a simple theory of it and to create a simple solution embodying that theory.
评论 #3538710 未加载
morphlesover 13 years ago
I recently tried plan 9 for a bit. Though i understand all the cool things it does and agree with a lot of it. One thing really disappointed and struck me as totally brain dead: there is no such thing as terminal emulator or it seems something like text only mode. In general it seems to me that achieving keyboard only control (that is comfortable to use) is not really possible at least for now.
angliover 13 years ago
A good introduction to the Plan 9 UI I found, for any who are interested: <a href="http://vimeo.com/7748726" rel="nofollow">http://vimeo.com/7748726</a>
Craiggybearover 13 years ago
"Those who don't understand UNIX are condemned to reinvent it. Poorly." – Henry Spencer
评论 #3538849 未加载