Jaq – A jq clone focused on correctness, speed, and simplicity
11–20 of 254 posts
Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#12Earlier quoted context omitted.
As an outsider, getting your code merged into a popular open source project involves a political process of convincing the maintainers that your fix should be addressed, and then convincing them they should merge your code. Writing a fork involves sitting down at your laptop and coding it out.
Plus of course everything needs rewritten in rust /s.
$ hyperfine -w 100 -m 1000 -L bin jq,jaq "echo '[1,2,3]' | {bin} '.[1]'"
Summary
echo '[1,2,3]' | jaq '.[1]' ran
1.57 ± 0.15 times faster than echo '[1,2,3]' | jq '.[1]'
Bring on the competition!Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#13[1] : https://github.com/jinyus/related_post_gen
[2]: https://github.com/jinyus/related_post_gen/blob/main/jq/rela...
Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#14I applaud this project's focus on correctness and efficiency, but I'd also really like a version of `jq` that's easy to understand without having to learn a whole new syntax. `jq` is a really powerful tool and `jaq` promises to be even more powerful. But, as a system administrator, most lot of the time that I'm dealing with json files, something that behaved more like grep would be sufficient.
Have you tried `gron`? It converts your nested json into a line by line format which plays better with tools like `grep` From the project's README: ▶ gron " https://api.github.com/repos/tomnomnom/gron/commits?per_page... " | fgrep "commit.author" json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; json[0].commit.author.email = "mail@tomnomnom.com"; json[0].commit.author.name = "Tom Hudson…
It flattens the structure. And makes for easy diffing.
Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#15Earlier quoted context omitted.
Plus of course everything needs rewritten in rust /s.
$ hyperfine -w 100 -m 1000 -L bin jq,jaq "echo '[1,2,3]' | {bin} '.[1]'" Summary echo '[1,2,3]' | jaq '.[1]' ran 1.57 ± 0.15 times faster than echo '[1,2,3]' | jq '.[1]' Bring on the competition!
I've commented before that I expect Rust to be a language that is generally faster than even C or C++ in a way that's hard to capture in small benchmarks, because the borrow checker permits code to be written safely that does less copying that other languages have to do for safety. Given the nature of what jq/jaq does, I wouldn't be surprised that that is some of the effect here. It would be interesting to instrument them up with tools that can track the amount of memory traffic each benchmark does to compare (that is, not memory used but total traffic in and out of RAM); I bet the Rust code shows a lot less.
Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#16[flagged]
For instance, do you know who Junio Hamano is? Oh, he's just a guy who's been maintaining a fairly minor project called Git for the last 15 years. But everyone can connect Linus Torvalds with git, even though he only worked on it consistently for a year or two before leaving it [1].
Also, and I think we all know this too, but working on someone else's codebase kinda sucks. Greenfield is so much more fun. It's a shame, but I'm really not surprised in the slightest.
Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#17Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#18[flagged]
Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#19Re: Jaq – A jq clone focused on correctness, speed, and simplicity
#20[flagged]
How does this relate to navigating structured documents? Even if you use XML, presumably you will want to programmatically navigate/query it at some point.