5 ms·
I highly recommend if you're interested in Lua checking out a few of my favorite Lua projects... 1. Moonscript (https://moonscript.org/ https://moonscript.org/
by abeisgreat 4y ago
I highly recommend if you're interested in Lua checking out a few of my favorite Lua projects...
1. Moonscript (https://moonscript.org/ https://moonscript.org/) the compile-to-lua language powering Itch.io, it's amazingly pleasant to work with and I was amazed porting a JavaScript tool to Moonscript that the moon version was more readable despite my lack of familiarity with the language.
2. Redbean (https://redbean.dev/ https://redbean.dev/) the single-file, cross-platform binary magic web server that's been all the rage lately. Super fun to embed Lua apps into a single binary and build small web apps.
3. Pico-8 (https://www.lexaloffle.com/pico-8.php https://www.lexaloffle.com/pico-8.php) the famed "fantasy console" a fake old computer with fake old requirements that forces you to get creative as you write games and apps with the limited resources, of course, all apps for Pico-8 are written in Lua.
I think the moral here (especially with the last two projects listed) if you like when computers get weird you'll like Lua. I also recently compiled the Lua runtime into wasm to make some of my scripts portable to the browser, it was simple and easy, including modifying the language code just a bit.
Lua is a little wacky, but there's something so fun it brings me back to the early days of writing code when everything was simple and just a little off.
- unsafecast 4y ago> simple and just a little off. Great way to put it. It's a very charming language. Once you learn the (very few) things that are off and can trip you up, it's really pleasant too.
- confident_inept 4y agoI'll add LOVE (https://love2d.org https://love2d.org) to that list as well. Very powerful and flexible game framework, Currently working on developing a game in Minetest (https://www.minetest.net/ https://www.minetest.net/), it is also scripted in Lua.
- bckr 4y agoI'll add LOVR (https://lovr.org/ https://lovr.org/), the 3D analog to LOVE. Haven't used it personally so ymmv.
- sph 4y agoAny relation with LÖVE or is it just piggybacking on its name?
- toastercat 4y agoIt's piggybacking on its name because its API is heavily inspired by LOVE.
- jmiskovic 4y agoLOVR is amazing and getting better each day. It's just amazing tool to throw up basic 3D playground for data visualization or for playing with visualized math. The interpreter is tiny in size but feature-full (drawing simple shapes & text, powerful low level graphics API, spatalized audio, physics engine!). Code is simple and elegant C. Community is tiny but wonderful and welcoming. (disclamer, I'm a minor contributor)
- prox 4y agoThe popular hit game Project Zomboid is also in Lua I believe.
- absurddoctor 4y agoThe game itself is Java, but the mods are Lua
- dboon 4y agoI’ve just released a demo of my science fiction no combat RPG (think Disco Elysium), also made in Lua https://spader.zone/firmament-1.0.0/ https://spader.zone/firmament-1.0.0/
- jhbadger 4y agoAlso TIC-80, a fully open "fantasy console" that uses Lua by default, but also supports other languages like JavaScript and Fennel (a Lisp-like variant of Lua). https://tic80.com/ https://tic80.com/
- actuallyalys 4y agoTo clarify, Fennel compiles to Lua, so you can use it in most places that use Lua. TIC-80 appears to embed Fennel, so you don't have to bring the Fennel dependency.
- pull_my_finger 4y agoOdd to suggest that if they're interested in Lua, that they should check out Moonscript which is a different language altogether (although it compiles to Lua). But if you insist, something a little more Lua-ish is Teal[1] (gradual types ala TypeScript) or Pallene[2] (companion typed subset of Lua meant to generate optimized C libraries for use with Lua). [1]: https://github.com/teal-language/tl https://github.com/teal-language/tl [2]: https://github.com/pallene-lang/pallene https://github.com/pallene-lang/pallene
- Benjamin_Dobell 4y agoThere's also my IDE which just bolts on types (both structural and nominal) to regular Lua - no transpiling as the types are defined with comments (or inferred). https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis/ https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis/ Unfortunately, I haven't been able to give it as much attention as it deserves recently.
- aiibe 4y agoI discovered Moonscript with Lapis web framework. Then OpenResty (NGINX + Lua). Love it!
- maxdemarzi 4y agoOne Lua thing that is wacky is that you cannot have large integers as keys to a table. Lua converts {2938433:"hello", 983748323:"hi"} to positions in the array portion of a table and creates a giant 99.999% empty table eating all the RAM. Unless somebody knows something I don't on how to make it work.
- tkhattra 4y agoi don't think that's true - lua stores sparse arrays efficiently. the table above should only have 2 slots allocated. see [1] or [4] for details on how lua implements sparse arrays. [1] https://cacm.acm.org/magazines/2018/11/232214-a-look-at-the-design-of-lua https://cacm.acm.org/magazines/2018/11/232214-a-look-at-the-... [2] http://www.lua.org/doc/jucs05.pdf http://www.lua.org/doc/jucs05.pdf
- maxdemarzi 4y agoYou are right. This code runs just fine on both of these online Lua websites. local tab = {} tab[938388893] = "hi" tab[987383332] = "Hello" for k,v in pairs(tab) do print(k) print (v) end https://www.lua.org/cgi-bin/demo https://www.lua.org/cgi-bin/demo https://luajit.me/ https://luajit.me/ But when I try it using the Sol library (embedded in C++) it eats all my memory. Is it a Sol issue or a C Lua binding issue? Anybody know?
- tkhattra 4y agosorry, i'm not familiar with Sol. might be worth inquiring on the lua mailing list
- coldacid 4y agoI would add Defold to that list, it's a pretty nice little engine if you're making casual games. I used it for my team's project for this year's TOJam. https://defold.com/ https://defold.com/
- alwillis 4y agoThese aren’t Lua projects per se but they are configurable/scriptable using Lua: Neovim [1] and WezTerm [2]. Neovim is the "hyperextensible Vim-based text editor”--quite the understatement IMHO. WezTerm is an incredibly well done, GPU-accelerated cross-platform terminal written in Rust and uses Lua for configuration. [1]: https://neovim.io https://neovim.io [2]: https://wezfurlong.org/wezterm/index.html https://wezfurlong.org/wezterm/index.html
- SirAiedail 4y agoAlso AwesomeWM [1], to continue the "Lua scriptable Unix desktop". [1] https://awesomewm.org/ https://awesomewm.org/