Kinda curious why you did not go with OpenResty?
Why I chose Lua for this blog
21–30 of 159 posts
Re: Why I chose Lua for this blog
#22I 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
There are languages that compile to Lua. Have you investigated those? For example, you can use a TypeScript syntax and pick up free typechecking along the way: https://typescripttolua.github.io/ There's also the venerable MoonScript: https://moonscript.org/ And YueScript, a personal fave: https://yuescript.org/doc/ A whole list: https://github.com/hengestone/lua-languages
Re: Why I chose Lua for this blog
#23Author of the blog here in case anyone has questions.
Re: Why I chose Lua for this blog
#24Re: Why I chose Lua for this blog
#25LuaJIT is awesome. I've been converting my Bash scripts/functions to it, with much success thus far.
JIT-compiled languages aren't generally faster in starting up, they generally are used to speed up long-lived programs that have hot sections.
Re: Why I chose Lua for this blog
#26I spend a lot of time blogging but all I use is a ~50 line Python file that converts my markdown pages to HTML, adds my template, and generates the ToC page. Then I push to GitHub Pages. I can't imagine needing more than that. Why are these blog stacks so complex?
Admittedly most of my blogging history has been something of a path towards simplification from hand-rolled PHP+MySQL, with custom "forum code" markup language, stuff before "blogging" was even an agreed upon term for it (and before Markdown was anywhere near as pervasive), to complex third-party beasts like Drupal, to homegrown Python (and reStructuredText), to very simple SSG tools (these days still Jekyll, but I don't like working in Ruby much, so I keep debating a switch to Lume but I don't think its Redirects plugin is yet compatible enough with GitHub Pages for my liking and I haven't tested its RSS support yet, both of which are personal hard requirements).
Re: Why I chose Lua for this blog
#27Re: Why I chose Lua for this blog
#28I 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
Re: Why I chose Lua for this blog
#29LuaJIT is awesome. I've been converting my Bash scripts/functions to it, with much success thus far.
You may want to benchmark lua versus luajit if you are writing scripts or other short-lived programs. JIT-compiled languages aren't generally faster in starting up, they generally are used to speed up long-lived programs that have hot sections.
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.
Re: Why I chose Lua for this blog
#30But 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?