Michael Färber

Results 246 comments of Michael Färber

> What about cases like this `10/2`, `1.1 | trunc` where the result could be an integer? The case for `10/2` is different from the rest of the cases in...

By the way, talking about `trunc`: I see that you use `trunc` quite a bit in jqjq, but I believe that using `floor` (or `round`?) might be more appropriate. This...

@itchyny has already brought this up in #139. TL;DR: The update behaviour for `..` can yield unexpected results for both jq and jaq (they're just more visible in jaq). Instead...

Bonjour @TurpIF, thanks, this is indeed an undocumented divergence between jaq and jq. The precendence of operators in jq is documented at: . I will see whether I can correct...

@wader, it is not directly related, but ... This is a pretty tough nut to crack after all. On my quest to resolve this issue, I tried to handle `|`...

@pkoppstein, I would appreciate your insight on this matter. Consider the following jq filter: 1, 2 as $x | 3, 4 | 5 as $y | 6, 7 How would...

For the current state in jaq, the algorithm is simply precedence climbing, where: - `|` and `as $_ |` are right-associative and have precedence 0, and - `,` is left-associative...

Thanks for your input, @pkoppstein. With that, I was able to come up with an algorithm to parse `as $x |` like in `jq`: https://github.com/01mf02/jaq/pull/370 However, I'm not sure whether...

@pkoppstein, yes, I agree. Although, as @wader pointed out, https://github.com/jqlang/jq/pull/3326 already changed the precedence of `as $x |` in jq 1.7 -> 1.8, so my proposed change might also work...