I was at a talk on mruby at a recent conference. It's some interesting stuff: the program size footprint is only something like 40k , and memory usage is around the same when running. It was initially meant for embedded systems, but seeing it here is also an interesting use case.
Since this project depends on webruby and webruby uses emscripten, it could get close to 2x native performance in browser(only firefox nightly) because of the awesome asm.js support.
It'd be nice if someone could show an example of a webpage embedding some ruby code interacting with some js code/framework or something like html5 canvas. Just to see how they "communicate".
I remember you could also get it into iOS. Perfect if you wanted to script some stuff in Ruby. I'm currently using JS for that, but Ruby should do as well.
14 comments
[ 43.6 ms ] story [ 589 ms ] threadI am a big supporter of asm.js after reading John Resig's post on it(http://ejohn.org/blog/asmjs-javascript-compile-target/).
Webruby (Mruby.js) was one of the options we considered but ultimately didn't use.
1000000.times{|i| puts "hello #{i}"}
jquery's $() is aliased to j() in ruby. Try:
j('body').css background: 'pink'
window is alias to w(). E.g.:
w.alert('hello from ruby')
puts w.prompt('saywhat?')