Live data from Hacker News

Why I chose Lua for this blog

andregarzia.com

71–80 of 159 posts

Re: Why I chose Lua for this blog

#71
post #30

I liked this post, and I can totally understand where you’re coming from… But couldn’t anything you say about Lua also be said about JS? You mentioned how Lua wasn’t batteries included, so you try to limit your libraries. Couldn’t you say the same for JS? JS itself doesn’t change much, it’s the ecosystem. Couldn’t you just pick out some small and stable libraries the same way you could with Lua?

For me, it isn't 100% language warts. It is the customer experience that matters the most for me. Can I compile and ship my products to my customers without having them to install a VMs, container runtime or a language runtime? That the question that is critical for me.

This is the primary reason Lua is interesting to me. As high level as JS/Python but embeddable.

Only problem is I have language ADHD. I use way too many to pick up another like Lua.

Re: Why I chose Lua for this blog

#72
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

it's easy, but the 1 indexes and global by default suck

Lua is the scripting language of [Recoil]. I've been writing some fairly complex game code on it for a few years now, I lost a lot of prejudice over time on 1-indexing.

In fact, at least for this application I've come to enjoy its practicality!

Recoil: https://beyond-all-reason.github.io/RecoilEngine

Re: Why I chose Lua for this blog

#73
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

it's easy, but the 1 indexes and global by default suck

Lua 5.5 will change the way global variables work: AFAICT you’ll be able to opt out of global-by-default

Re: Why I chose Lua for this blog

#75

Kinda curious why you did not go with OpenResty?

I guess it provides less freedom/flexibility on the dev side. You're forced to use LuaJIT, and you're forced to buy into OpenResty's coroutine paradigm where global variables act weird, and stuff like that. Also I bet it doesn't play super nice with LuaRocks.

Totally valid choice to make, but in my opinion OP is missing out. OpenResty is state of the art and has a ton of great libraries embedded in it. It's "batteries included" so to speak, and the batteries are well designed. Yichun Zhang is one of the GOATs, along with Mike Pall. And Roberto, obviously.

Re: Why I chose Lua for this blog

#76
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’ve never understood what people like about it

Re: Why I chose Lua for this blog

#78
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.

[deleted]

Re: Why I chose Lua for this blog

#79
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.

oh my gosh someone got root on your php personal home page

1. nobody cares 2. its not that complicated to write a dynamic web page that isn't going to get pwned

Re: Why I chose Lua for this blog

#80
post #73

Earlier quoted context omitted.

it's easy, but the 1 indexes and global by default suck

Lua 5.5 will change the way global variables work: AFAICT you’ll be able to opt out of global-by-default

Too bad the Lua ecosystem is split between 5.4 and 5.1 due to LuaJIT.
Post reply on HN