3 ms·
On a complete tangent: of all the language runtimes I'd expect to be converted to run in NaCl, I don't think Ruby's would top my list for "immediate practical u
by derefr 15y ago
On a complete tangent: of all the language runtimes I'd expect to be converted to run in NaCl, I don't think Ruby's would top my list for "immediate practical uses." On the other hand, porting the Erlang BEAM VM--and thus allowing a web client to become a node in an Erlang process network, and have arbitrary code pushed to and executed on it by the network--would have tons of relevant applications. Anyone working on this? Should I start working on this?
- eagsalazar 15y agoyes, you should. (ignore my previous tower of babel whining wrt this particular application which sounds completely awesome)
- andrewflnr 15y agoallowing a web client to become a node in an Erlang process network, and have arbitrary code pushed to and executed on it by the network Does this sound scary to anyone else?
- derefr 15y agoWe already have arbitrary code pushed to us and executed in our browsers all the time--it's called Javascript (and with JSONP, we even have more Javascript being pushed to us in realtime in response to events and eval'ed live. Nothing new here.) The difference in running Erlang here is simply that the browser would be joining a network of agents and spawning agents of its own, instead of joining a network of processes and spawning threads/web-workers of its own. This would allow a uniformity of process logic, such that an agent could be transparently running on a browser or on a server to complete a task, and messages could be being passed transparently across the network to facilitate this, without any of the code having to differentiate the cases. NaCl ensures the browser sandbox environment remains in place--so, other than perhaps getting a bit hot, your computer won't be doing anything it wasn't already doing just running the Javascript the server served it.
- tomjen3 15y agoNot if you know how NaCL works.
- obtu 15y agoarbitrary code For certain values of arbitrary; actually the code is restricted to the NaCl sandbox and the Pepper API.
- reddit_clone 15y agoDo you really need to port the Erlang VM for this? Wouldn't it be enough to implement the ErlNode line protocol inside the browser? (Say using Javascript and Websockets ? Or a browser extension?)
- derefr 15y agoYes, you could run pre-defined code in the browser given messages sent by the network this way. But you couldn't send the browser a code:compile(Binary) and then upgrade one of its modules in-place, as you could with any other Erlang node--which is sort of the point of using Erlang in the browser, as opposed to another language.
- CarlHoerberg 15y agoDistributed processing is a (not well known) core concept in Ruby as well: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/drb/rdoc/DRb.html http://www.ruby-doc.org/stdlib-1.9.3/libdoc/drb/rdoc/DRb.htm...