Live data from Hacker News

Why I chose Lua for this blog

andregarzia.com

151–159 of 159 posts

Re: Why I chose Lua for this blog

#151
post #137
post #102

Earlier quoted context omitted.

Having run Lua on a GameBoy Advance, not that fiddly. At worst, compile it all yourself.

Targeting a specific platform is easy. Making sure your luarocks builds work across different Linux distros and architectures, not so much...

Absolutely agree.

But... For dev work on my own server? I am targeting a specific platform.

Re: Why I chose Lua for this blog

#152

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…

Be aware that Lua doesn't use semver and that versions take many years to be ready. In this page: https://www.lua.org/versions.html You can see that between 5.3 and 5.4 there were five years. 5.2 to 5.3 was also a five years gap. Breaking changes are well documented and we see them years before they happen and nothing requires you to upgrade. Most code runs on 5.1 forward.

What’s their reason for not using semvar?

Re: Why I chose Lua for this blog

#153

Earlier quoted context omitted.

Be aware that Lua doesn't use semver and that versions take many years to be ready. In this page: https://www.lua.org/versions.html You can see that between 5.3 and 5.4 there were five years. 5.2 to 5.3 was also a five years gap. Breaking changes are well documented and we see them years before they happen and nothing requires you to upgrade. Most code runs on 5.1 forward.

What’s their reason for not using semvar?

Because Lua was created before semver was invented.

Re: Why I chose Lua for this blog

#154
post #147
post #100

Earlier quoted context omitted.

When I was a teenager I wrote my first "CMS" and was very proud. A few months later someone called my parents and asked for me. He said he was a developer and found some issues with security. He gave me a few tipps and suggested me some books and left for good. Never talked to hm again but this was so kind and I learned a lot about secure coding after that.

I wrote a "CMS" in college as a project in PHP (really hot then) so you could drag txt files and images into whatever directories and it would create web pages based on that. Professors were not impressed: "why you would want such thing, a MS Access would be better". I was disappointed, but hey, that's life.

I used PHP for so much stuff in the past. Really gave me a good start in large company but in school they teached us Microsoft FrontPage as the way to go tool for websites. Strange days. Hope you went on with your ideas and don't let anyone tell you otherwise.

Re: Why I chose Lua for this blog

#155
post #151
post #137

Earlier quoted context omitted.

Targeting a specific platform is easy. Making sure your luarocks builds work across different Linux distros and architectures, not so much...

Absolutely agree. But... For dev work on my own server? I am targeting a specific platform.

Yes, but if you develop on one arch/distro and deploy in another...

Re: Why I chose Lua for this blog

#156

Earlier quoted context omitted.

You'd get used to it eventually. Many of us had to go the other way. I grew up with BASIC and Wirth languages (Pascal, Modula-2, etc) that were 1-indexed and to this day even after 25, 30 years of working professionally in 0-based indexed languages I still catch myself here and there having to adjust (and whiteboard coding can sometimes throw me off under pressure), but clearly operate just fine. I worked briefly pro…

As Fortran is , not was.

Yeah fair enough. I was speaking more about historic influence. Fortran is still extensively used, but it was more influential 40 years ago than it is now.

Re: Why I chose Lua for this blog

#157

Earlier quoted context omitted.

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…

Never heard of Arturo before. Went to their page after reading your comments. Omg, it looks so cute and good. Defo up my alley. I love functional and minimalist languages. Thanks for sharing that. I might play with it for some project in the future.

Glad I could help ya! I love arturo as well :)

The creator is an extremely nice person and I am proud that he follows me on github. This might be the highlight of my github right now lol.

Came to learn from awesome-nim about the language and loved it from day one. There are a lot of ways of doing the same thing but maybe that's the point since its rebol inspired.

Re: Why I chose Lua for this blog

#158
post #6
post #2

Author 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.

My blog is yet to fail and I don't believe in premature optimization. I had 50k in a day once in the past and it was ok. If more than that happens in seconds and the blog fails, so be it. It doesn't affect my life at all, I fail too sometimes.

I considered monitoring popular posts and prerendering those. Feels like code bloat for something that might not happen.

Don't get me wrong, this blog used to prerender everything. It kinda sucked to compute which pages were affected by a change in any given page as it might need to patch indexes, cross linked references, and so on. It can be done of course, or you can simply re-render everything anyway. The added friction for development and maintenance was not worth it for me.

It is my personal blog, it is not a personal branding site to show people my cool web skills or anything. If it goes down, let it go down.

Re: Why I chose Lua for this blog

#159
post #6

Earlier quoted context omitted.

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.

By large I agree, its just common best practices these days. Or at least have some components statically generated like the rss feed. 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.

it used to work like that. At the moment, the dynamic pages take miliseconds to rende and ship. Even though static files would be a an order of magnitude faster, we're talking about it already being fast enough for 99% of the time it is needed and that is good enough. Reducing my time and friction maintaining and using my own blog is more important and having five sigma of uptime.
Post reply on HN