lua-users home
lua-l archive

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


On 14.09.2013 14:07, steve donovan wrote:
> Hi all,
> 
> Penlight [1] is a set of general utility Lua libraries, which started
> out as an attempt to imitate the Python standard libraries (e.g
> strings & Lists, path, dir) and grew in its own eccentric fashion
> thereafter.  Docs are here[2]; you can grab the 1.3.0 tag as an
> archive or do:
> 
> $ sudo luarocks install
> http://stevedonovan.github.com/files/penlight-1.3.0-1.rockspec
> 
> Change list is here [3]. Thanks particularly to John Schember and
> Thijs Schreijer as chief collaborators for this release, although
> every small contribution has been greatly appreciated. This is the
> first release that works fine with Lua 5.2 in non-5.1-compatible mode;
> pl.compat handles the differences.
> 
> There have been a number of fixes, and fans of pl.lapp will appreciate
> that short flags can now always be followed by the value without a
> space, e.g -I/path/to/file.
> 
> This is a pre-release release, since I'd really like comments about
> the pl.Date class[4] before there's a proper release that goes into
> the LuaRocks repo.  Dates are not easy, and John has tried to make
> pl.Date more robust and correct.  So there have been changes; toUTC
> and toLocal return a new date; DST is accounted for (say if you add
> two months to an BST date in September the time will remain the same).
>  __tostring returns a format appropriate to serialization (ISO 8601)
> although not so friendly for humans (as the discussion about tostring
> and floats indicates, there is always tension between precise and
> friendly presentation of date).  We had some debate about the public
> API here, since John dislikes the OOP style, whereas I simply find it
> convenient.
> 
> Since the otherwise excellent luadate seems to have become
> unmaintained, the idea is to get a robust package that does what it
> does well, and works for people who have to deal with DST.
> 
> steve d.
> 
> [1] https://github.com/stevedonovan/Penlight
> [2] http://stevedonovan.github.io/Penlight
> [3] https://github.com/stevedonovan/Penlight/blob/master/CHANGES.md
> [4] https://github.com/stevedonovan/Penlight/blob/master/lua/pl/Date.lua
> 

It looks promising, it would be perfect if you did use camelcase over
underscore case though :p.

It's more a matter of taste but I think camelcase looks prettier on
object oriented.

For instance I personally think this not really nice to see:
Object.my_function() which mix both.

Regards,