olemunch's comments

olemunch | 2 years ago | on: Jaq – A jq clone focused on correctness, speed, and simplicity

My first impression is it has fancy error messages but no halt_error/0

  $ ./jaq-v1.2.0-x86_64-unknown-linux-gnu -sf aoc22-13.jq input.txt
  Error: undefined filter
      ╭─[<unknown>:30:18]
      │
   30 │ ╭─▶          "bad input" | halt_error
   31 │ ├─▶        end;
      │ │
      │ ╰───────────────── undefined filter
  ────╯
and (after commenting out halt_error) slower than both jq and gojq

  $ time jq -sf aoc22-13.jq input.txt
  6415
  20056
  
  real    0m0.023s
  user    0m0.010s
  sys     0m0.010s
  $
  $ time gojq -sf aoc22-13.jq input.txt
  6415
  20056
  
  real    0m0.070s
  user    0m0.030s
  sys     0m0.000s
  $
  $ time ./jaq-v1.2.0-x86_64-unknown-linux-gnu -sf aoc22-13.jq input.txt
  6415
  20056
  
  real    0m0.103s
  user    0m0.065s
  sys     0m0.000s
aoc22-13.jq is here https://pastebin.com/raw/YiUjEu2n and input.txt is here https://pastebin.com/raw/X0FSyTNf
page 1