this post was submitted on 28 Dec 2025
527 points (91.9% liked)

Fediverse memes

2420 readers
356 users here now

Memes about the Fediverse.

Rules

General
  1. Be respectful
  2. Post on topic
  3. No bigotry or hate speech
  4. Memes should not be personal attacks towards other users
Specific
  1. We are not YPTB. If you have a problem with the way an instance or community is run, then take it up over at !yepowertrippinbastards@lemmy.dbzer0.com.

Elsewhere in the Fediverse

Other relevant communities:

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] rimu@piefed.social 7 points 1 day ago* (last edited 1 day ago) (2 children)

Performance is an attractive metric because it's something you can put a number on. It's measurable, so comparisons are easy.

But there are so many other metrics that are more important.

Still, https://leafo.net/lapis/ looks like something I'd like to try sometime. I don't know anything about the Lua web framework ecosystem, that's just the first search result I found. Do you have any recommendations?

[–] irelephant@anarchist.nexus 1 points 1 day ago (1 children)

I'm a big fan of lapis. It's built on openresty, a fork of nginx that embeds luajit into it. This means you can make use of all the features nginx has in your application. It's really fast in my experience.

I have a medium-ish project written in lapis here: https://codeberg.org/irelephant/kittygram

There isn't really much of an ecosystem around lua, lapis is really the only "proper" framework. There is stuff like redbean and mako which are cool, but not as complete/friendly to use as lapis imo.
Luarocks can be a bit of a pain as well (make sure to install packages for lua 5.1).

Lapis is made by the same person who made itch.io too, which i think it cool.

[–] rimu@piefed.social 2 points 1 day ago

Great to see a real app built with it. It reminds me of Flask a lot, although I guess all mvc frameworks are pretty similar.

[–] SlurpingPus@lemmy.world 3 points 1 day ago* (last edited 1 day ago)

I'm more familiar with Lua for desktop scripting — I'm using it whenever I can, if it's something that's more than like three lines in Bash and the Lua libraries aren't too bad. I'm even using it on the phone when dragging around blocks in Automate becomes too much (its minuscule footprint comes handy there). There's also the excellent automation app Hammerspoon for Mac, which uses Lua for its scripting.

I've been vaguely looking now and then into using it for web in the manner of node.js, with asynchrony being handled on the Lua side — but was offput by the fact that many popular Luarocks libraries presumed synchronous workings, and async requires installing different libs if they even exist. Node has it better since the libs were developed to be async from the start. Iirc Luvit is what I was looking at, there are both libs and some kinda frameworks for it.

OpenResty and frameworks for it like Lapis could be the better way to go. Nginx is pretty much mandatory anyway, and afaiu synchronous libs can be used then, leaving it to Nginx to chuck requests into multiple Lua threads. A drawback is that LuaJIT, used in Resty, still supports only Lua 5.1 features, which is pretty damn old.

I haven't looked into Lua for web in a few years, but since apparently nothing like Hammerspoon with its built-in http server exists for Linux, I'll need to pick it up again, just to do some custom remote control from the phone.