Agena v. 5.6.2 (22/9/2025, Alexander Walz) |
Readme/What's new |
5.6.2 Nashville, September 22, 2025
- `strings.random` in all its modes, Base64, ASCII and free form, has become 15 times faster.
- `math.random`, when computing a random _integer_ now uses a simple generic XOR-based 32-bit unsigned integer random number generator when given any third argument. There is no increase in speed, however.
- `os.tmpdir` now uses a fully portable version of the underlying C function mkdtemp(). Thus, the Agena version `os.tmpdir` for Solaris could be removed as it now uses the C version, too. The function also no longer tampers with templates starting with two or more slashes or backslashes.
- New `os.gethreadid returns the platform-specific unique ID of the thread Agena is running in, plus the POSIX Thread ID.
- New `os.getthreadseed` generates an unsigned 32-bit integer seed XORing the platform specific thread ID and the current time in seconds.
- `os.iscyrix`, `os.isamd`, `os.isintel`, `os.isnexgen`, `os.isnsc`, `os.isvia` have been deprecated. Use the new function `os.vendor` which returns a table with various manufacturer identifications, and which can now also check for CPUs manufactured or designed by:
Centaur Technology, Transmeta Corporation, x86 M6 Tine (NexGen), Rise Technology, Silicon Integrated Systems (SiS), United Microelectronics Corporation (UMC) and Vortex86 (Rise Technology/DM&P Electronics).
Example:
> os.vendor():
[amd ~ false, centaur ~ false, cyrix ~ false, intel ~ true, nexgen ~ false, nsc ~ false, rise ~ false, sis ~ false,
tmx86 ~ false, transmeta ~ false, umc ~ false, via ~ false, vortex ~ false]
Aliases have been provided to ensure backward compatibility, so you do not need to change your code for the time being.
- `os.uptime` now works in DOS, as well.
- `os.cpuinfo` returns the number of CPU cycles per microsecond with the new 'cyclesperusec' field (Intel-compatible CPUs only). The function now fills the 'frequency' field in OS/2 and DOS. In Linux, the 'arch' field now includes a human-readable string, such as 'arm', 'x64'.
- 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. |
Comments
Alexander Walz
Sat, 13/05/2017 - 20:06
Permalink
Hello,
Add new comment