Live data from Hacker News

Why I chose Lua for this blog

andregarzia.com

61–70 of 159 posts

Re: Why I chose Lua for this blog

#61

Lua 5.1 to 5.2 was a fairly significant breaking change; one that has forked the community to this day with luaJIT never coming on board. 5.2 to 5.3 also broke things with the introduction of integers but mostly at the level of bindings. There is also very little included in terms of standard library and while luarocks exists many significant packages go abandoned. There are breaking language changes in the upcoming…

Why stay on the upgrade treadmill? For such a minimal language, are the updates really that compelling?

NeoVim is committing to 5.1 and leaving it at that.

Re: Why I chose Lua for this blog

#63

Lua 5.1 to 5.2 was a fairly significant breaking change; one that has forked the community to this day with luaJIT never coming on board. 5.2 to 5.3 also broke things with the introduction of integers but mostly at the level of bindings. There is also very little included in terms of standard library and while luarocks exists many significant packages go abandoned. There are breaking language changes in the upcoming…

Why stay on the upgrade treadmill? For such a minimal language, are the updates really that compelling? NeoVim is committing to 5.1 and leaving it at that.

Sure that's an option, most distros continue to include every lua version back to at least 5.1; and since luaJIT stayed there a lot of the rest of the community did too.

I guess I'm not sure what advantage lua has in that regard: you could stick to an old version of any language, including node, which was called out as being hard to keep up with.

Re: Why I chose Lua for this blog

#64

Earlier quoted context omitted.

Why stay on the upgrade treadmill? For such a minimal language, are the updates really that compelling? NeoVim is committing to 5.1 and leaving it at that.

Sure that's an option, most distros continue to include every lua version back to at least 5.1; and since luaJIT stayed there a lot of the rest of the community did too. I guess I'm not sure what advantage lua has in that regard: you could stick to an old version of any language, including node, which was called out as being hard to keep up with.

The simple interpreter seems worth a lot. The official one is under 20k lines. There are reimplementations in many other host language (Go,Rust,JS, etc). Meaning it should be possible run Lua code forever without maintaining a full legacy virtual machine OS. I am not sure I can compile Node today, let alone N years from now as compilers and platforms shift.

Re: Why I chose Lua for this blog

#65
post #5

I miss the days when "implement your own blogging engine" was one of the most popular learning projects for engineers. We should bring that back! Its such a great way to play around with client- and server-side development options in an almost zero-risk environment.

Everything web-facing, if it's not a static website delivered by a well-tested web server, happens in a high-risk environment. And doubly so, if, like in this case, stuff like custom cgi libraries are involved. One has to be either very confident in their skills to do that or very, very brave.

My point here is that if someone breaks your blog, they've broken your blog. The blast radius of that should be strictly limited.

Obviously don't go rolling your custom CGI scripts on a server that also hosts your personal email - but these days we are spoiled for choice in terms of isolated hosting strategies for a blog.

Heroku, Vercel, Cloudflare Workers, Fly.io, GitHub Pages, a $5/month VPS...

Re: Why I chose Lua for this blog

#66
post #2

Author of the blog here in case anyone has questions.

What are your thoughts on something like arturo which I know is quite recent but it has a lot of features for scripting and an argument might in fact be made that it is in fact it might have too many batteries but it was an absolute pleasure to learn and I had a lot of aha moments in their discord server and the community was really pleasant to follow through actually. I know its definitely smaller but I just want yo…

Took a while to find examples:

https://arturo-lang.io/documentation/in-a-nutshell/

It looks interesting.

Re: Why I chose Lua for this blog

#67
post #7

I don't know man, every time I tried to learn Lua (to write nvim plugins and HammerSpoon spoons) I disliked the ergonomics of the language. I don't understand why people say it's an easy language— easy ≠ simple

I absolutely love Lua. It’s like scheme without the ((())((((()(((())))( noise.

Re: Why I chose Lua for this blog

#68

Earlier quoted context omitted.

LuaJIT bucks the trend of slow-warmup JITs. It is extremely quick to compile and load, and its interpreter is very fast -- faster than the JIT-compiled code from LuaJIT v1 IIRC, and certainly faster than the interpreter of Lua. It wasn't until LuaJIT that I realized that JIT didn't inherently have to be these slow lumbering beasts that take hundreds of milliseconds just to wake from their slumber.

Yet I've witnessed Lua 5.1 launching faster than luajit for some of my use cases. My point still stands though. Don't just use LuaJIT thinking it will magically make things faster in all cases. If you are embedding, LuaJIT is a no-brainer. If you are using a stand-alone interpreter, measure if you care about reality.

> If you are embedding, LuaJIT is a no-brainer. If you are using a stand-alone interpreter, measure if you care about reality.

This seems backwards. Lua is easier to embed and luajit is just as easy to install standalone and has zero downsides.

Re: Why I chose Lua for this blog

#70
I love the Lua language, has all the nice to have data structures, no need to think about memory management, is straightforward (keep the whole thing in your head easily) and will go forever without changes. Just stick with v5.1.

It’s so cool to take the interpreter source, type make and be using it in one minute.

Post reply on HN