[ANN] Stdlib 34.1 released

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

[ANN] Stdlib 34.1 released

Gary V. Vaughan
I am happy to announce the release of Stdlib 34.1,
General Lua Libraries.

This is a maintenance release to quickly fix a breakage in getopt
from release v34.  Getopt no longer parses non-options, but stops
on the first non-option... if a use case for the other method
comes up, we can always add it back in.

Install it as luarock stdlib-34.1 (see
http://luarocks.org/repositories/rocks )

Most simply:

  luarocks install stdlib

(You may need to wait a while after this announcement lands before the
rocks are available.)

Stdlib's home page is at http://github.com/rrthomas/lua-stdlib/

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Paul E. Merrell, J.D.
On Mon, Apr 1, 2013 at 1:50 AM, Gary V. Vaughan <[hidden email]> wrote:
> I am happy to announce the release of Stdlib 34.1,
> General Lua Libraries.

Hi, Gary,

Is Stdlib 34.1 compatible with Lua 5.2?

Best regards,

Paul

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan
Hi Paul,

On 1 Apr 2013, at 16:15, marbux <[hidden email]> wrote:
> On Mon, Apr 1, 2013 at 1:50 AM, Gary V. Vaughan <[hidden email]> wrote:
>> I am happy to announce the release of Stdlib 34.1,
>> General Lua Libraries.
>
> Hi, Gary,
>
> Is Stdlib 34.1 compatible with Lua 5.2?

Yes it is :)

Cheers,
--
Gary V. Vaughan (gary AT vaughan DOT pe)

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Paul E. Merrell, J.D.
On Mon, Apr 1, 2013 at 2:18 AM, Gary V. Vaughan <[hidden email]> wrote:

>> Is Stdlib 34.1 compatible with Lua 5.2?
>
> Yes it is :)

Hooray! You just saved me from reinventing several wheels. :-)

Best regards,

Paul

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Dirk Laurie-2
In reply to this post by Gary V. Vaughan
2013/4/1 Gary V. Vaughan <[hidden email]>:

> On 1 Apr 2013, at 16:15, marbux <[hidden email]> wrote:
>> On Mon, Apr 1, 2013 at 1:50 AM, Gary V. Vaughan <[hidden email]> wrote:
>>> I am happy to announce the release of Stdlib 34.1,
>>> General Lua Libraries.
>>
>> Hi, Gary,
>>
>> Is Stdlib 34.1 compatible with Lua 5.2?
>
> Yes it is :)

I have both Lua 5.1 and 5.2 on my system. "luarocks install stdlib"
installs stdlib for 5.1. What must I do to install it for 5.2?

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Hisham
On 1 April 2013 12:03, Dirk Laurie <[hidden email]> wrote:

> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>
>> On 1 Apr 2013, at 16:15, marbux <[hidden email]> wrote:
>>> On Mon, Apr 1, 2013 at 1:50 AM, Gary V. Vaughan <[hidden email]> wrote:
>>>> I am happy to announce the release of Stdlib 34.1,
>>>> General Lua Libraries.
>>>
>>> Hi, Gary,
>>>
>>> Is Stdlib 34.1 compatible with Lua 5.2?
>>
>> Yes it is :)
>
> I have both Lua 5.1 and 5.2 on my system. "luarocks install stdlib"
> installs stdlib for 5.1. What must I do to install it for 5.2?

That depends on how you configured LuaRocks. The code of LuaRocks
itself runs as both Lua 5.1 and 5.2.

For simplicity, you can either have two separate installations of it,
in different prefixes (passing --prefix, --with-lua-version and so on
to the configure script). Beware of mixing the local ~/.luarocks tree,
though.

Or, you can write a separate config.lua file containing your Lua 5.2
paths (includes, etc) *and* launch luarocks with your Lua 5.2
interpreter. You could write a `luarocks-5.2` launcher shell-script
like this (untested):

```
#!/bin/sh
LUAROCKS_CONFIG=/etc/luarocks/config-5.2.lua lua-5.2 `which luarocks` "$@"
```

where /etc/luarocks/config-5.2.lua would contain something like:

```
rocks_trees = {
   home.."/.luarocks-5.2/",
   "/usr/local/lib/.luarocks-5.2/",
}
variables = {
   LUA_BINDIR="/usr/local/bin", -- where your lua 5.2 interpreter is located
   LUA_INCDIR="/usr/local/include/lua-5.2/", -- where your lua.h for
Lua 5.2 is located
   LUA_LIBDIR="/usr/local/lib", -- where your liblua.so.5.2 is located
}
```

So, in short, its possible to have LuaRocks drive two versions of Lua
simultaneously, but it's not automatic. It could probably be made more
automatic in future releases.

-- Hisham
http://hisham.hm/

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Dirk Laurie-2
In reply to this post by Gary V. Vaughan
2013/4/1 Gary V. Vaughan <[hidden email]>:

> Stdlib's home page is at http://github.com/rrthomas/lua-stdlib/

How does one use the stuff in there?

The INSTALL says:

Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package.

I've often seen packages with that; however, this one does not have
a ./configure. It does not have a Makefile. It does not have a rockspec.
Instead, it has:

configure.ac
GNUmakefile
Makefile.am
stdlib.rockspec.in

Obviously some package will turn these into the real thing.
Doubtless some Googling or internet exploration will reveal
all. But a little hint in ether the README or INSTALL would
have been nice.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Philipp Janda
Am 01.04.2013 20:57 schröbte Dirk Laurie:

> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>
>> Stdlib's home page is at http://github.com/rrthomas/lua-stdlib/
>
> How does one use the stuff in there?
>
> The INSTALL says:
>
> Briefly, the shell commands `./configure; make; make install' should
> configure, build, and install this package.
>
> I've often seen packages with that; however, this one does not have
> a ./configure. It does not have a Makefile. It does not have a rockspec.

All those files are in the release branch.

> Instead, it has:
>
> configure.ac
> GNUmakefile
> Makefile.am
> stdlib.rockspec.in

This is GNU Autoconf stuff -- you probably don't want to go there ...

>
> Obviously some package will turn these into the real thing.
> Doubtless some Googling or internet exploration will reveal
> all. But a little hint in ether the README or INSTALL would
> have been nice.
>

Philipp






Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan
In reply to this post by Dirk Laurie-2
Hi Dirk,

On 2 Apr 2013, at 01:57, Dirk Laurie <[hidden email]> wrote:

> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>
>> Stdlib's home page is at http://github.com/rrthomas/lua-stdlib/
>
> How does one use the stuff in there?
>
> The INSTALL says:
>
> Briefly, the shell commands `./configure; make; make install' should
> configure, build, and install this package.
>
> I've often seen packages with that; however, this one does not have
> a ./configure. It does not have a Makefile. It does not have a rockspec.
> Instead, it has:
>
> configure.ac
> GNUmakefile
> Makefile.am
> stdlib.rockspec.in
>
> Obviously some package will turn these into the real thing.
> Doubtless some Googling or internet exploration will reveal
> all. But a little hint in ether the README or INSTALL would
> have been nice.

Sorry about that.  We've just dropped in the standard GNU INSTALL file,
which only holds true if you build a release.

I'll add a note to README before the next release, thanks.

You have several options:

1) Use Luarocks:  luarocks install stdlib
   That's it!  This is the easiest way to get stdlib by fare.
2) Use a full source release: https://github.com/rrthomas/lua-stdlib/archive/v34.1.tar.gz
   now you will have the files you need, to follow the INSTALL instructions,
   after unpacking:
      ./configure --prefix=/somewhere/on/your/lua/cpath
      make
      (as root!) make install
3) Change to the release tag in your git checkout:
      git checkout v34.1
   proceed to step 2 above.
4) Be a developer, install versions of the autotools somewhere on PATH, then,
      autoreconf --force --verbose --install
   proceed to step 2 above to finish now that you have the generated files.

HTH!
--
Gary V. Vaughan (gary AT vaughan DOT pe)


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan

On 2 Apr 2013, at 02:10, Gary V. Vaughan <[hidden email]> wrote:

> Hi Dirk,
>
> On 2 Apr 2013, at 01:57, Dirk Laurie <[hidden email]> wrote:
>> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>>
>>> Stdlib's home page is at http://github.com/rrthomas/lua-stdlib/
>>
>> How does one use the stuff in there?
>>
>> The INSTALL says:
>>
>> Briefly, the shell commands `./configure; make; make install' should
>> configure, build, and install this package.
>>
>> I've often seen packages with that; however, this one does not have
>> a ./configure. It does not have a Makefile. It does not have a rockspec.
>> Instead, it has:
>>
>> configure.ac
>> GNUmakefile
>> Makefile.am
>> stdlib.rockspec.in
>>
>> Obviously some package will turn these into the real thing.
>> Doubtless some Googling or internet exploration will reveal
>> all. But a little hint in ether the README or INSTALL would
>> have been nice.
>
> Sorry about that.  We've just dropped in the standard GNU INSTALL file,
> which only holds true if you build a release.
>
> I'll add a note to README before the next release, thanks.
>
> You have several options:
>
> 1) Use Luarocks:  luarocks install stdlib
>   That's it!  This is the easiest way to get stdlib by fare.
> 2) Use a full source release: https://github.com/rrthomas/lua-stdlib/archive/v34.1.tar.gz
>   now you will have the files you need, to follow the INSTALL instructions,
>   after unpacking:
>      ./configure --prefix=/somewhere/on/your/lua/cpath
>      make
>      (as root!) make install
> 3) Change to the release tag in your git checkout:
>      git checkout v34.1
>   proceed to step 2 above.
> 4) Be a developer, install versions of the autotools somewhere on PATH, then,
>      autoreconf --force --verbose --install
>   proceed to step 2 above to finish now that you have the generated files.

5) when you get to step 2, and have successfully run configure, you can generate
   the rockspecs with:

     make rockspecs

   and then do a luarocks install from the local checkout with something like:

     luarocks make stdlib-34.1-1.rockspec

   or if you are not on the release branch, better to use

     luarocks make stdlib-git-1.rockspec


> HTH!
> --
> Gary V. Vaughan (gary AT vaughan DOT pe)
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan

On 2 Apr 2013, at 02:14, "Gary V. Vaughan" <[hidden email]> wrote:

>
> On 2 Apr 2013, at 02:10, Gary V. Vaughan <[hidden email]> wrote:
>
>> Hi Dirk,
>>
>> On 2 Apr 2013, at 01:57, Dirk Laurie <[hidden email]> wrote:
>>> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>>>
>>>> Stdlib's home page is at http://github.com/rrthomas/lua-stdlib/
>>>
>>> How does one use the stuff in there?
>>>
>>> The INSTALL says:
>>>
>>> Briefly, the shell commands `./configure; make; make install' should
>>> configure, build, and install this package.
>>>
>>> I've often seen packages with that; however, this one does not have
>>> a ./configure. It does not have a Makefile. It does not have a rockspec.
>>> Instead, it has:
>>>
>>> configure.ac
>>> GNUmakefile
>>> Makefile.am
>>> stdlib.rockspec.in
>>>
>>> Obviously some package will turn these into the real thing.
>>> Doubtless some Googling or internet exploration will reveal
>>> all. But a little hint in ether the README or INSTALL would
>>> have been nice.
>>
>> Sorry about that.  We've just dropped in the standard GNU INSTALL file,
>> which only holds true if you build a release.
>>
>> I'll add a note to README before the next release, thanks.
>>
>> You have several options:
>>
>> 1) Use Luarocks:  luarocks install stdlib
>>  That's it!  This is the easiest way to get stdlib by fare.
>> 2) Use a full source release: https://github.com/rrthomas/lua-stdlib/archive/v34.1.tar.gz

D'oh!  That's not a full release tarball :(  I meant this url:

  https://github.com/rrthomas/lua-stdlib/archive/release-v34.1.tar.gz

>>  now you will have the files you need, to follow the INSTALL instructions,
>>  after unpacking:
>>     ./configure --prefix=/somewhere/on/your/lua/cpath
>>     make
>>     (as root!) make install
>> 3) Change to the release tag in your git checkout:
>>     git checkout v34.1
>>  proceed to step 2 above.
>> 4) Be a developer, install versions of the autotools somewhere on PATH, then,
>>     autoreconf --force --verbose --install
>>  proceed to step 2 above to finish now that you have the generated files.
>
> 5) when you get to step 2, and have successfully run configure, you can generate
>   the rockspecs with:
>
>     make rockspecs
>
>   and then do a luarocks install from the local checkout with something like:
>
>     luarocks make stdlib-34.1-1.rockspec
>
>   or if you are not on the release branch, better to use
>
>     luarocks make stdlib-git-1.rockspec
>
>
>> HTH!
>> --
>> Gary V. Vaughan (gary AT vaughan DOT pe)
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Dirk Laurie-2
In reply to this post by Gary V. Vaughan
2013/4/1 Gary V. Vaughan <[hidden email]>:

>
>> You have several options:
>>
>> 1) Use Luarocks:  luarocks install stdlib
>>   That's it!  This is the easiest way to get stdlib by fare.

That builds a 5.1 version. I want 5.2.

>>      autoreconf --force --verbose --install

That works ... up to a point. I now have configure and Makefile.
There is still no rockspec.

5) when you get to step 2, and have successfully run configure,
you can generate the rockspecs with:

     make rockspecs

That requires the module std. Chicken-and-egg.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan

On 2 Apr 2013, at 02:33, Dirk Laurie <[hidden email]> wrote:

> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>
>>
>>> You have several options:
>>>
>>> 1) Use Luarocks:  luarocks install stdlib
>>>  That's it!  This is the easiest way to get stdlib by fare.
>
> That builds a 5.1 version. I want 5.2.
>
>>>     autoreconf --force --verbose --install
>
> That works ... up to a point. I now have configure and Makefile.
> There is still no rockspec.
>
> 5) when you get to step 2, and have successfully run configure,
> you can generate the rockspecs with:
>
>     make rockspecs
>
> That requires the module std. Chicken-and-egg.

But you have std already! :-p

    LUA_PATH=`pwd`'/src/?.lua;;' make rockspecs

It's already fixed in master, and I forgot to backport it for
the 34.1 maintenance release.

Cheers,
--
Gary V. Vaughan (gary AT vaughan DOT pe)


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan
In reply to this post by Dirk Laurie-2
Hi Dirk,

On 2 Apr 2013, at 02:33, Dirk Laurie <[hidden email]> wrote:
> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>>> You have several options:
>>>
>>> 1) Use Luarocks:  luarocks install stdlib
>>>  That's it!  This is the easiest way to get stdlib by fare.
>
> That builds a 5.1 version. I want 5.2.

Well, that depends on how you've set your luarocks installation up.

Most likely, running `luarocks make stdlib-34.1-1.rockspec` will
also use the same luarocks binary, and install stdlib to your 5.1
luarocks tree.

Hisham already explained how to set up parallel trees better than
I could though, so I'll let you go back and read his earlier reply.

Cheers,
--
Gary V. Vaughan (gary AT vaughan DOT pe)

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Dirk Laurie-2
2013/4/1 Gary V. Vaughan <[hidden email]>:

> Hisham already explained how to set up parallel trees better than
> I could though, so I'll let you go back and read his earlier reply.

I just wanted to take quick look at stdlib to see what it
can do. It's not important enough to me to spend a whole
evening on. I'll just copy the contents of the std/ directory
to somewhere on my Lua path and use the individual
modules.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Gary V. Vaughan
Hi Dirk,

On 2 Apr 2013, at 02:48, Dirk Laurie <[hidden email]> wrote:

> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>
>> Hisham already explained how to set up parallel trees better than
>> I could though, so I'll let you go back and read his earlier reply.
>
> I just wanted to take quick look at stdlib to see what it
> can do. It's not important enough to me to spend a whole
> evening on. I'll just copy the contents of the std/ directory
> to somewhere on my Lua path and use the individual
> modules.

Understood.

Or you can use the LUA_PATH munging I pasted into an earlier message
to get make rockspecs to work.

Also, if you just want to poke around, then all the documentation
is checked in on the release branch:

  https://github.com/rrthomas/lua-stdlib/tree/release/src/modules

Or on your local machine, something along the lines of:

  file:///home/dirk/stdlib/src/index.html

HTH,
--
Gary V. Vaughan (gary AT vaughan DOT pe)


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Hisham
In reply to this post by Dirk Laurie-2
On 1 April 2013 16:48, Dirk Laurie <[hidden email]> wrote:

> 2013/4/1 Gary V. Vaughan <[hidden email]>:
>
>> Hisham already explained how to set up parallel trees better than
>> I could though, so I'll let you go back and read his earlier reply.
>
> I just wanted to take quick look at stdlib to see what it
> can do. It's not important enough to me to spend a whole
> evening on. I'll just copy the contents of the std/ directory
> to somewhere on my Lua path and use the individual
> modules.

You didn't specify how are Lua 5.1 and 5.2 installed in your system,
but try this:

mkdir testdir
cd testdir
wget http://luarocks.org/releases/luarocks-2.0.12.tar.gz
tar zxvpf luarocks-2.0.12.tar.gz
cd luarocks-2.0.12
./configure --prefix=$HOME/testdir --lua-version=5.2 --with-lua=/usr/local
# you may need additional flags such as --with-lua-include
# and --lua-suffix depending on your system
make
make install
cd ..
bin/luarocks build stdlib --tree=$PWD
eval `bin/luarocks path`
lua -e 'require "std"'
echo $?

-- Hisham
http://hisham.hm/

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Dirk Laurie-2
2013/4/1 Hisham <[hidden email]>:
> You didn't specify how are Lua 5.1 and 5.2 installed in your system,
> but try this:

I have Lua 5.2.2 as the preferred 'lua' in /usr/local, and Ubuntu's
Lua 5.1 in /usr, purely for the sake of those applications that still
lag behind.

I followed the instructions you gave. It did not quite work but was close
enough that I needed only to copy the contents of a subdirectory named
'5.2' in 'testdir' to a similar subdirectory in '/usr/local'.

Thanks!

Dirk

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Stdlib 34.1 released

Dirk Laurie-2
In reply to this post by Gary V. Vaughan
2013/4/1 Gary V. Vaughan <[hidden email]>:
> I am happy to announce the release of Stdlib 34.1,

Thanks for your help in getting it running under Lua 5.2.

It's mildly annoying (for other purposes than to make HTML docs)
to have the markup in the docstrings in HTML, since LDoc handles
Markdown just as well, but it is not easy to convert it automatically,
even for an HTML-to-Markdown translator like Pandoc.