|
Agena v. 7.0.0 (24/2/2026, Alexander Walz) |
Readme/What's new |
agena >>
`The Power of Procedural Programming`
7.0.0 Vega, February 24, 2026
- The `with` clause to short-cut functions and the `with` clause to the `if` operator have been extended and allow for more than
one assignment statement of local, intermediate variables: they fully evaluate each assignment statement before proceeding to
the next so that you can use the newly assigned variables there. Separate the assignment statements with semicolons:
> f := <: x, y with t := 1; u := t + 2; v := u + 3 -> print(x, y, t, u, v) :>
> f(1, 2):
1 2 1 3 6
> f := <: x, y with t := 1; u, v := t + 1, t + 2 -> print(x, y, t, u, v) :>
1 2 1 2 3
> return with t := 1; u, v := t + 1, t + 2 -> if t > 0 then u + v else u - v fi;
5
- Instead of the `scope`/`epocs` keywords you can now create a scope with `begin` and finish it with `end`:
> begin
print('I am a scope.');
print('Me, too !')
> end;
- New `tables.auto` creates Perl-style automagic tables (also called autovivication). An automagic table creates subtables
on demand, so that you do not have to set them up manually. Example:
> a := tables.auto();
> a.b.c.d := 'a.b and a.b.c are automatically created'
This is short for
> a := [];
> create table a.b;
> create table a.b.c;
> a.b.c.d := 'a.b and a.b.c are automatically created'
- The default number of digits in the _output_ of Agena numbers can now be controlled by the `Digits` environment variable.
If set to a non-negative integer by the user, it will always supersede the environ.kernel('digits') setting in the entire
session.
Note that this does not control the precision of a computation, but only the output created by the pretty-printer.
> Pi:
3.1415926535898
> Digits := 17
> Pi:
3.1415926535897931
> Digits := 5
> Pi:
3.1416
- Tweaked `dual.arctan2` and `dual.beta` a bit.
- Unused and undocumented `dual` functions have been removed.
- This release has been Valgrind-checked on x86 and x64 Linux to ensure there are no internal errors or memory leaks. |
|
Agena v. 4.12.5 (20/5/2025, Alexander Walz) |
Readme/What's new |
4.12.5 Merryville, May 20, 2025
- In the past, the bitshift operators <<< (left shift), >>> (right shift), <<<< (left rotation) and >>>> (right rotation) had different behaviour across platforms when a number at or beyond the +/-2^32 threshold has been processed. This has been changed and the results in these situations are now the same.
Likewise, `bytes.numto32` is now returning the same results on all platforms when casting a value at or beyond the +/-2^32 border.
This also benefits various functions in the `hashes` package as their returns are now the same across platforms, as well.
To check the new underflow or overflow behaviour, use `math.wrap`.
- New function `math.fmod` works and returns the same result as the binary `symmod` operator. It has just been added to facilitate porting C code to Agena.
- The results of `hashes.mix`, `hashes.crc32`, `hashes.crc8`, `hashes.reflect`, `hashes.parity`, `hashes.fibmod`, `hashes.interweave`, `hashes.jinteger` may now be different with out-of-range input, that is with arguments at or beyond the 2^32 threshold, depending on your platform. |
Commenti
Alexander Walz
Sab, 13/05/2017 - 20:06
Collegamento permanente
Hello,
Aggiungi un commento