lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi guys,

Now points to the Guide directly; the module docs are at:

The LuaDoc API docs are now much improved.

There are a number of new things. Sequence wrappers have been added as
recently discussed:

Can now write things like this one liner:


seq:enum(s)  If s is a simple sequence, then
     for i,v in seq.enum(s) do print(i,v) end

(so enum(copy(ls)) is like ipairs ;))

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

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.count_map() like seq.count_map(), 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. This reads a Lua table (as dumped by pretty.write)
and attempts to be paranoid about its contents.

There are a number of significant 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 (solution provided by Flemming Madsden)

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

So, a consolidation release, hopefully more solid!

BTW, I have made peace with LuaForge. This little script was most useful:

local L = require 'lexpect' 'ftp'
L.writeln 'open'
L.expect(': $',true)
L.writeln 'stevedonovan'
L.writeln 'xxxxxxx'
L.prompt = 'ftp>'
L.command 'cd penlight/htdocs'

function docmd(cmd)

docmd 'prompt off'
docmd 'put index.html'
docmd 'put examples.html'
docmd 'lcd api'
docmd 'cd api'
docmd 'put index.html'
docmd 'put  luadoc.css'
docmd 'lcd modules'
docmd 'mkdir modules'
docmd 'cd modules'
docmd 'mput *.html'
L.command 'quit'

steve d.

PS. I will now get back to my job for a while...