lua-users home
lua-l archive

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


On Fri, Jul 9, 2010 at 8:07 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
> On Fri, Jul 9, 2010 at 10:50, steve donovan <steve.j.donovan@gmail.com> wrote:
>> On Wed, Jul 7, 2010 at 7:09 AM, David Manura <dm.lua@math2.org> wrote:
>>> Penlight implements such a "path manipulation" module [1,2].
>
>> Note that the new canonical documentation URL is:
>
>> http://stevedonovan.github.com/Penlight/api/modules/pl.path.html
>
>> This is basically a translation of Python's os.path; not that I felt
>> that this was obviously a superior API, simply a de facto standard
>> that has been around the block a few times and has proved useful to a
>> lot of people.  However, it's part of a framework and so dependent on
>> other bits of Penlight (particularly pl.utils)  So there's still a
>> need for a stand-alone library.
>
> <...>
>
> So, what do you guys think? Should we simply copy Penlight API?

Sounds like a great starting point.

>> Plus, cross-platform does matter, although I suppose system management
>> scripts are unlikely to need to stretch across both Windows and POSIX.
>
> Indeed. I think that we should not strive to allow user to write
> cross-platform scripts (too many subtlietes). But the library itself
> should be cross-platform.
>
> On to the other hand, it should be possible to write cross-platform
> code complex enough to cover LuaRocks needs...

I can contribute code from luarocks.fs and luarocks.dir and adapt then
to be the first version of sh.fs, so that would mean that the needs of
LuaRocks would be covered. One thing I have in mind is to simplify the
use of optional module dependencies -- to either use them all (as is
the case in Lua for Windows) or to rely in os.execute for everything
(for the bootstrap stage when installing from scratch). That will make
testing it much simpler.

-- Hisham