3 ms·
Cool idea. Not the first attempt though: http://hotruby.yukoba.jp/ http://hotruby.yukoba.jp/ https://github.com/whitequark/coldruby https://github.com/whitequ
by DanielRibeiro 14y ago
Cool idea. Not the first attempt though:
http://hotruby.yukoba.jp/ http://hotruby.yukoba.jp/
https://github.com/whitequark/coldruby https://github.com/whitequark/coldruby
http://rb2js.rubyforge.org/ http://rb2js.rubyforge.org/
http://www.ntecs.de/blog/articles/2007/01/08/rubyjs-javascript-no-thank-you/ http://www.ntecs.de/blog/articles/2007/01/08/rubyjs-javascri...
https://github.com/jessesielaff/red https://github.com/jessesielaff/red
http://www.playmycode.com/docs/quby http://www.playmycode.com/docs/quby
https://github.com/mattknox/8ball https://github.com/mattknox/8ball
Unfortunately, none of them seem to be to handle the mor dynamic features of ruby, like method_missing, which diminishes the possibility of reusing existing ruby code in the browser.
- pygy_ 14y agoJavascript Harmony (ES6) Proxies will allow to define getter catchall and other kinds of traps. See https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Proxy https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...
- tlack 14y agoMinor FYI: for this who want to play with Proxies right now, you can use a recent-ish copy of node invoked with node --harmony_proxies Enjoy!
- pygy_ 14y agoActually, V8 implements an older version of the spec. You can get a polyfill created by the designer of the Proxy spec here: https://github.com/tvcutsem/harmony-reflect https://github.com/tvcutsem/harmony-reflect It requires `node --harmony` (actually only Harmony Proxies and Harmony WeakMaps, but the rest doesn't hurt.)
- tlrobinson 14y agoWhile I never finished it, my "CappRuby" prototype supported method_missing since it compiled to use the Objective-J runtime. https://github.com/tlrobinson/cappruby https://github.com/tlrobinson/cappruby
- adambeynon 14y agoOpal does support method_missing, it's just off by default, i.e. opt-in.