Live data from Hacker News

Lua 5.5

lua.org

91–100 of 138 posts

Re: Lua 5.5

#91
post #41

Earlier quoted context omitted.

Yeah, I wish someone would pick up LuaJIT development. From what I've heard it in practice isn't developed anymore and is stuck at Lua 5.1 still.

Not true. It's getting a constant stream of bugfixes. It's also not "stuck" on Lua 5.1, but is deliberately not following Lua's path, except for some backports. There's also a recent post about how a LuaJIT 3 might work.

Where is that post?

Re: Lua 5.5

#92

Earlier quoted context omitted.

> get it to run on SteamOS Huh? I had to do zero extra work to run it on the steam deck.

The version sold in the Steam store runs the Windows build via Proton. (Valve's whole philosophy is you should build one version of your game, and their compatibility layers should be so bulletproof that it runs flawlessly everywhere.) In this case, I had the Game Pass version. It depends on a custom shared object `love.platform` that talks to Microsoft's cloud APIs to save/load your game and achievements. I used Gem…

Interesting, great game I coincidentally also just started to play a few days ago

Re: Lua 5.5

#93
post #20

We never got a new edition of Programming in Lua for 5.4... does that mean we won't ever get one for 5.5?

That's not true, it was published in 2016. I just happen to know because I bought it last week to support the Lua Foundation in the wake of doing some work on Scribunto modules at the Wikimedia projects. They're using Lua 5.1.5, but I figured the author would indicate the feature introduction points and I was correct about that.

I'm only just over halfway through but if I'm being honest, I can't offer much praise for the depth of the material or the treatment it's given: other authoritative volumes I've previously consulted (strangely, Mastering CMake comes to mind first among that cohort) were much more effective at communicating the underlying philosophies of construction and other unobvious practical realities of their subjects. Nevertheless, I do still value having a comprehensive reference at hand to refresh my memory on what's in fact possible when working with a language that I make use of as infrequently as this one.

Re: Lua 5.5

#94
post #30

Earlier quoted context omitted.

Ypu could probably run it in wasm. Of course, without access to the DOM it won't go any further than anything else on wasm. The whole thing is nuts if you ask me. So much lost potential.

What is nuts?

It's slang, it's a reference to legumes I think. https://en.wikipedia.org/wiki/Legume

Re: Lua 5.5

#95
I 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 robotics, it was really a superpower.

Re: Lua 5.5

#96
post #82

One challenge we have with Lua in Mudlet (FOSS text-based MUD client, think something akin to Roblox but for text) is that all of the player-created content is on Lua 5.1, and upgrading to 5.5 would be a breaking change for most. Has anyone solved an ecosystem upgrade like this?

You're probably better off finding a way to support both.

Re: Lua 5.5

#97
post #84

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

Strictly speaking, Lua is not global by default. All free names, that is, all names unqualified with `local`, is actually indexed from a table `_ENV`, which is set to `_G`, the global environment. So, all free names are effectively global by default, but you can change this behavior by put this line at the top of your file `local _G = _G; _ENV = {};`. This way, all free names are indexed from this new table, and all…

Thanks to Lua’s great metaprogramming facilities, and the fact that _G is just a table, another workaround is to add a metamethod to _G that throws an error if you try to declare a global. That way you can still declare globals using rawset if you really want them, but it prevents you from declaring them accidentally in a function body.

Re: Lua 5.5

#98
post #20

We never got a new edition of Programming in Lua for 5.4... does that mean we won't ever get one for 5.5?

That's not true, it was published in 2016. I just happen to know because I bought it last week to support the Lua Foundation in the wake of doing some work on Scribunto modules at the Wikimedia projects. They're using Lua 5.1.5, but I figured the author would indicate the feature introduction points and I was correct about that. I'm only just over halfway through but if I'm being honest, I can't offer much praise for…

According to https://www.lua.org/pil/

> Fourth edition

> Programming in Lua

> by Roberto Ierusalimschy

> Lua.org, August 2016

> The fourth edition updates the book to Lua 5.3

Re: Lua 5.5

#99

How hard is it to put a simple hello world example on the homepage.

Because Lua's Hello World is just `print("hello, world")`, which looks a lot like Python and doesn't tell you much about actually using the language.

So put a slightly more informative hello world example then.

Look at the Go homepage. Or Nim. (But not Rust sadly.)

Re: Lua 5.5

#100
post #82

One challenge we have with Lua in Mudlet (FOSS text-based MUD client, think something akin to Roblox but for text) is that all of the player-created content is on Lua 5.1, and upgrading to 5.5 would be a breaking change for most. Has anyone solved an ecosystem upgrade like this?

Is transpilation a thing in the Lua world like it is for JavaScript?

Like https://moonscript.org/ or https://teal-language.org/ ?
Post reply on HN