Why I chose Lua for this blog
41–50 of 159 posts
Re: Why I chose Lua for this blog
#42I've been thinking of how to make a blog simple recently, and I came across xslt. It looks really cool and seems pretty set in stone, so I thought I'd ask, what are the advantages/drawbacks of making your own tech stack versus xslt? At first glance, it seems perfectly able to handle rss and other simple linking patterns, and pretty much anything can easily be turned into an xml then xslt could be used to generate an…
Re: Why I chose Lua for this blog
#43Re: Why I chose Lua for this blog
#44I've been thinking of how to make a blog simple recently, and I came across xslt. It looks really cool and seems pretty set in stone, so I thought I'd ask, what are the advantages/drawbacks of making your own tech stack versus xslt? At first glance, it seems perfectly able to handle rss and other simple linking patterns, and pretty much anything can easily be turned into an xml then xslt could be used to generate an…
XSLT might be removed from the HTML spec soon, see discussion here: https://news.ycombinator.com/item?id=44952185
xsltproc was preinstalled on my machine actually, the fact I could just run it without installing anything is pretty cool
Re: Why I chose Lua for this blog
#45I've been thinking of how to make a blog simple recently, and I came across xslt. It looks really cool and seems pretty set in stone, so I thought I'd ask, what are the advantages/drawbacks of making your own tech stack versus xslt? At first glance, it seems perfectly able to handle rss and other simple linking patterns, and pretty much anything can easily be turned into an xml then xslt could be used to generate an…
And yes, there is other code I've omitted for brevity. This is used to generate the navigation links for the site. I initially write this ... prior to 2009 (that's when I moved it into git). There have been some minor fixes to the XSL over the years, but it's largely unchanged (for a reason that I hope is obvious). Yes, I still use it, because it still works, and it's for a static website.Re: Why I chose Lua for this blog
#46Earlier quoted context omitted.
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.
What? Are you serious? If you roll your own little cgi-bin perl script behind Apache you're far from vulnerable compared to, say, a WordPress website.
Re: Why I chose Lua for this blog
#47Re: Why I chose Lua for this blog
#48Re: Why I chose Lua for this blog
#49Re: Why I chose Lua for this blog
#50Earlier quoted context omitted.
it's easy, but the 1 indexes and global by default suck
The 1 indexes are only a difference from what you're used to. Lua was made by mathematicians, who of course wanted to address the first element as 1, the second element as 2, etc. 0-indexing makes sense in the context of C where the index operator is syntactic sugar for pointer arithmetic. In higher-level languages like C# and Python and others, it's pretty much just a leftover habit from C devs that we all got used…
for i=1,#arr do
foo(arr[i])
end
I don't feel that strongly for or against either way of indexing though, they both have their pros and cons.