need a simplified understanding of Rubinius

D

Dave Rose

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

Wilson Bilkovich

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

James Edward Gray II

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.

James Edward Gray II
 
W

Wilson Bilkovich

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. :)
http://en.wikipedia.org/wiki/Meta-circular_evaluator
 
M

M. Edward (Ed) Borasky

James said:
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. :)

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

gabriele renzi

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" :)
 
W

Wilson Bilkovich

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" :)

I was thinking of all of those. Five or so out of all of the language
implementations, to mind mind, counts as "not often". :)
 
R

Rick DeNatale

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
http://wiki.squeak.org/squeak/2267 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.
 
P

pat eyler

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
http://wiki.squeak.org/squeak/2267 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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top