lua-users home
lua-l archive

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


On 4 November 2016 at 14:34, sur-behoffski <sur_behoffski@grouse.com.au> wrote:
> G'day,
>
> [Brief ActiveState diversion, that partially provoked this message:  I
> enjoyed their Tcl/Tk packaged version in the late 90's, and left behind
> me some satisfied customers... so this message is partially looking at
> the Lua ecosystem with a slight ActiveState flavour...]
>
> Having seen that a Lisp-ish or Scheme-ish high-level language, plus
> straight C at the lower levels, seems to be the nature of more than one
> project that's proven successful, I'm trying to centre my programming
> universe around C + Lua.
>
> LuaRocks is a non-trivial part of that ecosystem.  So, two
> questions, loosely related on LuaRocks (the first is probably more
> important than the second):
>
> 1. Given that I have some set of LuaRocks installed, is there an
>    automated way of checking whether the main repository has a newer
>    version?  I haven't seen an easy way to do this from the
>    intrinsic help contained within the "luarocks" command; and

Well, there is `luarocks search`, but yes, that is quite manual and
you asked for an easy way. We have discussed several possibilities of
semantics for an "upgrade" command, but we never reached a decision.
Is something we want to add, though. It's more of a matter of deciding
how it is going to work in the details. It's one of these things
that's easy on surface but gets more involved the more you think about
it. Perhaps a "check_versions" command that reports but does not
modify the local repository by default would be a good (and safe)
first step?

> 2. For some reason, I've tended to use the "strictness" lua rock
>    instead of the "strict.lua" included with the distribution.  Am I
>    introducing extra dependencies+pain for little gain by doing this?
>    (I vaguely recall that there was some advantage to using
>    "strictness" over "strict.lua", but I can't recall exact reasons...)

Well, for one, the author of strictness uploaded it to LuaRocks,
making it easy to specify it as a dependency. That's a plus.

The fact that strict.lua was included with the Lua 5.1 tarball (it
isn't anymore) isn't meaningful because the Makefiles don't install
it, so it isn't actually "included with the distrubition" (ie, when
you install Lua with a package manager, you don't get strict.lua — it
is not part of the standard libraries).

Speaking of strict-checking libraries, yet another alternative is
https://luarocks.org/modules/hisham/safer
which allows you to apply those kind of checks not only for globals,
but for individual tables (creating read-only proxies, etc.).

> (Extra information that may be relevant:  I've held myself to version
> 5.1, minus deprecated features such as "module", but using various
> LuaRocks occasionally (e.g. features such as bit32).  Does anything I've
> said in this paragraph really affect the "strictness" versus
> "strict.lua" pros and cons?)

Not really.

> Thanks in advance for any help on the LuaRocks versioning and/or
> strictness front.

Hope this helps!

-- Hisham