

Ruby VM in JavaScript - nickb
http://ejohn.org/blog/ruby-vm-in-javascript/

======
aston
Haha. Right when I saw the post title, I jokingly thought "it prolly runs
faster than real Ruby..." Sometimes fact is stranger than fiction.

------
jamesbritt
There's also RubyJS: [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-
talk/...](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/233882)

A tool to convert a subset of Ruby into JavaScript.

I saw Michael's talk at RubyConf 2007; the video is probably up on the
confreaks site. Really neat stuff.

------
alex_c
Pretty neat... but I'm disappointed that the compilation is done server-side.
An entirely in-browser solution would be so much cooler ;)

~~~
Hexstream
"An entirely in-browser solution would be so much cooler"

... and slower.

~~~
alex_c
Of course. But I see it as a neat proof of concept rather than something
practical (even after reading the comments at the link), so I don't see speed
as an issue... may as well go all the way ;)

I AM also curious how much slower it would be, since this version is faster
than regular Ruby. I suspect the size of the JS files would be a bigger issue
than the speed.

------
jamongkad
I saw this a while back. But I never gotten around to try it out. If I'm not
mistaken does this mean I can write JavaScript in Ruby?

~~~
thomasfl
Yes, just include HotRuby.js and write <script type="text/ruby"> puts
"wow".uppercase();</script>

Amazing what javascript has been able to do.

~~~
jamongkad
Fascinating...but I've read you need to upgrade to Ruby 1.9 cuz the code is
parsed by it?

