[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] Penlight 1.0.0
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 26 Mar 2012 17:58:39 +0200
Hi all,
This is a release candidate for Penlight version 1.0, which provides
some useful general-purpose libraries for Lua. It's available through
LuaRocks as 'penlight' and there's a zip [1] as well. Tested against
Lua 5.1, Lua 5.2 and LuaJIT 2 beta.
One new feature of this release is fully-integrated documentation [2]
courtesy of LDoc 1.2.
The focus for this release is quality and bug fixes, and there's
relatively little innovation (which is how it should be)
- improvements in pl.lapp due to feedback from Egil Hjelmeland, who
also provided a script to track down all remaining global references.
- path.relpath (Jonathan Beebe)
- pl.Set no longer has methods and so can't be confused (Mathew Wild)
- repeated self:super() calls in classes now work properly (Henk Boom)
- pl.class provides optional property support (getters/setters)
- allow for initial comments in data by pretty.read; pretty.load for
reading 'top-level' Lua configuration files. pretty.number shows large
numbers in various human-friendly formats. (Kevin Ghadyani)
- array2d: 'move' for block moves in 2D arrays, 'new' for making a 2D
array, and 'reshape' for rearraging a 2D array.
- require 'pl' respects existing _G metatable. (Tawanda Gwena)
- List: l:map():method(arg) is short for l:map(Class.method,arg);
ditto for l:foreach():method(); there is a minmax method in analogy to
seq.minmax
- List,tablex and array2d are _covariant_ where applicable, that is
they will return tables of the same type as their inputs. [3]
- lexer problem with strings like "path\\" fixed (AMSUser)
- Data object returned by data.read() will look for missing methods in
array2d, allowing one-liners like 'print(data.read
'data.txt':flatten():minmax())'
Any feedback welcome!
steve d.
[1] http://stevedonovan.github.com/files/penlight-1.0.0-src.zip
[2] http://stevedonovan.github.com/Penlight/api/
[3] For example, see how map and slice return objects of the correct
type here: https://gist.github.com/2204798