lua-users home
lua-l archive

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


On Tue, Apr 8, 2014 at 6:24 AM, Philipp Janda <siffiejoe@gmx.net> wrote:
> Am 08.04.2014 05:01 schröbte Tim Hill:
> `package.path` templates? I think even Unix users would benefit from a
> `~/.lua/?.lua` entry in the default `package.path`.

I like this - because otherwise you are lost on a Unix machine without
admin rights, as a poster pointed out.

Another solution is a custom Lua executable which has the mod path and
cpath hard-coded in at build time - good for sandboxes.  Luabuild does
this so a person can have a completely self-contained 5.2 system.

The Windows convention is the lua.exe directory - that's consistent
with how Windows likes to organize things, as a directory-per-program
with DLLs side-by-side.  (Actually it's "!\lua\?.lua" for the mod path
and '!\?.dll' for the cpath, where ! is that directory)

I'm a fan of Lua distributions and LuaDist Batteries is the way to go
- old LfW did not have a unified build, so people were always
disappointed in the answer to the question "where is the source?".
Distributions handle the convenience thing very well, and people don't
mind downloading stuff they don't need, if it's a single download.

Making this experience more graphical is important, but it isn't
trivial.  I did intend to do this for the LuaDist batteries but got
side-tracked by zillions of little projects (which is my weakness)

You can now download LuaDist extensions from within ZeroBrane Studio,
which I also think is best-of-breed.