lua-users home
lua-l archive

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


Mike Panetta wrote:
Will this solve the problems of people that need explicitly the features that some of the POSIX functions provide? I don't know what windows has because I dont write software for it, but I am using Lua to script the startup process of an 'embedded' Linux system. This is why I needed my own versions of waitpid and execvp. The ones that were in the posix library didnt have all the functionality of the C versions (that functionality is there for a reason!) and I could not tell if my spawned processes were returning the values I wanted or were being killed by signals or what have you.

I'm looking at adding Lua scripting to our embedded app that might
be moved to a small FreeBSD box (Soekris based). I can expect that
some of the "standard" POSIX library would be replaced for the same
reasons you have done so.

This is why having the standard framework for the API is important.

It helps other programmers integrating Lua into their custom
systems do so in a way that does not break when the Lua code
is ported to another platform.

I'm acutely aware of this as we look at moving from putting our
apps on a single Windows based server to several smaller BSD boxes
distributed around the site.

 Maybe the best thing to do is to have a windows library, and a
POSIX library, and a LUA top level abstraction for both? And isn't windows becoming more POSIX these days with the unix services for windows stuff?

Good idea. Then you can have your modified POSIX library under the
Lua abstraction layer and never really know the difference. Of
course, at some point the abstraction layer hits the real world
and there may be a few bits sticking out, but at least it is
easier to document a few differences from a standard than to
have to document an entire library.

We should never underestimate the benefit that a book like PiL
brings to encouraging adoption of Lua - management likes to
see a book, and programmers like to read a manual, even if they
don't like writing them...

Ralph