Personal site of Leaf Corcoran, creator of itch.io, who writes on Lua, MoonScript, the Lapis framework, and parsing.
HN commenters praise him as an inspiring programmer who ships projects, and recommend Lapis as a fast, Rails-like OpenResty web framework.
> webserver (nginx)
How timely! Right now I'm learning Lapis [1] by building a toy CRUD app that I plan on deploying to fly.io. Lua reminds me of Go insofar as it's a really "dumb" language. You can't get too cute and there are a few powerful abstractions that let you accomplish a lot. Coming from Python (which is an endless horizon of PEPs and build artifact standards and name mangling and kwargs and... well, you get the idea) it's kind of a breath of fresh air.
As for 1-based indexing: it makes more sense. We're all just used to 0-based because that's how C worked. If you stop and think about it early C was really just a veneer on top of assembly and since addressing an array in memory meant having a pointer to the first element that meant that it was arr[0]. We have no need for this decades later.
[1] https://leafo.net/lapis/
This is really cool, I'd love to write frontends in Lua. For side project backend development, I've been using Apache and mod_lua[1] (Openresty is Lua for nginx[2]) for a couple of years now. In particular Lua with Luajit is such a kick ass platform, I've always wondered why it hasn't gotten more attention than it has. There are at least two high quality event loop http servers written with it [3][4] and some quite mature web application frameworks [5][6]. Really seems like the Lua backend story is set to explode.
[1] https://httpd.apache.org/docs/trunk/mod/mod_lua.html
[2] https://openresty.org/en/
[3] https://luvit.io/
[4] https://github.com/daurnimator/lua-http
[5] http://leafo.net/lapis/
[6] http://sailorproject.org/
Hi, saw the post on Lobster [1] but didn't have an account there even if that post was more active.
I'm sure it was fun porting the Lua parser to Go and all but I wanted to let you know that Lua is very powerful on its own for making very nice DSLs, for example it can be used to make an HTML Builder DSL akin to JSX within the language itself (and by the way I think it's far more readable than JSX or XML) [2] and also some build tools use it as a base language [3]
[1]: https://lobste.rs/s/oubncm/i_made_jsx_for_lua_because_i_hate_static
[2]: https://leafo.net/guides/dsl-in-lua.html
[3]: https://xmake.io/#/getting_started
Kinda surprised seeing this here. I made this project 2 years ago and haven't updated it since. It was an interesting proof of concept, but I only took it far enough to run a couple of my games. The only takeaway was that I was really disappointed with the performance of native client OpenGL.
The modern version of Love supports OpenGL ES though so a rewrite like this isn't required, a better approach would just be to try to compile Love.
If you want to see more cool stuff I've done with Lua:
Moonscript: http://moonscript.org
Lapis: http://leafo.net/lapis
I've been thinking along these lines for a while. For python-based, I think your toolkit is a good stake in the ground.
I think Lua-based is very interesting.
openresty is a great choice for replacing the simple glory of what Apache/PHP once was.
Although, Lapis (moonscript/Lua) adopts "Web-MVC", the way its coded is a toolkit of un-opinionated libs. You can skip the MVC stuff and just have a clean set of libs for throwing things in a directory and getting your bang for very few bucks.
http://leafo.net/lapis/
http://moonscript.org/
http://openresty.org/
To get conversations started..
Lapis[1] on Openresty[2] is one of the most simplest, documented, and performant full web framework stack out there, yet almost no one knows it.
Hello World Open[3] - 2.5k teams, only 17 ( < 0.7% ) teams used Lua. This is an open competition, which means people can use their favorite language instead of Java, and less than 1% uses Lua.
The lua community really need to start doing something about this.
1. http://leafo.net/lapis/
2. http://openresty.org/
3. https://helloworldopen.com/teams