5 ms·
Initiatives like this make me really excited, but the biggest problem is always long term maintainability and interoperability with the rest of the browser ecos
by Shank 9y ago
Initiatives like this make me really excited, but the biggest problem is always long term maintainability and interoperability with the rest of the browser ecosystem. Without a huge company backing the effort, it becomes really risky to use this long term because development could drop off or never gain traction.
If you don't have a huge open source community, you need one to push the ball forward and keep things going. That's really hard to get without users, which is a great catch 22. I'd almost suggest building a "killer web app" on Fengari just to demonstrate it, or at least to indicate that its development effort won't go the way of Moonshine.
I love Lua, and I would love to use this. The risk, however, is pretty high in anything but an experimental context -- at least for me.
- giancarlostoro 9y agoSounds like you're yearning for WebAssembly. With WebAssembly you can write your solution in any language it just needs to be compiled to WebAssembly. Every major browser is backing WebAssembly. As a result (and for example) Microsoft is making it possible to write front-end code in C# which is compiled with a small .NET runtime into the browser with WebAssembly. In theory efforts could be (and likely have been) made to compile Lua to WebAssembly. Quick search reveals at least two results: https://scriptinghelpers.org/lua https://scriptinghelpers.org/lua https://github.com/vvanders/wasm_lua https://github.com/vvanders/wasm_lua
- nevir 9y agoWebAssembly is not a silver bullet, and is intended for lower level code than I think you expect. There's little to no interop with the front-end world as we know it (aka the DOM), and any briding to it is still quite expensive. You'd have to re-implement lua's garbage collector in wasm, etc. wasm is great for high performance data crunching—aka why it's so attractive for 3d engines, games, and the like. It's less great for developing front end apps; unless you feel like building much of a browser within it. --- It _will_ get to that point, but we've got a while before interop is a realistic thing
- pjmlp 9y agoI think the golden question is if browser vendors are going to follow along community wishes and eventually turn the browser into a general purpose VM, or just put a wall and state "this is all you will ever get".
- giancarlostoro 9y agoI know currently it's nowhere near a silver bullet. As for not being able to use it now I would say Microsoft has to disagree: https://github.com/aspnet/blazor https://github.com/aspnet/blazor There's plenty of things to work on to get WebAssembly to the state where it could be used as a JavaScript replacement, but none of it impossible. Blazor shows you can build WebAssembly based web front-end applications today. It definitely takes some resources but I'm glad Microsoft is there to work on it to once again leave an example for the rest of the developers who may want to follow a similar pattern for new language implementations. To be fair, I'm not sure how much overhead their approach may have pertaining to the DOM with the way they're handling things.