[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Penlight 0.9.8
- From: Ryan Pusztai <rpusztai@...>
- Date: Tue, 29 Nov 2011 13:06:10 -0500
On Tue, Nov 29, 2011 at 3:21 AM, steve donovan <firstname.lastname@example.org>
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  and the docs are online as a Guide  and an
API reference 
'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
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  and can handle ISO 8601 dates as well.
The major addition is XML 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
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.