[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua.vm.js - Lua VM, on the Web
- From: Alek Paunov <alex@...>
- Date: Sun, 02 Jun 2013 21:59:57 +0300
I just want to say a big Thank you!
All this work which you are doing in the recent years around the
emscripten project is nothing less than amazing!
From a long time I am dreaming about flexible client side
data-interface application. Something, where the user can declaratively
define data-panels (eg. SlickGrids), backed directly by your
emscripten-sqlite port and with websocket based server replication. Now
I am sure that the core of this application will be coded in Lua :-)
Thank you again!
On 02.06.2013 21:08, Alon Zakai wrote:
I implemented this now as
which seems like a nice API. There is an example on the repl page for it,
but I didn't test much yet.
On Sun, Jun 2, 2013 at 9:10 AM, Alon Zakai <firstname.lastname@example.org> wrote:
That's a missing feature, I forgot about that. Should be easy to add
though. How about an api like
js.new('WebSocket', arg1, arg)
which will call new WebSocket(arg1, arg2)?
On Sun, Jun 2, 2013 at 5:00 AM, Nicolas <email@example.com> wrote:
On 01 Jun 2013 03:52:50 +0200
Alon Zakai <firstname.lastname@example.org> wrote:
I added the ability to write HTML script tags in Lua, example here
Do "view source" on the page to see the Lua in it.
Very nifty (that and the whole thing).
As in if in lua I wanted to do the equivalent of JS "new WebSocket(...)"
I tried with a js.run() call but it returned 0 instead of the websocket
On Thu, May 30, 2013 at 11:31 AM, Alon Zakai <email@example.com>
I'd like to present lua.vm.js, a new project that ports the Lua VM
language running on the web, so people can use Lua there.
main page: http://kripken.github.io/lua.vm.js/lua.vm.js.html
blogpost with more details:
that is easy to optimize, the Lua VM can run at nearly the speed it
would run normally on your machine. Benchmarks show it can run at
about half the speed of a native build, which should be more than
enough for many use cases I think, and this is expected to improve.
Comparison to other approaches for running Lua on the web:
* This is a straightforward compilation of Lua 5.2.2. So no effort
is needed to recreate all the work done on Lua, we just compile it
to JS like we would compile it to x86 or ARM, and get the full
language "for free".
not require anything nonstandard or proprietary (like Flash, NaCl,
etc.). So it should run in any modern browser.
* Speed will vary by browser, depending on the power of the JS
engine on this type of code (you can run a benchmark on the main
page in those links). The half native speed figure from before is
what I get on my machine, running Firefox nightly. But even if it
is less fast on another browsers, the good thing about the JS speed
race is that they all get faster in order to match whichever is
better at something, so I would expect this to become fast
Hopefully this project will be interesting to people. It would be
great to get feedback and help from Lua users and developers to
improve it and make it something that's useful for people.
- Alon Zakai