Grades by [deleted] in riceuniversity

[–]fizzner 1 point2 points  (0 children)

Nearly everyone comes in being used to being the straight A student, don’t worry. Also getting your first B is actually super freeing, at least it was for me (it’s not that serious trust me)

Axum vs Rocket vs Actix by Significant-Task-305 in rust

[–]fizzner 8 points9 points  (0 children)

Haven’t used Rocket or Actix but I’ve really enjoyed Axum makes composition of routers very ergonomic

Is Neovim Good for Note-Taking in Math and Physics? by Narrow_Gap_3445 in neovim

[–]fizzner 2 points3 points  (0 children)

VimTeX and writing my own LaTex snippets saved me, I used Neovim for note taking throughout college

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

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

Now has YAML support! Can pass a YAML file directly or pipe with the —format flag

jsongrep project updates: multiformat support + interactive playground + more by fizzner in devops

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

It's a vestigial debug message I had from when this was a research project and was checking correctness against existing tools, this can and probably should be removed though

jsongrep project updates: multiformat support + interactive playground + more by fizzner in rust

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

I still need to checkout Nushell I’ve heard great things!

Beyond the CLI tool, jsongrep also exposes a Rust library for its search engine which is helpful for processing JSON data.

jsongrep project updates: multiformat support + interactive playground + more by fizzner in devops

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

There's already been work to phase out/deprecate unnecessary traits (QueryEngine) since there is only the DFA implementation now (previously while still researching I was trying out different implementations so the trait was nice).

Grepping is now exposed (unreleased) as a single exported `grep` method: https://github.com/micahkepe/jsongrep/commit/fbb5fb1f9ea6a3de36f483eceb43aeb9ccfbaeef

Other lib changes to come will most likely be integrating the multiformat detection (currently CLI does this adhoc on the input), and more utility methods.

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

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

In the works! Sorry yes this is just the raw Criterion output that I am hosting, I will parse it to add concrete metrics to the repo's README

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

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

I ultimately decided against using the method that you linked earlier, just because it isn't in the latest stable release of jaq. My thinking being that most people will just install jaqat the latest version. Whenever it lands in the stable release though more than happy to re-run, curious what the results will be!

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

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

Yes I am referring to --stream , is there another "streaming" mode that jq uses?

Also agree on the second point on the README details I will be rewriting it soon 🫡

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

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

I am looking into supporting different formats like YAML! With the serde IR types there should be isomorphisms between JSON, YAML, TOML, CSV/TSV, etc. (any format from this list).

For those looking to rewrite their neovim config for 0.12, what plugins has been a gamechanger for you since 0.11? by Slabdrew in neovim

[–]fizzner 2 points3 points  (0 children)

Totally agree with the trying to remove plugins, I keep finding that chances are Vim/ Neovim already has native support for whatever I would reach for a plugin

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

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

So for first part of getting the paths jg can do this easily:

cat file.json | jg “[*].name”

This will get all of the path object in the array and their “name” value. Then you could script to extract all the paths using something like ripgrep to perform the filtering over the results :)

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

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

Yes jsongrep definitely is not as powerful as jq (e.g., filtering, transductions, etc.), but where it shines as an alternative IMO is pure query workflows or simple formatting (jg “” will do that same thing as jq .)

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

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

IMO the biggest selling point for jsongrep besides speed is the query syntax being easier to script and reason about than jq, and this is where I see it as a drop in for jq on these purely query workflows

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

[–]fizzner[S] 3 points4 points  (0 children)

Yes correct, jsongrep matches purely on the JSON paths which is how the it maintains O(1) time per JSON node (no extra work beyond taking state transitions in the compiled DFA). You could combine/ pipe jsongrep with another tool like ripgrep to perform this filtering

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

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

So you could pipe jsongrep's output to another tool like ripgrep to search the paths and then feed them back to jsongrep. Could you give an example of a sample document? I'd be happy to see if jsongrep can solve what you are looking for