Changelog

Versioning is strictly according to Semantic Versioning, see the README.md for details on version scoping and deprecation policy.

see CONTRIBUTING.md for release instructions

1.13.1 (2022-Jul-22)

- fix: warn unquoted argument #439

1.13.0 (2022-Jul-22)

- fix: xml.parse returned nonsense when given a file name #431 - feat: app.require_here now follows symlink'd main modules to their directory #423 - fix: pretty.write invalid order function for sorting #430 - fix: compat.warn raised write guard warning in OpenResty #414 - feat: utils.enum now accepts hash tables, to enable better error handling #413 - feat: utils.kpairs new iterator over all non-integer keys #413 - fix: warn use rawget to not trigger strict-checkers #437 - fix: lapp provides the file name when using the default argument #427 - fix: lapp positional arguments now allow digits after the first character #428 - fix: path.isdir windows root directories (including drive letter) were not considered valid #436

1.12.0 (2022-Jan-10)

- deprecate: module pl.text the contents have moved to pl.stringx (removal later) #407 - deprecate: module pl.xml, please switch to a more specialized library (removal later) #409 - feat: utils.npairs added. An iterator with a range that honours the n field #387 - fix: xml.maptags would hang if it encountered text-nodes #396 - fix: text.dedent didn't handle declining indents nor empty lines #402 - fix: dir.getfiles, dir.getdirectories, and dir.getallfiles now have the directory optional, as was already documented #405 - feat: array2d.default_range now also takes a spreadsheet range, which means also other functions now take a range. #404 - fix: lapp enums allow patterns magic characters #393 - fix: text.wrap and text.fill numerous fixes for handling whitespace, accented characters, honouring width, etc. #400 - feat: text.wrap and text.fill have a new parameter to forcefully break words longer than the width given. #400 - fix: stringx.expandtabs could error out on Lua 5.3+ #406 - fix: pl the module would not properly forward the newindex metamethod on the global table. #395 - feat: utils.enum added to create enums and prevent magic strings #408 - change: xml.new added some sanity checks on input #397 - added: xml.xml_escape and xml.xml_unescape functions (previously private) #397 - feat: xml.tostring now also takes numeric indents (previously only strings) #397 - fix: xml.walk now detects recursion (errors out) #397 - fix: xml.clone now detects recursion (errors out) #397 - fix: xml.compare now detects recursion (errors out) #397 - fix: xml.compare text compares now work #397 - fix: xml.compare attribute order compares now only compare if both inputs provide an order #397 - fix: xml.compare child comparisons failing now report proper error #397

1.11.0 (2021-Aug-18)

1.10.0 (2021-Apr-27)

1.9.2 (2020-Sep-27)

1.9.1 (2020-Sep-24)

1.8.1 (2020-Sep-24) (replacing a briefly released but broken 1.9.0 version)

Fixes

1.8.0 (2020-Aug-05)

New features

Changes

Fixes

1.7.0 (2019-Oct-14)

New features

Changes

Fixes

1.6.0 (2018-Nov-23)

New features

Changes

Fixes

1.5.4 (2017-07-17)

Fixes

1.5.3 (2017-07-16)

Changes

Fixes

1.5.2 (2017-04-08)

Fixes

1.5.1 (2017-04-02)

Fixes

1.5.0 (2017-04-01)

Changes

Fixes

Features

1.4.1 (2016-08-16)

Changes

Fixes

Features

1.4.0 (2016-08-14)

Changes

Fixes

Features

1.3.2 (2015-05-10)

Changes

Fixes

Features

1.3.1 (2013-09-24)

1.3.0 (2013-09-14)

Changes

Fixes

Features

1.2.1 (2013-06-21)

Changes

Fixes

Features

1.2.0 (2013-05-28)

1.1.1 (2013-05-14)

1.1.0 (2013-03-18)

1.0.3 (2012-12-07)

1.0.2 (2012-05-12)

1.0.1 (2012-05-26)

1.0.0 (2012-04-26)

0.9.8 (2011-11-27)

0.9.7 (2011-11-27)

Lua 5.2 compatibility

(These are all now defined in pl.utils)

Changes

Fixes

0.9.6 (2011-09-11)

Lua 5.2 compatibility

Changes

Fixes

0.9.5 (2011-07-05)

Lua 5.2 compatibility

New functions

Fixes

0.9.4 (2011-04-08)

0.9.3 (2011-03-05)

0.9.2 (2011-02-16)

0.9.1 (2011-02-12)

0.9.0 (2010-12-20)

0.8.5 (2010-12-16)

What's new with 0.8b ?

Features:

pl.app provides useful stuff like simple command-line argument parsing and require_here(), which makes subsequent require() calls look in the local directory by preference.

p.file provides useful functions like copy(),move(), read() and write(). (These are aliases to dir.copyfile(),movefile(),utils.readfile(),writefile())

Custom error trace will only show the functions in user code.

More robust argument checking.

In function arguments, now supports 'string lambdas', e.g. '|x| 2*x'

utils.readfile,writefile now insist on being given filenames. This will cause less confusion.

tablex.search() is new: will look recursively in an arbitrary table; can specify tables not to follow. tablex.move() will work with source and destination tables the same, with overlapping ranges.

Bug Fixes:

dir.copyfile() now works fine without Alien on Windows

dir.makepath() and rmtree() had problems.

tablex.comparenoorder() is now O(NlogN), as expected. tablex.move() had a problem with source size

What's New with 0.7.0b?

Features:

utils.istype(v,tp) can say istype(s,'string') and istype(l,List). utils.iscallable(v) either a function, or has a __call metamethod.

Sequence wrappers: can write things like this:

seq(s):last():filter('<'):copy()

seq:mapmethod(s,name) - map using a named method over a sequence.

seq:enum(s) If s is a simple sequence, then

 for i,v in seq.enum(s) do print(i,v) end

seq:take(s,n) Grab the next n values from a (possibly infinite) sequence.

In a related change suggested by Flemming Madsden, the in-place List methods like reverse() and sort() return the list, allowing for method chaining.

list.join() explicitly converts using tostring first.

tablex.countmap() like seq.countmap(), but takes an equality function.

tablex.difference() set difference tablex.set() explicit set generator given a list of values

Template.indent_substitute() is a new Template method which adjusts for indentation and can also substitute templates themselves.

pretty.read(). This reads a Lua table (as dumped by pretty.write) and attempts to be paranoid about its contents.

sip.matchatstart(). Convenience function for anchored SIP matches.

Bug Fixes:

tablex.deepcompare() was confused by false boolean values, which it thought were synonymous with being nil.

pretty.write() did not handle cycles, and could not display tables with 'holes' properly (Flemming Madsden)

The SIP pattern '$(' was not escaped properly. sip.match() did not pass on options table.

seq.map() was broken for double-valued sequences. seq.copytuples() did not use defaultiter(), so did not e.g. like table arguments.

dir.copyfile() returns the wrong result for *nix operations. dir.makepath() was broken for non-Windows paths.

What's New with 0.6.3?

The map and reduce functions now take the function first, as Nature intended.

The Python-like overloading of '*' for strings has been dropped, since it is silly. Also, strings are no longer callable; use 's:at(1)' instead of 's(1)' - this tended to cause Obscure Error messages.

Wherever a function argument is expected, you can use the operator strings like '+','==',etc as well as pl.operator.add, pl.operator.eq, etc. (see end of pl/operator.lua for the full list.)

tablex now has compare() and comparenoorder(). An explicit set() function has been added which constructs a table with the specified keys, all set to a value of true.

List has reduce() and partition() (This is a cool function which separates out elements of a list depending on a classifier function.)

There is a new array module which generalizes tablex operations like map and reduce for two-dimensional arrays.

The famous iterator over permutations from PiL 9.3 has been included.

David Manura's list comprehension library has been included.

Also, utils now contains his memoize function, plus a useful function args which captures the case where varargs contains nils.

There was a bug with dir.copyfile() where the flag was the wrong way round.

config.lines() had a problem with continued lines.

Some operators were missing in pl.operator; have renamed them to be consistent with the Lua metamethod names.