Skip to content

Commit 5353b25

Browse files
committed
Release v40.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
1 parent c832763 commit 5353b25

50 files changed

Lines changed: 1554 additions & 1639 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog

Lines changed: 162 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,167 @@
1+
2014-05-01 Gary V. Vaughan <gary@gnu.org>
2+
3+
Release version 40
4+
* NEWS: Record release date.
5+
6+
refactor: remove unused `std.modules`.
7+
* lib/std/modules.lua: Remove.
8+
* local.mk (dist_luastd_DATA): Adjust.
9+
10+
refactor: use `t[#t + 1] = v` rather than `table.insert (t, v)`.
11+
Save a function call by factoring away calls to table.insert.
12+
* lib/std/container.lua, lib/std/functional.lua, lib/std/io.lua,
13+
lib/std/list.lua, lib/std/optparse.lua, lib/std/set.lua,
14+
lib/std/strbuf.lua, lib/std/string.lua, lib/std/table.lua,
15+
lib/std/tree.lua: Substitute accordingly.
16+
17+
refactor: factor out merge_allfields and merge_namedfields.
18+
* lib/std/table (clone, merge): Move shared functionality from
19+
here...
20+
(merge_allfields): ...to here.
21+
(clone_select, merge_select): Move shared funtionality from
22+
here...
23+
(merge_namedfields): ...to here.
24+
25+
refactor: move leaves and ileaves from base to tree module.
26+
* lib/std/base.lua (ileaves, leaves): Move from here...
27+
* lib/std/tree.lua (ileaves, leaves): ...to here.
28+
* lib/std/base.lua (_leaves): Rename from this...
29+
(leaves): ...to this.
30+
* lib/std/list.lua (flatten): Adjust.
31+
32+
refactor: move unshared methods out of std.base.
33+
* lib/std/base.lua (merge): Move from here...
34+
* lib/std/table.lua (merge): ...to here.
35+
* lib/std/base.lua (append, compare, concat): Move from here...
36+
* lib/std/list.lua (append, compare, concat): ...to here.
37+
* specs/object_spec.yaml (std.object): Adjust.
38+
39+
refactor: remove deprecated methods.
40+
* lib/std/base.lua (new, metatable): Remove.
41+
(concat, M): Simplify accordingly.
42+
* lib/std/functional.lua: No need to require std.base.
43+
* lib/std/set.lua (_functions): Move into object declaration,
44+
removing `new`.
45+
* lib/std/strbuf.lua (new): Remove.
46+
* lib/std/tree.lua (new): Remove.
47+
* NEWS: Update.
48+
49+
tree: allow objects as keys.
50+
* lib/std/tree.lua (Tree.__index): Only fold key list when key
51+
parameter is a raw list, and not when it is a std.object derived
52+
table.
53+
(Tree.__newindex): Only descend the key list creating sub-Trees
54+
when key parameter is a raw list, and not when it is a std.object
55+
derived table.
56+
* NEWS: Update.
57+
58+
functional: generalize memoize with normalization parameter.
59+
* lib/std/functional.lua (memoize): Don't rely on tostring
60+
having been monkey-patched to std.string.tostring already, but
61+
also don't automatically load all of std.string into memory
62+
unless memoize is called without a normalization function.
63+
* NEWS: Update.
64+
65+
list: remove deprecated methods.
66+
* lib/std/list.lua: Remove indexKey, indexValue, mapWith, zipWith,
67+
new and slice.
68+
* NEWS: Update.
69+
70+
specs: std.table.pack is present for any supported Lua release.
71+
* specs/table_spec.yaml (extend_base): List "pack" unconditionally.
72+
73+
specs: Lua 5.1 does not call tostring on format "%s" arguments.
74+
* specs/string_spec.yaml (..): Explicitly stringify nil argument.
75+
76+
2014-04-26 Gary V. Vaughan <gary@gnu.org>
77+
78+
std: barrel of monkey(patche)s!
79+
Close #56.
80+
Segregate monkey patching into module functions that have to
81+
be called explicitly.
82+
* lib/std.lua.in: Don't clobber any core metatables, or change
83+
any global symbols on load.
84+
* specs/io_spec.lua (monkey_patch): Specify behaviour of
85+
std.io.monkey_patch function.
86+
* lib/std/io.lua (monkey_patch): Add readlines and writelines
87+
methods to core file objects.
88+
(processFiles): Remove.
89+
* specs/math_spec.lua (monkey_patch): Specify behaviour of
90+
std.math.monkey_patch function.
91+
* lib/std/math.lua (monkey_patch): Overwrite core math.floor.
92+
* specs/string_spec.lua (monkey_patch): Specify behaviour of
93+
std.string.monkey_patch function.
94+
* lib/std/string.lua (monkey_patch): Overwrite core assert and
95+
tostring functions, and add methods and metamethods to core
96+
string objects.
97+
(escapePattern, escapeShell, ordinalSuffix): Remove.
98+
* specs/table_spec.lua (monkey_patch): Specify behaviour of
99+
std.table.monkey_patch function.
100+
* lib/std/table.lua (monkey_patch): Overwrite core table.sort.
101+
* specs/table_spec.lua (barrel, monkey_patch): Specify behaviour
102+
of std.barrel and std.monkey_patch functions.
103+
* lib/std.lua.in (monkey_patch): New function for patching core
104+
symbols and metatables by calling submodule `monkey_patch`
105+
functions.
106+
(barrel): New function for scribbling all over the given
107+
namespace, as well as installing all std monkey_patches.
108+
* specs/debug_spec.yaml, specs/functional_spec.yaml,
109+
specs/io_spec.yaml, specs/math_spec.yaml, specs/package_spec.yaml,
110+
specs/std_spec.yaml, specs/string_spec.yaml, specs/table_spec.yaml,
111+
specs/tree_spec.yaml: Update to reflect removal of default
112+
monkey patching.
113+
114+
refactor: move `metamethod` from `functional` to `table` module.
115+
* lib/std/functional.lua (metamethod): Move from here...
116+
* lib/std/base.lua (metamethod): ...to here; and...
117+
* lib/std/table.lua (metamethod): ...re-export from here.
118+
Break dependency on `std.functional`.
119+
Adjust all callers.
120+
* NEWS: Update.
121+
122+
refactor: move clone and clone_rename back into std.table.
123+
* lib/std/base.lua (clone, clone_rename): Move from here...
124+
* lib/std/table.lua (clone, clone_rename): ...to here.
125+
126+
refactor: break std.container dependency on std.base.
127+
* lib/std/container.lua (instantiate): New function; a faster
128+
equivalent to `merge (clone (proto), t or {})`.
129+
Adjust all callers.
130+
131+
specs: fix a garbage-in, garbage-out example.
132+
Close #44.
133+
* specs/tree_spec.yaml (tostring): The assumption that tostring
134+
should recurse by itself, or that the Tree constructor should
135+
massage subtables on instantiation were both flawed. Fix the
136+
input to be properly nested tree, and `tostring` will indeed
137+
output a properly nested tree.
138+
139+
2014-04-25 Gary V. Vaughan <gary@gnu.org>
140+
141+
docs: add missing doc for nometa arg of merge_select.
142+
* lib/std/table.lua (merge_select): Add missing nometa doc.
143+
144+
table: add merge_select, and support map and nometa args to merge.
145+
Close #56.
146+
* specs/table_spec.yaml (extend_base): Add merge_select.
147+
(merge): Specify behaviour of new `map` and `nometa` args.
148+
(merge_select): Specify behaviour of new `merge_select` api.
149+
(clone, clone_select): Refactor for clarity and orthogonality.
150+
* lib/std/base.lua (merge): Rewrite to support clone-like `map`
151+
and `nometa` parameters, according to improved specifications.
152+
(clone): Rewrite as a call to `merge`.
153+
* lib/std/table.lua (merge_select): New `clone_select` like api
154+
satisfying specs.
155+
(clone_select): Rewrite as a call to `merge_select`.
156+
* NEWS: Update.
157+
1158
2014-04-23 Gary V. Vaughan <gary@gnu.org>
2159

3-
Release v39.
160+
maint: post-release administrivia.
161+
* configure.ac (AC_INIT): Bump release number to 40.
162+
* NEWS: Add header line for next release.
163+
* .prev-version: Record previous version.
164+
* ./local.mk (old_NEWS_hash): Auto-update.
4165

5166
Release version 39
6167
* NEWS: Record release date.

Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ man_MANS =
390390
save_release_files = $(scm_rockspec)
391391
std_path = $(abs_srcdir)/lib/?.lua
392392
LUA_ENV = LUA_PATH="$(std_path);$(LUA_PATH)"
393-
old_NEWS_hash = 1c4d1bfae2d511327b83800043bc19c7
393+
old_NEWS_hash = 606609f9586288cfe6d9df676719570a
394394
update_copyright_env = \
395395
UPDATE_COPYRIGHT_HOLDER='(Gary V. Vaughan|Reuben Thomas)' \
396396
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
@@ -446,7 +446,6 @@ dist_luastd_DATA = \
446446
lib/std/io.lua \
447447
lib/std/list.lua \
448448
lib/std/math.lua \
449-
lib/std/modules.lua \
450449
lib/std/object.lua \
451450
lib/std/optparse.lua \
452451
lib/std/package.lua \

NEWS

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,68 @@
11
Stdlib NEWS - User visible changes
22

3+
* Noteworthy changes in release 40 (2014-05-01) [stable]
4+
5+
** New features:
6+
7+
- `functional.memoize` now accepts a user normalization function,
8+
falling back on `string.tostring` otherwise.
9+
10+
- `table.merge` now supports `map` and `nometa` arguments orthogonally
11+
to `table.clone`.
12+
13+
- New `table.merge_select` function, orthogonal to
14+
`table.clone_select`. See LDocs for details.
15+
16+
** Incompatible changes:
17+
18+
- Core methods and metamethods are no longer monkey patched by default
19+
when you `require "std"` (or `std.io`, `std.math`, `std.string` or
20+
`std.table`). Instead they provide a new `monkey_patch` method you
21+
should use when you don't care about interactions with other
22+
modules:
23+
24+
local io = require "std.io".monkey_patch ()
25+
26+
To install all of stdlib's monkey patches, the `std` module itself
27+
has a `monkey_patch` method that loads all submodules with their own
28+
`monkey_patch` method and runs them all.
29+
30+
If you want full compatibility with the previous release, in addition
31+
to the global namespace scribbling snippet above, then you need to
32+
adjust the first line to:
33+
34+
local std = require "std".monkey_patch ()
35+
36+
- The global namespace is no longer clobbered by `require "std"`. To
37+
get the old behaviour back:
38+
39+
local std = require "std".barrel (_G)
40+
41+
This will execute all available monkey_patch functions, and then
42+
scribble all over the `_G` namespace, just like the old days.
43+
44+
- The `metamethod` call is no longer in `std.functional`, but has moved
45+
to `std.table` where it properly belongs. It is a utility method for
46+
tables and has nothing to do with functional programming.
47+
48+
- The following deprecated camelCase names have been removed, you
49+
should update your code to use the snake_case equivalents:
50+
`std.io.processFiles`, `std.list.indexKey`, `std.list.indexValue`,
51+
`std.list.mapWith`, `std.list.zipWith`, `std.string.escapePattern`,
52+
`std.string. escapeShell`, `std.string.ordinalSuffix`.
53+
54+
- The following deprecated function names have been removed:
55+
`std.list.new` (call `std.list` directly instead),
56+
`std.list.slice` (use `std.list.sub` instead),
57+
`std.set.new` (call `std.set` directly instead),
58+
`std.strbuf.new` (call `std.strbuf` directly instead), and
59+
`std.tree.new` (call `std.tree` directly instead).
60+
61+
** Bug fixes:
62+
63+
- Allow `std.object` derived tables as `std.tree` keys again.
64+
65+
366
* Noteworthy changes in release 39 (2014-04-23) [stable]
467

568
** New features:

configure

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for stdlib 39.
3+
# Generated by GNU Autoconf 2.69 for stdlib 40.
44
#
55
# Report bugs to <http://github.com/lua-stdlib/lua-stdlib/issues>.
66
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
580580
# Identity of this package.
581581
PACKAGE_NAME='stdlib'
582582
PACKAGE_TARNAME='stdlib'
583-
PACKAGE_VERSION='39'
584-
PACKAGE_STRING='stdlib 39'
583+
PACKAGE_VERSION='40'
584+
PACKAGE_STRING='stdlib 40'
585585
PACKAGE_BUGREPORT='http://github.com/lua-stdlib/lua-stdlib/issues'
586586
PACKAGE_URL=''
587587

@@ -1217,7 +1217,7 @@ if test "$ac_init_help" = "long"; then
12171217
# Omit some internal or obsolete options to make the list less imposing.
12181218
# This message is too long to be a string in the A/UX 3.1 sh.
12191219
cat <<_ACEOF
1220-
\`configure' configures stdlib 39 to adapt to many kinds of systems.
1220+
\`configure' configures stdlib 40 to adapt to many kinds of systems.
12211221
12221222
Usage: $0 [OPTION]... [VAR=VALUE]...
12231223
@@ -1283,7 +1283,7 @@ fi
12831283

12841284
if test -n "$ac_init_help"; then
12851285
case $ac_init_help in
1286-
short | recursive ) echo "Configuration of stdlib 39:";;
1286+
short | recursive ) echo "Configuration of stdlib 40:";;
12871287
esac
12881288
cat <<\_ACEOF
12891289
@@ -1363,7 +1363,7 @@ fi
13631363
test -n "$ac_init_help" && exit $ac_status
13641364
if $ac_init_version; then
13651365
cat <<\_ACEOF
1366-
stdlib configure 39
1366+
stdlib configure 40
13671367
generated by GNU Autoconf 2.69
13681368
13691369
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1380,7 +1380,7 @@ cat >config.log <<_ACEOF
13801380
This file contains any messages produced by compilers while
13811381
running configure, to aid debugging if configure makes a mistake.
13821382
1383-
It was created by stdlib $as_me 39, which was
1383+
It was created by stdlib $as_me 40, which was
13841384
generated by GNU Autoconf 2.69. Invocation command line was
13851385
13861386
$ $0 $@
@@ -1760,7 +1760,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
17601760
17611761
17621762
$as_echo "## --------------------- ##
1763-
## Configuring stdlib 39 ##
1763+
## Configuring stdlib 40 ##
17641764
## --------------------- ##"
17651765
echo
17661766
@@ -2250,7 +2250,7 @@ fi
22502250
22512251
# Define the identity of the package.
22522252
PACKAGE='stdlib'
2253-
VERSION='39'
2253+
VERSION='40'
22542254
22552255
22562256
cat >>confdefs.h <<_ACEOF
@@ -3641,7 +3641,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36413641
# report actual input values of CONFIG_FILES etc. instead of their
36423642
# values after options handling.
36433643
ac_log="
3644-
This file was extended by stdlib $as_me 39, which was
3644+
This file was extended by stdlib $as_me 40, which was
36453645
generated by GNU Autoconf 2.69. Invocation command line was
36463646
36473647
CONFIG_FILES = $CONFIG_FILES
@@ -3694,7 +3694,7 @@ _ACEOF
36943694
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36953695
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36963696
ac_cs_version="\\
3697-
stdlib config.status 39
3697+
stdlib config.status 40
36983698
configured by $0, generated by GNU Autoconf 2.69,
36993699
with options \\"\$ac_cs_config\\"
37003700

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
1818

1919

2020
dnl Initialise autoconf and automake
21-
AC_INIT([stdlib], [39], [http://github.com/lua-stdlib/lua-stdlib/issues])
21+
AC_INIT([stdlib], [40], [http://github.com/lua-stdlib/lua-stdlib/issues])
2222
AC_CONFIG_AUX_DIR([build-aux])
2323
AC_CONFIG_MACRO_DIR([m4])
2424

doc/classes/std.container.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
55
<head>
6-
<title>stdlib 39 Reference</title>
6+
<title>stdlib 40 Reference</title>
77
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
88
</head>
99
<body>

doc/classes/std.list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
55
<head>
6-
<title>stdlib 39 Reference</title>
6+
<title>stdlib 40 Reference</title>
77
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
88
</head>
99
<body>

doc/classes/std.object.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
55
<head>
6-
<title>stdlib 39 Reference</title>
6+
<title>stdlib 40 Reference</title>
77
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
88
</head>
99
<body>

doc/classes/std.optparse.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
55
<head>
6-
<title>stdlib 39 Reference</title>
6+
<title>stdlib 40 Reference</title>
77
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
88
</head>
99
<body>

doc/classes/std.set.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
55
<head>
6-
<title>stdlib 39 Reference</title>
6+
<title>stdlib 40 Reference</title>
77
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
88
</head>
99
<body>

0 commit comments

Comments
 (0)