Why I chose Lua for this blog
11–20 of 159 posts
Re: Why I chose Lua for this blog
#12Author of the blog here in case anyone has questions.
> Your blog is your place to experiment and program how you want it
I 100% agree with your statement and people don't need to justify their hobbies. I've done really pointless things simply for lolz and because I wanted.
My question arises because I was surprised in how ... architected and (dare I say) complex the tech stack in your blog is. In my blogging days I wrote my own HTML/CSS and published it on a Internet facing server. Later, I've used CSS templates and Markdown-to-HTML to generate the static content. What is the purpose of Lua and having a database and all the other complexity for what seems like a static blog? Again, "because I wanted to experiment" or "sharpen my skills" is a totally valid answer but seeing I don't have a background in web development I am inquiring to see if there is a technical reason for doing this. Would be curious to learn what, if any, technical problem warrants such a set up :)
Re: Why I chose Lua for this blog
#13I 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
Perhaps people's tastes vary? I find Lua an easy to use language. Easy to embed into C/C++ projects for scripting purposes. Also great when you can only spare 100 kB or so for an interpreter. (Arguably that was more important in the past.)
Re: Why I chose Lua for this blog
#14I 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
When you're doing stuff in nvim or HammerSpoon, you're dealing with someone else's interface and the decisions that they've made.
Re: Why I chose Lua for this blog
#15I 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?
Re: Why I chose Lua for this blog
#16https://github.com/dbohdan/caddy-markdown-site/blob/master/C...
^^ the above combined with caddy git fs to have your md files cloned in memory and refresh every X interval is kind of magical. Git push a new md file and wait X minutes and your website updates.
https://github.com/mohammed90/caddy-git-fs
====
Or a one-file FastHTML (python web framework) solution:
https://gist.github.com/simonMoisselin/f63c52f087704c99b6a62...
Re: Why I chose Lua for this blog
#17I've been converting my Bash scripts/functions to it, with much success thus far.
Re: Why I chose Lua for this blog
#18I use perl for the same reasons. The few dynamic scripts that I need I want to write and forget them for years. Odds are with perl they'll still work 20 years from now.
Re: Why I chose Lua for this blog
#19I 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'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
#20I 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
Of course it has its warts, but given the topic, almost everything is better than a vimscript imho.