[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaSocket to communicate with database
- From: duck <duck@...>
- Date: Tue, 1 Feb 2005 11:53:53 +0000
> I am not sure I understand what is it that you dislike. Lua "standard"
> does not come with support for sockets. You have to do something to get
> that support loaded and available. This can be done with the "require"
> business, or you can build your own interpreter and "preinstall"
> everything so that scripts can just use it as if someone else had called
I posted some code the other day (search for "lstatic") which showed
how one can easily do a static build of an extended Lua interpreter
based on 5.0.2 + compat-5.1 + lsocket + socket.lua (all compiled into
a single binary).
Then when you write code which does
and that code itself says
the require()s simply succeed and...bingo...you have socketing built in.
(But your code will work in Lua builds which have it dynamically
loadable...how good is that!)
Someone else (forget who) showed how to take my bin2c-based lstatic and
convert it to use Windows resources on Win32, to save run-time memory.