News for hackers. Stuff that matters.
Re:Fq: Jq for Binary Formats by pmoriarty on Saturday June 03, 2023 @08:58AM (#36176313)
Too bad that jq has such a shitty, convoluted syntax.

Could have definitely chosen one of the many alternatives to jq that also worked with JSON but did so in a much clearer and more elegant way.

Re:Fq: Jq for Binary Formats by hedora on Saturday June 03, 2023 @11:15AM (#36177311)
Can you name an alternative to jq with better syntax?
Re:Fq: Jq for Binary Formats by dmoura on Saturday June 03, 2023 @11:31AM (#36177454)
I prefer a SQL-like format. It’s not as complete but it cover most of the day-to-day use cases. Take a look at https://github.com/dcmoura/spyql (I am the author). Congrats on fq!
Re:Fq: Jq for Binary Formats by wwader on Monday June 05, 2023 @02:49PM (#36201176)
Thanks! i actually experimented a bit with an SQL-like interface for while, dump things into sqlite and use that as query engine. Problem usually was that file formats tend to be mix of array and tree structures more then relational and at least standard SQL is not great for that. Maybe some graph-SQL dialect could work?
Re:Fq: Jq for Binary Formats by benibela on Sunday June 04, 2023 @03:54AM (#36183844)
There is XPath 3.1
Re:Fq: Jq for Binary Formats by xp84 on Saturday June 03, 2023 @12:45PM (#36178173)
Commenting to follow because I’m curious what alternatives you mean. I thought a lot of people liked jq and I only just finally got around to installing it, so if there’s a much better way I’d like to hear it.
Re:Fq: Jq for Binary Formats by wwader on Monday June 05, 2023 @02:45PM (#36201099)
Hi author here. Slide 3 from my FOSDEM talks explains my own very subjects reasons for choosing jq https://fosdem.org/2023/schedule/event/bintools_fq/attachmen...

To sum up: Very CLI friendly syntax, generators/backtracking makes working with tree structures very convenient.

But now after writing lots of jq i even thing writing multi line programs in jq to be quite nice :) but i can recommend IDE help, see end of slide 17