lua-users home
lua-l archive

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

On Tue, Dec 15, 2009 at 6:50 PM, steve donovan
<> wrote:
> On Tue, Dec 15, 2009 at 5:13 PM, Francesco Abbate <>
>>Talking about point 2, I don't know but I've got the idea that Lua
>> does not have a really good set of libraries.
> No standard libraries - that's one of the Python/Lua differences. The
> Three do the kernel and we're supposed to supply the OS ;) A lot of
> good code has been produced, but not so much consensus.

I wonder if it's time to start thinking about specifying a basic set
of standard libraries; not in the sense of 'endorsed by the Lua
developers) since we know that's not their job.

Another way of putting this: what are the functions you find yourself
needing to rewrite for yourself? And then to agree on a core API which
satisfies as many of those needs, but keeping the total function count
to less than a hundred.  E.g., a candidate would be a split() function
which takes a string and a regular expression and returns a table;
nearly every non-trivial Lua package has one of these and it is
actually a more delicate operation than it looks at first.

Not a new idea, of course; there is stdlib and my Penlight (which was
partly inspired by frustration with stdlib). On the non- Lua side,
there is Mark Edgar's extension proposal (which is BTW not about
extending the core):

If I can self-criticize here, Penlight has too much stuff that I
thought was interesting/cute, and recently I've been thinking of
deprecating some of the more obscure/underused modules and making them
separate libraries (although fitting into the PL namespace).  That is,
defining the universally useful core of functions that deal with the
filesystem and with table manipulation.

Namespacing is an important concept, which the Perl people understand
well (David M can elaborate on this)  Even if we could agree on some
namespaces, that would be progress.

steve d.