Live data from Hacker News

Lua 5.5

lua.org

111–120 of 138 posts

Re: Lua 5.5

#111
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 typically don't update Lua, you pick a version and stick with it.

Re: Lua 5.5

#113

Earlier quoted context omitted.

Where is that post?

https://www.freelists.org/post/luajit/Question-about-LuaJIT-... Warning: Ridiculous cookie consent banner, needs dozens of clicks to opt out.

This cookie consent banner is handled in 0 clicks thanks to Consent-O-Matic Firefox extension

Re: Lua 5.5

#114

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…

could it be that game mode is attempting to run the game in compat mode even though you are running the native build?

Re: Lua 5.5

#116
post #30
post #26

I feel like Lua is absolutely underrated. I just wish one of the mainstream browsers actually puts their foot down and starts supporting Lua as scripting language.

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.

I transpiled the runtime into wasm and made an interactive shell: https://thecatbutt.com/lua/

Re: Lua 5.5

#117

Earlier quoted context omitted.

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

Rather than Hello World, I'd rather see something like a classic Fibonacci calculator with recursion. That way you see function definitions, variable typing, math operations (Lua doesn't have increment/decrement operators or augmented assignments), and even tail-call recursion if it's an option. Hello World is really only useful as an environment verification - do you have your machine set up so you can run the code, or are you missing something?

Re: Lua 5.5

#118

Earlier quoted context omitted.

So put a slightly more informative hello world example then. Look at the Go homepage. Or Nim. (But not Rust sadly.)

Rather than Hello World, I'd rather see something like a classic Fibonacci calculator with recursion. That way you see function definitions, variable typing, math operations (Lua doesn't have increment/decrement operators or augmented assignments), and even tail-call recursion if it's an option. Hello World is really only useful as an environment verification - do you have your machine set up so you can run the code,…

Look at the Go homepage. It has a variety of examples.

Re: Lua 5.5

#119
post #48

Earlier quoted context omitted.

Why did you find this interesting?

For me it's interesting because global variable declarations haven't been needed before, so why now? Also, I'm not sure `global` was reserved before, but now it seems to be.

lua does not preserve compatibility between minor versions. As such they don't need to reserve words for future use.

Re: Lua 5.5

#120
post #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 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 implementation and syntax-wise have differences (mostly for performance).

BTW Basis was a good idea, I remember reading about Nondeterministic replay is a big problem on platforms like ROS.

Post reply on HN