News for hackers. Stuff that matters.
Re:Q: A faster re-implementaiton of jq written in Reason Nat... by davesnx on Monday September 14, 2020 @10:41AM (#24470688)
Nothing that can be fixed later?
Re:Q: A faster re-implementaiton of jq written in Reason Nat... by freedomben on Monday September 14, 2020 @10:55AM (#24470880)
Thanks for this. I've been planning a similar work for years and haven't gotten off my ass (too many other projects lol).

I definitely agree that reading from stdin is critical if I'll be able to use it. Don't take the criticism too hard though (especially the "author doesn't appreciate unix" stuff. Sometimes we can be such assholes to each other).

Nice work!

Re:Q: A faster re-implementaiton of jq written in Reason Nat... by davesnx on Monday September 14, 2020 @11:56AM (#24471662)
I'm happy with the critics.

Judging is free and I didn't consider stdin as something to spend time on yet. Will do, now that some people raise it.

Thanks :D

Re:Q: A faster re-implementaiton of jq written in Reason Nat... by jeffbee on Monday September 14, 2020 @10:44AM (#24470730)
Probably. You tell us :=)

The incompatibility is apparently due to the fact that jq is happy with a concatenation of JSON objects and q is not. For example {'foo':1}{'foo':2} as opposed to [{'foo':1},{'foo':2}]

Re:Q: A faster re-implementaiton of jq written in Reason Nat... by davesnx on Monday September 14, 2020 @10:53AM (#24470847)
Sure, it's a missing feature "," creates 2 spins of the filter.

I certantly didn't use it, but I see where it's useful, will implement it soon.

Re:Q: A faster re-implementaiton of jq written in Reason Nat... by pwm on Monday September 14, 2020 @11:37AM (#24471415)
To be fair that is a JSON parse error.
Re:Q: A faster re-implementaiton of jq written in Reason Nat... by jeffbee on Monday September 14, 2020 @11:40AM (#24471438)
Yes, but the inputs to jq are not JSON, they are "a sequence of whitespace-separated JSON values which are passed through the provided filter one at a time" which is the relevant thing if you are going to try to replace jq.
Re:Q: A faster re-implementaiton of jq written in Reason Nat... by davesnx on Saturday September 19, 2020 @07:43AM (#24526761)
Yep, kind of.

The comma operations means that the "filters" are duplicated, so instead of one json state you would pass two if there's one coma; and ofcourse any number of commas are allowed.