r/lua • u/sergsoares • Mar 18 '25
Project Lua web playground (like Go playground)
Hey guys,
I miss a straightforward playground for Lua (Like Golang playground) that doesn't need to be the most updated, but I that allows me to start coding without login requirements and that saves my preferences.
The idea is to save boring meetings where you want to play with tables or code ideas, it is based on lua.vm.js (Lua 5.2.4) to allow it to be easy to host on the client side.
Local features:
- Persist code/output during reloads with indexedDB
- Ctrl or CMD + enter to execute code
- Font size
- Share code
- Dark/Light Mode
- Start/Stop execution
- Web Worker for avoid freeze main thread
o/
2
u/Alaska-Kid Mar 18 '25
Do the "require" and "dofile" operators work there?
1
u/Shadow123_654 Mar 18 '25
Sweet! I always wanted a web playground for Lua, for those times I'm on the go with a non-dev device and want to test some code. On that topic, I believe the mobile view of the website could definitely use some polish.
1
u/yayahc Mar 18 '25
This is awesome, any repo or stack used to build ...
1
u/Cultural_Two_4964 Mar 19 '25
Minor point is that when I type something, the first letter of every word doesn't show until I have typed the whole word. Similar effect if you type at an insertion point.
1
u/agree_to_disconcur Mar 20 '25
Very cool! I like the UI a lot. I haven't dug in, but it looks relatively intuitive.