[ANN] Penlight 1.6.0 available

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Penlight 1.6.0 available

Thijs Schreijer
List,

I’m happy to announce that the 1.6.0 version of Penlight is available from LuaRocks (already was available for some time from the source repo). Steve Donovan has handed over the repository to me, since I have already been maintaining it for a while.

What is it: A set of pure Lua libraries focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.

The new repo location is: https://github.com/Tieske/Penlight



New features

• pl.compat now provides unpack as table.unpack on Lua 5.1

Changes

• utils.unpack is now documented and respects .n field of its argument.
• tablex.deepcopy and tablex.deepcompare are now cycle aware (#262)
• Installing through LuaRocks will now include the full rendered documentation

Fixes

• Fixed seq.last returning nil instead of an empty list when given an empty iterator (#253).
• pl.template now applies tostring when substituting values in templates, avoiding errors when they are not strings or numbers (#256).
• Fixed pl.import_into not importing some Penlight modules (#268).
• Fixed version number stuck at 1.5.2 (#260).
• Fixed types.is_empty returning true on tables containing false key (#267).
• Fixed test.assertraise throwing an error when passed an array with a function to call plus its arguments (#272).
• Fixed test.assertraise not throwing an error when given function does not error but instead returns a string matching given error pattern.
• Fixed placeholder expressions being evaluated with wrong precedence of binary and unary negation.
• Fixed placeholder expressions being evaluated assuming wrong binary operator associativity (e.g. _1-(_2+_3) was evaluated as (_1-_2)+_3.
• Fixed placeholder expressions being evaluated as if unary operators take precedence over power operator (e.g. (-_1)^_2) was evaluated as -(_1^2)).
• Fixed vulnerable backtracking pattern in pl.stringx.strip (#275)


Since there have been quite some updates after the 1.6.0 got tagged, I expect to release a 1.7.0 shortly as well.


I’d like to thank Steve for all his contributions over the years, and providing cornerstone libraries like Penlight!

regards
Thijs

PS. I’ve tried to switch all the links as best as I could, if you run into anything that’s broken please let me know. To prevent breaking anything I’ve also uploaded all the missing source-rocks to LuaRocks, so as always LuaRocks is your best bet to install without any issues.