lua-users home
lua-l archive

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


Thanks to Gary and Hisham, I have a working installation of
stdlib running under Lua 5.2.

I have for my own future use written the attached description/summary
and installed it in the same directory as the official documentation.

The program that writes most of it automatically is also attached.

Anyone can do anything with it. I believe that's called the WTFYL license.

stdlib: Lua general libraries

This package, currently (April 2013) at release 34.1 has had several authors. It is written purely in Lua and is documented in the source according to the conventions of LuaDoc. The Lua code runs under either Lua 5.1 or Lua 5.2.

The package does not provide a module table. require"std" returns a table containing only the version and loads the new functions in several places: new libraries, additions to existing libraries, including the global library. Moreover, several existing functions have been replaced by enhanced versions.

In addition, some Lua files are provided in the bundle but are not loaded automatically by require"std". These are not listed below.

A short docstring in LuaDoc format (using HTML, not Markdown) is provided most of the time, and the HTML file that LuaDoc generates from those is supplied.

The following list was made using a program, with occasional comments added manually.

Summary of the effect of loading module stdlib

The global table

Expanded from 38 names to 80 names.

New tables

base getopt list op package_ext set strbuf string_ext table_ext tree

base contains no functions. package_ext, string_ext and table_ext are the original versions of package, string and table.

New functions

_tostring bind collect compose curry die eval filter fold id ileaves 
 inodes leaves map memoize metamethod nodes pack permuteOn pickle 
 prettytostring propersubset render require_version ripairs totable warn

New constants

_DEBUG debug_ext debug_init io_ext math_ext

New values

assert tostring

_tostring is the original version of tostring. The original version of assert is not available.

The table library

Expanded from 7 names to 16 names.

New functions

clone clone_rename empty invert keys merge new size values

New values

sort

The io library

Expanded from 14 names to 25 names.

New tables

_M

New functions

catdir catfile processFiles readlines shell slurp splitdir writelines

New constants

_NAME _PACKAGE

The string library

Expanded from 14 names to 32 names.

New tables

__index

New functions

caps chomp escapePattern escapeShell escape_pattern escape_shell finds 
 ltrim numbertosi ordinalSuffix ordinal_suffix pad rtrim split tfind trim 
 wrap

New values

format

The package library

Expanded from 10 names to 15 names.

New constants

dirsep execdir igmark path_mark pathsep

The math library

Expanded from 30 names to 34 names.

New tables

_M

New functions

round

New constants

_NAME _PACKAGE

New values

floor

The debug library

Expanded from 16 names to 21 names.

New tables

_M

New functions

say trace

New constants

_NAME _PACKAGE

The bit32 library

Unchanged.

The os library

Unchanged.

The coroutine library

Unchanged.

New libraries

Note: the function names in op can only be used via string indexing, e.g. op["and"].

   getopt:
usageInfo getOpt opt usage processArgs

   list:
append cons foldr compare project concat sub new transpose zipWith 
relems map tail depair mapWith slice shape enpair flatten filter elems 
rep foldl indexValue reverse indexKey

   op:
~= and [] not - + or == * .. /

   set:
symmetric_difference elems member insert subset union intersection 
difference new equal delete

   strbuf:
concat tostring new

   tree:
clone merge new

Attachment: stdlib_explorer.lua
Description: Binary data