|
This post originated from an RSS feed registered with Ruby Buzz
by Red Handed.
|
Original Post: Visitors Who Steal Ruby Off to New VMs
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded
|
|
Avi: 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.
He’s talking about his smalltalk.rb, which translates this code:
class HelloRuby
def zot
3+4
end
end
Into this code:
Object subclass: #HelloRuby instanceVariableNames: ''
classVariableNames: '' poolDictionaries: '' category: 'Ruby'!
!HelloRuby methodsFor: 'ruby' stamp: ''!
zot
^ 3 + 4
Neat. You know, I think NodeVisitor would be a really great tankshed RCR.
Read: Visitors Who Steal Ruby Off to New VMs