Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wwader
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
wwader
3y ago
If you don't need to digg deep it's also possible to do: $ jq -n '{"a": 1, "b": {"c": 2, "d": 3}, "e": 4} | {a, e}' { "a": 1, "e": 4
62.
▲
by
wwader
3y ago
Hey! as one of the maintainers i can safely say that we take backwards compatibility very seriously
63.
▲
jq 1.7
(github.com)
434 points
by
wwader
3y ago
|
205 comments
64.
▲
by
wwader
3y ago
In that case it would be very similar but pick is more general then the shorthand object literal syntax, it can be used with nested index lika .a.b.c or any expression like pick(if .a then .b else .c end) but both has it uses i think.
65.
▲
by
wwader
3y ago
Note that this is a release candidate so please report any issues!
66.
▲
by
wwader
3y ago
Hey, pick is implemented in jq here https://github.com/jqlang/jq/blob/master/src/builtin.jq#L258... using various path functions. When the jq manual say "path expression" like the argument
67.
▲
by
wwader
3y ago
no problem! feel free to reach out if you have any questions
68.
▲
by
wwader
3y ago
Hi author here. Releases support as in package .deb and .rpm myself for each relese?
69.
▲
by
wwader
3y ago
Hi fq author here. What is gqui? some internal google thingy?
70.
▲
by
wwader
3y ago
Hi author here. Yeap currently only decodes the "wire" format. Actually it can decode using a schema but not parsed from a proto file, this is used by other formats using protobuf as a subformat then they pass a schema internally
71.
▲
by
wwader
3y ago
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
72.
▲
by
wwader
3y ago
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, gen
73.
▲
by
wwader
3y ago
Hi author here. There is no stable API at the moment and it depends a bit what you want to do. If you mean write own private decoders it is possible but i can't guarantee the API will change, see this old twitter thread https:/&#
74.
▲
by
wwader
3y ago
Hi fq author here and also acquaintance with the gnu poke author. One difference is that fq is focused in decoding and querying while poke might be more focused on editing and runtime modeling of formats. But we have both inspired each othe
75.
▲
by
wwader
3y ago
Hi author here, i think format mostly but also i thought about fq as file(1) on steroids in the beginning :)
76.
▲
by
wwader
3y ago
Hi fq author here! please do if you want, would be a great addition.
77.
▲
by
wwader
3y ago
Hi, i'm working on runtime kaitai support and have made good process but it's quite a big task. Keep an eye on https://github.com/wader/fq/issues/627 your interested.
78.
▲
by
wwader
3y ago
Thanks for the kind words! they inspired me so i hope i can inspire others
79.
▲
by
wwader
3y ago
Thanks for the kind words! without the other tools i don't think fq would even exist, they inspired and show what was possible.
80.
▲
by
wwader
3y ago
fun fact: fq is kind of the spiritual predecessor of https://github.com/wader/flac.tcl , you can see traces of it in flac_frame.go in fq, was used to prototype some things :)
81.
▲
by
wwader
3y ago
Hi, sorry for the delay, on vacation. There is no process really more then convincing me :) and i think i will accept any decoder that is for a format used in public, standardized or proprietary. I do want to add some kind of runtime format
82.
▲
by
wwader
4y ago
confusingly jq also has a streaming mode https://stedolan.github.io/jq/manual/#Streaming that streams JSON values as [<path>,<value>] pairs. This can also be combined with null input and enables one to
83.
▲
by
wwader
4y ago
Hey, i'm the author of fq. It can convert to/from html and JSON (in two different modes). Use -d html, or the fromhtml, fromxml and toxml functions. Ex: $ curl -s https://news.ycombinator.com/ | fq -r -d html &#
84.
▲
by
wwader
4y ago
fq has mp4 support https://github.com/wader/fq is quite visual but is a CLI tool (for now). It has a REPL and query language to poke around. Disclaimer: i'm the author. Other mp4 tools i use are https://
85.
▲
by
wwader
4y ago
If you want to go deep ISO-14496-12 is probably what your looking for. You can either pay ISO to read it or hypothetically you can google for "filetype:pdf ISO-14496-12". For how things actually work in practice https://
86.
▲
by
wwader
4y ago
I think it has been turing complete for a long while. Here is the first prototype in haskell before it was convert to C https://github.com/stedolan/jq/commit/eca89acee00faf6e9ef55d... , it's very basic bu
87.
▲
by
wwader
4y ago
It also has requirements on the box tree structure and order and what boxes are required/optional. Then there are also mapping per codec (see https://mp4ra.org/ ) that have additional requirements on boxes and how the s
88.
▲
by
wwader
4y ago
Hi author of jqjq here. I don't know why Stephen Dolan designed the jq language the way he did. But for me the most attractive things about jq is the terse and pipe-friendly syntax. This allows you to write queries in shells and REPLs
89.
▲
by
wwader
4y ago
gron is great, i have this in my init.jq file for fq ( https://github.com/wader/fq ). Sadly jq lacks a path_to_expr function so a bit harder to do it with that. def gron: ( path(..) as $p | getpath($p) |
90.
▲
by
wwader
4y ago
Yes you can! but it's very slow $ ./jqjq "eval($(jq -Rs . jqjq.jq)+.)" <<< '"eval(\"def f: 1,8; [f,f] | map(.+105) | implode\")"' "jqjq" But running jqjq in jq
More ›