lua-users home
lua-l archive

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


On Apr 7, 2014, at 6:50 PM, Sean Conner <sean@conman.org> wrote:

> It was thus said that the Great Tim Hill once stated:
>> 
>> On Apr 7, 2014, at 6:43 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> 
>>> If Lua 5.3 were to come with a "standard extension library", consisting
>>> of modules that are available by a mere "require mathx", "require lpeg",
>>> etc, those modules having been built and placed into the default
>>> loadpath and cloadpath by the default "make linux", "make mingw" etc, I
>>> shall withdraw all opposition to the suggestion.
>> 
>> +1 on that. As soon a script has a dependency on a library, using it goes
>> +from “install lua and run the script” to “install lua, go to a bunch of
>> +web sites and/or download a bunch of Lua rocks, some of which you will
>> +have to compile .. oh, and make sure you have the right compiler .. oh,
>> +and you need a particular version of xxx” etc etc...
> 
>  Your mention of "the right compiler" triggered a thought:  is the fagility
> of require() due to Windows and not inherently with Lua itself?  (Or maybe a
> distinction between a consumer operating system like Windows/Mac OS-X and a
> non-consumer operating system like Unix? [1]) [2]
> 

Partly, yes I think it is. But it’s also one of the more intricate designs in Lua, which makes creating predictable installs of libraries hard to do unless you control the complete OS installation, libraries, and scripts, even assuming you can compile things cleanly.

I have a sneaking suspicion most of this discussion is really about the fragility of “require()”. Assuming for a moment Lua had a bullet-proof “require” model so that all anyone had to do was “require mathx” (with no OS/web tinkering) and you would get all those hyperbolics, I wonder how many people would still have an issue with moving them out of the math library?

—Tim