Monday May 28, 2001
Evil Idea du jour, alias "use Ruby;"
Well, this isn't really just an idea, because I've gone and done it. I added most of a B::Generate
backend to Leon's Shiny compiler, and created some Perl bytecode out of some (admittedly very simple) Ruby. I could then execute this, or - even more fun - send it to B::Deparse
. It worked. I was impressed. It probably won't impress you much - I sent in puts(10/bar(20))
and got out puts 10/bar(20)
. Not a big deal, uh? Well, it went through the intermediary stages of being parsed into an AST, compiled onto the Perl virtual machine, and then deparsed again.
use Ruby;. It's happening, people.