lua-users home
lua-l archive

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


On Mon, 16 Oct 2006 17:42:57 -0400
"Leo Razoumov" <slonik.az@gmail.com> wrote:

> On 10/16/06, George <j4y54w@sawinski.de> wrote:
> > Hi all.
> >
> > [..snip..]
> >
> > Btw, I'd like to ask if there's a compelling reason why these posix
> > functions have their own namespace, why not simply extend the existing
> > "os" table?
> 
> "os" module is the least common denominator of all ANSI C compatible
> operating systems. Core Lua makes very little assumptions about
> underlying OS. For example, core Lua does not even know about
> directories and Lua search-paths are pattern based. IMHO, POSIX
> library should stay as an add-on.

Not everything can be share either. Things like fork, chroot and
setuid. I really also like that lua core is small. It makes it very
suitable for embedded projects. I would like to see many small
addon libaries rather than few big ones or a huge core.

But being able to write portable scripts that works on many systems
(like posix systems an win32 systems) would definitively be a good
thing.

Posix could be splitted up into smaller pieces too.

for example: 

  fs - filesystem functions (chdir, mkdir, glob, is_file, is_dir)
  ps - process functions (fork, get/set priority, wait, signal)
  time - date and time functions

Things that dont fit in into common libs could go to either posix or
win32. (chroot, setuid etc)

In any case, it would be awesome if we could try make some kind of
collection of standard libs rather than everyone making their own.

Maybe we should try to start with writing the whole api? at least
decide what funcs go where to try to avoid overalapping. I have the
feeling that currently there is no big plan on this subject so everyone
is kind of doing their own stuff. (I'm new to lua but I believe im here
to stay). 

The goal would be that regardless of what system you are on (linux,
bsd, windows) there should be a set of libs that you can expect to be
there.

Do you think we can make that happen?

Natanael Copa