From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 9 Jun 2006 12:17:51 -0700 From: Roman Shaposhnick To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] gcc on plan9 Message-ID: <20060609191751.GE1693@submarine> References: <70EC82CA-FDA3-46E6-94B0-AB25939C375F@telus.net> <3e1162e60606080751k6435daebs943d094b338b21f8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <3e1162e60606080751k6435daebs943d094b338b21f8@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Topicbox-Message-UUID: 6496d7bc-ead1-11e9-9d60-3106f5b1d025 On Thu, Jun 08, 2006 at 07:51:32AM -0700, David Leimbach wrote: > I know people who think files should be for files, and that's it. > That abstracting the filesystem to mean anything else is almost as bad > as overloading operators in C++. I disagree strongly! In fact when I was in Madrid we had a very nice conversation with Nemo during which he managed to put in words things I've long felt but was never able to pinpoint. Mainly, why such thing as abstracting everything as file makes *lots* of sense. Its rather simple, really, as an application developer my ideal world would be the one where I can reuse useful components/services literally in a manner of LEGO bricks. The world where a component that gives me a "binary editor" capability would be equally easily accessible from my debugger, my editor, the application I use to edit fonts, etc. Ideally I shouldn't even care about where component resides or what language/infrastructure it is implemented in. A SOA of sorts. Do we live in an ideal world ? Not really, but a before I state why Plan 9 comes as close to it as one would hope to get, lets look at some of the "proposed" solutions to this universal reusability problem. Java comes to mind right away. Its widespread and it abstracts you sufficiently enough from the outside world, so that you don't have to care how to create threads or windows -- its all part of the grandure API. It also provides the level of reusability I've mentioned via [Net]Beans and such. However, the unbelievably high price you have to pay for this is that you absolutely have to remain in Java's world. Both from an VM and from an API standpoint. Suppose I even have that binary editor module coded as a [Net]Bean and it works fine in that framework, but can I get to it from my favorite editor ? From my favorite debugger ? From a command line prompt ? No! I have to use Java and Java alone to "glue" this piece of functionality to the rest of my working environment. It is sort of like having LEGO bricks which not only do not stick to each other if you put 'em together, but require a particular brand of glue to form any sort of complex structure. The glue called Java in my previous example, or the glue called C language, or what not... Now, the question becomes is it even possible to have anything at all which would let my LEGO bricks just stick together ? My answer is -- yes and it is called files! Files are my true universal glue, the lowest common denominator of sorts, the one and only API present in absolutely *all* common programming languages and systems. It takes a bit of time to realize just how far the lack of files as a universal glues pushed various developers. Do you know that when you do "getline a < /inet/tcp/lport/rhost/rport" in (g)awk the right thing happens ? Do you realize how much extra code was duplicated and how many bugs were reintroduced ? Same question about all these jolly Java APIs -- sure its fun to reinvent the wheel, but you should at least start from wood, not from carbon molecules... > For some, ignorance really is bliss. And never needing to touch the > shell and still be productive is actually a dream come true. In a world where vendors actually listen to their customers that would be a true statement, but I'm yet to see a system where I don't have to tweak things so that they feel right. Thanks, Roman.