A new release of the GNU Project's implementation of the AWK programming language, Gawk 5.2.0, has been released. AWK was developed in the 70s and hasn't undergone significant changes since the mid-80s, when the core language was defined. This has allowed the language to maintain its original stability and simplicity over the past decades. Despite its advanced age, AWK is still actively used by administrators for routine tasks involving parsing various types of text files and generating simple summary statistics.
Key changes:
- Added experimental support for the pma (persistent malloc) memory manager, which allows you to save the values of variables, arrays, and user-defined functions between different awk runs.
- High-precision arithmetic support, implemented using the MPFR library, has been removed from the GNU Awk maintainer's purview and transferred to a third-party enthusiast. It is noted that the implementation of MPFR mode in GNU Awk is considered a bug. Should the maintainer's status change, it is planned to completely remove this feature from GNU Awk.
- The build infrastructure components Libtool 2.4.7 and Bison 3.8.2 have been updated.
- The number comparison logic has been changed, bringing it into line with the logic used in the C language. For users, this change primarily affects the comparison of Infinity and NaN values with regular numbers.
- The ability to use the FNV1-A hash function in associative arrays has been enabled by setting the AWK_HASH environment variable to "fnv1a".
- Support for building using CMake has been removed (the Cmake support code was not in demand and had not been updated for five years).
- Added mkbool() function to create boolean values, which are numbers but treated as Boolean type.
- In BWK mode, when the "--traditional" flag is specified, support for expressions for defining ranges, previously enabled by the "-r" ("--re-interval") option, is enabled by default.
- The rwarray extension introduces new writeall() and readall() functions for writing and reading all variables and arrays at once.
- Added gawkbug script for reporting errors.
- Instant shutdown is now provided when syntax errors are detected, solving problems with using fuzzing testing tools.
- Support for OS/2 and VAX/VMS operating systems has been discontinued.
Source: opennet.ru
