Live data from Hacker News

Lua 5.5

lua.org

131–138 of 138 posts

Re: Lua 5.5

#131

For what kinds of applications is LuaJIT being used? I’ve always found the standard interpreter fast enough for my needs. Especially when compared to Python.

The most recent integration I've seen is is OpenMW, which is an open source re-implementation of the Morrowind game engine. Basically it is built on the assumption that people are going to make mods that do a ridiculous amount of number-crunching in lua so any small improvement to performance is welcome.

Re: Lua 5.5

#132

Earlier quoted context omitted.

What is nuts?

Means like "a crazy thing" in slang, I think.

That is correct. Not sure about all dialects of English but in American English, "nuts" is a slang synonym for "insane". So to say "the whole thing is nuts" could be rephrased as "the situation is crazy".

Re: Lua 5.5

#133
post #60
post #56

Earlier quoted context omitted.

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.

Isn't it a bit naive to declare that, just because Lua created a new minor version, it should be somehow better? The author of LuaJIT has often written his arguments, including why he disagrees with the changes to the language, why they should have been implemented as libraries instead, that in his view LuaJIT is still more performant and more widely used than PUC Lua, and more.

As for forking, you can try, but I would warn you that one does not simply fork LuaJIT. Required is deep expertise in tracing JIT compilers, in assembly and in many different computer architectures. Nobody was really up to the task when Mike Pall announced that he was searching for a maintainer, before his eventual return.

Re: Lua 5.5

#134

please resurrect Mike Pall

But he has been working actively on LuaJIT. According to [1], he has come to the conclusion that, instead of working on LuaJIT 2.2, it would be a better investment of his time to go big on v3.0 and rearchitect it. LuaJIT 2.1 is to be maintained.

[1] https://www.freelists.org/post/luajit/Question-about-LuaJIT-...

Re: Lua 5.5

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

The point now is so that if you use a `global` statement in your code, Lua will now error on misspellings of local variables when compiling, rather than defaulting to treat them as globals.

Re: Lua 5.5

#136

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,…

  function fib(a)
    return countfib(1,1,a)
  end
  function countfib(a,b,n)
    if n == 1 then
      return a
    else
      -- proper tail call
      return countfib(b,a+b,n-1)
    end
  end
  print(fib(6)) --> 8

Re: Lua 5.5

#137
post #105
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?

I strenuously disagree. Not every language needs to chase trends and pile on unnecessary complexity because developers want the latest shiny language toys to play with. It's good to have a simple, stable language that works and that you can depend on to remain sane for the forseeable future. C is a language like that but I fear the feature creep is coming (auto? AUTO??.) JS is a lost cause.

Languages are products as well, either they evolve to cater to new audiences, or they slowly die as the userbase shrinks away with the passing of each developer generation.

Re: Lua 5.5

#138
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?

Do you have any reason to upgrade to 5.5? Many people still use 5.1 because that is already a complete language that works fine. Most people don't really need the new features. Plus if you stay on 5.1 you get compatibility with LuaJit and Luau so much better performance.

There are nice new features in recent updates, but so far our strategy has been to stick to the version we use.
Post reply on HN