Agena v. 3.11.3 (16/3/2024, Alexander Walz) |
Readme/What's new |
3.11.3 Converse, March 16, 2024
- `units.cm` did not convert correctly Russian handspans. This has been fixed. The function now accepts the following options:
- 'piad', the argument is taken to be in Russian handspans (piads) with 1 piad = 17.8 cm.
- 'span', the argument is taken to be in US spans with 1 span = 22.86005 cm.
- 'hand', the argument is taken to be in US hands with 1 hand = 4 inches = 10.16002 cm.
- 'link', the argument is taken to be in US links with 1 link = 2/3 feet = 20.11684 cm.
Also changed conversion factor from 1 inch = 2.54 cm to 1 inch = 2.54000508 cm.
- `units.inch` now accepts the following options:
- 'piad', the argument is taken to be in Russian handspans (piads) with 1 piad = 7.01 inches.
- 'span', the argument is taken to be in US spans with 1 span = 9 inches.
- 'hand', the argument is taken to be in US hands with 1 hand = 4 inches.
- 'link', the argument is taken to be in US links with 1 link = 7.92 inches.
Also changed default conversion factor from 1 inch = 2.54 cm to 1 inch = 2.54000508 cm.
- Changed conversion factors in `units.km` and `units.mile` from 1 standard mile = 1.609344 km to 1 std. mile = 1.6093440006 km
and from 1 nautical mile = 1.852 km to 1 nmi = 1.852216 km. |
Agena v. 3.9.2a (9/1/2024, Alexander Walz) |
Readme/What's new |
3.9.2 Rayne, January 09, 2024
- With (deeply) nested tables, `map` and `subs` can recursively descend into the entire structure and map a function or substitute values
with only just one call, with the new `descend=true` option:
> map(<< x -> 2*x >>, [1, 2, 3, [4, 5, [6]]], descend=true):
[2, 4, 6, [8, 10, [12]]]
> subs(1:0, 6:10, [1, 2, 3, [4, 5, [6]]], descend=true):
[0, 2, 3, [4, 5, [10]]]
Sequences, registers, sets, pairs and complex numbers, however, are not accepted in the input structure.
- With tables as input, `map` now supports the 'reshuffle' option, removing any holes in the result before returning it. Just an example:
> a := [1, 2, 3, 4, 5];
> a[3] := null; # we create a hole
> a:
[1 ~ 1, 2 ~ 2, 4 ~ 4, 5 ~ 5]
> map(<< x -> 2*x >>, a): # no reordering, index 3 is still not assigned a value
[1 ~ 2, 2 ~ 4, 4 ~ 8, 5 ~ 10]
> map(<< x -> 2*x >>, a, reshuffle=true): # return a concise table array with consecutive integral indices
[2, 4, 8, 10]
- Hardened `map` against stack corruption in `multret=true` mode.
- When given a non-supported option, `map`, `subs, `subsop`, `select`, `remove` and `selectremove` now issue an error.
- The C API function `lua_call` now returns the number of results actually pushed onto the stack in a function call.
- This release has been Valgrind-checked on x86 and AMD64 Linux to ensure there are no internal errors or memory leaks. |
Comments
Alexander Walz
Sat, 13/05/2017 - 20:06
Permalink
Hello,
Add new comment