lua-users home
lua-l archive

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



> Am 14.02.2018 um 09:29 schrieb Miha Cooper <mihakuper@gmail.com>:
> 
> This project looks pretty interesting for me. Here is a lot of helpful functions and no dependencies, yey!
> 
> After the first look at the project I have a question or suggestion. Do you suppose that users will copy necessary files to their projects manually?

No. You can use lzt<1> with the subcommand inject to add the functions into a script or the makelib subcommand to create a custom Lua module.
lzt itself uses functions from LuaZDF.

[1] https://github.com/aiq/

> If so, I think it's strange. Why not to add "init.lua" to the root directory of the ZDF and the same "init.lua" to each subdirectory?

Each name is unique in the LuaZDF directory. It's not necessary to create submodules if you want prevent name collision.
And lzt allows you to create your own submodules.

> So, we would be able to do this:
> 
> zdf = require "luazdf"
> zdf.str.lines()
> 
> or if we don't need the whole library:
> 
> zdf_str = require "luazdf.str"
> zdf_str.lines()
> 
> This will make you library more comfortable, IMHO.
> 
> 
> On 14 February 2018 at 10:19, Alexander Schulz <aiqpost@yahoo.com> wrote:
> 
> > Am 13.02.2018 um 22:45 schrieb Sean Conner <sean@conman.org>:
> >
> > It was thus said that the Great Alexander Schulz once stated:
> >>
> >> The main problems on using packages often are the dependencies and their
> >> management. For example almost all package managers force you to define a
> >> required version for a package. My experience is that in most cases the
> >> packages are just defining the minimum version and ignore a maximum
> >> version where the code compiles or runs correctly. I unterstand the
> >> motivation but it breaks my code so often - it really hurts.
> >
> >  I'm not sure what you are saying here.  At the one extream, you can
> > specify:
> >
> >       dependencies =
> >       {
> >         "lua" -- any version of Lua, even 1.0!
> >       }
> >
> > and at the other end:
> >
> >       dependencies =
> >       {
> >         "lua >= 5.1, < 5.4"
> >       }
> 
> I know that this is possible, but my experience is that in most cases the packages
> do just definine the minimum version with the hope that the interface does not break.
> It’s not just Luarocks packages.
> 
> >
> > If you stuff really is zero dependency functions, then what's the problem
> > with specifying "lua >= 5.1, < 5.4" (where Lua 5.4 doesn't exist yet)?
> >
> >  -spc
> 
> I know, I've thought a lot about that how to include different versions of the functions
> for specific Lua Version. I haven’t found a good answer.
> I am open for ideas.
> 
> Thanks.
> 
> 
> 
> -- 
> With best regards,
> Kupriyanov Mikhail.