[ANN] Lua 5.5.0 (rc2) now available

87 views
Skip to first unread message

Luiz Henrique de Figueiredo

unread,
Dec 1, 2025, 9:13:18 AM (2 days ago) Dec 1
to lua-l
Lua 5.5 is the next version of Lua.

Lua 5.5.0 (rc2) is now available for testing at
https://www.lua.org/work/lua-5.5.0-rc2.tar.gz

The SHA256 checksum is
50b24b8fce4644a4590af0f23c65945836161515b9e87c45ee1f0e62b0255a1d

The Git commit ID is
985ef32248f17ae4ca2d4e83e5e39e15393bb2f6

The main changes in Lua 5.5.0 are listed at
https://www.lua.org/work/doc/#changes

An updated reference manual is included and also available at
https://www.lua.org/work/doc

The complete diffs from rc1 to rc2 are available at
https://www.lua.org/work/diffs-lua-5.5.0-rc1-rc2.html
https://www.lua.org/work/diffu-lua-5.5.0-rc1-rc2.html

A test suite is available at
https://www.lua.org/work/lua-5.5.0-tests.tar.gz

All feedback welcome. Thanks.
--lhf

Bas Groothedde

unread,
Dec 1, 2025, 2:13:57 PM (2 days ago) Dec 1
to lu...@googlegroups.com

Thank you,

The new flagging confuses me a bit, lobject.h:

/*
** Flags in Prototypes
*/
#define PF_VAHID  1  /* function has hidden vararg arguments */
#define PF_VATAB  2  /* function has vararg table */
#define PF_FIXED  4  /* prototype has parts in fixed memory */


In my testing I cannot quite figure out how to detect a named vararg argument that is not a vararg table.


Thanks,

~b


Roberto Ierusalimschy

unread,
Dec 1, 2025, 2:52:34 PM (2 days ago) Dec 1
to 'Bas Groothedde' via lua-l
> The new flagging confuses me a bit, lobject.h:
>
> /*
> ** Flags in Prototypes
> */
> #define PF_VAHID 1 /* function has hidden vararg arguments */
> #define PF_VATAB 2 /* function has vararg table */
> #define PF_FIXED 4 /* prototype has parts in fixed memory */
>
> In my testing I cannot quite figure out how to detect a named vararg
> argument that is not a vararg table.

function foo (n, ...t) return t[n] end

-- Roberto

Rett Berg

unread,
Dec 1, 2025, 7:39:56 PM (2 days ago) Dec 1
to lua-l
Can these two be elaborated on in the changes a bit more?

* declarations for global variables: does this mean I can say "global foo"? Is it just for documentation or does it affect anything?
* for-loop variables are read only: does this mean in "for k,v in pairs(t)" I can no longer do "k = 42"?
* major collections done incrementally: what does this mean?

Thanks,
Rett

Rett Berg

unread,
Dec 1, 2025, 7:46:31 PM (2 days ago) Dec 1
to lua-l
I see that "global" is documented in https://www.lua.org/work/doc/manual.html#8 "3.3.7 – Variable Declarations"

sur-behoffski

unread,
Dec 1, 2025, 9:59:42 PM (2 days ago) Dec 1
to lu...@googlegroups.com, Luiz Henrique de Figueiredo
On 2025-12-02 00:43, Luiz Henrique de Figueiredo wrote:
> Lua 5.5 is the next version of Lua.
>
> Lua 5.5.0 (rc2) is now available for testing at
> https://www.lua.org/work/lua-5.5.0-rc2.tar.gz
> [...]
>
> An updated reference manual is included and also available at
> https://www.lua.org/work/doc [...]

Thanks for the new -rc.

While browsing the Lua 5.5 reference manual (triggered by the
previous query about 'global'), I was looking at Section 2.1 -
Values and Types. Some observations:

- Perhaps add "signed" to the definition of "integer";

- "two-complement arithmetic" is more traditionally called
"two's complement arithmetic", or maybe
"two's-complement arithmetic";

- IEEE 754 is quoted as the "usual" floating-point standard
in Section 3.4.1; also, 2.1 also prohibits IEEE 754 "NaN"
as a table index. Given these snippets, is it worth
promoting "usually IEEE 754" from 3.4.1 into the definition
of floating-point numbers in 2.1?

I accept that the manual is very carefully written, and so the
suggestions above may cause more harm than good. In any case,
thanks for your consideration.

s-b etc

Bas Groothedde

unread,
Dec 2, 2025, 1:12:48 PM (13 hours ago) Dec 2
to lu...@googlegroups.com
I understand, but the rc2 proto flags do no longer distinguish whether a vararg pack is named or not (unless it is a PF_VATAB)?
 
--@main = function id: 0, PF_VAHID: 1, PF_VATAB: 0, is_variadic: true, num_params: 0

--function id: 1, PF_VAHID: 1, PF_VATAB: 0, is_variadic: true, num_params: 1
function foo1(n, ...t)
    return t[n]
end
--function id: 2, PF_VAHID: 1, PF_VATAB: 0, is_variadic: true, num_params: 1
function foo2(n, ...)
    local v1 = ...;
end
--function id: 3, PF_VAHID: 0, PF_VATAB: 2, is_variadic: true, num_params: 1
function foo3(n, ...t)
    t[n] = true
end
 
foo2 has a local named '(vararg table)', but main does not and is vararg too. How to distinguish named and unnamed non-table varargs in bytecode as in foo1 and foo2 (and the main chunk)?
 
~b

Andrey Dobrovolsky

unread,
Dec 2, 2025, 3:25:33 PM (11 hours ago) Dec 2
to lu...@googlegroups.com
вт, 2 груд. 2025 р. о 20:12 'Bas Groothedde' via lua-l
<lu...@googlegroups.com> пише:
>
> How to distinguish named and unnamed non-table varargs in bytecode as in foo1 and foo2 (and the main chunk)?

I think they are indistinguishable from outside the function. What is
the purpose of such knowledge?


In manual.html line 2991:

for instance <code>a , b, c = e1, e2, e3</code>

looks like there is an extraneous space after the name "a"

-- Andrew

Bas Groothedde

unread,
Dec 2, 2025, 3:38:19 PM (11 hours ago) Dec 2
to lu...@googlegroups.com

> On 2 Dec 2025, at 21:25, Andrey Dobrovolsky <andrey.dobro...@gmail.com> wrote:
>
> вт, 2 груд. 2025 р. о 20:12 'Bas Groothedde' via lua-l
> <lu...@googlegroups.com> пише:
>>
>> How to distinguish named and unnamed non-table varargs in bytecode as in foo1 and foo2 (and the main chunk)?
>
> I think they are indistinguishable from outside the function. What is
> the purpose of such knowledge?

Static analysis of bytecode, parsing and reporting such as in luac.nl - it is not a necessity, I am merely wondering as in rc1 the flags were slightly different where this determination was made possible.

~b
Reply all
Reply to author
Forward
0 new messages