Agena v. 5.1.6 (15/7/2025, Alexander Walz) |
Readme/What's new |
5.1.6 Incline II, July 15, 2025
- The `:-` operator which checks whether a value is of a specific type did not work correctly with userdata and returned a wrong result.
This has been fixed.
- There was a severe bug with userdata put into read-only mode by the `freeze` function as Agena rejected to check for these objects
in various functions calls, causing either confusing error messages or segmentation faults, especially during garbage collection.
The flaw affected various packages and has been fixed.
- The userdata object created with `utils.udata` now features an accompanying table. You can read from or write any values to it via
standard indexing:
> u := utils.udata('null');
> u[1], u[2] := 10, 20;
> u[1], u[2]:
10 20
`utils.udata` returns a reference to the table when given the userdata object as the sole argument:
> r := utils.udata(u):
[10, 20]
You can read and write values the common way, for example:
> insert 30, 40, 50 into r
> utils.udata(u):
[10, 20, 30, 40, 50]
Alternatively, you can call the userdata object like a function. With no argument given, a reference to the accompanying table
will be returned, the same way `utils.udata` does:
> u():
[10, 20, 30, 40, 50]
With one argument, the value for the given key can be retrieved:
> u(1):
10
With two arguments, the first denoting a key and the second a value, a write operation will be executed:
> u(6, 60):
> u():
[10, 20, 30, 40, 50, 60]
- You can now call numarrays like a function. With no argument given, a reference to the internal status table will be returned,
the same way `numarray.getitem(<numarray>, 0)` does:
> a := numarray.double();
> a():
[]
You can fill the table with values, for example:
> insert 10, 20, 30 into a()
With one argument, the value for the given key can be retrieved:
> a(1):
10
With two arguments, the first denoting a key and the second a value, a write operation will be executed:
> a(4, 40);
> u():
[10, 20, 30, 40]
- Issues with the page setup of the Primer & Reference have been solved. Also fixed some minor issues in the Quick Reference.
- This release has been Valgrind-checked on x86 and x64 Linux to ensure there are neither internal errors nor 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. |
Comments
Alexander Walz
Sat, 13/05/2017 - 20:06
Permalink
Hello,
Add new comment