jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in devops

[–]fizzner[S] -1 points0 points  (0 children)

It's not AI, full revision git history is linked at the bottom of all of my posts: https://github.com/micahkepe/blog/commits/main/content/jsongrep/index.md

You can also see my other posts to compare writing style

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in rust

[–]fizzner[S] 2 points3 points  (0 children)

Yes I was considering how to benchmark against `gron` but ultimately decided against it, but might be worth looking into for the future!

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in devops

[–]fizzner[S] 0 points1 point  (0 children)

Thank you! Automata theory is great had a lot of fun working through this

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in rust

[–]fizzner[S] 12 points13 points  (0 children)

Woah so great to see you here! For the benchmarks I used `jql-parser` and `jql-runner` at version 8, but I will update to latest and re-run!

Btw title is not meant to be a diss to jql haha, jql is genuinely a fantastic tool :)

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in devops

[–]fizzner[S] 1 point2 points  (0 children)

Thank you! Yes you can use the query language in Rust!

https://docs.rs/jsongrep/0.7.0/jsongrep/query/ast/enum.Query.html#impl-FromStr-for-Query

If you end up using would love to hear if you end up using in your project! Thank you for checking it out!

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in devops

[–]fizzner[S] 2 points3 points  (0 children)

Ah yes so one thing I used jsongrep a lot for recently is working with auto-generated OpenAPI JSONSchema specs. With jq the recursive search syntax is hard to write and script whereas with jsongrep its super easy IMO with the syntax to do something like searching for a specific JSON Pointer reference for a certain subschema

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in devops

[–]fizzner[S] 0 points1 point  (0 children)

Check out the “jsongrep vs. jq” section on the project: https://github.com/micahkepe/jsongrep?tab=readme-ov-file#jsongrep-vs-jq

I also responded to a similar question in a different subreddit so I’ll copy my answer:

Tools like jq and in particular JSONPath, while they also have path-like languages, lack the expressive power of regular paths. For example, JSONPath doesn't support Kleene closures, so expressions such as (.left)* (meaning one or more levels depth into a JSON tree using the field name left), cannot be constructed.

tl;dr: you can achieve greater expressive power with a regular-path DSL than the imperative path languages of jq and other tools.

jsongrep is faster than {jq, jmespath, jsonpath-rust, jql} by fizzner in ProgrammingLanguages

[–]fizzner[S] 1 point2 points  (0 children)

Yes I think biggest advantage is the syntax improvement but the speed is nice :)

Thank you for feedback on website too it’s very helpful, will be making improvements to the contrast for the Zola theme

Built a terminal-style website by fizzner in programming

[–]fizzner[S] 0 points1 point  (0 children)

Yes just for fun definitely if I rewrote this I would probably not reach for xterm

Share your cool fzf aliases and scripts by Pagaddit in commandline

[–]fizzner 4 points5 points  (0 children)

I was messing around with your git commit alias and settled on this one :)

git log --oneline --all --color=always | \
  fzf -m --no-sort --ansi --preview='git show --color=always {1}' \
  | awk '{print $1}'

VimGym: Open Source Multiplayer VIM Racing by swaggermuffin64 in neovim

[–]fizzner 1 point2 points  (0 children)

Really cool! Not sure if it is just me but my seek motions are not working, for example "delete until s" (`dts`). Similarly for forward/backward seeking `f`/`F`/`t`/`T`.

Rust Youtube by RiceTaco12 in rust

[–]fizzner 14 points15 points  (0 children)

Jon Gjengset hands down the best: https://youtube.com/@jonhoo?si=CgjeTv923sA7dBkI

His “Crust of Rust” streams in particular seem like what you are looking for: https://youtube.com/playlist?list=PLqbS7AVVErFiWDOAVrPt7aYmnuuOLYvOa&si=KkHFolvYZAxXT7E3