[ANN] Lua 5.2.0 (beta-rc6) now available

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

[ANN] Lua 5.2.0 (beta-rc6) now available

Luiz Henrique de Figueiredo
Lua 5.2.0 (beta-rc6) is now available at
        http://www.lua.org/work/lua-5.2.0-beta-rc6.tar.gz

MD5 fcc8a12d88a40147c9daceea8595f2d9  -
SHA1 7ff9140f92cb128f554b6aa1d1d9feab76f412ee  -

This is a beta version. Some details may change in the final version.

The main changes from rc5 to rc6 are:
        - fixed bug in NaN trick for big-endian machines
        - removed functions really removed
        - '\*' -> '\z' (so that '\punctuation' always means 'punctuation')
        - more uniformity in manual formatting

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

The complete diffs are available at
        http://www.lua.org/work/diffs-lua-5.2.0-beta-rc5-beta-rc6.txt

A test suite is available at
        http://www.lua.org/tests/5.2/

This release candidate will be the beta version if no glitches are found
in the next 10 days or so. We thank everyone for their feedback till now.

All feedback welcome. Thanks.
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Gé Weijers
Hello Luiz,

It looks like lua.hpp went missing in the tar file. Was that intentional?
(my revision control software pointed this out)



On Tue, 5 Jul 2011, Luiz Henrique de Figueiredo wrote:

> Lua 5.2.0 (beta-rc6) is now available at
> http://www.lua.org/work/lua-5.2.0-beta-rc6.tar.gz
>
> MD5 fcc8a12d88a40147c9daceea8595f2d9  -
> SHA1 7ff9140f92cb128f554b6aa1d1d9feab76f412ee  -
>
> This is a beta version. Some details may change in the final version.
>
> The main changes from rc5 to rc6 are:
> - fixed bug in NaN trick for big-endian machines
> - removed functions really removed
> - '\*' -> '\z' (so that '\punctuation' always means 'punctuation')
> - more uniformity in manual formatting
>
> The main changes since Lua 5.1 are listed in
> http://www.lua.org/work/doc/#changes
>
> The complete diffs are available at
> http://www.lua.org/work/diffs-lua-5.2.0-beta-rc5-beta-rc6.txt
>
> A test suite is available at
> http://www.lua.org/tests/5.2/
>
> This release candidate will be the beta version if no glitches are found
> in the next 10 days or so. We thank everyone for their feedback till now.
>
> All feedback welcome. Thanks.
> --lhf
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Luiz Henrique de Figueiredo
> It looks like lua.hpp went missing in the tar file. Was that intentional?

Oops, sorry about that. It will be fixed in the next rc. :-(
Thanks for the report.

(Lesson to learn: do not interrupt complicated scripts :-)

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Edgar Toernig
In reply to this post by Luiz Henrique de Figueiredo
> The main changes from rc5 to rc6 are:
> - '\*' -> '\z' (so that '\punctuation' always means 'punctuation')

*lol*  Ok, I give up ...

Farewell, ET.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Philippe Lhoste
In reply to this post by Luiz Henrique de Figueiredo
On 06/07/2011 00:20, Luiz Henrique de Figueiredo wrote:
> - '\*' ->  '\z' (so that '\punctuation' always means 'punctuation')

Not sure how to interpret exactly the '\*' ->  '\z' part, but I fear this change will lead
to non consistent behavior, as '\accent', '\break', '\nobreak', etc. (making these up)
won't mean 'accent', 'break', 'nobreak'...

Not taking side (should the \ be kept literally? should an error be raised?) but I wanted
to point that out, for what it is worth.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Jose Luis Hidalgo Valiño
In reply to this post by Luiz Henrique de Figueiredo
Hi Luiz,

   I'm wondering if etc/all.c which includes all .c files required to
compile lua will be included in the final release version, or is
missing on purpose (with the rest of /etc).

Best Regards,
   JL.

On Wed, Jul 6, 2011 at 1:28 AM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
>> It looks like lua.hpp went missing in the tar file. Was that intentional?
>
> Oops, sorry about that. It will be fixed in the next rc. :-(
> Thanks for the report.
>
> (Lesson to learn: do not interrupt complicated scripts :-)
>
>



--
  Jose L. Hidalgo Valiño (PpluX)
  ---- http://www.pplux.com ----

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Gé Weijers
In reply to this post by Luiz Henrique de Figueiredo

I just happened to see this one:

Index: lua_src/llex.c
===================================================================
--- lua_src/llex.c
+++ lua_src/llex.c
@@ -353,11 +353,11 @@
            case 'x': c = readhexaesc(ls); break;
            case '\n':
            case '\r': save(ls, '\n'); inclinenumber(ls); continue;
            case EOZ: continue;  /* will raise an error next loop */
            case 'z': {  /* zap following span of spaces */
-            next(ls);  /* skip the '*' */
+            next(ls);  /* skip the 'z' */
              while (lisspace(ls->current)) {
                if (currIsNewline(ls)) inclinenumber(ls);
                else next(ls);
              }
              continue;  /* do not save 'c' */


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Rena
On Wed, Jul 6, 2011 at 03:29, Gé Weijers <[hidden email]> wrote:

>
> I just happened to see this one:
>
> Index: lua_src/llex.c
> ===================================================================
> --- lua_src/llex.c
> +++ lua_src/llex.c
> @@ -353,11 +353,11 @@
>           case 'x': c = readhexaesc(ls); break;
>           case '\n':
>           case '\r': save(ls, '\n'); inclinenumber(ls); continue;
>           case EOZ: continue;  /* will raise an error next loop */
>           case 'z': {  /* zap following span of spaces */
> -            next(ls);  /* skip the '*' */
> +            next(ls);  /* skip the 'z' */
>             while (lisspace(ls->current)) {
>               if (currIsNewline(ls)) inclinenumber(ls);
>               else next(ls);
>             }
>             continue;  /* do not save 'c' */
>
>
>

So it's \z now to continue a line? That's kinda ugly. What's wrong
with just \<line break>?

--
Sent from my toaster.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

David Given
HyperHacker wrote:
[...]
> So it's \z now to continue a line? That's kinda ugly. What's wrong
> with just \<line break>?

That already means 'literal newline':

a = "foo\
bar"
print(a)

->

foo
bar

Yeah, \z is ugly, but TBH I can't think of anything cleaner they could
have done, and it *is* needed.

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup


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

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Roberto Ierusalimschy
In reply to this post by Philippe Lhoste
> On 06/07/2011 00:20, Luiz Henrique de Figueiredo wrote:
> > - '\*' ->  '\z' (so that '\punctuation' always means 'punctuation')
>
> Not sure how to interpret exactly the '\*' ->  '\z' part, but I fear
> this change will lead to non consistent behavior, as '\accent',
> '\break', '\nobreak', etc. (making these up) won't mean 'accent',
> 'break', 'nobreak'...

I am not sure we were clear about the change. The only change was that
the new escape sequence for skipping spaces now is written '\z'. There
is no new rule "\punctuation always means puntuaction". This is only a
kind of guideline for choosing escapes. Undefined escape sequences are
still undefined and should be avoided.

(But maybe I did not understand your message. What do you mean by
"non consistent behavior", when compared to how it was and to how
many other languages handle escape sequences?)

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Philippe Lhoste
On 06/07/2011 15:07, Roberto Ierusalimschy wrote:

>> On 06/07/2011 00:20, Luiz Henrique de Figueiredo wrote:
>>> - '\*' ->   '\z' (so that '\punctuation' always means 'punctuation')
>>
>> Not sure how to interpret exactly the '\*' ->   '\z' part, but I fear
>> this change will lead to non consistent behavior, as '\accent',
>> '\break', '\nobreak', etc. (making these up) won't mean 'accent',
>> 'break', 'nobreak'...
>
> I am not sure we were clear about the change. The only change was that
> the new escape sequence for skipping spaces now is written '\z'. There
> is no new rule "\punctuation always means puntuaction". This is only a
> kind of guideline for choosing escapes. Undefined escape sequences are
> still undefined and should be avoided.

Sorry, I misunderstood the line, it was clarified by Gé's excerpt of diff. I wasn't aware
of the previous \* meaning.
So, if I understand correctly the manual (I should have started to read it...):
"The escape sequence '\z' skips the following span of white-space characters, including
line breaks; it is particularly useful to break and indent a long string into multiple
lines without adding the newlines and spaces into the string contents."

x = "Foo\
Bar"

is now the same than

x = "Foo\z
      Bar"

and the same than

x = [[
Foo
Bar]]

right?

> (But maybe I did not understand your message. What do you mean by
> "non consistent behavior", when compared to how it was and to how
> many other languages handle escape sequences?)

Well, I jumped on the "'\punctuation' always means 'punctuation'" sentence, which I don't
understand, then...
Mmm, if it just means the behavior is the same than C's one, I see my reaction is stupid.
Sorry for the noise.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Roberto Ierusalimschy
> x = "Foo\
> Bar"
>
> is now the same than
>
> x = "Foo\z
>      Bar"
>
> and the same than
>
> x = [[
> Foo
> Bar]]
>
> right?

Wrong :)  '\z' skips linebreaks, too. So,

x = "Foo\z
     Bar"

is the same as

x = "FooBar"

A more realistic use is like this:

x = "\x7F\x45\x4C\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\z
     \x02\x00\x03\x00\x01\x00\x00\x00\x30\xB9\x04\x08\x34\x00\x00\x00\z
     \x60\xC5\x0A\x00\x00\x00\x00\x00\x34\x00\x20\x00\x08\x00\x28\x00\z
     \x27\x00\x24\x00\x06\x00\x00\x00\x34\x00\x00\x00\x34\x80\x04\x08\z
     \x34\x80\x04\x08\x00\x01\x00\x00\x00\x01\x00\x00\x05\x00\x00\x00\z
     \x04\x00\x00\x00\x03\x00\x00\x00\x34\x01\x00\x00\x34\x81\x04\x08\z
     \x34\x81\x04\x08\x13\x00\x00\x00\x13\x00\x00\x00\x04\x00\x00\x00\z
     \x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x04\x08\z
     \x00\x80\x04\x08\x6C\x74\x03\x00\x6C\x74\x03\x00\x05\x00\x00\x00\z
     \x00\x10\x00\x00\x01\x00\x00\x00\xE0\x7E\x03\x00\xE0\x0E\x08\x08"

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Gé Weijers
In reply to this post by Gé Weijers

To be clear, the \* escape was changed to \z, but the comment still shows
'*'

> I just happened to see this one:
>
> Index: lua_src/llex.c
> ===================================================================
> --- lua_src/llex.c
> +++ lua_src/llex.c
> @@ -353,11 +353,11 @@
>           case 'x': c = readhexaesc(ls); break;
>           case '\n':
>           case '\r': save(ls, '\n'); inclinenumber(ls); continue;
>           case EOZ: continue;  /* will raise an error next loop */
>           case 'z': {  /* zap following span of spaces */
> -            next(ls);  /* skip the '*' */
> +            next(ls);  /* skip the 'z' */
>             while (lisspace(ls->current)) {
>               if (currIsNewline(ls)) inclinenumber(ls);
>               else next(ls);
>             }
>             continue;  /* do not save 'c' */
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Roberto Ierusalimschy
> To be clear, the \* escape was changed to \z, but the comment still shows
> '*'

Thanks.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Luiz Henrique de Figueiredo
In reply to this post by Jose Luis Hidalgo Valiño
>    I'm wondering if etc/all.c which includes all .c files required to
> compile lua will be included in the final release version, or is
> missing on purpose (with the rest of /etc).

It is on purpose. The distribution will no longer include etc/. Its
contents will be distributed separately.

On the other hand, we may include all.c (now renamed one.c or something else)
and add a Makefile target for it if it can be done cleanly (ie, with support
for all the platforms that we currently support).

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Jose Luis Hidalgo Valiño
On Wed, Jul 6, 2011 at 6:40 PM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
> On the other hand, we may include all.c (now renamed one.c or something else)
> and add a Makefile target for it if it can be done cleanly (ie, with support
> for all the platforms that we currently support).

Ok, thanks. Having an "one.c" is really handy to compile lua in our
projects, if you are going
to distribute it separately maybe you can consider doing an
amalgamation in the same way
sqlite[1] does, where you can actually download just a single .c and
.h with all the source code. This is
just one step further but it simplifies the distribution of the source
code in order to embed it.

[1] http://www.sqlite.org/amalgamation.html

JL.

--
  Jose L. Hidalgo Valiño (PpluX)
  ---- http://www.pplux.com ----

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Luiz Henrique de Figueiredo
> if you are going to distribute it separately maybe you can consider
> doing an amalgamation in the same way sqlite[1] does, where you can
> actually download just a single .c and .h with all the source code.

A single .c is easy. A single .h is not because there are 4 public header
files: lua.h, luaconf.h, lualib.h, lauxlib.h.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.2.0 (beta-rc6) now available

Jose Luis Hidalgo Valiño
On Wed, Jul 13, 2011 at 8:50 PM, Luiz Henrique de Figueiredo
<[hidden email]> wrote:
>> if you are going to distribute it separately maybe you can consider
>> doing an amalgamation in the same way sqlite[1] does, where you can
>> actually download just a single .c and .h with all the source code.
>
> A single .c is easy. A single .h is not because there are 4 public header
> files: lua.h, luaconf.h, lualib.h, lauxlib.h.

I was thinking in a .c and .h controlled by macros to include or
exclude parts, but anyway, the interesting part from the embedded
point of view is the part that gets compiled so just one .c with the
amalgamation would be great anyway.

JL.



--
  Jose L. Hidalgo Valiño (PpluX)
  ---- http://www.pplux.com ----