[ANN] Lua 5.3.2 (rc1) now available

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

[ANN] Lua 5.3.2 (rc1) now available

Luiz Henrique de Figueiredo
Lua 5.3.2 (rc1) is now available for testing at
        http://www.lua.org/work/

Lua 5.3.2 fixes all bugs listed in
        http://www.lua.org/bugs.html#5.3.1

Lua 5.3.2 also contains several internal improvements and includes a
revised reference manual.

Like all minor releases, this is a bug-fix release; no new features have
been added.

The tarball is at
        http://www.lua.org/work/lua-5.3.2-rc1.tar.gz

The checksums are
        MD5 1d7df444f167a039c274bb4a78468ff5  -
        SHA1 8b0d7cc745743484565cc62f33b5290bace15996  -

The complete diffs from Lua 5.3.1 to rc1 are available at
        http://www.lua.org/work/diffs-lua-5.3.1-lua-5.3.2-rc1.txt
        http://www.lua.org/work/diffs-lua-5.3.1-lua-5.3.2-rc1.html

The diffs are also available in unified format:
        http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.txt
        http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.html

A test suite for Lua 5.3.2 is available at
        http://www.lua.org/tests/lua-5.3.2-tests.tar.gz

We thank everyone for their feedback on Lua 5.3 till now.

All feedback welcome. Thanks.
--lhf


Reply | Threaded
Open this post in threaded view
|

RE: [ANN] Lua 5.3.2 (rc1) now available

Thijs Schreijer
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Luiz Henrique de Figueiredo
> Sent: donderdag 19 november 2015 1:29
> To: [hidden email]
> Subject: [ANN] Lua 5.3.2 (rc1) now available
>
> Lua 5.3.2 (rc1) is now available for testing at
> http://www.lua.org/work/
>
> Lua 5.3.2 fixes all bugs listed in
> http://www.lua.org/bugs.html#5.3.1
>
> Lua 5.3.2 also contains several internal improvements and includes a
> revised reference manual.
>
> Like all minor releases, this is a bug-fix release; no new features have
> been added.
>
> The tarball is at
> http://www.lua.org/work/lua-5.3.2-rc1.tar.gz
>
> The checksums are
> MD5 1d7df444f167a039c274bb4a78468ff5  -
> SHA1 8b0d7cc745743484565cc62f33b5290bace15996  -
>
> The complete diffs from Lua 5.3.1 to rc1 are available at
> http://www.lua.org/work/diffs-lua-5.3.1-lua-5.3.2-rc1.txt
> http://www.lua.org/work/diffs-lua-5.3.1-lua-5.3.2-rc1.html
>
> The diffs are also available in unified format:
> http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.txt
> http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.html
>
> A test suite for Lua 5.3.2 is available at
> http://www.lua.org/tests/lua-5.3.2-tests.tar.gz
>
> We thank everyone for their feedback on Lua 5.3 till now.
>
> All feedback welcome. Thanks.
> --lhf
>

Tested building on Windows with LuaWinMake [1]. No errors or warnings with MinGW, TDM32, TDM64, Win7 SDK x86 and Win7 SDK x64.

Thijs

[1] https://github.com/Tieske/luawinmake


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Daurnimator
In reply to this post by Luiz Henrique de Figueiredo
On 19 November 2015 at 11:28, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
> The diffs are also available in unified format:
>         http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.txt
>         http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.html

When creating unified diffs for C code, consider passing '-p' so that
it (additionally) emits which C function each diff chunk relates to.
Makes it easier to browse :)

> All feedback welcome. Thanks.

Interesting to see that in functions such as lua_rawseti, `hvalue` is
now called twice.
Was this fixing any particular issue?


The caching in upvalues for type() is a nice touch


Typo in comment of moveresults. ('ajdust')


Why does ltablib.c now `#include <time.h>`

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Daurnimator
In reply to this post by Luiz Henrique de Figueiredo
On 19 November 2015 at 11:28, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
> A test suite for Lua 5.3.2 is available at
>         http://www.lua.org/tests/lua-5.3.2-tests.tar.gz

404!

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Luiz Henrique de Figueiredo
> >         http://www.lua.org/tests/lua-5.3.2-tests.tar.gz
> 404!

Fixed. Sorry about that. It should have been
        http://www.lua.org/work/lua-5.3.2-tests.tar.gz
but the URL above works for now.

BTW, the updated manual is available at
        http://www.lua.org/work/doc/

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Daurnimator
On 19 November 2015 at 12:10, Luiz Henrique de Figueiredo
<[hidden email]> wrote:

>> >         http://www.lua.org/tests/lua-5.3.2-tests.tar.gz
>> 404!
>
> Fixed. Sorry about that. It should have been
>         http://www.lua.org/work/lua-5.3.2-tests.tar.gz
> but the URL above works for now.
>
> BTW, the updated manual is available at
>         http://www.lua.org/work/doc/
>

Thanks.
All tests passing here; and passing the undefined behaviour sanitizer too!

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Philipp Janda
In reply to this post by Daurnimator
Am 19.11.2015 um 02:01 schröbte Daurnimator:

> On 19 November 2015 at 11:28, Luiz Henrique de Figueiredo
> <[hidden email]> wrote:
>> The diffs are also available in unified format:
>>          http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.txt
>>          http://www.lua.org/work/diffu-lua-5.3.1-lua-5.3.2-rc1.html
>
> When creating unified diffs for C code, consider passing '-p' so that
> it (additionally) emits which C function each diff chunk relates to.
> Makes it easier to browse :)
>
>> All feedback welcome. Thanks.
>
> Interesting to see that in functions such as lua_rawseti, `hvalue` is
> now called twice.
> Was this fixing any particular issue?
>
>
> The caching in upvalues for type() is a nice touch

Actually the upvalue trick is reverted in this release (presumably
because the string caching is good enough?).

>
>
> Typo in comment of moveresults. ('ajdust')
>
>
> Why does ltablib.c now `#include <time.h>`

Because `clock()` and `time()` are used to find a pivot element for sorting.


Btw., the manual now says:

 > Note that the <code>comp</code> function must define
 > a strict partial order over the elements in the list;
 > that is, it must be asymmetric and transitive.
 > Otherwise, no valid sort may be possible.

Shouldn't that be a (strict) *total* order (i.e. all elements may be
compared to each other)?


Also there are a lot of superfluous `sizeof(char)`s in the code.


Philipp



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Daurnimator
On 19 November 2015 at 15:26, Philipp Janda <[hidden email]> wrote:
> Am 19.11.2015 um 02:01 schröbte Daurnimator:
>> The caching in upvalues for type() is a nice touch
>
>
> Actually the upvalue trick is reverted in this release (presumably because
> the string caching is good enough?).

Oops; I read that bit of the diff backwards.

>> Why does ltablib.c now `#include <time.h>`
>
>
> Because `clock()` and `time()` are used to find a pivot element for sorting.

Ah, somehow I missed that. This seems a poor choice....
Could this be made configurable via moving to llimits.h?

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Dirk Laurie-2
In reply to this post by Philipp Janda
2015-11-19 6:26 GMT+02:00 Philipp Janda <[hidden email]>:

> Btw., the manual now says:
>
>> Note that the <code>comp</code> function must define
>> a strict partial order over the elements in the list;
>> that is, it must be asymmetric and transitive.
>> Otherwise, no valid sort may be possible.

> Shouldn't that be a (strict) *total* order (i.e. all elements may
> be compared to each other)?

The total order need not be strict (i.e. it is perfectly OK for
comp(a,b) and comp(b,a) to be both false).

The specification in the manual requires that :

1. comp(a,b) and comp(b,c)    implies    comp(a,c)
2. comp(a,b)    implies   not comp(b,a)

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Enrico Colombini
In reply to this post by Daurnimator
On 19-Nov-15 05:49, Daurnimator wrote:
>>> Why does ltablib.c now `#include <time.h>`
>>
>> >Because `clock()` and `time()` are used to find a pivot element for sorting.
> Ah, somehow I missed that. This seems a poor choice....
> Could this be made configurable via moving to llimits.h?

Those calls could be a nuisance in embedded applications.
Perhaps replacing them with GET_PIVOT_SEED1(), GET_PIVOT_SEED2() macros,
or just a CHOOSE_PIVOT(lo, up) macro in luaconf.h?

--
   Enrico

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Michal Kottman
In reply to this post by Luiz Henrique de Figueiredo

On Nov 19, 2015 1:29 AM, "Luiz Henrique de Figueiredo" <[hidden email]> wrote:
> All feedback welcome. Thanks.
> --lhf

In function newbox(), there's a typo in the comment:

/* metatalbe.__gc = boxgc */

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Roberto Ierusalimschy
In reply to this post by Dirk Laurie-2
> > Shouldn't that be a (strict) *total* order (i.e. all elements may
> > be compared to each other)?
>
> The total order need not be strict (i.e. it is perfectly OK for
> comp(a,b) and comp(b,a) to be both false).
>
> The specification in the manual requires that :
>
> 1. comp(a,b) and comp(b,c)    implies    comp(a,c)
> 2. comp(a,b)    implies   not comp(b,a)

A "strict order" means not comp(a,a) (that is, it is irreflexive). Rule
2 above implies strictness (comp(a,a) => not camp(a,a)). Rules 1 and 2
above define a (strict) partial oder. And that is what 'sort' needs.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Daurnimator
In reply to this post by Luiz Henrique de Figueiredo
On 19 November 2015 at 11:28, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
> All feedback welcome. Thanks.
> --lhf

I don't suppose you have some solution to
http://lua-users.org/lists/lua-l/2015-07/msg00540.html ?
I was hoping it might have made it into this release.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Roberto Ierusalimschy
> I don't suppose you have some solution to
> http://lua-users.org/lists/lua-l/2015-07/msg00540.html ?
> I was hoping it might have made it into this release.

What is the issue here? What would be the "correct" behavior? The
documentation is clear that "Option 's' expects a string without
embedded zeros" [1].

[1] http://www.lua.org/manual/5.3/manual.html#pdf-string.format

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

云风 Cloud Wu
Roberto Ierusalimschy <[hidden email]>于2015年11月19日周四 下午9:06写道:
> I don't suppose you have some solution to
> http://lua-users.org/lists/lua-l/2015-07/msg00540.html ?
> I was hoping it might have made it into this release.

What is the issue here? What would be the "correct" behavior? The
documentation is clear that "Option 's' expects a string without
embedded zeros" [1].

[1] http://www.lua.org/manual/5.3/manual.html#pdf-string.format

The common mistake is use string.format to concat strings may contain zeros.

Maybe supporting embedded zeros would be better ?

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Roberto Ierusalimschy
In reply to this post by Daurnimator
> Interesting to see that in functions such as lua_rawseti, `hvalue` is
> now called twice.
> Was this fixing any particular issue?

No. 'hvalue' is a macro that produces one addition and one load:

  hvalue(o)  ->  ((&((((union GCUnion *)((((o)->value_).gc))))->h)))

Hopefuly any reasonable compiler will optimize these two "calls" into
one.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Roberto Ierusalimschy
In reply to this post by Philipp Janda
> Also there are a lot of superfluous `sizeof(char)`s in the code.

We always use 'sizeof(char)' as a kind of documentation. If someone
crazy enough decides to change strings in Lua to wchar_t, these sizeofs
would help.  (Similarly, we always use '\0' instead of 0 when talking
about string sentinels, and always use the type lu_byte for chars which
are not characters.)

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Roberto Ierusalimschy
In reply to this post by 云风 Cloud Wu
> The common mistake is use string.format to concat strings may contain zeros.
>
> Maybe supporting embedded zeros would be better ?

That is not trivial to implement. We would need to implement flag '-',
width, and "precision". I don't think it is worth the trouble, to
support something that, as you said, is a mistake.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

云风 Cloud Wu
Roberto Ierusalimschy <[hidden email]>于2015年11月19日周四 下午9:49写道:
> The common mistake is use string.format to concat strings may contain zeros.
>
> Maybe supporting embedded zeros would be better ?

That is not trivial to implement. We would need to implement flag '-',
width, and "precision". I don't think it is worth the trouble, to
support something that, as you said, is a mistake.

Lua support embedded zero strings elsewhere, so this limit is a little strange :) 

Sometimes, string.format is more useful than string.pack . For example, to implement redis protocol ( http://redis.io/topics/protocol ) , it use a text protocol, but the string in the protocol may contain embedded zeros . 

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.2 (rc1) now available

Roberto Ierusalimschy
In reply to this post by Luiz Henrique de Figueiredo
> Lua 5.3.2 (rc1) is now available for testing at
> http://www.lua.org/work/

What is new:

- fixed bug: 'io.lines' does not check maximum number of options
- command line accepts ';' at the end to make it a command
- lua_pushlstring(L, NULL, 0) (and luaL_addlstring) is valid
- limits for non-linear time in pattern matching
- traceback shows fixed number of levels when initial level != 1
- fixed some internal "integer overflows" (detected with -ftrapv)
- table.sort "randomize" the pivot
- using 'snprintf' instead of 'sprintf' in C99
- some small optimizations

-- Roberto

123