3 ms·
Clever! But in all honesty, I was a little disappointed when I discovered that Ruby was not being emulated in JavaScript or something similar. Just bouncing the
by aarongough 17y ago
Clever! But in all honesty, I was a little disappointed when I discovered that Ruby was not being emulated in JavaScript or something similar. Just bouncing the entered text back to a server-side instance of IRB instead...
- nym 17y agoTry-javascript-emulated-ruby?
- aarongough 17y agoYou forgot the '.org' :-D
- jmonegro 17y agoThe problem with using a javascript-emulated version is that it'd be way too limited, unless the dev went out of his way to cover much of the ruby language. This way, you can try the whole thing. JS emulated would be good if it was just a tutorial, but it's a bit more than that.
- mpk 17y agoWell, an official spec for Ruby is in the works and there's already one for JavaScript (ECMAScript). Someone is bound to build a Ruby VM in JS at some point and then it'll be trivial to build a site like this. The performance will be horrible, of course, but once that happens some other person will come along and run a subset of Rails (or some other Ruby web framework) with an evented db backend on it (for async callbacks to the server over HTTP) to run an app in the browser. Which would be pretty cool, though not useful. (But don't let that stop you, whoever you are!)
- ThinkWriteMute 17y agoI believe a Ruby VM is already in the works, but my cold addled brain can't google fu right now.
- Zev 17y agoThat would be HotRuby, http://hotruby.yukoba.jp http://hotruby.yukoba.jp.
- scotth 17y agoI can imagine a fairly clean mapping between languages. If the result of compilation was JavaScript code, to be passed on to the browser using eval(), the code would perform quite well. So, assuming that I'm correct, what you would be left with is the one-time cost of parsing. And how costly is parsing generally? (I am keeping in mind that Ruby may not be general)
- petercooper 17y agoIt would be possible to have a JRuby applet so everything would run within the browser but.. that'd involve having a multi megabyte applet to activate on the page and they kinda freak people out nowadays. Some sort of Flash based Ruby VM that you can interact with through JavaScript would make it rather interesting though..
- city41 17y agoType in "help", the tutorial that gets kicked off from that is pretty impressive. My Dad has been curious about programming and I think this is what I'm going to point him to.