News for hackers. Stuff that matters.
Re:Lapis: A Web Framework for Lua by xrd on Saturday May 25, 2024 @10:04AM (#40475140)
Not knowing much about MoonScript and only knowing a tiny bit of Lua, does anyone have a recommendation on which is "better" if you are starting from where I'm at with these languages?

MoonScript looks class based; I avoid classes like the plague in JavaScript because of "this" but maybe that is the wrong starting assessment?

Re:Lapis: A Web Framework for Lua by elpocko on Saturday May 25, 2024 @10:20AM (#40475223)
MoonScript supports classes via keyword, while in Lua you have to implement them yourself. That's about it. You can ignore them, even more so than in JS.

MoonScript is dead anyway. Check out yuescript instead: https://github.com/pigpigyyy/Yuescript

Re:Lapis: A Web Framework for Lua by hnax on Saturday May 25, 2024 @11:16AM (#40475522)
lua-classy (https://github.com/siffiejoe/lua-classy) works like gem and is fast!
Re:Lapis: A Web Framework for Lua by elpocko on Saturday May 25, 2024 @11:38AM (#40475659)
It's 10x larger than it needs to be, and seems to do a lot of unnecessary stuff. I would call this one hopelessly bloated and overengineered and recommend something like https://github.com/Yonaba/30log instead.
Re:Lapis: A Web Framework for Lua by otikik on Saturday May 25, 2024 @10:27AM (#40475257)
Start with Lua. Moonscript produces Lua so you will have to deal with Lua if you’re ever to debug a Moonscript program. The opposite isn’t true
Re:Lapis: A Web Framework for Lua by _heimdall on Saturday May 25, 2024 @10:06AM (#40475158)
I wouldn't run from classes just because JS historically has, though coming from JS I'd lean towards lua for a more familiar function calling syntax.
Re:Lapis: A Web Framework for Lua by thefaux on Saturday May 25, 2024 @12:42PM (#40476143)
I would strongly recommend just learning vanilla lua. The beauty of lua is that it is lightweight and runs anywhere so it is worth learning on its own terms. Wrapper languages come and go, but lua 5.1 is still highly usable even though it hasn't changed its feature set in 15 years (and never will).
Re:Lapis: A Web Framework for Lua by qgc on Sunday May 26, 2024 @12:31AM (#40479791)
Fennel is a neat Lisp-flavored Lua language that I've been using for around 2 years now.