[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

A Ruby Operating System (no bashing please

André

1/25/2007 7:11:00 PM

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?

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é

15 Answers

Ola Bini

1/25/2007 7:24:00 PM

0

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?
>
> 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'm sorry, but I won't answer to the post itself. I just can't resist
reformat your subject:

A Ruby Operating System (no BASH:ing please)

of course, in a Ruby OS, BASH wouldn't be allowed... =)

Regards
--
Ola Bini (http://ola-bini.bl...)
JvYAML, RbYAML, JRuby and Jatha contributor
System Developer, Karolinska Institutet (http:/...)
OLogix Consulting (http://www....)

"Yields falsehood when quined" yields falsehood when quined.


André

1/25/2007 7:34:00 PM

0

> > AndréI'm sorry, but I won't answer to the post itself. I just can't resist
> reformat your subject:
>
> A Ruby Operating System (no BASH:ing please)
>
> of course, in a Ruby OS, BASH wouldn't be allowed... =)

Well... I figured that a title like "(no IRB:ing please)" would be just
plain wrong... ;-)

André

Gary Wright

1/25/2007 7:58:00 PM

0


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?

You might want to take a look at Inferno (http://www.vita...
inferno/).
It is an OS based on a virtual machine model.

Another possibility would be creating a Ruby interface to the Plan 9
operating system. Currently the Ruby libraries are crafted to interface
to Posix-like OSs and Windows. Re-thinking the core libraries in the
context of something like Plan 9 or Inferno might be interesting.

Gary Wright




dave rose

1/25/2007 9:58:00 PM

0

..it sounds very interesting...but i would start with rubinius since
it's a self booting like squeak ... then write the entire OS in the ruby
language itself with only small c stubs for cpu critical dma access
things


--
Posted via http://www.ruby-....

brabuhr

1/25/2007 10:21:00 PM

0

On 1/25/07, André <andre.nho@gmail.com> 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.

Sounds like a cool project. :)

The first things that come to mind:

Perl:
http://perllinux.source...
A Linux distribution where ALL programs are written in perl:
The only compiled code in this Perl/Linux system is: Linux Kernel,
perl, and uClibc.)

C#:
http://channel9.msdn.com/ShowPost.aspx?Po...
http://en.wikipedia.org/wiki/Si...(operating_system)
a Microsoft Research project started in 2003 to build a highly-
dependable operating system in which the kernel, device driver,
and applications are all written in managed code
http://sharpos.org...
SharpOS is a look into the possibility and the challenge of
creating an operating system written in C# and based on Mono

Java:
http://en.wikipedia.org/w...
(As of 2006, Sun considers JavaOS a legacy system)
http://www....
Java New Operating System Design Effort

Gavin Kistner

1/25/2007 11:01:00 PM

0

On Jan 25, 12:11 pm, "André" <andre....@gmail.com> wrote:
> 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.

How are you defining an 'operating system'? The definitions I'm used to
involve managing all the low level aspects of the computer - hardware
interrupts, access to devices, memory allocation and management,
including virtual memory, etc.

Like: http://en.wikipedia.org/wiki/Operat...

Given that the ruby interpretter itself relies on these things, I'd
think any Ruby-based operating system would be ... well, I don't know
what it would be. A ruby interpretter written in machine code that
handled all of this itself?

Do you mean a shell environment that accepts and uses Ruby code? Or the
"WebOS" term of a suite of applications covering all your daily needs,
all written in Ruby? Or truly an operating system?

Jörg W Mittag

1/26/2007 12:42:00 AM

0

André wrote:
> 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?)

Of course it does!

> - It has been done before?

A Ruby OS? Not that I know of. A dynamic language OS? Tons: various
Smalltalk OSes, LISP OSes. A VM OS? Several: Inferno, IBM OS/400,
NewOS, Microsoft Research's Singularity.

The House operating system (Haskell) might be of interest to you.

> And then the technical stuff. I though about doing things this way:

Well, I can't comment on those. I'm just gonna be an excited
bystander, witnessing in awe ...

Anyway, I kinda like the Singularity OS from Microsoft Research. The
most important thing about it is that MSR chose to do two things
radically different: over 4 decades the overarching goal of all
operating systems has been performance. And over 4 decades the design
of all operating systems has been driven by hardware innovations.

Singularity is different: its overarching design goal is dependability
and its design is driven by language and tools innovations (in the
case of Microsoft that obviously means statically verifiable/provable
safe programming languages (i.e. C#, Spec#, Sing#) and automatic
static program verification). And, I mean, they're right: look at
today's operating systems: most of them are implemented using
technology from the 70s (i.e. C) and if you look at it from *way* high
above then Windows Vista is still Digital VMS and Linux and MacOS X
are still MULTICS.

This language driven operating system design makes Singularity pretty
different from today's mainstream operating systems and IMHO also
makes it pretty cool. (Of course there have been other similar
attempts before, I don't mean to sound like a Microsoft fanboy,
because, actually, I ain't one.)

You might wonder where I'm getting at ... Well: I just wanted to say,
I'm looking forward to what interesting design choices a Ruby based OS
might lead to. Obviously it would look totally different from
Singularity (because of its strong roots in static verification) and
it would also look totally different from today's mainstream systems.

As a closing remark, you might want to take a look at The TUNES
Project <http://TUNE.... They want to build an entirely new
operating system (well, actually an entirely new *computing* system,
including hardware, OS and language) based on the very latest and
greatest in dynamic languages, AI, cybernetics, ... However, they have
been around for many years and all they have accomplished so far is
three relaunches of their website ...

> 1. Make the ruby VM run on bare metal. (that is, a ruby VM operating
> system)

Don't forget: there's more than one Ruby VM. JRuby and IronRuby might
be of interest to you because people have already gotten the JVM and
the CLR to run on bare metal. And of course Rubinius might be of very
great interest because it is written mostly in Ruby.

Anyway, I'm looking forward to what's coming out of this, even if it's
just a thread on ruby-talk that makes a nice evening's read (-;

jwm

M. Edward (Ed) Borasky

1/26/2007 3:43:00 AM

0

Jörg W Mittag wrote:
> Singularity is different: its overarching design goal is dependability
> and its design is driven by language and tools innovations (in the
> case of Microsoft that obviously means statically verifiable/provable
> safe programming languages (i.e. C#, Spec#, Sing#) and automatic
> static program verification). And, I mean, they're right: look at
> today's operating systems: most of them are implemented using
> technology from the 70s (i.e. C) and if you look at it from *way* high
> above then Windows Vista is still Digital VMS and Linux and MacOS X
> are still MULTICS.
>
Yeah ... and Digital VMS is still Xerox/Honeywell CP-V and RSX-11M. And
MVS is still DOS\360. :)
> As a closing remark, you might want to take a look at The TUNES
> Project <http://TUNE.... They want to build an entirely new
> operating system (well, actually an entirely new *computing* system,
> including hardware, OS and language) based on the very latest and
> greatest in dynamic languages, AI, cybernetics, ... However, they have
> been around for many years and all they have accomplished so far is
> three relaunches of their website ...
>
Ayup ... then again, people don't use Lisp Machines any more either,
because general-purpose computers caught up with them in
computations/buck. The cheese moves, you know. :)

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


M. Edward (Ed) Borasky

1/26/2007 4:14:00 AM

0

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.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


AdSR

1/26/2007 11:46:00 AM

0

On Jan 25, 11:21 pm, brab...@gmail.com wrote:
> On 1/25/07, André <andre....@gmail.com> 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.Sounds like a cool project. :)
>
> The first things that come to mind:
>
> Perl:
> http://perllinux.source...
> A Linux distribution where ALL programs are written in perl:
> The only compiled code in this Perl/Linux system is: Linux Kernel,
> perl, and uClibc.)
>
> C#:
> http://channel9.msdn.com/ShowPost.aspx?Po...
> http://en.wikipedia.org/wiki/Si...(operating_system)
> a Microsoft Research project started in 2003 to build a highly-
> dependable operating system in which the kernel, device driver,
> and applications are all written in managed code
> http://sharpos.org...
> SharpOS is a look into the possibility and the challenge of
> creating an operating system written in C# and based on Mono
>
> Java:
> http://en.wikipedia.org/w...
> (As of 2006, Sun considers JavaOS a legacy system)
> http://www....
> Java New Operating System Design Effort

Python:
http://unun...