Programming Languages Will Become OSes
Anonymous Coward writes "A couple of months ago, at the Lightweight Languages Workshop 2002, Matthew Flat made a premise in his talk: Operating systems and programming languages are the same thing (at least 'mathematically speaking'). I find this interesting and has a lot of truth in it. Both OS and PL are platforms on which other programs run. Both are virtualizing machines. Both make it easier for people to write applications (by providing API, abstractions, frameworks, etc.)"
Already happened: Microsoft BASIC ==> Microsoft Windows
Just remember the past. Oberon was an OS an a PL at the same time and I think most of the readers didn't ever heard about it...
If you use Emacs, you have a programming language, OS, and editor all in one happy package.
I can't say that I don't give a fuck. I've just run out of fuck to give.
... the home computers of the early '80s didn't really have OSes, they had programming languages. You'd boot a BBC Micro and it would fire up into BBC Basic - with a few * commands for file system manipulation. Or you'd boot a Spectrum and you'd get the same: the name of the system and a prompt to begin typing your program.
Real Daleks don't climb stairs - they level the building.
A single machine could have multiple languages co-existing for different tasks. Some of these tasks require quick and dirty scripting, some require high performance and some other application programs might concentrate on object oriented features and such.
The operating system, on the other hand, is typically only one per machine and performance and stability might be the major considerations (other than compatibility with the popular applications around!)
All your favorite sites in one place!
I guess Mr. Flat (what a name!) hasn't ever heard of the LISP Machine..
I though web browsers and OSes were the same thing.
-Peter
OSes and programming languages have some superficial features in common, but they are totally different concepts. This is so manifestly obvious that I'm not even sure how to argue the point.
However, Mr. Flat's suggestion that languages need better isolation capabilities is a good one. It all goes back to Fred Brooks' point that one in ten programmers is a superstar. I think isolation facilities in a programming language allow the superstar to set the rules that the other nine programmers must follow, making the system more coherent by the guidance of one mind.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
FORTH was and still is such a combination. It's compact, easy to implement and incredibly fast and felxible.
Stick Men
Microsoft is always pretty quick to recognize new products that could threaten windows dominance. In some ways platform independent languages (most scripting languages, Smalltalk, Java) already implement their own OS on top of the OS they're already running on.
For one the wall between OS space and user space is there for a good reason (security) and second different people like to use different languages, and you'll lose a good part of your developers by forcing them into the straightjacket of a single language for a certain os.
it's been tried before (smalltalk, java) and failed, for these and a whole bunch of other reasons.
MP3 Search Engine
Actually you see this reflected in modern systems designs such as Cocoa/OC or Java. They are in themselves virtualized operating systems. Adding classes in these adds reusable functionality to the overall system, much like adding functions in Lisp adds functionality to the system.
Like java... I think a likely evolution will be towards a single VM that runs all your programs instead of the one VM per app generally used now. More and more of the process switching and memory management will be built into the VM's probably to the point one day where java VM's become operating systems in their own right and only need the underlying OS for drivers to talk to the hardware.
C OS - Every single task you want to achieve has to be split into fifty bite size actions.
COBOL OS - The literati's dream OS! No longer must you click and drag, but instead type bizarrely syntaxed English to do your work! PROGRAM OPEN CALCULATOR AS NEW PROGRAM
Perl OS - An open source OS worked on by a bunch of extremely crazy (but clever) bearded anoraks. You can do EVERYTHING in one click or one line of code. Oh, face it, it's just the future of Linux.
PHP OS - This OS was originally the shell for Perl OS, but some wimps who couldn't work out the Perl way of doing things decided to turn it into their own 'paint by numbers' OS. Unfortunately you can only access the Internet with PHP OS, no off-line facilities are available.
C++ OS - A simple upgrade to C OS. Still just as complicated, but the ++ makes it cooler to use and adds a host of useless features that are non standard across all implementations. Besides, C OS is for old fogeys.
Python OS - Supposedly this exists, but since no-one cares, we won't go into it.
Ruby OS - EVERYTHING is an object. Want to open your calculator app? calculator.open; please. Need to enter some numbers? calculator.buttons[8].press; It's long, tedious, but at least it makes logical sense.
BASIC OS - Joe six pack's answer to operating systems. This is Microsoft XP in the future. Anything can be done with point and click, but it's slow, crashes a lot, and is totally lame. Oh, I'm already talking about XP here aren't I?
mogorific carpentry experiments
If any programming language/framework has a chance it will become an OS it is .NET.
And Java is half an OS already, it has its own threading moodel, has memory management etc. Though frankly I believe this paradigm of PLs becoming OSes will be first be seen on handhelds etc. Note that many Cellphones run Java etc. (though now sybian is more commoon).
.ACMD setaloiv siht gnidaeR
...the partitioning of computer environments into applications, OS, "drivers," "libraries," etc. etc. is arbitrary, cultural, traditional, etc. To some extent it's also based on modularity considerations, and to some extent on marketing/commercial considerations. There's no fundamental logic to "the way things are."
A few decades ago, MANY environments blurred the distinction between OS and language: FORTH, MUMPS, SMALLTALK, and, indeed, most early versions of BASIC, to name four.
The traditional textbook discussion of an OS ("provides four interfaces, to the filesystem, to devices, to applications, and to users") is just a discussion of what IBM evolved in the sixties or thereabouts.
Incidentally, the very name "operating system" indicates the original rationale and function of these pieces of software. They were intended to automate the functions that previously required the manual services of an "operator," thus increasing utilization and decreasing payroll.
Another example of the arbitrariness of the term "OS" is the way in which various applications programs are now considered to somehow be part of the OS. In Digital's glory days, these were sometimes referred to as "CUSPS"--Commonly Used System Programs. Is grep "part" of UNIX? Is Windows Explorer (not Internet Explorer, but Windows Explorer--the application that displays directory contents and that "start" button at the bottom of your screen--Windows' graphical "shell") part of Windows?
At one point Apple said Hypercard was "systems software." Perhaps iTunes is "part of" OS X?
"How to Do Nothing," kids activities, back in print!
It so happens that I know a bit about Smalltalk so perhaps I can help a little.
Smalltalk was originally the entire system on the original hardware. Indeed, Dan Ingalls said back then (paraphrasing, I don't have the exact quote handy) "An operating system is a collection of things that don't fit into a programming language. There shouldn't be one".
The reality of commercial machines caused those of us interested in using Smalltalk to accept the limitations (and it must be said, benefits) of OSs. Even so, there have been several occasions where an attempt has be made to use Smalltalk as the entire system: the Active Book and the Momenta machines for example and more recently the Interval Research MediaPad (where the RTOS was written in Smalltalk).
These days I'd be inclined to 'soften' Dan's statement to something like "An OS is a collection of things underneath the language. There shouldn't be any way to tell the difference". That is to say, the language ought to be able to make full use of anything available without having to burden the programmer with wierd crap.
Systems architecture (and to a certain extent application architecture) revolves around creating "environments" where other applications operate, (note emphasis). Architectures provide services to these applications, which in turn may provide different services to yet more applications (components, web-based solutions, etc.). Thus you can argue that by sitting down and designing and implementing a specific or generic purpose architecture, you're creating a "mini-OS". That much is true. But the OS is simply a lower-level architecture than, say, Java or COM or .NET. It's a more complicated and extensive one, but one nonetheless. The stuff you do with a programming language (or as they like to be called these days - platforms) is essentially a higher-level abstraction than the real OS happens to be.
So we can argue then that we're moving towards the platform concept where things are interconnected via well-defined interfaces and entry points (that's your APIs) where the OS itself is just another component.
Take a look at SavaJe. It is a JVM that is also an OS.
The truly wise path to go is to define an OS/bytecode combination, so that (in a very LISP-like way) security is accomplished by "thought-controlling" programs rather than action-controlling (the MS/Linux model).
What I want to know is this: Is the LISP bytecode the best, or should a more modern one be used? JavaVM?
The best attempt at isolation at the language level is probably Java. The internal security architecture is rather complicated. And even after half a dozen years, Java still does not provide anything like "ulimit" and I wouldn't trust it to isolate arbitrary code within the same VM.
I see alot of people getting upset at Mathhew without having read the article. For them, and for those who are reading in diagonal, I'll summarise the important point here.
At LL2 Matthew Flat posed that, while OS's and programming languages both support application development, by providing libraries of function calls, their difference in focus fundamentaly sets them appart. OS's focus on isolation of code, for security and for stability. Programming languages focus on cooperation, and try to maximize code reuse and efficiency.
Basicaly, OS hacker and the PL hacker have alot to learn from each each other. They would win at from cross-pollination between the two fields. Matthew then proceeded to show his implementation of what operating system concepts would look like in a programming language, by demoing DrScheme, a programming environment which can run (and debug) itself recursively.
This post was compiled with `% gec -O`. email me if you need the sources
Java OS - True object orientation meets platform-independent code. Boot once, run it on anything. However, it takes 10 seconds alone to start each application's virtual machine. Early benchmarks indicate cold program starts of the Mozilla browser approaching the 60 minute mark on a dual Pentium system. Future benchmarks are planned and will be measured using a sun dial.
Reply or e-mail; don't vaguely moderate. Ex-O'Reilly/MIT employee, now a full-time Google employee.
Yes, be we want OSs to get LESS bloated, not more.
My beliefs do not require that you agree with them.
Microsoft was threatened by the java api. You only have to use the Java VM and on that platform your software doesn't have to use the windows api anymore. Takes away the advantage of developing on a operating system with a rubust api.
When you get down to heart of the matter, all computers use just one kind of language: the processor's binary instruction set. So you could make an argument that all (Von Neuman architecture) computers are just interpreters for a particular instruction set. Operating systems and programming languages just provide abstractions which make the programmer's job easier. Making a division between operating system and programming language is an engineering decision on where you want to position your layers of abstraction to achieve a good balance between ease of use and speed. It is all just a matter of where you decide to put your abstractions.
Physicists do it with a big bang!
No, it's because the term "OS" is commonly used to mean "OE" or "Operating Environment". Linux, being the kernel, is an OS. sh, and all the other shell tools are the OE. You don't have to use sh for your shell or init or any other shell tools, replacing them with other valid executables. A real world example of this is the FreeVMS project. In making a free/libre version of VMS, they don't want to duplicate the work of writing drivers and developing a kernel -- they want to focus on developing analogs of DCL, TPU, the Queue manager, etc. So they're using Linux or FreeBSD for their kernel and writing their own userland.
Same with Windows Explorer. The "My Computer" icon is part of Windows' operating environment. You can, believe it or not, use Windows without using Explorer (using the command line or a replacement shell like LiteStep). Windows just isn't designed or intended to have its core components replaced so easily. I think there was a court case about it... Anyhow, I used to run Windows NT with just cmd.exe as the shell, which was fun for a few weeks, figuring out how to set control panels from the shell. With cywin & GINA installed, you could put a nearly complete UNIX face on NT and still be able to run Win32 apps.
Sun is one the only companies I've seen distinguish between an OS and OE. They used to (still?) call it the Solaris Operating Environment, with the SunOS kernel as the underlying OS. The truth is nobody cares. _My_ eyes are glazing over just writing about this. My sincerest condolences to your disintigrating brain. But on the bright side, without the ambiguous use of technical terms, slashdot readers would have a lot less to argue about, and this site would degrade into a competitive festival of increasingly embarrassing personal confessions on sex, drug use, music, government secrets, scams, circumventing the law, satire, and other boring stuff like they have kuro5hin. If we should be so lucky.
Democracy. Whiskey. Sexy. Pick any two.
What is the standard C library except an API specification to an OS?
Standard C library is not a standard library of C language for Unix, it's a standard library of the Unix system that is used with C language (and every other language on Unix). Of course, for applications portability purpose it was ported to other systems, however it's still not really a part of the language design -- say, variable arguments list is a part of C design, but [v[s[n]]]printf strictly speaking isn't.
Contrary to the popular belief, there indeed is no God.
... in this business you'll eventually hear everything twice (or more). If you look back to (eg) Parnas, et al, and the A-7 project, you'll discover that back in the late 70's and early 80's a key notion was that both the OS and the language were part of the "hardware hiding" layer.
On the IBM System/3 in the later 60's and early 70's, the RPG/II compiler generted a binary that was booted onto bare iron to run. (If you were really down-scale, like I was, the compiler was a bootable 4-foot deck of punch cards and the result was a freshly punched deck of cards that was itself bootable.) This included the code for both the "program" -- the business logic -- and the "operating system" that allowed the program to control card reader, printer, and disk drive.
On the IBM 1401, people had decks of program cards that did specialized things, like control the printer; you added them to your program. I'm sure Goldstein and von Neumann had something similar.
What I wonder sometimes, though, is whether this repetition of the same old idea, generation by generation, proves that "computer science" is essentially a dead topic?
You are in a directory, there are many files here. A path leads to the the south and down labeled Mydocuments.
> look
There are files here labeled read.me, config.sys and autoexec.bat. A path leads to the the south labeled Mydocuments.
> take read.me
taken.
> kill read.me
You smite the file labeled read.me and it crunbles to dust.
There are files here labeled config.sys and autoexec.bat. A path leads to the the south labeled Mydocuments.
> South
You move through the passage and reach the grand chamber of Mydocuments. There are many files here. Passages lead further south and down labeled Mymusic and Mypr0n. To the north is a passage leading up......
I'm an American. I love this country and the freedoms that we used to have.