[erlang-questions] Erlang in the browser

Witold Baryluk baryluk@REDACTED
Sun Nov 27 22:41:35 CET 2011

On 10-25 13:36, Mike Oxford wrote:
> Forget javascript.  Forget Flash.  Forget java/Go/Dart/whatever.
> Is anyone working on a stripped-down erlang VM to be run in a browser,
> maybe as a plugin?

Yes :) Even without plugin.

> Download the .beam and run it instead of a script/jar.
> httpc for ajax-style work, sockets already in place for websocket stuff.
> Dupe the DOM and fire up V8 via port to handle LEGACY javascript sites.
> Cross platform due to portability of beams, VM already compiles to all
> of the significant platforms.
> async actor model with lightweight processes and micro-heaps ... other
> code looking to go here but Erlang already there
> "fe" used for frontend, thinking that maybe it's a more extensible
> name for anything "not web"
> fe:update_item(TheDOM, button1, "new text") when is_dom(TheDOM). %% or
> "button1" to save atoms
> fe:ajax(MyCallback, URI).
> etc.
> It sounds like many of the building blocks are there...anyone already
> moving on this?

I have working BEAM to JS translator and small VM In JS to run erlang programs.
It have a scheduler and everything, but few things are still missing.
Especially obsucre opcodes, like binary handling.

About your example I have built a small framework with very similar
syntax, which allows handling DOM from erlang running in this VM.

There is many other advantages of this model, and because I have some
time to finish this project I will publish it shortly.

Feel free to contact me.

Witold Baryluk

More information about the erlang-questions mailing list