Avi (and others) have talked about getting Ruby to run inside a Smalltalk system - and now Avi has gone ahead and taken a first step in that direction:
Here’s the cool thing about JRuby for this purpose: one, it has a nice, classic object-oriented parser/AST/Visitor package, in Java. Two, it makes it very easy to access Java classes and implement Java interfaces from Ruby. That means, as it turns out, that it’s trivial to write a JRuby script that uses the JRuby parser to parse some Ruby code, and then pass the parse nodes through a Ruby visitor implementation. So I wrote a visitor that does the least work possible to translate the simplest Ruby program possible into something Squeak Smalltalk can load and run, and hey, it adds 3+4 and comes up with 7. I’m pretty sure this is the lightestweight bootstrap there can be towards the goal of eventually getting Ruby running on a Smalltalk VM. No new parser needed: we use JRuby’s. No new compiler needed: we use Squeak’s. No third party libraries needed (I never could get ParseTree built on my Mac). No new code that needs to be written in any language but Ruby. Cool.
Interesting approach - the code required to do that is here. Now it'll be interesting to see whether anyone else picks this up to look at - Blaine, perhaps?
This raises the question as to why one of the Smalltalk vendors (like, say, Cincom) doesn't take a crack at it. Well, the revenue model for it is not immediately obvious (meaning: you come up with a way to explain it to management - I haven't found that way yet :) ). Additionally, we have a fairly full plate of things we need to do to Cincom Smalltalk already, and the engineering team is over-committed on that.
That said, I think it's a cool idea. If there's money in it, a third party should be able to build support and help us sell it.