[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: about lposix
- From: Natanael Copa <natanael.copa@...>
- Date: Tue, 17 Oct 2006 17:01:15 +0200
Luiz,
On Tue, 2006-10-17 at 11:21 -0300, Luiz Henrique de Figueiredo wrote:
> Let me summarize the current state of afairs:
> So, my suggestion, which has already been made recently, is that we join
> efforts and write an extended OS library that works on POSIX and Windows,
> and that can be easily ported to other OS. That requires that we reach
> an agreement about what to include in it and most important what *not* to
> include.
>
> I can try to coordinate this by extracting the relevant parts of lposix and
> the other libraries as needed. But I cannot do anything about Windows...
> Or if someone else wants to takes this over, it's ok, but we'd still like to
> discuss what shall be included and what shall not. We must avoid bloat.
> Again, the point is that it is simple to include any given function, but
> we have to consider the other requirements: natural Lua interface,
> documentation, ease of porting, etc.
This is great! That was exactly what I wanted to hear.
> [1] http://lua-users.org/wiki/ExtensionProposal
The ex module has already done a great work so I think thats a good
starting point. But I'd suggest we have several smalles libs for
different categories. That way you dont need to include process and file
management if you only need to get and set environment.
What do you think about this as a start:
env.getenv(name)
env.setenv(name, value)
env.environ()
fs.attributes -- this is from luafilesystem
fs.chdir(pathname)
fs.mkdir(pathname)
fs.currentdir()
fs.dir(pathname)
fs.dirent(pathname)
fs.lock(file, mode, offset, length)
fs.unlock(file, offset, length)
proc.pipe()
proc.sleep(seconds)
proc.spawn(...)
proc.wait(proc)
It is basicly the ex module but just different prefixes. I believe that
will help it to scale without being bloaty.
I'd like to add "glob" but I don't know how it can be implemented in windows.
Natanael Copa