lua-users home
lua-l archive

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


Penlight [1] is a general-purpose collection of libraries to make Lua programming more productive. It started out as implementation of some standard Python libraries, starting with  pl.List, stringx (Python-style string functions) and pl.path,pl.dir (os.dir,os.path) but has grown beyond this. There are pretty-printing and paranoid Lua data loading (pretty), reading and query operations on tabular data (data), configuration file reading (config) for common Unix formats and INI files, XML pretty-printing and LOM manipulation (xml), and _two_ separate command-line parsers (app and lapp).  There is lightweight support for OOP (class) and some useful classes (List,Map,Set and OrderedMap).  Plus common extended operations on tables and 2-d arrays (tablex and array2d).

There have been a lot of contributions and bug reports from people for which I'm very grateful.  Particular thanks to Thijs Schreijer as chief collaborator on this version, as well as Pierre Chapuis, Pete Kazmier, John Schember and many others.  Documentation and comprehensive tests are key in this kind of project and any contributions are welcome.

Since the last release, there have been a number of fixes and extensions. The single breaking change in 1.2.1 is that we _don't_ create top-level setfenv and getfenv compatible functions; instead these are defined in pl.compat as compat.setfenv. For backwards compatibility, also available as utils.setfenv, etc.  For 5.1, package,searchpath and table.pack are created.  PL now checks capabilities, not version, so it knows that LuaJIT already has package.searchpath and a 5.2 compatible load function (which is always available as utils.load)

The cute class.Frodo() declaration style now puts Frodo in the _current environment_, not always in _G.

A full list of changes is available here [2]; on-line documentation [3], and a source zip at [4].  You can always grab an archive of the 1.2.1 tag through Github.

This is a release candidate, so it's not  available from luarocks main repo. Instead grab so 'luarocks install --server=http://rocks.moonscript.org' until any issues have been ironed out and bugs nailed.

steve d.

[1] https://github.com/stevedonovan/Penlight.git
[2] https://github.com/stevedonovan/Penlight/blob/master/CHANGES.md
[3] http://stevedonovan.github.io/Penlight/api/index.html
[4] http://stevedonovan.github.io/files/penlight-1.2.1-core.zip