Andr茅 wrote:
Hello,
this post might sound strange, but after working with ruby for so long,
I've been thinking about writing a ruby operating system. I've been
thinking about doing my M.D. thesis about it, but I want to hear some
of your opinions.
First of all, the philosophical questions
- Does it make any sense? (that is, does it sound useful?)
- It has been done before?
In a way it makes sense, and in a way it doesn't. The two most notable examples of very tight coupling between a language and an operating system are the Lisp machines that used to grace AI labs, and the Forth language, which, at its birth and for many years thereafter existed as a combination language and real-time operating system. So where are they now?
1. The Lisp machines faded into obscurity, mostly because the price-performance numbers for general-purpose systems caught up with them. The same thing happened to other special-purpose machines like mini-supercomputers.
2. Forth as a language has evolved in two directions. Forth still is used in its original modus operandi as a combination language and real-time OS, often on special chips designed to execute Forth efficiently. But it also has evolved into a language hosted on conventional operating systems like Windows and Linux. And there is an ANSI standard which covers both types of Forth usage.
Would a "Ruby machine" be useful in the same sense as a "Lisp machine" was? It strikes me as vulnerable to the same thing that killed off the Lisp machines -- competition from general-purpose operating systems that can run Ruby, Lisp, Perl, Fortran, Haskell, Erlang, C++, .NET, Java ...
And then the technical stuff. I though about doing things this way:
1. Make the ruby VM run on bare metal. (that is, a ruby VM operating
system)
2. Make the standard ruby libraries
3. Make SO libraries
For step 1, the logical approach (for me) would be something like this:
1. Get the ruby source.
2. Write a replacement for every libc function ruby uses.
3. Compile ruby into a kernel and boot it.
Does this sound like a logic approach? Or there's any better way to do
it, or I should go for a different path here?
Thank you in advance,
Andr茅
I don't think there's a "Ruby VM" yet. There are fairly complete ports of Ruby to the JVM and the CLR, and there is a Ruby-specific VM called YARV that is scheduled for its first release Christmas of this year. And there are two other semi-functioning projects in the Ruby implementation space -- Cardinal, which is a port of Ruby to the Parrot virtual machine, and Carbone, which is a port of Ruby to the gforth/vmgen virtual machine.
None of these are really "operating systems" in the conventional sense of the term. Operating systems manage processes, files, events, signals, processors, memory and devices. A program written in Ruby manages objects, classes of objects, methods, strings, regular expressions, numbers, arrays, and hashes.
路路路
--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/
If God had meant for carrots to be eaten cooked, He would have given rabbits fire.