Embedding Lua in the Web
starlight.paulcuth.me.uk
starlight.paulcuth.me.uk
I'm sure I'll get critical comments on this but it beats compiling Lua to JS to make it convert itself back to JS. Maybe WebASM will be a solution for this, but it's too soon to tell for me how reliable that is for now.
Every now and then I get the thought that maybe I'll try to hack Lua into a browser just for fun, then I start trying to read the source and it is just 0_o to me.
I feel like this concept is about to be turned on it's head. Pretty soon, with WebAssembly (DOM access specifically), JS is going to potentially not matter at all for modern browsers.
Hell, there's even a chance that other languages end up "doing it better", being safer, or more robust, or more concurrent (when threads are added to WASM).
I have a hard time believing JS will still reign king of the hill when it has so many publicly agreed upon issues. If other languages do not have a disadvantage due to WASM (ie, slower DOM access), it seems inevitable that JS is just going to be one in many web languages, just like the rest of software.
But I don't think it'll ever happen. There's just too much behind Javascript and it's slowly catching up anyways.
I'm reaaaaally excited for that!
I'm not sure what the current progress is like. Other projects to get lua in the browser:
* moonshine.js - same author as the OP
* lua.vm.js - emscripten based (I maintain this one; I'd like to think of it's API as the "gold standard" for lua on the web. however it has issues around leaking references to the JS VM (to be solved when javascript gets WeakRef))
* brozula - abandoned
Probably will have to pop open the JSBins as live ones to have them properly function.