|
On Sunday, November 6, 2011 at 11:48 AM, Maximilian Herkender wrote:
I did, I even tried different implementations of Lua. It was always prohibitively slow. My solution is orders of magnitude faster than anything I ever tried with Emscripten. The same goes for Alchemy, the Flash equivalent.
On Sun, Nov 6, 2011 at 7:03 AM, Joshua Ballanco <jballanc@gmail.com> wrote:Have you looked at Emscripten (https://github.com/kripken/emscripten/wiki)? There's an example of Lua running in the browser here: http://syntensity.com/static/lua.html- JoshOn Saturday, November 5, 2011 at 6:26 PM, Maximilian Herkender wrote:
Hi, I wanted to share a Lua-related experiment I've written.Basically, it converts a single Lua script into a _javascript_ equivalent.It works by parsing normal Lua code and wrapping pretty much every Lua operation around a function to maintain compatibility, and using _javascript_ constructs wherever possible, the result being a pretty fast _javascript_ version of a Lua script. It seems like there's only a handful of Lua features that seem to be completely incompatible with this style of translation.
Still, this is better used as a proof-of-concept rather than a legitimate tool. I didn't plan much in advance so it's only clear to me now that it should've been written in _javascript_ instead of Python, which makes this something of a dead end. Since it works for what I've been using it for, and I'm having trouble finding an equivalent to ply for _javascript_, I decided to put it up online for now in case anyone would like to check it out.-Max