Meta: ASM.JS and future of Ruby

So javascript is getting crazy fast. There is node.js, but also asm.js
that is getting near-native performance on browser environment.

What this means is that in near future (few or more years) it is
completely feasible to have Ruby interpreter running in near-native
performance on supported browsers. And with poorer performance on other

I know there has been efforts to tidy up Javascript syntax with various
languages like Coffeescript. And then there are projects like opal that
already bring ruby to the browser. (

So what do you think, what will this mean to Rubyists in the long run?

I think Javascript will remain a language where you write your own code,
however Javascript more and more frequently becomes a compiler target,
where you write code in a different language, and javascript is only a
running environment.

Clojure and Scala already compiles to JS (without loss of
functionality), and there is an LLVM to Javascript compiler, Emscripten,
so anything that compiles to LLVM code could run in a browser, even C++.

So I am saying that Javascript will be an alternative to the JVM as a
running environment. Large corporations won’t switch from JVM as they
have huge investments in Java and the JVM, but newly born, smaller
projects could use JS as an intermediate language especially if the
language itself has a slower VM (like Ruby). Language developers could
decide if they spend time polishing the VM or write a
_to_Javascript module.
And new languages might born more easily, as IMHO it is easier to write
a _to_JS compiler than a virtual machine with its own language (or
a native compiler). There is already a competition among JS engines that
would result in better and better product, and if you design a language
that targets the JS, the same sourcecode will be faster and faster with
the change of JS running environment.

Sysadmins would have the same advantage as in JVM, they need to manage
only one ‘javascript server engine’ and developer could use any
language, without reconfiguring the server.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs