i think the most interesting design detail of lua tables is just glossed over as "nil-holes" in this article. namely, that nil values do not exist. there is no table.delete(key) method, you just zero out the value and the key stops existing. the same thing is true for any variable, if you set it to nil it ceases to be. i find that implementation fascinating.
post
Such a strange website. Pretty decent content, but just lying around as HTML/js/css files without a coherent layout to tie them all together? Reminds me of good ol' internet.
Yes, I like it. It makes only one (big) mistake: a horizontal table-of-contents. Nobody does that. You can put it on the left, or above the text, but... not like that.
wdym coherent layout? this thing looks more coherent than any reactwebbloatapp i have seen
it is also very mobile friendly, no lag while scrolling because react is being the bloated garbage it is
I'm guessing the author didn't want to mess with a framework every time they post, with different page layouts they might've evolved over the years. Though the absence of site-wide navigation is still baffling.
Good HTML is coherent by itself. Depends on if the html is good or not.
Experience has shown that having a map as your only data structure is definitely a mistake. It's much better to support real arrays too. I doubt it would have made the implementation significantly more complex either (maybe even simpler for luajit).
Idk, PHP chugs on splendidly with arrays that combine both arrays and maps. I regret to say that PHP is considerably faster than some better languages like Python and Ruby, and arrays are the workhorse structure there.
(Like, PHP's approach to FastCGI is that the script's runtime is destroyed after every request and then started anew for the next one, and it still outperforms Python's always-on approach. Of mainstream languages, only Node can compete.)
Right but it's fast(ish) in spite of that. It would still be better with separate types.
Weird choice of lifestyle to complain about the two fastest scripting languages being ‘fast-ish’. While you complain, the world is using Lua for embedded scripts and game programming, and PHP for the web.
People straight up write libraries in Lua instead of C, because the performance difference is unnoticeable. But apparently it's only ‘fastish’.
any benchmarks to support this claim?
all 24 comments