1.4.1

Changes

Fixes

Features

1.4.0

Changes

Fixes

Features

1.3.2

Changes

Fixes

Features

1.3.0

Changes

Fixes

Features

1.2.1

Changes

Fixes

Features

0.9.7

Lua 5.2 compatibility

(These are all now defined in pl.utils)

Changes

Fixes

0.9.6

Lua 5.2 compatibility

Changes

Fixes

0.9.5

Lua 5.2 compatibility

New functions

Fixes

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.