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.
I suppose it's because fewer people have personal web sites these days? What is the typical learning project these days for beginners of a programming language?
Why I chose Lua for this blog
131–140 of 159 posts
Re: Why I chose Lua for this blog
#132I 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.
https://github.com/williamcotton/webpipe
My blog code:
https://github.com/williamcotton/williamcotton.com/blob/mast...
GET /hello/:world
|> jq: `{ world: .params.world }`
|> handlebars: `hello, {{world}}
`
describe "hello, world"
it "calls the route"
when calling GET /hello/world
then status is 200
and output equals `hello, world
`Re: Why I chose Lua for this blog
#133I think what is really meant by choosing boring technology is that it be simple, proven, reliable.
That's the key part. Minimize cognitive load, maximize peace of mind.
Some ecosystems are "boring" in the sense that developers are not excited about them, but they also maximize your blood pressure and chance of shipping defects. That's the wrong kind of boring!
Re: Why I chose Lua for this blog
#134(For years now I publish with Hugo/Bunny CDN ($1/month))
I from time to time wonder if I should write my own engine. Then I laugh and write a blog post.
Re: Why I chose Lua for this blog
#135Author of the blog here in case anyone has questions.
Why would you build your blog to fail if some article on it ever gets popular? The fact that the most hits you ever received was 50k in a week isn't relevant; a single important post could receive that in seconds. It basically costs nothing to pre-render a static site, which then serves several orders of magnitude faster. I'm confused why anyone would do it this way in this day and age.
I know some will go 'oh well I want a web interface to create or edit posts in', nothing says you cant just implement that part dynamic and have it update static components on modification of posts.
Re: Why I chose Lua for this blog
#136I worked with Lua for awhile but never got over the 1-based indexing.
I worked briefly professionally in Julia a couple years ago, which is 1-indexed, and I found it an easy transition, really. Many scientific computing things are 1-indexed, as Fortran was, too, among other reasons.
My own project is a rewrite / defibrilation of the 1990s LambdaMOO server (https://codeberg.org/timbran/moor/), which had its own OO programming language that was 1-indexed.
It's just not as "weird" as people think, I think it's just a generation of people grew up with C-derived languages and have grown to expect 0 as "normal" when it's really just "accident of history/popularity". I don't think it's objectionable that Lua chose 1-indexing, it is actually more "friendly" to newcomers to programming.
Re: Why I chose Lua for this blog
#137Mine’s in Python. I took that route when it was a relatively obscure thing and PHP was gaining ground over CGI in Apache (at the time having a Python web server was downright weird) and stuck with it for a long time. These days it’s a purely static site generator and a bit too funky to release (there’s a variant over on https://github.com/rcarmo/sushy ) but I really enjoyed maintaining it while it was a small, batter…
Having run Lua on a GameBoy Advance, not that fiddly. At worst, compile it all yourself.
Re: Why I chose Lua for this blog
#138Earlier quoted context omitted.
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 "batterie…
While everything you said there is true, it is a matter of taste for me. I prefer working with PUC Lua over LuaJIT. The speed improvement of LuaJIT doesn't matter for me, the only thing I miss from it is the FFI. I wish PUC Lua had the same FFI interface tbh.
One of these days I'll port OpenResty to use PUC Lua and this FFI.
Re: Why I chose Lua for this blog
#139Earlier quoted context omitted.
I suppose it's because fewer people have personal web sites these days? What is the typical learning project these days for beginners of a programming language?
Maybe the ubiquitous "to do list" app?
I vote for inventory apps. Books, movies, games, whatever.
Re: Why I chose Lua for this blog
#140A large proportion of users may very well be on mobile, but do we just not do flexible layouts in 2025?