What does HackerNews think of jq?

Command-line JSON processor

Language: C

jq has >20k stars on GitHub.

I use it mostly for little cli utilities, so maybe it isn’t an exact refutation of your claim.

[0] https://github.com/stedolan/jq

In today's world of excellent CLI tools I don't think grep is a good choice, especially for checking irregular languages like XML. [0]

I use tools like `jq` [1] or `yq` [2] all the time for CI checks. One useful check, is we have a configuration file stored as several hundred lines of YAML. Its a nice thing to maintain a sorted order for that, so we have a git pre-commit hook that runs the following:

> yq eval --inplace '.my_key|= sort' my_file.yaml

Of course, a pre-commit hook or CI both work. There's pros and cons of both. For our team, the pre-commit hook is a low enough level of effort, and doesn't require a CI check for something that executes in milliseconds.

[0] https://stackoverflow.com/a/1732454

[1] https://github.com/stedolan/jq

[2] https://github.com/mikefarah/yq

For whatever it's worth, on a somewhat-current Linux Mint, with the test from https://github.com/stedolan/jq/issues/1387:

System jq:

    $ jq --version
    jq-1.6
    $ echo '{"number":288230376151711744}' | jq '.number'
    288230376151711740
Fresh compile from source according to the build instructions at https://github.com/stedolan/jq:

    $ ./configure --with-oniguruma=builtin && make -j8
    $ ./jq --version
    jq-1.6-137-gd18b2d0-dirty
    $ echo '{"number":288230376151711744}' | ./jq '.number'
    288230376151711744
Alternatively:

    $ ./configure --with-oniguruma=builtin --enable-decnum=no && make -j8
    $ echo '{"number":288230376151711744}' | ./jq '.number'
    288230376151711740
So the basic bug is fixed, jq has included a bignum library for > 2 years. I don't know if Mint (and thus presumably Ubuntu, and thus possibly Debian) includes an older version of jq or sets nonstandard user-unfriendly flags on purpose, but I'm somewhat underwhelmed in either case.
jq[1] comes in handy when I need to make sense of json data and search through it fast.

grep, because I find myself piping data to grep all the time to search for what I am looking for.

[1]https://github.com/stedolan/jq

Namespaces are an interesting addition, and I appreciate GNU trying to modernize such a ubiquitous tool, but I wish they would put more effort into expanding the built-in utilities. There's still no `join`, for example. No high-level date mechanics. Also, no Oniguruma! I'm tired of looping over `match` and `sub` statements because you can't specify non-greedy regex.

The @include and @load directives are extremely useful for shipping your own customizations, but I prefer the maintenance priorities of the JQ maintainers [1], who understand that powerful builtins are what burn into user's minds, making a tool mentally indispensable.

1. https://github.com/stedolan/jq

Author uses python one-liner to pretty-print JSON struture. There is marvelous MIT-licensed tool "jq" just for that and ton more: https://github.com/stedolan/jq
> no matter what language I create, people will not use it, it it comes from a random github page.

Speaking as a fellow sufferer, how did perl, python, php, lua, ruby start getting used? They were pre-github, but jq really did start that way: https://github.com/stedolan/jq.

The key to being used is a usage: a problem to apply it to. If there's a problem that people need solved, and your language is much better than the alternatives, then people will use it, post about it, rave about it. If JSON wasn't popular, jq wouldn't be popular.

OTOH your actual interest is in more abstract ideals. This is crucially important work, but you may be right that no one will use it... instead, they'll be interested in the ideas you are interested in. Finding a needed application of your ideas will generate use.

What next? Job control signals?? :) (EDIT: How about tmux?)

Anyways, this is fantastic. Finally, proper ssh functionality!

This will encourage development of console (text-oriented) apps for Windows, which I hope will be much simpler. Interfacing with the console can be really difficult if you're coming from *nix. Ideally all the WIN32-specific code in, e.g., jq[0], could be ripped out.

[0] https://github.com/stedolan/jq (look in src/main.c)

Support for the necessary recording is available since version 2.0.0.

This can be done via jq [0]. See the simple script [1] I made. It relies on things like tab-expansion yielding the same results, so beware.

[0]: https://github.com/stedolan/jq [1]: https://0x0.st/sj0G.txt (License: AGPLv3, credit to my handle)