[ANN] Lua 5.4.0 (rc5) now available

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Lua 5.4.0 (rc5) now available

Luiz Henrique de Figueiredo
Lua 5.4.0 (rc5) is now available for testing at
        http://www.lua.org/work/lua-5.4.0-rc5.tar.gz

The checksums are
        MD5 4425152a3105df139a72aba2fb1eec93  -
        SHA1 dd23dade0313915a65adc360591a063db797477c  -

This is the final version of Lua 5.4.0 (rc5).

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

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

The complete diffs from rc4 to rc5 are available at
        http://www.lua.org/work/diffs-lua-5.4.0-rc4-rc5.html
        http://www.lua.org/work/diffu-lua-5.4.0-rc4-rc5.html

To build Lua in a common Unix-like platform, just do
        make
The Makefile will guess your platform using uname and build Lua for it.
We welcome feedback on this, which is new, especially more uname targets
with explicit rules and fixes for existing ones.

We also welcome feedback on the listings output by luac -l -l, because
luac has been rewritten to account for the new VM instructions.

All feedback welcome. Thanks.
--lhf
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Jonathan Goble
On Wed, Jun 10, 2020 at 5:25 PM Luiz Henrique de Figueiredo <[hidden email]> wrote:
Lua 5.4.0 (rc5) is now available for testing at
        http://www.lua.org/work/lua-5.4.0-rc5.tar.gz

I've never seen any piece of software have this many release candidates. Are we approaching a world record?
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

云风 Cloud Wu
Jonathan Goble <[hidden email]> 于2020年6月11日周四 上午9:21写道:
>
> On Wed, Jun 10, 2020 at 5:25 PM Luiz Henrique de Figueiredo <[hidden email]> wrote:
>>
>> Lua 5.4.0 (rc5) is now available for testing at
>>         http://www.lua.org/work/lua-5.4.0-rc5.tar.gz
>
>
> I've never seen any piece of software have this many release candidates. Are we approaching a world record?

We have a long way to get a record. PHP 7.0.0 had RC8 before it released.
https://www.php.net/archive/2015.php

--
http://blog.codingnow.com
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Pierre Chapuis
On Thu, Jun 11, 2020, at 03:56, 云风 Cloud Wu wrote:

> Jonathan Goble <[hidden email]> 于2020年6月11日周四 上午9:21写道:
> >
> > On Wed, Jun 10, 2020 at 5:25 PM Luiz Henrique de Figueiredo <[hidden email]> wrote:
> >>
> >> Lua 5.4.0 (rc5) is now available for testing at
> >>         http://www.lua.org/work/lua-5.4.0-rc5.tar.gz
> >
> >
> > I've never seen any piece of software have this many release candidates. Are we approaching a world record?
>
> We have a long way to get a record. PHP 7.0.0 had RC8 before it released.
> https://www.php.net/archive/2015.php

Linux kernels often have more. Linux 3.1 had 10 RC releases. 5 is pretty average, Lua 5.3 had 4 as well.

--
Pierre Chapuis
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Luiz Henrique de Figueiredo
In reply to this post by Jonathan Goble
> I've never seen any piece of software have this many release candidates.

This is common, especially for the first release of new versions:
Lua 5.3.0 had 5, Lua 5.2.0 had 8.
We don't want to ship code with known bugs or glitches.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Lorenzo Donati-3
In reply to this post by Luiz Henrique de Figueiredo
On 10/06/2020 23:24, Luiz Henrique de Figueiredo wrote:
> Lua 5.4.0 (rc5) is now available for testing at
> http://www.lua.org/work/lua-5.4.0-rc5.tar.gz
[...]
>
> All feedback welcome. Thanks.
> --lhf
>

Small RFE for reference manual. I stumbled on this almost every time.
I find table.move description extremely confusing:

table.move(a1, f, e, t [,a2])

Not only are the tables indicated by "a" and an index by "t", combined
with the arrangement of the args it becomes not intuitive at all.


May I suggest changing the "prototype" to:

table.move(ts, is1, is2, id [,td])

This more closely matches other function descriptions and is consistent
with the terminology in the text below. Moreover it is clear at a glance.

ts = source table
is1, is2 = indexes in the source table
td = destination table
id = index in the destination table


I don't know if I'm the only one that gets that prototype wrong, but any
time I look at the doc I have to read it through because if I just blink
at it it just won't stick.

Cheers!

-- Lorenzo
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

TonyMc
In reply to this post by Luiz Henrique de Figueiredo

On 10/06/2020 22:24, Luiz Henrique de Figueiredo wrote:

To build Lua in a common Unix-like platform, just do
    make
The Makefile will guess your platform using uname and build Lua for it.
We welcome feedback on this, which is new, especially more uname targets
with explicit rules and fixes for existing ones.

We also welcome feedback on the listings output by luac -l -l, because
luac has been rewritten to account for the new VM instructions.

All feedback welcome. Thanks.
--lhf

Hi,

on xubuntu 20.04, if I just do make as suggested here I get a Linux build without readline.  I need to do

    make linux-readline

to get readline built in.  I don't know how others feel, but it seems to me that with readline would be a more useful default make target.

Best, Tony

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Jonathan Goble
On Thu, Jun 11, 2020 at 12:36 PM TonyMcC <[hidden email]> wrote:

On 10/06/2020 22:24, Luiz Henrique de Figueiredo wrote:

To build Lua in a common Unix-like platform, just do
    make
The Makefile will guess your platform using uname and build Lua for it.
We welcome feedback on this, which is new, especially more uname targets
with explicit rules and fixes for existing ones.

We also welcome feedback on the listings output by luac -l -l, because
luac has been rewritten to account for the new VM instructions.

All feedback welcome. Thanks.
--lhf

Hi,

on xubuntu 20.04, if I just do make as suggested here I get a Linux build without readline.  I need to do

    make linux-readline

to get readline built in.  I don't know how others feel, but it seems to me that with readline would be a more useful default make target.

Best, Tony

I agree. This has been bugging me for quite a while. readline should be the default because it's expected in most shells and REPLs. Not having readline by default is confusing.

In a perfect world, the Makefile would include code to detect whether the readline library exists and automatically use it if found.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Luiz Henrique de Figueiredo
In reply to this post by TonyMc
> it seems to me that with readline would be a more useful default make target.

The default before 5.4.0 was linux with readline but it generated a
lot of noise from people that did not have the readline development
package installed. Now we expect some noise from those that do have it
and want readline :-(

Anyway, the fix is just to change src/Makefile

from

Linux linux:    linux-noreadline

to

Linux linux:    linux-readline
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Luiz Henrique de Figueiredo
In reply to this post by Jonathan Goble
> In a perfect world, the Makefile would include code to detect whether the readline library exists and automatically use it if found.

If you can contribute simple portable code that does this, it'd be great.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Jonathan Goble
On Thu, Jun 11, 2020 at 1:35 PM Luiz Henrique de Figueiredo <[hidden email]> wrote:
> In a perfect world, the Makefile would include code to detect whether the readline library exists and automatically use it if found.

If you can contribute simple portable code that does this, it'd be great.

I'll look at that this weekend. I don't think it would be too complex.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

William Ahern
In reply to this post by Luiz Henrique de Figueiredo
On Thu, Jun 11, 2020 at 02:34:46PM -0300, Luiz Henrique de Figueiredo wrote:
> > In a perfect world, the Makefile would include code to detect whether the readline library exists and automatically use it if found.
>
> If you can contribute simple portable code that does this, it'd be great.

I had an hour to kill. The following was tested and works correctly with the
native make implementations on AIX, FreeBSD, NetBSD, OpenBSD, and Solaris,
as well as with GNU Make. (But see AIX notes.) Excepting the command
substitution constructs and the macro expansion pattern replacement
construct ($(MACRO:PATT=REPL)), as far as I know everything else is POSIX
compliant. In particular, the use of recursive expansion and dynamically
evaluated macro names is sound as far as I understand. Macro expansion
pattern replacement is so well supported that the POSIX standard notes that
it may be mandated in the future.


BOOL,1 = 1
BOOL,0 = 0
BOOL,  = 0

OR,1,1 = 1
OR,1,0 = 1
OR,0,1 = 1
OR,0,0 = 0

HAVE_READLINE.cmd = printf "\043include <readline/readline.h>\n" | $(CC) $(CFLAGS) -E - 2>/dev/null | grep -q rl_readline_name && echo 1 || echo 0
HAVE_READLINE.gnu = $(shell $(HAVE_READLINE.cmd))
HAVE_READLINE.sun = $(HAVE_READLINE.cmd:sh)
HAVE_READLINE.if.aix,1 = 0
HAVE_READLINE.if.aix,0 = $(OR,$(BOOL,$(HAVE_READLINE.gnu)),$(BOOL,$(HAVE_READLINE.sun)))
HAVE_READLINE = $(HAVE_READLINE.if.aix,$(BOOL,$(BOOL,$(CCC:xlC%=1))))

all:
        @printf "HAVE_READLINE=%s\n" "$(HAVE_READLINE)"

# NOTES:
#
# * Tested with the native (non-GNU) make implementations on AIX 7.1,
#   FreeBSD 12.0, NetBSD 8.0, OpenBSD 3.6, and Solaris 11.4. Tested with
#   various GNU Make versions on all platforms, including macOS.
#
# * Macro strings are evaluated lazily, and syntax errors in macro
#   expansions only occur during evaluation.
#
# * All make implementations, as well as POSIX make, support recursive
#   expansion of macro names.
#
# * Expansion of undefined macros is okay and evaluates to the empty string.
#
# * GNU Make supports $(shell ...).
#
# * Solaris make, OpenBSD make, and FreeBSD/NetBSD make all support
#   $(MACRO:sh). OpenBSD doesn't document it, but it's supported
#   nonetheless.
#
# * No implementation supports both $(shell ...) and $(MACRO:sh), though
#   the use of $(OR) should result in correct expansion even if both
#   constructs are supported.
#
# * $(MACRO:sh) is a syntax error for AIX make, but only on evaluation.
#
# * The BSD (and future POSIX) assignment operator != is also a syntax error
#   for AIX make and Solaris make, yet there's no way to lazily evaluate it
#   and thus no way to make evaluation conditional.
#
# * AIX make does not support any form of command substitution. The best
#   we can do is redirect expansions to something benign.
#
# * AIX make predefines $(CCC) to xlC in both native and POSIX modes, providing
#   a way to distinguish AIX. GNU Make (3.80) on AIX does not predefine
#   $(CCC) at all.
#
# * $(BOOL) expansion is done twice at the end to handle the case where
#   $(CCC) is defined to something other than "xlC", "0", or "1".
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.4.0 (rc5) now available

Jonathan Goble
On Thu, Jun 11, 2020 at 7:02 PM William Ahern <[hidden email]> wrote:
On Thu, Jun 11, 2020 at 02:34:46PM -0300, Luiz Henrique de Figueiredo wrote:
> > In a perfect world, the Makefile would include code to detect whether the readline library exists and automatically use it if found.
>
> If you can contribute simple portable code that does this, it'd be great.

I had an hour to kill. The following was tested and works correctly with the
native make implementations on AIX, FreeBSD, NetBSD, OpenBSD, and Solaris,
as well as with GNU Make. (But see AIX notes.) Excepting the command
substitution constructs and the macro expansion pattern replacement
construct ($(MACRO:PATT=REPL)), as far as I know everything else is POSIX
compliant. In particular, the use of recursive expansion and dynamically
evaluated macro names is sound as far as I understand. Macro expansion
pattern replacement is so well supported that the POSIX standard notes that
it may be mandated in the future.


BOOL,1 = 1
BOOL,0 = 0
BOOL,  = 0

OR,1,1 = 1
OR,1,0 = 1
OR,0,1 = 1
OR,0,0 = 0

HAVE_READLINE.cmd = printf "\043include <readline/readline.h>\n" | $(CC) $(CFLAGS) -E - 2>/dev/null | grep -q rl_readline_name && echo 1 || echo 0
HAVE_READLINE.gnu = $(shell $(HAVE_READLINE.cmd))
HAVE_READLINE.sun = $(HAVE_READLINE.cmd:sh)
HAVE_READLINE.if.aix,1 = 0
HAVE_READLINE.if.aix,0 = $(OR,$(BOOL,$(HAVE_READLINE.gnu)),$(BOOL,$(HAVE_READLINE.sun)))
HAVE_READLINE = $(HAVE_READLINE.if.aix,$(BOOL,$(BOOL,$(CCC:xlC%=1))))

all:
        @printf "HAVE_READLINE=%s\n" "$(HAVE_READLINE)"

I spent an hour and a half this evening and couldn't come up with anything better than the above. The only tweaks I would suggest would be to replace the OR lines with:

OR,1,1= linux-readline
OR,1,0= linux-readline
OR,0,1= linux-readline
OR,0,0= linux-noreadline

and then the line

Linux linux:   linux-noreadline

becomes

Linux linux: $(HAVE_READLINE)  # or call it $(LINUX_TARGET)