π if you spend your days digging thru your own or others ppls broken, weird or even valid binary files i can recommend it :)
@mwader
Some projects that i work on: https://github.com/wader/fq - query, display and slice binary and text formats using jq https://github.com/jqlang/jq - query and transform JSON github.com/wader/ydls - turn a media website into media file or podcast
π if you spend your days digging thru your own or others ppls broken, weird or even valid binary files i can recommend it :)
fq 0.16.0 released github.com/wader/fq/rel... π₯³
jq language fixes, a new safetensors decoder and minor improvements and fixes to mp4, avc and flac decoders.
#fq #jq
no idea what that is, got www.youtube.com/watch?v=RXJK... vibes :)
@nilo.bsky.social
Lovely code :) i think the difference is mostly syntax, the concepts are not new, it's generators and yielding using a terse DSL, the rest is similar to other languages i would say. But yes i do use jq mostly fore exploratory and adhoc things where quickly testing things is important.
what part of jq is most confusing? it's a bit different but once understand some of the fundamentals it's extremely neat and terse
Once up on a time i wanted to output more than one file from jq so i did an ugly tar hack, finally cleaned up the code and pushed it here github.com/wader/tar.jq
#jq #tar
Noice πΈ (but i feel the lack of jq disturbing!)
--unhelpful
Γntligen levererar AI lite vΓ€rde!
FLOSS Weekly Episode 842: Will the Real JQ Please Stand Up
A rainbow Hilbert curve, a squiggly line that visits every cell in a square grid, starting red in the top left, working down then right to becine yellow in the centre, upward and then right to become green at the top right, down and left to be cyan in the centre, and continuing roughly clockwise through blue and the bottom right, magenta off the centre and red again in the bottom left. It's in a terminal and is the result of the command: jq -rnf curve.jq | rsvg-convert | wezterm imgcat
Source code for the jq script. It's about a page long and uses some pretty opaque variable names like s, sl, t0, dt and dtt. But it does have some text explaining the parameters to its main, recursive "hilbert" function, and we can see that it generates fragments of XML, specifically SVG. The full text is in the linked gist.
I made this yesterday. It draws a Hilbert curve in jq. I like jq. gist.github.com/weeble/265cb...
Hmm still confused. By default jq uses JSON for input and output so null will be null. Maybe you want the values filter to filter out nulls? ex:
$ jq -n '123, null, "null" | values'
123
"null"
As one of the jq maintainers: Care to add some context? π€π
Closeup of license plate on back of blue car. NY plate with number βJQβ.
When you are, like, REALLY into processing JSON.
JSONPath (RFC 9535) might be the only "standardised" JSON query language, or maybe XSLT that i think also has some JSON support. But in my experience i want to do more than just select out things, i also want to transform etc so jq is my goto.
π» jq-lsp π»
Jq language server
π https://github.com/wader/jq-lsp
#homebrew #newpkg #macos #linux #formula
jaq 2.3.0 released by Michael FΓ€rber! π₯³ some catch up with jq builtins, repl support and more.
github.com/01mf02/jaq/r...
#jq #jaq #rust
jq 1.8.1 released! π₯³ mostly security and performance fixes.
github.com/jqlang/jq/re...
#jq
No problem! happy to help and spread the word of jq π¬
Nice article! I noticed some of the JSON uses single quotes. BTW i can recommending reading thru github.com/jqlang/jq/bl... and if you want to digg deep the wiki has some great stuff like how assignment is implemented using path expression etc github.com/jqlang/jq/wi...
KΓΆr vi drinking-gamet att ta en sup varje gΓ₯ng AI nΓ€mns?
Thanks! most of the heavy lifting was actually done by github.com/itchyny
jq 1.8 has been released! π₯³ github.com/jqlang/jq/re...
#jq
What part feels most confusing? happy to help!
is very nice and in combination with the inputs function one can aggregate stuff per file etc:
$ jq -n '[inputs | {(input_filename): .}] | add' <(echo 1) <(echo 2)
{
"/dev/fd/11": 1,
"/dev/fd/12": 2
}
fq 0.15.0 released! π₯³ github.com/wader/fq/rel...
Improvements to decode broken mp4 files, decode some more mp4 boxes and nicer handling of AVC and HEVC NALU that don't use emulation prevention.
Does that make jq the ffmpeg of JSON?
Fotografi av en boksida. βANTIVIRUS βDin dator maxpresterar inteβ upplyser mig mitt antivirusprogram. Γr det rimligt att krΓ€va mer av min dator Γ€n av mig sjΓ€lv? Golare har inga polare, jag raderar antivirusprogrammet.β
Henrik Johansson!