lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Great to see someone else is interested in this area. I'm open for
collaboration. :-)

I'm open for collaboration too.  I checked your old post and I only went a bit further than you it seems.  From what I gathered you compiled lua using Alchemy and then ran the command line lua on some scripts (forgive me if I'm underestimating the tests).  I started working on a wrapper to allow running lua from a flex app (passing in a string to lual_dostring) and extended lua a little to be able to call functions and set properties on a Flex TextArea.  With my POC done I was going to extend a wrapper that will do a more complete binding back and forth from AS to allow lua to create and script arbitrary AS objects.

I can put together a project on google code or something to collaborate on the wrapper.  I'm pretty handy with Flex and C++ but totally new to Lua (the test flex app on my site constitues the first time I ever used lua; heard of it for years but had little incentive or time to play with it).  Basically Lua got chosen for my project due to it being the first C based interperter to compile cleanly for me in Alchemy.

I didn't strip anything out of lua (including io) and I'm playing with capturing stdout, stdin, and stderr inside the Flex application so things like Print can go to a special sprite.

I think that with help of lua-llvm direct compilation from Lua to swf
should be possible *in theory*. It must require a lot of work to
implement though...

Alchemy uses LLVM to compile C/C++ to ActionScript.  I didn't know that there was a lua-llvm that might help compile to fash bytecode.  I'd considered that as a path for other languages after seeing what PyPy is doing (there a pypy sub-project that compiles python to Flash and the pypy toolchain uses LLVM too). 

One thing I have thought would be cool is to have a dynamic interpreted language available in a Flash application used for exploratory programming (changing code on the fly like you can in a smalltalk environment without waiting for a compiler).  Then when you are satisfied "compile" the code into an application for performance.