Live data from Hacker News

Lua 5.5

lua.org

51–60 of 138 posts

Re: Lua 5.5

#51
post #42

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

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 of considerations for not choosing lua is a bit silly, but to highlight array indexing and only that as the only thing you'd need to know... well i don't know how to put it that wouldn't be impolite.

either way, at least you can't toggle between indexes starting at zero and one, (at least not that i can recall.)

Re: Lua 5.5

#52
post #49

Earlier quoted context omitted.

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.

OK, then I got some wrong info. If it's stuck at it deliberately, then it's worse. May be someone should fork it and bring it up to date with recent Lua versions. Why is this split needed?

My understanding is that there was a language fork after 5.1. One thing was a complete reworking of how math works. It used to be just floating point for everything but the new idea was to make it like Python 3. So most operations are float/integer with some weird exceptions.

As with any language fork there will be some who stay and others who switch to the new thing. Often a fork will drive people away from a particular language as in my case.

Re: Lua 5.5

#53
post #49

Earlier quoted context omitted.

OK, then I got some wrong info. If it's stuck at it deliberately, then it's worse. May be someone should fork it and bring it up to date with recent Lua versions. Why is this split needed?

My understanding is that there was a language fork after 5.1. One thing was a complete reworking of how math works. It used to be just floating point for everything but the new idea was to make it like Python 3. So most operations are float/integer with some weird exceptions. As with any language fork there will be some who stay and others who switch to the new thing. Often a fork will drive people away from a partic…

Language fork is unfortunate. Python situation isn't much of a fork really. Python 2 is basically EOL.

Re: Lua 5.5

#54
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.

I think that's doable. https://github.com/zacharie410/lua-browser-dom-demo

(Using https://github.com/fengari-lua/fengari-web )

Re: Lua 5.5

#55
post #4

One 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

#56
post #49

Earlier quoted context omitted.

OK, then I got some wrong info. If it's stuck at it deliberately, then it's worse. May be someone should fork it and bring it up to date with recent Lua versions. Why is this split needed?

My understanding is that there was a language fork after 5.1. One thing was a complete reworking of how math works. It used to be just floating point for everything but the new idea was to make it like Python 3. So most operations are float/integer with some weird exceptions. As with any language fork there will be some who stay and others who switch to the new thing. Often a fork will drive people away from a partic…

Lua's nature as a primarily embedded language means backwards compatibility is not guaranteed between any version. If 5.2 was a language fork then so was 5.3, 5.4, 5.5, etc. (5.2 did have some more significant changes though)

For that reason luajit staying at ~5.1 actually works in its favor. Rather than trying to follow the moving target of the newest version, it gives a robust focal point for the lua ecosystem, while modern versions can be developed and continue to serve their purpose in embedded systems and whatnot where appropriate.

Re: Lua 5.5

#57
post #37
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.

> I feel like Lua is absolutely underrated. This sounds like an offhand Youtube comment, I'm afraid. Underrated how? Its principal strength, easy embedding with the ability to work as an extension language, is well known in the circles where it matters. The authors never gave an impression that they'd aim to make it a language to bury all other scripting languages, which I find refreshing in the winner-take-all cultu…

That was originally what Dart was created for.

Beside all the rabblerousing that it came from the same company as Chrome, there was a real concern about compatibility and spreading the platform too thin, if every engine had to maintain multiple VMs in parallel.

It seems like the only language browsers will ever have is JavaScript (although it's still up to us to decide how that language evolves over time).

Re: Lua 5.5

#58
post #42

Earlier quoted context omitted.

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.

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

#59
I 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 that - people porting it to obscure platforms and making mods to extend the game.

It's also really cool to see how the game handles all the different ecosystems it exists in (Steam, Game Pass, Apple, Android, Nintendo Switch…).

I've got a Nix derivation that ought to be able to run any version of the game in Linux. Now I just need to figure out why it crashes when opened in game mode.

All this is way more effort than just spending the $10 to get it to run in Steam natively, but it's more interesting this way.

Re: Lua 5.5

#60
post #56

Earlier quoted context omitted.

My understanding is that there was a language fork after 5.1. One thing was a complete reworking of how math works. It used to be just floating point for everything but the new idea was to make it like Python 3. So most operations are float/integer with some weird exceptions. As with any language fork there will be some who stay and others who switch to the new thing. Often a fork will drive people away from a partic…

Lua's nature as a primarily embedded language means backwards compatibility is not guaranteed between any version. If 5.2 was a language fork then so was 5.3, 5.4, 5.5, etc. (5.2 did have some more significant changes though) For that reason luajit staying at ~5.1 actually works in its favor. Rather than trying to follow the moving target of the newest version, it gives a robust focal point for the lua ecosystem, whi…

I don't see a reason not to update LuaJIT still. Changes in Lua aren't just version numbers, it should be improving something, meaning that would be missing in LuaJIT.
Post reply on HN