[erlang-questions] Erlang in the browser

Daniel Dormont <>
Tue Oct 25 23:22:29 CEST 2011


I don't use Windows much anymore, but does Erlang have an adapter to the
Windows Scripting Host? If so, you could in principle support <script
language="escript"> and run Erlang or more likely a modified escript
directly in the browser. I get the impression this is not a recommended
approach these days, and it's IE-specific obviously, but it's an amusing
idea. Something more akin to Java/Flash is more likely viable.

You'd probably not want to use httpc, at least not by default. The nice
thing about Java and Flash is that they can transparently use the browser's
proxy settings and the browser's cookies - even if they themselves don't get
permission to view those cookies directly - when making HTTP requests.

To be at all useful you'd need to interface with the DOM pretty deeply, and
coming up with a library as capable as jQuery will be an exciting challenge
for sure! I don't know much about Flash, but in Java the main way this is
done is to just call Java from Javascript or vice versa, which might be a
good short-term solution while the Erlang DOM library is being built out.

Sounds fun, at any rate.

dan

On Tue, Oct 25, 2011 at 4:36 PM, 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?
>
> 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?
>
> -mox
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111025/941d739b/attachment.html>


More information about the erlang-questions mailing list