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.<div>

<br></div><div>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.</div>

<div><br></div><div>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.</div>
<div><br></div><div>Sounds fun, at any rate.</div><div><br></div><div>dan<br><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 4:36 PM, Mike Oxford <span dir="ltr"><<a href="mailto:moxford@gmail.com" target="_blank">moxford@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Forget javascript.  Forget Flash.  Forget java/Go/Dart/whatever.<br>
<br>
Is anyone working on a stripped-down erlang VM to be run in a browser,<br>
maybe as a plugin?<br>
<br>
Download the .beam and run it instead of a script/jar.<br>
<br>
httpc for ajax-style work, sockets already in place for websocket stuff.<br>
Dupe the DOM and fire up V8 via port to handle LEGACY javascript sites.<br>
Cross platform due to portability of beams, VM already compiles to all<br>
of the significant platforms.<br>
async actor model with lightweight processes and micro-heaps ... other<br>
code looking to go here but Erlang already there<br>
<br>
"fe" used for frontend, thinking that maybe it's a more extensible<br>
name for anything "not web"<br>
<br>
fe:update_item(TheDOM, button1, "new text") when is_dom(TheDOM). %% or<br>
"button1" to save atoms<br>
fe:ajax(MyCallback, URI).<br>
etc.<br>
<br>
It sounds like many of the building blocks are there...anyone already<br>
moving on this?<br>
<br>
-mox<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>