Live data from Hacker News

Jaq – A jq clone focused on correctness, speed, and simplicity

github.com

241–250 of 254 posts

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#241

Earlier quoted context omitted.

[flagged]

There’s no single way “native” speakers say any word, and the fact that you think there is shows you have had no exposure to the massive diversity of American accents.

What dialect of American English treats /ʒ/ and /dʒ/ as allophones at the beginning of a word (or any other context)? You've already (weirdly) accused me of being a prescriptivist, here's your chance to counter with some descriptive evidence of the kind of variation you are talking about.

I'd love to be wrong, because I'd learn a new thing. Please, educate me.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#242

Earlier quoted context omitted.

There’s no single way “native” speakers say any word, and the fact that you think there is shows you have had no exposure to the massive diversity of American accents.

What dialect of American English treats /ʒ/ and /dʒ/ as allophones at the beginning of a word (or any other context)? You've already (weirdly) accused me of being a prescriptivist, here's your chance to counter with some descriptive evidence of the kind of variation you are talking about. I'd love to be wrong, because I'd learn a new thing. Please, educate me.

Listen, you’ll hear.

Nothing quite as weird as someone accusing me of not knowing how people in my own country say my own name.

The amount of misplaced confidence in this form is just absurd sometimes.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#243
post #99

It's so awesome when projects shout out other projects that they're similar to or inspired by or not replacements for. I learned about https://github.com/yamafaktory/jql from the readme of this project and it's what I've been looking for for a long time, thank you! That's not to take away from JAQ by any means I just find the JQ style syntax uber hard to grokk so jql makes more sense for me.

Nice find. I think I'll try it out. Although I was hoping for a real SQL type experience. I don't understand why no one just copies SQL so I can write a query like "SELECT * FROM $json WHERE x>1". Everyone seems to want to invent their own new esoteric symbolic query language as if everything they do is a game of code golf. I really wish everyone would move away from this old Unix mentality of extremely concise, yet…

> I don't understand why no one just copies SQL so I can write a query like "SELECT * FROM $json WHERE x>1".

You could ask the same with respect to XML too -- why XPath/XSLT instead of SQL?

The problem is that SQL isn't that convenient when you're querying data in a free-form and recursive schema. Especially the latter, because recursive queries in SQL are just not pithy. I say this as someone who loves SQL.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#244
post #3

While jq is a very powerful tool, I've also been using DuckDB a lot lately. SQL is a much more natural language if the data is somewhat tabular.

Yes. SQL is much better for relational data with a strict schema. Though you'll still never get a way to express recursive queries in SQL w/o a lot of verbosity.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#245

Congratulations! We're almost back to the basic functionality we used to have with XSLT.

Yes. jq is essentially an XPath/XSLT for JSON. I'd say that jq is more powerful than XPath/XSLT, but that's neither here nor there since both can evolve to be as powerful as they need to be.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#246

why not contribute to the existing jq project instead of starting a new one? We have so many json query tools now it's insane.

jq maintainer here. We love that there are multiple implementations of jq now. It does several things: a) it gives users more choices, b) it helps standardize the language (though we've not yet written a formal specification), c) it brings more energy to jq because the maintainers of the other tools have joined jq as maintainers. I also love that these alternative implementations relieve my growing dislike of C.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#247

why not contribute to the existing jq project instead of starting a new one? We have so many json query tools now it's insane.

The obvious reason here is jaq makes some changes to semantics, changes which would be rejected by jq. Another likely reason is that it seems a motivation for jaq is improving the performance of jq. Any low-hanging fruit there in the jq implementation was likely handled a long time ago, so improving this in jq is likely to be hard. Writing a brand new implementation allows for trying out different ways of implementin…

jq hasn't had much work done to make it fast though.

There's two classes of performance problems:

- implementation issues

- language issues

The latter is mainly a problem in `foreach` and also some missing ways to help programmers release references (via `$bindings`) that they no longer need.

The former is mostly a matter of doing a variety of bytecode interpreter improvements, and maybe doing more inlining, and maybe finding creative ways to reduce the number of branches.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#248
post #227
post #44

Earlier quoted context omitted.

Saxon is where it's at. When XSLT 3.0 tells a joke, it starts with "a JSON walks into a bar..." https://github.com/Saxonica/Saxon-HE

I do not see license in either repository and it seems that this tool only has 30 day evaluation tier for free. Anyway, using this means that you have dependency on a single vendor and you accept their future pricing changes. Now compare this with JSON ecosystem

Their "home" edition is open source and way more capable than anything I've seen for other formats.

Saxonica, the company behind it, has been critical for the evolution of the XML ecosystem.

I agree that lack of alternatives sucks but the breadth of options you refer to is backed by an army of open source volunteers.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#249
post #156

How have you been using jq? It is more adhoc for exploring JSON files during development/data analysis or in programs that run in production?

Yeah, I've always liked the idea of jq but personally I find it easier to open a REPL in the language I'm most familiar with (which happens to be JS, which does make a difference) and just paste in the JSON and work with it there It may be more verbose, but I never have to google anything, which makes a bigger difference in my experience

Yes. So much easier to reuse other common helper functions. Once you’ve finished exploration you can just copy the code into production instead of translating.

Re: Jaq – A jq clone focused on correctness, speed, and simplicity

#250

Earlier quoted context omitted.

What dialect of American English treats /ʒ/ and /dʒ/ as allophones at the beginning of a word (or any other context)? You've already (weirdly) accused me of being a prescriptivist, here's your chance to counter with some descriptive evidence of the kind of variation you are talking about. I'd love to be wrong, because I'd learn a new thing. Please, educate me.

Listen, you’ll hear. Nothing quite as weird as someone accusing me of not knowing how people in my own country say my own name. The amount of misplaced confidence in this form is just absurd sometimes.

I'm also from the US and I've spent quite a lot of time listening to people speaking, specifically listening for how they realize phonemes. Your experience doesn't at all align with mine, either what I heard or what I've read about dialect variation in the US.

Anyway, sorry to have upset you.

Post reply on HN