Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wwader
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
wwader
5mo ago
Assume input is an array you can do it several ways depending on what you want: # output each value in the array separately .[] # output each value but transform it in some way .[] | . * 2 # map each value into a n
2.
▲
by
wwader
1y ago
Same! and jq's regexp functions are quite powerful for transforming text into something more structured: $ echo -e "10:20: hello\n20:39: world" | jq -cR 'capture("^(?<timestamp>.*): (?<message>.*)$&q
3.
▲
by
wwader
1y ago
Very nice! thanks for building this
4.
▲
by
wwader
1y ago
The jaq author is working on a formal specification of jq https://github.com/01mf02/jq-lang-spec . I think it has also help that there are several implementations of jq now like, gojq, jaq and jqjq, that has helped find
5.
▲
by
wwader
2y ago
The sqlite source includes a CLI tool called showdb that is quite nice for poking around in database files
6.
▲
by
wwader
2y ago
Note on (b): As i understand it JSONPath by design is limited to only be able to select things from the input, so can't build a new object, array etc.
7.
▲
Jaq 2.0 released with lots of improvements and support for jqjq
(github.com)
2 points
by
wwader
2y ago
|
0 comments
8.
▲
by
wwader
2y ago
open -a is nice, i use it with alias, ex: alias qt='open -a "quicktime player"' alias vlc='open -a "vlc"'
9.
▲
by
wwader
2y ago
Yeap the syntax and semantics is quite different to other languages and it really took me a long time and deep understanding to really appreciate how expressive and damn well designed it is.
10.
▲
by
wwader
2y ago
As a heavy jq user and now a days also maintainer i say welcome! happy to help if you run into some problem
11.
▲
by
wwader
2y ago
Yeap love things like that, ex https://www.imdb.com/title/tt1787791/ and the mystery show podcast. Let me know if you know any!
12.
▲
by
wwader
2y ago
Reminds me of the documentary Kim's video https://www.imdb.com/title/tt24132144/ recommended!
13.
▲
by
wwader
2y ago
I think the alpine package format do use this in combination with tar being similar https://wiki.alpinelinux.org/wiki/Apk_spec
14.
▲
by
wwader
2y ago
Nice haven't seen. Shameless plug fq support elf https://github.com/wader/fq and will have a look if i could lend some ideas from llvm-readelf
15.
▲
by
wwader
2y ago
I once dumped a cassandra cluster to json (10ish gb i if remember correctly) and used jq to do queries
16.
▲
by
wwader
2y ago
Comparison of last example from https://axel.leroy.sh/quick-refs#dasel desel: .data.all().filterOr(moreThan(.quantity,3),equal(.quantity,3)).mapOf(key,key,quantity,quantity) yq: .data[] | select(.quantity >= 3) | {"
17.
▲
by
wwader
2y ago
Hey! thanks for the jqjq shoutout!
18.
▲
by
wwader
2y ago
> Oh oh, jq has bugs..., I hope you reported them. I wondered more than once whether I could trust the results of my jq invocations. Yes report, and i'm one of the jq maintainers now a days :) and i think you can trust the result if
19.
▲
by
wwader
2y ago
No sure what your talking about, i get happy every time i get to use jq! :)
20.
▲
by
wwader
2y ago
Yes it is! see the example in the readme how to run jqjq with jqjq. Sadly you will probably need a lot of memory, it used to work on my laptop but not anymore after some recent changes that seem to have increased memory use.
21.
▲
by
wwader
2y ago
"thanks" :)
22.
▲
by
wwader
2y ago
Hey! quite accurate, it was a mix of i just wanted to try to see how hard it would be and wanted to know more about jq. I guess it has limited practical use other than as a learning tool. But i've used it to prototype features for &quo
23.
▲
by
wwader
2y ago
Hey! jqjq author here. Some time :) but surpassingly not that much, after getting over some major hurdles like how to mix recursive decent parsing and infix operators (precedence climbing is nice) and how to eval jq's call semantic tha
24.
▲
by
wwader
2y ago
jq has quite a few more ways to input things more than from stdin and files. Some examples: $ abc=123 jq -cn '$ENV | {abc, othername: .abc}' {"abc":"123","othername":"123"} $ jq -cn
25.
▲
by
wwader
2y ago
It do involve some quite complicated plumbing :) i hope i've made at least some more ppl interested in jq as a langauge and related tools with fq, jqjq, jq-lsp and by helping maintain the original jq project
26.
▲
by
wwader
2y ago
Thanks for the kind words! I have to pass along most of the credit to the designers of jq and jq CLI interface. Lots of care and thought have gone into those, also gojq was big enabler. I feel more like plumber that half accidentally conne
27.
▲
by
wwader
2y ago
Hey! fq author here, just want to say that i've looked at rq also :) nice to see ppl explore developing tools like this
28.
▲
by
wwader
2y ago
Note that gojq also fixes and improves on some things compared to jq, like arbitrary-precision arithmetic (jq only preserves), some semantic and parsing improvement and fixes that will likely happen in jq at some point also, time zone/
29.
▲
by
wwader
2y ago
Hey, it was discussed a bit some years ago https://github.com/jqlang/jq/issues/1892
30.
▲
by
wwader
2y ago
jq tries to preserve number precision if you don't do operation with them, but as you noted this is within some sanity. If you do operations the involved numbers will first be converted to binary64 (aka double), same as node and most o
More ›