an OS in RUBY?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
com1
Member
Member
Posts: 105
Joined: Sat Apr 28, 2007 11:57 am
Location: TN

an OS in RUBY?

Post by com1 »

could ANYBODY give me tips of writing an OS in ruby? my OS is designed to be written in C, and i know nothing about ruby.
oh microsoft, microsoft, what souls you have dismayed
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Well, you could go two ways here.

First, you could write an interpreter in C, and then have that run the Ruby code. This is slow, and writing the actual kernel in plain script might not be the best idea.

Or, you could create a virtual machine which would then run as the OS, running the Ruby byte code. (Which you would have to somehow compile.) This is probably your best bet. You could even just implement a simple Java machine in C, and then use xruby, or jruby.

An even easier method, however, would be to simply use Perl, and port Parrot so that it can run without an operating system. :wink:

Either way, it's going to be a quite a bit of work, and that doesn't even cover reimplementing the Ruby standard functions and such...
C8H10N4O2 | #446691 | Trust the nodes.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

May I ask why you wish to write an OS designed in C in Ruby? What's wrong with C, it's purpose was for operating system development (the guys at Bell created it so they could write UNIX, back when OS development was black magic).
com1
Member
Member
Posts: 105
Joined: Sat Apr 28, 2007 11:57 am
Location: TN

well I...

Post by com1 »

I saw an OS written in RUBY, and was interested in how it worked, thats all. I wasn't going to implement RUBY in my C OS.
oh microsoft, microsoft, what souls you have dismayed
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

Do you know the name of this Ruby-based operating system? I'd rather like to see it.

If you want an idea of how implementing an OS in a very-high-level language works out, take a look at Movitz.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Crazed123 wrote:Do you know the name of this Ruby-based operating system? I'd rather like to see it.
ROS, perhaps?
C8H10N4O2 | #446691 | Trust the nodes.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Yup.......

Post by DeletedAccount »

:P Everything that a Turing machine can do can be done with a Computer ,
What i mean is any feasible computational task can be performed by the
Turing machine.... 8) SO it is theoritically possible to write an OS in Ruby....


But i do not recomend writing an OS in an intrepretative language like RUBY... or BASIC ... try something like PASCAL,C.C++,Oberon etc........
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Post by binutils »

IMHO, movitz suffers from bootstrap problem..
some kind of usability. had little chat with #movitz @freenode..

http://common-lisp.net/project/movitz/

If you ask to me, "what are you talk about?", i will say this is little offtopic. :)
Post Reply