Skip to content

0.9.0

Compare
Choose a tag to compare
@01mf02 01mf02 released this 10 Nov 11:37
· 949 commits to main since this release

This release greatly improves performance of file reading by memory mapping. On one benchmark, for example, this change decreased runtime by about 27%. Pass input files as arguments to profit from this; i.e., use jaq 'filter' file.json instead of jaq 'filter' <file.json.

Several filters now behave more like in jq, for example assignment (=) and arithmetic update-assignment (+=, -=, ...).
Updates using f as $x | g or if f then g else h on the left-hand side are now evaluated correctly if f yields multiple values.
recurse, reduce, and foreach are now evaluated more lazily.

BREAKING CHANGE: foreach xs as $x(init; f) does now also output the outputs of init, and the syntax foreach xs as $x(init; f; proj) is not supported anymore. This makes the behaviour of foreach easier to describe and reason about, greatly simplifies the implementation and makes foreach behave more like reduce. See the README for details.

Users of jaq-core (the library powering jaq) might be happy to know that Filters are now Send and Sync. That means that it is now possible to execute a filter on multiple threads, processing multiple values in parallel. The jaq application itself does not make use of this (yet).

Full Changelog: v0.8.2...v0.9.0