|
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.
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.
Expanded from 38 names to 80 names.
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
.
_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
_DEBUG debug_ext debug_init io_ext math_ext
assert tostring
_tostring
is the original version of tostring
. The original version of assert
is not available.
Expanded from 7 names to 16 names.
clone clone_rename empty invert keys merge new size values
sort
Expanded from 14 names to 25 names.
_M
catdir catfile processFiles readlines shell slurp splitdir writelines
_NAME _PACKAGE
Expanded from 14 names to 32 names.
__index
caps chomp escapePattern escapeShell escape_pattern escape_shell finds
ltrim numbertosi ordinalSuffix ordinal_suffix pad rtrim split tfind trim
wrap
format
Expanded from 10 names to 15 names.
dirsep execdir igmark path_mark pathsep
Expanded from 30 names to 34 names.
_M
round
_NAME _PACKAGE
floor
Expanded from 16 names to 21 names.
_M
say trace
_NAME _PACKAGE
Unchanged.
Unchanged.
Unchanged.
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