|
|
|
|
|
by thaliaarchi
1521 days ago
|
|
I find the stateless streaming paradigm in jq very pleasing. Results can be emitted iteratively using generators, which are implemented as tail-recursive streams [0]. Combined with the `input` built-in filter, which yields the next item in the input stream, and jq can handle real-time I/O and function as a more general-purpose programming language. I built an interpreter for the Whitespace programming language in jq using these concepts and it's easily one of the most complex jq programs out there. [0]: https://stedolan.github.io/jq/manual/#Generatorsanditerators [1]: https://github.com/andrewarchi/wsjq |
|