lua-users home
lua-l archive

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


On Wed, Mar 6, 2013 at 10:49 AM, Christian Bielert
<cib123@googlemail.com> wrote:
> linux users will disagree). I wouldn't ask my users to install LR or
> LD, but a single, portable executable that does some basic setup and
> downloading of binary libraries to its own installation directory
> seems useful. "Just download smartlua from over there, then unpack my
> .lua files and you're good to go."

That makes sense. If you think about Windows using a Unix mindset you
are doomed to disappointment. It's ... different. Forget about having
guaranteed ability to download and decompress files! But on the plus
side, binary compatibility is great.

So this is how I would do it; I would use LuaBuild to make a
standalone Lua 5.2 executable with luafilesystem, luasocket, and one
of the zip libraries.  We can simplify the problem by only allowing
http and ftp, which luasocket handles fine - we can do this because we
can arrange suitable hosting (https is a complete other kettle of
fish).

(I've been thinking along exactly these lines with Lake, which has
recently acquired a plug-in system; the natural next step is to allow
for these plugins to be downloadable.  For the moment, I would expect
Windows users to grab wget, but I'm sure it can all be done in a base
executable about 300kb)

It would be of course useful to have a dedicated smartlua repo, which
would just be a HTTP directory, perhaps with a simple manifest, even
if it just provides redirects.  Let me put a PoC concept executable
together; the thing to think about is how a programmer goes about
asking for a package.  We can hijack require to do a request to the
repo, for instance; we can do as Go does, and have long package names
which contain a reference to the server.

steve d.