|
OpenLaszlo is a full-blown JavaScript compiler, that currently emits Flash virtual machine byte codes ("SWF" files) as its "machine language".
It now has a new DHTML back-end, that emits JavaScript source code as its "machine language", which runs in the web browser, Rhino, SpiderMonkey or other JavaScript interpreters. But it could also be extended to translate JavaScript source code into Lua source code, or byte codes.
Henry Minsky (who works on the OpenLaszlo compiler and runtime) suggests that OpenLaszlo could even translate JavaScript source code into efficient C code that could be compiled and linked into the scripting language. OpenLaszlo requires a runtime library, which is currently implemented in JavaScript, but could also be implemented in Lua, or even partially in C or C++ for efficiency. The OpenLaszlo runtime (LFC) provides services like events, delegates, xml, data binding, an object system, object instantiation and replication, network services, a sprite and input system, timers, animation, etc. You should be able to plug in a new sprite system instead of Flash or DHTML, like SVG or OpenGL.
Sure, OpenLaszlo running on Flash and DHTML is great for "web 2.0" browser based stuff, but I'm thinking long term, far past 2.0: my web goes to 11, runs on small devices like cell phones, and powerful devices like game consoles.
-Don From: Henry Minsky <henry.minsky@gmail.com> To: OpenLaszlo Development and Bug Reporting <laszlo-dev@openlaszlo.org> Subject: Re: [Laszlo-dev] Laszlo for Lua? "OpenLuaszlo"I wonder what the speedup would be to compile the LFC as C code linked with a javascript library. If it was much better maybe there is a JavaScript to C compiler out there that could be used.
Or we might be able to find someone to modify our compiler's javascript backend to emit C instead. You'd still need a runtime library for javascript support (definitions of primitive objects, GC, etc)
Javier Guerra wrote:
On Thursday 24 August 2006 9:10 am, Don Hopkins wrote:You can read about OpenLaszlo and Project Legals (OpenLaszlo for Multiple Runtimes) here: http://www.openlaszlo.orgthis is a really really interesting path of current trends: to write web apps on a single, easy language, and get it compiled into different environments for web 'deploying'.unfortunately, most of these efforts consider JavaScript a usable language.yes, it would be absolutely wonderfull to replace JS with Lua, but compiling Lua into a different bytecode wouldn't be the same. most bytecode VMs out there are really bad, and those that are 'good' have a totally inappropriate (for Lua) focus and structure.i really don't see any way out; if we want to write client-side apps in Lua, we need a Lua VM in the client.please, somebody prove me wrong...