lua-users home
lua-l archive

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


Hi Dirk,

> On Jan 16, 2014, at 10:06 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 
> 2014/1/16 Gary Vaughan <gary@vaughan.pe>:
> 
>> I am happy to announce release 36 of stdlib.
> 
>> ** New features:
>> 
>> - Modules have been refactored so that they can be safely
>>   required individually, and without loading themselves or any
>>   dependencies on other std modules into the global namespace.
> 
> I have tried this under Lua 5.2.3.
> 
> - `std=require"std"` does not return a table containing std.set etc
>   which is assigned to a variable `std` but gives the error message

That is a TODO item. In this release std is documented as the "global namespace scribbler" that tries to keep compatibility with previous releases.

> /usr/local/share/lua/5.2/std/debug.lua:6: module 'std.debug_init' not found:
> 
> - `set=require"set"` adds the names `proper_subset` and `new` to the
> global namespace. The former is fairly harmless, the latter is disastrous.
> 
> I have not tried any other submodules.

Yikes! Thanks for the heads up. Until very recently stdlib basically scribbled all over the global namespace, and moving to encapsulate everything in tables is a work in progress - not yet at the point where I've actually audited for outliers. But std.set is supposed to be one of the clean modules, so I'll fix  that (and any others I find) and put out a new release shortly.

Cheers,
-- 
Gary V. Vaughan (gary AT vaughan DOT pe)