On Jul 5, 2006, at 11:30 AM, Paul Battley wrote: > Here's something for the hungry mob to tear apart: automatic Ruby to > JavaScript conversion. It seems somehow wrong, like grafting a pretty > girl's head onto a donkey, but I've done it anyway! > > [snip: example] > > It uses Ryan Davis et al's ParseTree and Florian Gros ruby.js for > most of the hard work. It's still very limited, and there are many > warts, not least of which is the requirement for an explicit receiver > on every method. > > That said, the code's here: http://po-ru.com/files/ruby2js.tar.gz > > Have fun! > Paul. Grotesquely awesome! I especially like the unsettling analogy of the pretty-faced donkey. Now what would be a great addition to that would be a mod_ruby or rails plugin that allowed .rjs files to be automagically translated from ruby to javascript. -Mat