[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] Penlight 0.9.5
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 5 Jul 2011 13:20:48 +0200
Hi all,
This is mostly a bug fix and Lua 5.2 beta compatibility update; list
of changes is at [0]. Tested with Lua 5.1, Lua 5.2 and LuaJIT.
stringx.title() and path.normpath() are new, following the Python
definitions. stringx.expandtabs() now works up to tab stops.
Can cope with UNC paths on Windows
pl.utils defines some useful Lua 5.2 compatibility functions:
- utils.execute() - returns ok,code. Strictly speaking the return is
different from both Lua 5.1 and 5.2, but the main thing is that it
returns true/false for the first return value.
- load() - overrides Lua 5.1's load() with a Lua 5.2 compatible
load(), that can load strings and set chunk environments.
- table.pack() for Lua 5.1, updated to new 5.2 beta rc5 return values.
With these, it was easy to update PL to handle Lua 5.2 beta. (Unless
you use set/getfenv a lot, load() and execute() are going to be the
show-stoppers for any code porting, generally speaking)
The only required external dependency is luafilesystem. (Can test 5.2
support on Windows against the zipfile I posted earlier)
See the API documentation at [2], a zipball is at [3]
steve d.
[0] https://github.com/stevedonovan/Penlight/blob/master/change-0.9.5.md
[1] https://github.com/stevedonovan/Penlight
[2] http://stevedonovan.github.com/Penlight/api/
[3] http://stevedonovan.github.com/files/penlight-0.9.5.zip