GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Tags · lua-stdlib/lua-stdlib
Tags
v42General Lua Libraries I am happy to announce release 42 of stdlib. stdlib's home page is at https://lua-stdlib.github.io/lua-stdlib ## Noteworthy changes in release 42 (2026-10-22) [stable] ### New features - Overhaul of the LDoc documentation, adding more introductory material, clearer usage examples and better internal consistency. At this point we're pushing the technical limits of what LDoc can do for us organization-wise, but improvements and corrections to the content are always welcome! - With this release, stdlib is much more focused, and non-core modules `optparse`, `std.functional`, 'std.prototype', `std.strict` and `typecheck` have been moved into their own packages and release cycle. Also, the shared debug initialization and Lua host normalization code have been split out into new 'std._debug' and 'std.normalize' respectively, and are pulled in automatically as dependencies for any of any modules that need them. You can still install them all separately from their own projects or by using Luarocks: ```bash luarocks install optparse luarocks install std.functional luarocks install std.prototype luarocks install std.strict luarocks install typecheck ``` - All support for previously deprecated APIs has been removed, reducing the install size even further. - `std.string.prettytostring` continues to use `normalize.string.render` for more legible deeply nested table output, identically to previous releases. - `std.npairs` and `std.rnpairs` now respect `__len` metamethod, if any. - stdlib depends on the packages its 41.x modules moved into, so upgrading from 41.2 keeps those APIs available. `std.container`, `std.object`, `std.set`, `std.strbuf` and `std.tree` are built on 'std.prototype', but still return the prototype itself. `std.tree` is 'std.prototype.trie', still called Tree, and `std.operator` is 'std.functional.operator'. `std.optparse` returns the OptionParser prototype from 'optparse', with 41.x's Object methods too. `std.list` is rebuilt over 'std.functional', with the List API of 41.2, less the functions 41 deprecated. - `std.functional` is the 41.x API again, over the new design in the std.functional package, which has its data first and its function last. When stdlib is installed, `require 'std.functional'` gives you the 41.x module, and `require 'std.functional.init'` the new one, so that the two don't clash. The `bind` with its arguments spread rather than in a table, `eval`, `fold` and `op` are deprecated, as they were in 41.2. - stdlib builds with luke instead of make, and supports Lua 5.1 through 5.5, including LuaJIT. To install current git master, use the `stdlib-dev-1.rockspec`: ```bash luarocks install https://raw.githubusercontent.com/lua-stdlib/lua-stdlib/master/stdlib-dev-1.rockspec ``` ### Bug fixes - `std.string.pickle` writes table keys in a stable order, and writes infinities, nan and every digit of a fraction so that they load back as the same number. A table that contains itself, or a value that can't be pickled, raises an error, rather than overflowing the stack or exiting the program. - `std.string.escape_shell` escapes `&` too. - `std.string.wrap` doesn't throw a StrBuf deprecation warning any more. - `std.getmetamethod` now returns functable valued metamethods correctly, rather than `nil` as in previous releases. It's also considerably faster now that it doesn't use `pcall` any more. - `table.pack` now sets `n` field to number of arguments packed, even in Lua 5.1. - With `typecheck` installed, stdlib functions check their arguments again, unless `std._debug.argcheck` is `false`. Since `typecheck` moved into its own package, no argument was checked at all. - With `typecheck` installed, an optional argument of `std.assert`, `std.require`, `std.io.writelines`, `std.package.find`, `std.string.finds`, `std.string.prettytostring`, `std.string.tfind`, `std.string.wrap`, `std.table.new` or `std.table.unpack` can be omitted only along with every argument after it, as in release 41. So `std.string.tfind(s, p, false)` is diagnosed again, instead of passing `false` as the `plain` argument. ### Deprecations - `std.debug_init` and the `_DEBUG` global still configure debug hints as in 41.x, but are deprecated in favour of setting the 'std._debug' hints directly. `std.debug_init._DEBUG` reads and writes them, and a `_DEBUG` global sets them when stdlib is first loaded. Each writes a warning to stderr, unless `std._debug.deprecate` is `false`. With `std._debug.deprecate` set to `true`, requiring `std.debug_init` raises an error, and the `_DEBUG` global is ignored. - A `_functions` table in a `std.container` or `std.object` constructor still becomes module functions of the new prototype, which are not propagated to its instances, but it is deprecated: put module functions in a module table, beside a `prototype` field, as 'std.prototype' does. It writes a warning to stderr the first time it is used, unless `std._debug.deprecate` is `false`. With `std._debug.deprecate` set to `true`, `_functions` is just another `_` prefixed field, kept in the new prototype's metatable, as in 'std.prototype'. - Monkey patching calls `std.barrel`, `std.monkey_patch`, `std.io.monkey_patch`, `std.math.monkey_patch`, `std.string.monkey_patch` and `std.table.monkey_patch` are deprecated, and write a warning to stderr the first time each is called, unless `std._debug.deprecate` is `false`. With `std._debug.deprecate` set to `true`, they are not defined at all. - `std.tostring` and the 41.2 form of `std.string.render`, with five callback functions, are deprecated in favour of their equivalents from 'std.normalize': `str` and `string.render`, which `std.string.render` also accepts. Those implementations handle skipping initial sequence keys for a more compact output, escaping of whitespace and other C escape characters for even more compact output and stringification of nested Objects and Containers using their `__tostring` metamethods. - `std.ireverse`, `std.table.flatten` and `std.table.shape` are deprecated in favour of `reversed` from 'std.functional.init', and `flatten` and `shape` from 'std.functional', which stdlib now depends on. `std.ireverse` still stops at the first hole of a table, as it always has, where `reversed` keeps them. - `std.table.len` is deprecated in favour of `len` from 'std.normalize'. - `std.table.okeys` is deprecated for lack of utility. If you still need it, use this instead: ```lua local okeys = std.functional.compose (std.table.keys, std.table.sort) ``` ### Incompatible changes - `std.maturity`, `std.strict` and `std.tuple` have been moved to their own packages, and are no longer shipped as part of stdlib. `std.functional` is too, but stdlib keeps its 41.x API, as above. - `lambda` from the 'std.functional' package, which stdlib now depends on, returns a functable rather than a bare function, so that `tostring` gives back its lambda string. Calling it works as before, but `type(lambda '=_1')` is now `'table'`. - Requiring 'std.strict' no longer makes the global environment strict as a side effect. The 'std.strict' package returns a function that wraps the environment you pass it in a strict proxy: ```lua local _ENV = require 'std.strict'(_ENV) ``` 41.x code that relied on the side effect still loads, but no longer checks for undeclared variables. Like 'typecheck', 'std.strict' is optional: stdlib doesn't depend on it, so install it separately. When it is installed, stdlib checks its own modules with it, unless `std._debug.strict` is `false`. - `std.debug.argerror`, `std.debug.extramsg_mismatch`, `std.debug.extramsg_toomany`, `std.debug.parsetypes`, `std.debug.resulterror` and `std.debug.typesplit` have moved to the `typecheck` package, and `std.debug` has them only when `typecheck` is installed. Without it, `std.debug.argcheck` and `std.debug.argscheck` check nothing, as when `std._debug.argcheck` is `false`. - A function wrapped by `std.debug.DEPRECATED` writes its warning only the first time it is called in a run, as 41.x documented, rather than every time. - Deprecated functions `string.assert`, `string.require_version`, `string.tostring`, `table.clone_rename`, `table.metamethod`, `table.ripairs` and `table.totable` have been removed. See previous NEWS entries below for what they were replaced by. - Passing a table with a `__len` metamethod, that returns a value other the index of the largest non-nil valued integer key, to `std.npairs` now iterates upto whatever `__len` returns rather than `std.table.maxn`. If `__len` is not present, or gives the same result as `maxn` then `npairs` continues to behave as in the previous release. - `std.io.writelines` writes the values that follow a `nil` argument too, skipping the `nil`, where it used to stop at the first. Install it with LuaRocks, using: luarocks install stdlib 42 release-v41.2.4Release v41.2.4 Signed-off-by: Gary V. Vaughan <[email protected]> release-v41.2.3Release v41.2.3 Signed-off-by: Gary V. Vaughan <[email protected]> release-v41.2.2Release v41.2.2 release-v41.2.1Release v41.2.1 release-v41.2.0Full source release v41.2.0 release-v41.1.1Full source release v41.1.1 PreviousNext
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |