please resurrect Mike Pall
Mike Pall made a commit to LuaJIT just a couple of weeks ago.
Lua 5.5
121–130 of 138 posts
Re: Lua 5.5
#122I miss working in Lua. Metatables are pretty powerful, and "everything is in a table" made it super easy to do hot reloading. At one point working on an iOS game, I had things set up so that when I hit save on my PC, my phone would pick up the changes and just start running the new code, as all persistent state was stored in a special table. Someday I need to look into getting the same kind of environment going for r…
I'm building something like Lua for robots, you might want to check it out if you're looking to collaborate. I didn't know about Lua when I started it, but I did end up at an "everything is a table" metaphor because it seemed good for robotics. This does allow for cool things like hot reloading and such. Although, we've since moved to having several distinct data structures which conceptually map to tables, but imple…
How did you miss Lua? It has been available for decades and good SE practice is to evaluate alternatives before commiting to any techonology.
Re: Lua 5.5
#123One of the new features I found interesting, declarations for global variables, is buried in the reference manual. Here's a link to the section that discusses it: https://www.lua.org/manual/5.5/manual.html#2.2
Global-by-default scoping was one of Lua's largest mistakes. I wish they'd fix it, but of course it would break backwards compat.
Re: Lua 5.5
#124Earlier quoted context omitted.
Global-by-default scoping was one of Lua's largest mistakes. I wish they'd fix it, but of course it would break backwards compat.
yeah. I hate typing `local` for every variable. I would prefer they introduce some syntactic sugar like `let`(to mean local variable) and `const`(to mean local and constant).
Re: Lua 5.5
#125How hard is it to put a simple hello world example on the homepage.
Well. You’d have to demonstrate that a[1] is the first offset in an array, and it’s not a great curb appeal to anyone who has programmed computers before.
In Lua you specify the “beginning” and “end” of the iteration, both included. It doesn’t work like in C, where you have an initialization and an invariant. What makes it short in C would make it longer in Lua, and viceversa.
You could argue “why not make loops like C”, then. But that can be extended to the limit: “why have a different language at all?”.
Re: Lua 5.5
#126I recently happened into Balatro through a Game Pass trial. I fell deep down the rabbit hole of trying to get it to run on SteamOS. It's fascinating to see a commercial game whose source is easily read inside the application bundle, and all the modding opportunities it opens up. (It's written in Lua with LÖVE.) Balatro was one of the biggest games of last year, and I'm sure the tinkerability was a big catalyst to tha…
Re: Lua 5.5
#127Re: Lua 5.5
#128I miss working in Lua. Metatables are pretty powerful, and "everything is in a table" made it super easy to do hot reloading. At one point working on an iOS game, I had things set up so that when I hit save on my PC, my phone would pick up the changes and just start running the new code, as all persistent state was stored in a special table. Someday I need to look into getting the same kind of environment going for r…
I'm building something like Lua for robots, you might want to check it out if you're looking to collaborate. I didn't know about Lua when I started it, but I did end up at an "everything is a table" metaphor because it seemed good for robotics. This does allow for cool things like hot reloading and such. Although, we've since moved to having several distinct data structures which conceptually map to tables, but imple…
I’ll take a look at your thing, too!
Re: Lua 5.5
#129Earlier quoted context omitted.
i think i might prefer indexing starting at zero, but it really isn't important. with c it makes total sense for zero-based indexing. frankly though, for lua, how it works and what an array is, it makes more sense for one-based indexing, the only counter-argument being that 1-based indexing puts off people who learned a thing one way and are unable or unwilling to do it a different way. to even include it on a list o…
> either way, at least you can't toggle between indexes starting at zero and one You can, you just have to explicitly assign something to a[0]. Lua doesn't have real arrays, just tables. You have to do it for every table you use/define though, so if you mean "toggle" as in change the default behavior everywhere then I believe you are correct.
Re: Lua 5.5
#130Earlier quoted context omitted.
You kind of always have to go on a quest for a library on the internet, why would lua be any different? For lua, luarocks is its module registry and you can sort by most downloads, which sometimes leads you to buggy modules, but what can you do.
> You kind of always have to go on a quest for a library on the internet Plenty of languages come with standard libraries that are more than sufficient for handling plenty of tasks.
FWIW you can do a lot with pure lua and unless you're importing json there's no reason to include a library for it given that lua itself can be used as the data exchange format.