lua-users home
lua-l archive

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


On Tue, Aug 25, 2009 at 11:03 PM, David Manura<dm.lua@math2.org> wrote:
> There have been a number of efforts in this direction [1].  For
> example, there is a fair amount of overlap with Steve's recent
> penlight [2], including pl.operator [3], pl.stringx [4], pl.tablex
> [5], and pl.text.wrap [6].

I've looked at Penlight before, and it's a nice project. I think,
though, that there's a bit of a philosophical difference between libmc
and Penlight. Some of the ideas on my wishlist page notwithstanding,
the libmc idea is to fill in the stuff Lua doesn't provide, and
Penlight's is to do that and add stuff - like the lexer, the
'pl.input' module, the file tools, etc. Consequently, libmc is a
single .lua file at 22K, and Penlight is a big 256K package. libmc is
to be pure Lua, with no dependencies. Penlight requires LuaFileSystem.
libmc seperates arguments in functions with a comma and a space.
Penlight doesn't bother with spaces. Of course, I'm not in Steve's
head, so I can't really describe Penlight's design philosophy, but I
think there are some different ideas working in libmc. (Though the
Penlight source does give me some good ideas for implementation.)

> I think it would be a good thing to try to
> merge your work with his.

I'm a bit unsure about that. There are only a few things in libmc that
are not in Penlight, and our coding styles are very different. But if
he asks, I'd be more than happy to let him use any of my code.

>> For simplicity, it loads a good degree of
>> them into the 'math', 'string', and 'table' standard tables, with the
>> rest going in the 'mc' table.
>
> The can be good or bad.  See "To Inject or not to Inject?" in [7].  It
> has been previously discussed [8][9].

Now that you bring it up, I can see some problems that would arise
from the injection. I suppose I could switch everything to a single
'mc' module, and then people could call 'mc:inject()' to inject the
math, string, and table functions.

-- Regards, LeafStorm
"There are 10 types of people in the world - those who understand
binary and those who don't."