lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Nov 29, 2011 at 3:21 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
Hi all,

I'm pleased to announce Penlight 0.9.8, which is effectively the first
candidate for a version 1.0 release.

Originally Penlight started as a collection of Python-like modules,
starting with Nick Trout's implementation of Python lists. I added
stringx, which implemented Python-like string operations, and
path/dir, and thereafter started to diverge from the script ;)

A zip is available [0] and the docs are online as a Guide [1] and an
API reference [2]

'luarocks install penlight' will also get you the latest up-to-date version.

Tested against Lua 5.1, Lua 5.2 and LuaJIT 2.0 beta 8.  pl.utils
contains the compatibility layer, which may be of more general
interest.  For instance, if you use utils.execute instead of
os.execute you are assured of a consistent interface across Lua
versions.

A fair number of bugs were sorted out, and some new functionality. For
instance, pretty.number will print numbers out in human-friendly
format (inspired by code by Vadim Peretokin).  Date.Format(), if
passed nil for the format string, will go into 'flexible' date parsing
mode [3] and can handle ISO 8601 dates as well.

The major addition is XML[4] support, which is based on my
luaexpat-utils project, which is a reworked version of Mathew Wild's
stanza.lua from Prosody.

It provides pretty-printing for LOM documents as returned by lxp.lom
from LuaExpat.  LuaExpat is a 'soft' dependency of Penlight, and it
will fall back to a straightforward XML parser based on the classic
Roberto version if LuaExpat is not found.  It's not intended as a
heavy-duty XML processing package, but to parse configuration files
and extract useful data from XML returned by web APIs.

There are some raw edges, and I welcome you to try to break things.
The best kind of feedback is a test case which can go in the test
suite.

steve d.

[0] http://stevedonovan.github.com/files/penlight-0.9.8-src.zip
[1] http://stevedonovan.github.com/Penlight/
[2] http://stevedonovan.github.com/Penlight/api/
[3] http://stevedonovan.github.com/Penlight/#T24
[4] http://stevedonovan.github.com/Penlight/#T31
 
Looking great. I have done a small amount of testing and so for it looks good. I did notice that 'utils._VERSION' is not set correctly to 0.9.8. I pushed a change to the Git repo to fix this.

I will try out the XML module soon.
--
Regards,
Ryan