Need a simplified understanding of Rubinius

…just curious…how does Rubinius ‘boot’ itself up and how does
translate ruby into bytecode… i know a little about parsing and
compilers … but what makes rubinius different? i hear it is actually
written in ruby… but that’s circular? like MC Ecsher the hand drawing
a hand?..tia dave

On 9/27/07, Dave R. [email protected] wrote:

…just curious…how does Rubinius ‘boot’ itself up and how does
translate ruby into bytecode… i know a little about parsing and
compilers … but what makes rubinius different? i hear it is actually
written in ruby… but that’s circular? like MC Ecsher the hand drawing
a hand?..tia dave

Basically what you do is you write a first implementation using
language A. Then you use that implementation to create an ‘artifact’
that is capable of running language B. If you do this carefully, you
can then discard everything you wrote in language A.

For example, Pascal was first implemented in FORTRAN. Once that
worked, they rewrote the compiler in Pascal, and away they go… etc.

Instead of an Ecsher drawing, it is more like using scaffolding to
build a house. When you are done, the house is made entirely out of
“house”. Heh.

In answer to your second question… Rubinius isn’t really ‘different’.
It uses only time-honored implementation techniques. They just happen
to be techniques that have not often been used to implement dynamic
languages.

On 9/28/07, James Edward G. II [email protected] wrote:

Basically what you do is you write a first implementation using
language A. Then you use that implementation to create an ‘artifact’
that is capable of running language B. If you do this carefully, you
can then discard everything you wrote in language A.

Isn’t there a Scheme book with a Scheme implementation written in
Scheme in it? If my memory serves, I think I even remember Evan
talking about this being some of the inspiration for Rubinius.

That is true, yeah. However, our more direct inspiration is the
Smalltalk-80 book. The last section of that book is a Smalltalk VM
written in Smalltalk.

Here is a link with some links to more links. :slight_smile:

James Edward G. II wrote:

Isn’t there a Scheme book with a Scheme implementation written in Scheme
in it? If my memory serves, I think I even remember Evan talking about
this being some of the inspiration for Rubinius.

  1. Few entry-level books on Lisp or Scheme don’t contain an evaluator
    written in the language itself. It’s a tradition. :slight_smile:

  2. I thought the inspiration for Rubinius was Smalltalk, not Scheme.
    Then again, Lisp was one of the inspirations for Smalltalk.

On Sep 28, 2007, at 10:47 AM, Wilson B. wrote:

language A. Then you use that implementation to create an ‘artifact’
that is capable of running language B. If you do this carefully, you
can then discard everything you wrote in language A.

Isn’t there a Scheme book with a Scheme implementation written in
Scheme in it? If my memory serves, I think I even remember Evan
talking about this being some of the inspiration for Rubinius.

James Edward G. II

On Sat, 29 Sep 2007 00:47:53 +0900, Wilson B. wrote:

In answer to your second question… Rubinius isn’t really ‘different’.
It uses only time-honored implementation techniques. They just happen
to be techniques that have not often been used to implement dynamic
languages.

also PyPy, many Schemes and Squeak come to mind. I believe a better
wording may be “not often used to implement dynamic languages of the
unix
legacy” :slight_smile:

On 9/28/07, Wilson B. [email protected] wrote:

a hand?..tia dave

That is true, yeah. However, our more direct inspiration is the
Smalltalk-80 book. The last section of that book is a Smalltalk VM
written in Smalltalk.

Although that was done for pedagogical purposes, AFAIK, the
Smalltalk-80 was never actually written in Smalltalk (or at least not
executed that way).

Squeak’s VM is actually written in a language called Slang
Slang which is a small language with a
restricted Smalltalk syntax easily translated to C.

At one point Rubinius was going down a similar path, but the last time
I looked, they had moved on to hand written C, unless it’s changed
again.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On 10/2/07, Rick DeNatale [email protected] wrote:

Slang which is a small language with a
restricted Smalltalk syntax easily translated to C.

At one point Rubinius was going down a similar path, but the last time
I looked, they had moved on to hand written C, unless it’s changed
again.

Actually, the hand-written C is a cheat until Cuby is mature enough to
handle the bits of the VM that can’t be written in Ruby. (Cuby is to
Ruby like Slang is to Smalltalk.)

On 9/29/07, gabriele renzi [email protected] wrote:

legacy" :slight_smile:

I was thinking of all of those. Five or so out of all of the language
implementations, to mind mind, counts as “not often”. :slight_smile: