[ANN] Lua 5.3.0 (work2) now available

classic Classic list List threaded Threaded
261 messages Options
1234 ... 14
Reply | Threaded
Open this post in threaded view
|

[ANN] Lua 5.3.0 (work2) now available

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

MD5 52bd13d0b40f637bc388a133b9bb8771  -
SHA1 e52ea0acf4b2d7bf042f48bd01dddc149d517184  -

This is a work version. An updated reference manual is included but
all details may change in the final version. See
        http://www.lua.org/work/doc/readme.html

The main change in Lua 5.3.0 is the introduction of integers.
For other changes, see
        http://www.lua.org/work/doc/readme.html#changes

The complete diffs from work1 are at
        http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt

Enjoy. All feedback welcome. Thanks.
--lhf


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Coroutines
On Fri, Mar 21, 2014 at 8:44 PM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:

> Lua 5.3.0 (work2) is now available for testing at
>         http://www.lua.org/work/lua-5.3.0-work2.tar.gz
>
> MD5     52bd13d0b40f637bc388a133b9bb8771  -
> SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -
>
> This is a work version. An updated reference manual is included but
> all details may change in the final version. See
>         http://www.lua.org/work/doc/readme.html
>
> The main change in Lua 5.3.0 is the introduction of integers.
> For other changes, see
>         http://www.lua.org/work/doc/readme.html#changes
>
> The complete diffs from work1 are at
>         http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt
>
> Enjoy. All feedback welcome. Thanks.
> --lhf
>
>

it is significantly lacking in cowbell.  loving the uservalue change <3

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Rena
In reply to this post by Luiz Henrique de Figueiredo
On Fri, Mar 21, 2014 at 4:44 PM, Luiz Henrique de Figueiredo <[hidden email]> wrote:
Lua 5.3.0 (work2) is now available for testing at
        http://www.lua.org/work/lua-5.3.0-work2.tar.gz

MD5     52bd13d0b40f637bc388a133b9bb8771  -
SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -

This is a work version. An updated reference manual is included but
all details may change in the final version. See
        http://www.lua.org/work/doc/readme.html

The main change in Lua 5.3.0 is the introduction of integers.
For other changes, see
        http://www.lua.org/work/doc/readme.html#changes

The complete diffs from work1 are at
        http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt

Enjoy. All feedback welcome. Thanks.
--lhf



64-bit integers, bit operations, basic UTF-8 library... so many things I've wanted for Lua. Really looking forward to it.

(Now about that continue statement... *ducks*)

--
Sent from my Game Boy.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Javier Guerra Giraldez
In reply to this post by Luiz Henrique de Figueiredo
On Fri, Mar 21, 2014 at 3:44 PM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
> The main change in Lua 5.3.0 is the introduction of integers.
> For other changes, see
>         http://www.lua.org/work/doc/readme.html#changes


"no need to prefix with '='"

hurray!!

--
Javier

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Hisham
On 21 March 2014 18:19, Javier Guerra Giraldez <[hidden email]> wrote:

> On Fri, Mar 21, 2014 at 3:44 PM, Luiz Henrique de Figueiredo
> <[hidden email]> wrote:
>> The main change in Lua 5.3.0 is the introduction of integers.
>> For other changes, see
>>         http://www.lua.org/work/doc/readme.html#changes
>
>
> "no need to prefix with '='"
>
> hurray!!

A much welcome addition, seriously! I'll have to retrain my fingers
from typing "python" whenever I need to do a quick calculation.

Also, to pop the champagne, this just _had_ to be done ;)

]cat iostream.lua

std = {}
std.cout = {
   __shl = function(a, b)
      io.write(b)
      return std.cout
   end
}
setmetatable(std.cout, std.cout)
std.endl = "\n"



]cat hellocpp.lua

require "iostream"

_= std.cout << "Hello overloadable bitwise operators!" << std.endl


Cheers!

-- Hisham

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Andrew Starks
On Fri, Mar 21, 2014 at 4:34 PM, Hisham <[hidden email]> wrote:
> require "iostream"
>
> _= std.cout << "Hello overloadable bitwise operators!" << std.endl
>
>
> Cheers!

Gasp! While a C++ thread is ongoing, even!

Your example may have portend the beginning of the end of the world as
we know it. :)

-Andrew

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Hisham
On 21 March 2014 18:45, Andrew Starks <[hidden email]> wrote:

> On Fri, Mar 21, 2014 at 4:34 PM, Hisham <[hidden email]> wrote:
>> require "iostream"
>>
>> _= std.cout << "Hello overloadable bitwise operators!" << std.endl
>>
>>
>> Cheers!
>
> Gasp! While a C++ thread is ongoing, even!
>
> Your example may have portend the beginning of the end of the world as
> we know it. :)

Consider it a preemptive strike: I had to do it in jest quickly before
someone decides to do it for real :)

-- Hisham

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Coroutines
In reply to this post by Hisham
On Fri, Mar 21, 2014 at 2:34 PM, Hisham <[hidden email]> wrote:

> On 21 March 2014 18:19, Javier Guerra Giraldez <[hidden email]> wrote:
>> On Fri, Mar 21, 2014 at 3:44 PM, Luiz Henrique de Figueiredo
>> <[hidden email]> wrote:
>>> The main change in Lua 5.3.0 is the introduction of integers.
>>> For other changes, see
>>>         http://www.lua.org/work/doc/readme.html#changes
>>
>>
>> "no need to prefix with '='"
>>
>> hurray!!
>
> A much welcome addition, seriously! I'll have to retrain my fingers
> from typing "python" whenever I need to do a quick calculation.
>
> Also, to pop the champagne, this just _had_ to be done ;)
>
> ]cat iostream.lua
>
> std = {}
> std.cout = {
>    __shl = function(a, b)
>       io.write(b)
>       return std.cout
>    end
> }
> setmetatable(std.cout, std.cout)
> std.endl = "\n"
>
>
>
> ]cat hellocpp.lua
>
> require "iostream"
>
> _= std.cout << "Hello overloadable bitwise operators!" << std.endl
>
>
> Cheers!
>
> -- Hisham
>

This is why we can't have nice things :(

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Ashwin Hirschi
In reply to this post by Luiz Henrique de Figueiredo

> Lua 5.3.0 (work2) is now available for testing at
> http://www.lua.org/work/lua-5.3.0-work2.tar.gz

I'm pleased the strip option made it in.

Thanks so much!

Ashwin.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Luiz Henrique de Figueiredo
In reply to this post by Coroutines
Tests for this version are available at
        http://www.lua.org/work/lua-5.3.w2-tests.tar.gz

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Xavier Wang
lua_get* and lua_rawget* functions has return values!!! thanks for that!!

btw, the function lua_getfield and lua_getuservalue doesn't have return value, yet. lua_getfield is the most useful function in my coding (though maybe it's slow a bit), and now userdata can have any type of lua value for its uservalue, so lua_getuservalue should return a type, either.


2014-03-22 11:44 GMT+08:00 Luiz Henrique de Figueiredo <[hidden email]>:
Tests for this version are available at
        http://www.lua.org/work/lua-5.3.w2-tests.tar.gz




--
regards,
Xavier Wang.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Xavier Wang
In reply to this post by Luiz Henrique de Figueiredo
I found that build lua with MinGW still produce lua52.dll, shouldn't be lua53.dll?


2014-03-22 4:44 GMT+08:00 Luiz Henrique de Figueiredo <[hidden email]>:
Lua 5.3.0 (work2) is now available for testing at
        http://www.lua.org/work/lua-5.3.0-work2.tar.gz

MD5     52bd13d0b40f637bc388a133b9bb8771  -
SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -

This is a work version. An updated reference manual is included but
all details may change in the final version. See
        http://www.lua.org/work/doc/readme.html

The main change in Lua 5.3.0 is the introduction of integers.
For other changes, see
        http://www.lua.org/work/doc/readme.html#changes

The complete diffs from work1 are at
        http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt

Enjoy. All feedback welcome. Thanks.
--lhf





--
regards,
Xavier Wang.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Luiz Henrique de Figueiredo
> I found that build lua with MinGW still produce lua52.dll, shouldn't be
> lua53.dll?

Oops, sorry about that. Thanks for the report.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Jay Carlson
In reply to this post by Luiz Henrique de Figueiredo

On Mar 21, 2014 4:45 PM, "Luiz Henrique de Figueiredo" <[hidden email]> wrote:

> Lua 5.3.0 (work2) is now available for testing at
>         http://www.lua.org/work/lua-5.3.0-work2.tar.gz

string.format uses a little language for constructing strings out of numbers and other strings, primarily in variable-length decimal encoding. I think a very similar language could be designed for constructing strings out of numbers and other strings in the domain of fixed-size binary encoding.

Aside from symmetry, my motivation is premature optimization. string.pack written in Lua would have the same problems as string.format written in Lua: as formatting is executed, short strings will be created, pushed on a Lua-side concat table, then turned into garbage. Easier and faster to do this at the C level where string building is cheaper.

Jay

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Xavier Wang
In reply to this post by Luiz Henrique de Figueiredo
build Lua 5.3.0 work2 with gcc -O3 -Wall produce this warning:

gcc -O3 -Wall -Wextra -DLUA_COMPAT_ALL -DLUA_BUILD_AS_DLL    -c -o lvm.o lvm.c
lvm.c: In function 'luaV_equalobj':
lvm.c:223:22: warning: 'n2' may be used uninitialized in this function [-Wmaybe-uninitialized]
       lua_Number n1, n2;
                      ^
In file included from lua.h:16:0,
                 from lvm.c:16:
luaconf.h:511:30: warning: 'n1' may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define luai_numeq(a,b)  ((a)==(b))
                              ^
lvm.c:223:18: note: 'n1' was declared here
       lua_Number n1, n2;
                  ^

Is that worth to fix? (-O3 is unsafe optimize?)


2014-03-22 4:44 GMT+08:00 Luiz Henrique de Figueiredo <[hidden email]>:
Lua 5.3.0 (work2) is now available for testing at
        http://www.lua.org/work/lua-5.3.0-work2.tar.gz

MD5     52bd13d0b40f637bc388a133b9bb8771  -
SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -

This is a work version. An updated reference manual is included but
all details may change in the final version. See
        http://www.lua.org/work/doc/readme.html

The main change in Lua 5.3.0 is the introduction of integers.
For other changes, see
        http://www.lua.org/work/doc/readme.html#changes

The complete diffs from work1 are at
        http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt

Enjoy. All feedback welcome. Thanks.
--lhf





--
regards,
Xavier Wang.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Coroutines
In reply to this post by Luiz Henrique de Figueiredo
On Fri, Mar 21, 2014 at 1:44 PM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:

> Lua 5.3.0 (work2) is now available for testing at
>         http://www.lua.org/work/lua-5.3.0-work2.tar.gz
>
> MD5     52bd13d0b40f637bc388a133b9bb8771  -
> SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -
>
> This is a work version. An updated reference manual is included but
> all details may change in the final version. See
>         http://www.lua.org/work/doc/readme.html
>
> The main change in Lua 5.3.0 is the introduction of integers.
> For other changes, see
>         http://www.lua.org/work/doc/readme.html#changes
>
> The complete diffs from work1 are at
>         http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt
>
> Enjoy. All feedback welcome. Thanks.
> --lhf
>
>

After having a look at the utf8 library in 5.3, I like what I see -- I
only wish for the addition of a utf8.sub() and a utf8.strip()
1) utf8.sub() would be a utf8-aware version of string.sub; 'nuff said
2) utf8.strip() would remove the greater-than-single-byte codepoints
from a string -- it is possible to do this with the utf8.codes()
generator you guys provided, but in the interest of speed I think this
should be in C

I really like utf8.offset(), that's something I should have added to
my own project: https://github.com/Pogs/lua-utf8-simple

Please do add utf8.sub() to be identical to string.sub()'s behavior
(apart from being utf8-aware).  I imagine a lot of people would wind
up rolling their own with varying subtle differences (like some
accepting negative indices and some not).  If you *really* want to
impress, make generator/iterator that can cycle through a utf8 string
backward -- I would love that!  ((I also want a string.find() that
iterates backward))

Anyway, hope I was helpful :-)

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Philipp Janda
In reply to this post by Luiz Henrique de Figueiredo
Am 21.03.2014 21:44 schröbte Luiz Henrique de Figueiredo:
> Lua 5.3.0 (work2) is now available for testing at
> http://www.lua.org/work/lua-5.3.0-work2.tar.gz
>
> MD5 52bd13d0b40f637bc388a133b9bb8771  -
> SHA1 e52ea0acf4b2d7bf042f48bd01dddc149d517184  -
>
> This is a work version. An updated reference manual is included but
> all details may change in the final version. See
> http://www.lua.org/work/doc/readme.html

The precedence of the new bitwise operators is not yet documented in 3.4.8.

>
> Enjoy. All feedback welcome. Thanks.
> --lhf
>

Philipp




Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Coroutines
In reply to this post by Coroutines
On Fri, Mar 21, 2014 at 11:35 PM, Coroutines <[hidden email]> wrote:

> On Fri, Mar 21, 2014 at 1:44 PM, Luiz Henrique de Figueiredo
> <[hidden email]> wrote:
>> Lua 5.3.0 (work2) is now available for testing at
>>         http://www.lua.org/work/lua-5.3.0-work2.tar.gz
>>
>> MD5     52bd13d0b40f637bc388a133b9bb8771  -
>> SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -
>>
>> This is a work version. An updated reference manual is included but
>> all details may change in the final version. See
>>         http://www.lua.org/work/doc/readme.html
>>
>> The main change in Lua 5.3.0 is the introduction of integers.
>> For other changes, see
>>         http://www.lua.org/work/doc/readme.html#changes
>>
>> The complete diffs from work1 are at
>>         http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt
>>
>> Enjoy. All feedback welcome. Thanks.
>> --lhf
>>
>>
>
> After having a look at the utf8 library in 5.3, I like what I see -- I
> only wish for the addition of a utf8.sub() and a utf8.strip()
> 1) utf8.sub() would be a utf8-aware version of string.sub; 'nuff said
> 2) utf8.strip() would remove the greater-than-single-byte codepoints
> from a string -- it is possible to do this with the utf8.codes()
> generator you guys provided, but in the interest of speed I think this
> should be in C
>
> I really like utf8.offset(), that's something I should have added to
> my own project: https://github.com/Pogs/lua-utf8-simple
>
> Please do add utf8.sub() to be identical to string.sub()'s behavior
> (apart from being utf8-aware).  I imagine a lot of people would wind
> up rolling their own with varying subtle differences (like some
> accepting negative indices and some not).  If you *really* want to
> impress, make generator/iterator that can cycle through a utf8 string
> backward -- I would love that!  ((I also want a string.find() that
> iterates backward))
>
> Anyway, hope I was helpful :-)

I think I'll take the utf8.strip() proposal back -- it looks like this
utf8 library doesn't check that strings are valid utf8.  It makes sure
the byte sequence fits the form of a utf8 codepoint, but it doesn't
take into account things like unused codepoints or overlong encodings.
 utf8.strip() might lead people to believe it will remove all utf8,
even invalid but valid to the byte format codepoints.  Bad idea.. so
I'll forget that.

I still want a utf8.sub().  Also, I think it should be noted in the
manual that utf8.charpatt will find valid utf8 byte sequences, but
will not take into account what I mentioned above (unused codepoints,
overlong, unexpected continuation bytes... etc).  It is a practical
utf8 library but not a foolproof solution (no disrespect meant).  I am
very happy to see this added :-)

PS: I think charpatt could be improved:
"[\0-\x7F\xC2-\xF4][\x80-\xBF]*" ->
"[\0-\x7F\xC2-\xF4][\x80-\xBF]?[\x80-\xBF]?[\x80-\xBF]?"

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

Liam Devine
In reply to this post by Luiz Henrique de Figueiredo
On 21/03/14 20:44, Luiz Henrique de Figueiredo wrote:
>
> Lua 5.3.0 (work2) is now available for testing at
> Enjoy. All feedback welcome. Thanks.
> --lhf
>
>

I really enjoy the features about to this work version and feel it is
what 5.2 should have been. However, this leaves me with a problem in
that I do not have much to moan about now.

--
Liam


signature.asc (919 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3.0 (work2) now available

steve donovan
On Sat, Mar 22, 2014 at 12:51 PM, Liam Devine <[hidden email]> wrote:
> I really enjoy the features about to this work version and feel it is
> what 5.2 should have been. However, this leaves me with a problem in
> that I do not have much to moan about now.

Absolutely!  Lovely release guys!  I agree with Hisham that 5.3 is the
best desktop calculator ever, especially now we have the bit
operators.

The basic UTF-8 support seems at the right level...

steve d.

1234 ... 14