Live data from Hacker News

A Faster Alternative to Jq

micahkepe.com

161–170 of 281 posts

Re: A Faster Alternative to Jq

#161

Earlier quoted context omitted.

I also genuinely hate using jq. It is one of the only things that I rely heavily on AI.

At that point why don't we ask the AI directly to filter through our data? The AI query language is much more powerful.

You really need to go and learn about the concept of determinism and why for some tasks we need and want deterministic solutions.

It's an important idea in computer science. Go and learn.

Re: A Faster Alternative to Jq

#162
post #3

When initially opening the page it had broken colors in light mode. For anyone else encountering it: switch to dark mode and then back to light mode to fix it.

Hey OP here! Sorry about this this is just laziness on my part because I never use light mode so I forget to test haha, will push a fix!

Re: A Faster Alternative to Jq

#163
post #156

Earlier quoted context omitted.

Because the output you get can have hallucinations, which don’t happen with a deterministic tool. Furthermore, by getting the `jq` command you get something which is reusable, fast, offline, local, doesn’t send your data to a third-party, doesn’t waste a bunch of tokens, … Using an LLM to filter the data is worse in every metric.

You can use a local LLM and you can ask it to use tools so it is faster.

There is hardware that is able to run jq but no a local AI model that's powerful enough to make the filtering reliable. Ex a raspberry pi

Re: A Faster Alternative to Jq

#164
post #137

Jq's syntax is so arcane I can never remember it and always need to look up how to get a value from simple JSON.

Shameless plug, but you might like this: https://github.com/IvanIsCoding/celq jq is the CLI I like the most, but sometimes even I struggled to understand the queries I wrote in the past. celq uses a more familiar language (CEL)

I had never heard of CEL, looks useful though, thanks for posting this!

Re: A Faster Alternative to Jq

#165

Earlier quoted context omitted.

I also genuinely hate using jq. It is one of the only things that I rely heavily on AI.

At that point why don't we ask the AI directly to filter through our data? The AI query language is much more powerful.

Because the input might be sensitive.

Because the input might be huge.

Because there is a risk of getting hallucinations in the output.

Isn't this obvious?

Re: A Faster Alternative to Jq

#166
post #161

Earlier quoted context omitted.

At that point why don't we ask the AI directly to filter through our data? The AI query language is much more powerful.

You really need to go and learn about the concept of determinism and why for some tasks we need and want deterministic solutions. It's an important idea in computer science. Go and learn.

You need to learn to adapt to the real world where most things are not deterministic. Go and learn.

Re: A Faster Alternative to Jq

#167
post #137

Jq's syntax is so arcane I can never remember it and always need to look up how to get a value from simple JSON.

I also genuinely hate using jq. It is one of the only things that I rely heavily on AI.

You should try nushell or PowerShell which have built ins to convert json to objects. It makes it so easy.

Re: A Faster Alternative to Jq

#168
post #156

Earlier quoted context omitted.

Because the output you get can have hallucinations, which don’t happen with a deterministic tool. Furthermore, by getting the `jq` command you get something which is reusable, fast, offline, local, doesn’t send your data to a third-party, doesn’t waste a bunch of tokens, … Using an LLM to filter the data is worse in every metric.

You can use a local LLM and you can ask it to use tools so it is faster.

[deleted]

Re: A Faster Alternative to Jq

#169
post #167

Earlier quoted context omitted.

I also genuinely hate using jq. It is one of the only things that I rely heavily on AI.

You should try nushell or PowerShell which have built ins to convert json to objects. It makes it so easy.

Second this. Working with nushell is a joy.

Re: A Faster Alternative to Jq

#170

Quick comment for the author. Just added this new tool to arkade, along with the existing jq/yq. No Arm64 for Darwin.. seriously? (Only x86_64 darwin.. it's a "choice") No Arm64 for Linux? For Rust tools it's trivial to add these. Do you think you can do that for the next release? https://github.com/micahkepe/jsongrep/releases/tag/v0.7.0

OP here- I will add! Thank you for checking out the project!
Post reply on HN