Rubyx OS - A Testament To The Power Of Ruby
Andrew Walrond writes "Rubyx the OS is created from source by rubyx the ruby script. Got it? The same small ruby script handles all subsequent package management, customised parallel and distributed user-mode package builds, and can create a live CD. For good measure, Rubyx (the os) sports an all new init and rationalised service management system written in ....can you guess?..."
I am a Perl user
</disclaimer>
It is an installer and package manager written in Ruby not an OS. The website doesn't seem to make this very clear though, so I don't blame you for being confused. It is really a Linux (or GNU/Linux if you prefer) distribution. If we were to follow this logic then Mandrake Linux would be a Perl OS and Fedora/Redhat would be a Python OS.
When evaluated on that level it looks interesting. It seems to combine the concepts of LFS and Gentoo with stow like package managment.
I use Python mostly for "work", but I much prefer Ruby and try to use it whenever possible.
If you are a theoretical guy who loves a conceptually elegant and consistent language like Smalltalk or Scheme, you'll love Ruby. Ruby is so consistent, it's really lovely.
If you're more practical and need good documentation and extensive libraries, you'll probably be annoyed by it.
If you like to write programs FAST but not sacrifice readability like Perl, you'll really love Ruby. For instance in Ruby, you don't have to type "self" in method argument lists the way you do in Python. Ruby is 100% object oriented inside and out. Classes are first class objects, subclasses of Module objects. There are no "old style classes" or "new style classes", no cruft held over from previous versions of the language.
In Python, you have built-ins like "str()" which can call the __str__() method on an object. None of that kind of repetition in Ruby. Just call obj.str (or actually, obj.to_s) directly. You don't need the parens in that case.
Ruby has "blocks" which are a nice syntactic sugar for a whole class of operations. For instance a database transaction can be implemented as a block:
transaction { |t|
do stuff with t
more stuff
}
in Python that would be:
t = start_transaction()
try:
do stuff with t
more stuff
finally:
end_transaction()
The ruby version is easier to read.
If you want a large selection of tools and implementations, well, Ruby doesn't have too many like Python.
Also the Ruby community is still small and friendly. The python community is turning into the Perl community, in my opinion. A little arrogant.
Python is starting to look more and more like Ruby every revision though.
How much can you convey in 1 paragraph? Maybe I did a bad job, but I did at least expect/prime (with "can you guess") the ruby/perl/python flamefest.
:)
But a few people were intelligent enough to pick out the salient points, or were bothered to read the website. And then downloaded 8Gb of Rubyx overnight. (Hang the cost; It made me smile!)
For those of you who somehow missed those salient points:
Rubyx is 'yet another linux distro', that builds from source (like gentoo). It is _not_ an OS written in ruby.
But it's different because...
Rubyx can be created, with a single command, using the rubyx script.
With a second command, you can create a bootable Rubyx CD/DVD.
The same script handles ALL subsequent package management.
Reread that last bit. This is one small script we are talking about, written in the ruby language.
I wrote the new init system inside 2 days. Go figure. A complete init replacement in two days.
Yes, I'm a fan of ruby. Its the most writable, readable scripting language I have tried. Could Rubyx have been done in another language? Surely. But, I argue, not as quickly, elegantly and maintainably.
Have a lovely day
Andrew Walrond
It's been done. 20 years ago. My first serious workstation development was on a Symbolics Workstation whose OS was written in LISP. We had a windowing operating system with bit-mapped graphics, source-level debugging, suspend-substitute-and-continue code execution. Just all kinds of cool stuff. And coding in an OO LISP was the best experience. Ruby and Perl have both similar levels of joy in programming, but as LISP was my first, it will always hold a special place.
Unfortunately it was too expensive. My workstation cost $125000. Alas...
Be careful what you wish for...
Where your treasure is there is your heart also...