Thursday, March 27th, 2008
HotRuby: Run Ruby on a JavaScript interpreter?
<p>This is from the "wow, really?" department. HotRuby is an implementation of Ruby in JavaScript!The way it works is that a HotRuby "VM" takes the resulting output from YARV and can grok it via JSON:
-
VM::InstructionSequence.compile(cgi['src'], "src", 1, OutputCompileOption).to_a.to_json
Thus, you can embed Ruby by doing something like this:
Since you can run on any JavaScript interpreter or VM, they also support Flash.
For example, check out this Box2D example written in Ruby, running in Flash:









I hadn’t seen this… that is a definite “wow really” moment for me. …wasn’t expecting this until Screaming Monkey… thanks, Dion.
Ultra cool. Kudos!
Yes this is pretty cool…but also complete insanity. Why, exactly, would anyone actually want to do this?