Live data from Hacker News

Zq: An easier and faster alternative to jq

brimdata.io

211–220 of 237 posts

Re: Zq: An easier and faster alternative to jq

#211
post #98

Hi, all. Author here. Thanks for all the great feedback. I've learned a lot from your comments and pointers. The Zed project is broader than "a jq alternative" and my bad for trying out this initial positioning. I do know there are a lot of people out there who find jq really confusing, but it's clear if you become an expert, my arguments don't hold water. We've had great feedback from many of our users who are reall…

"cobbled-together" jq as it often appears in the wild will often compare badly with crafted solutions because the writer's goal is usually GSD and not write pretty code. People with the time and inclination to slow down and think a little more about how the tools work will produce cleaner solutions. In your example to convert {"name":"foo","vals":[1,2,3]} to {"name":"foo","val":1} {"name":"foo","val":2} {"name":"foo"…

can also use name instead of name:.name

I think jq is very elegant - genius even - but whenever I use it, I have to look up the docs for syntax. But I guess that's true for any infrequently used tool.

Re: Zq: An easier and faster alternative to jq

#213

jq is incredibly powerful and I'm using it more and more. Even better, there is a whole ecosystem of tools that are similar or work in conjunction with jq: * jq (a great JSON-wrangling tool) * jc (convert various tools’ output into JSON) * jo (create JSON objects) * yq (like jq, but for YAML) * fq (like jq, but for binary) * htmlq (like jq, but for HTML) List shamelessly stolen from Julia Evans[1]. For live links see…

tbh my biggest problem with all these tools is that I really don't want to have to learn one for each of the json-y formats I have to use every day. If jq supported toml and yaml natively I'd be much much much happier to learn its kind of obtuse syntax.

Re: Zq: An easier and faster alternative to jq

#214

Earlier quoted context omitted.

"cobbled-together" jq as it often appears in the wild will often compare badly with crafted solutions because the writer's goal is usually GSD and not write pretty code. People with the time and inclination to slow down and think a little more about how the tools work will produce cleaner solutions. In your example to convert {"name":"foo","vals":[1,2,3]} to {"name":"foo","val":1} {"name":"foo","val":2} {"name":"foo"…

can also use name instead of name:.name I think jq is very elegant - genius even - but whenever I use it, I have to look up the docs for syntax. But I guess that's true for any infrequently used tool.

This exactly. I think JQ's problem in this regard is further compounded because its query language just doesn't feel like anything else most people have used, I've certainly never come across anything quite like it, anyway.

Re: Zq: An easier and faster alternative to jq

#215

jq is incredibly powerful and I'm using it more and more. Even better, there is a whole ecosystem of tools that are similar or work in conjunction with jq: * jq (a great JSON-wrangling tool) * jc (convert various tools’ output into JSON) * jo (create JSON objects) * yq (like jq, but for YAML) * fq (like jq, but for binary) * htmlq (like jq, but for HTML) List shamelessly stolen from Julia Evans[1]. For live links see…

I need someone to make a `Q` wrapper that amalgamates all of them. And if that's already taken by a common utility, I vote we name it deLancie, instead.

Re: Zq: An easier and faster alternative to jq

#217
post #49

Earlier quoted context omitted.

It really is a fundamental problem where lots of these important projects aren't maintained simply because the reality is the maintainers can't beat the economics of a lot of rich freeloaders having no real short term incentive to compensate these maintainers..

Pity he quit before Github opened up sponsorships.

How would Github sponsorship help pay for the time of someone at a finance company earning who knows where between 200-500k?

Re: Zq: An easier and faster alternative to jq

#218
post #98

Hi, all. Author here. Thanks for all the great feedback. I've learned a lot from your comments and pointers. The Zed project is broader than "a jq alternative" and my bad for trying out this initial positioning. I do know there are a lot of people out there who find jq really confusing, but it's clear if you become an expert, my arguments don't hold water. We've had great feedback from many of our users who are reall…

"cobbled-together" jq as it often appears in the wild will often compare badly with crafted solutions because the writer's goal is usually GSD and not write pretty code. People with the time and inclination to slow down and think a little more about how the tools work will produce cleaner solutions. In your example to convert {"name":"foo","vals":[1,2,3]} to {"name":"foo","val":1} {"name":"foo","val":2} {"name":"foo"…

counter point: I reach for jq probably twice a year. It's a slog every time, but way way less work than diving into the terse syntax and understanding the inner workings of jq. A good abstraction is the border of my understanding, a leaky abstraction means I have to have mastery of the internals to be successful. jq is a leaky abstraction.

Re: Zq: An easier and faster alternative to jq

#219

As an aside --- isn't the traditional flat namespace of unix command names getting a bit crowded nowadays?

We've got space for 26^2 2-letter commands...

> for d in $(echo $PATH | tr ":" "\n") ; do ls $d | grep "^..$"; done | sort -u | wc -l

> 52

I can fit a few more in

(edit: I can't work out how to put code in a comment)

Re: Zq: An easier and faster alternative to jq

#220

jq is incredibly powerful and I'm using it more and more. Even better, there is a whole ecosystem of tools that are similar or work in conjunction with jq: * jq (a great JSON-wrangling tool) * jc (convert various tools’ output into JSON) * jo (create JSON objects) * yq (like jq, but for YAML) * fq (like jq, but for binary) * htmlq (like jq, but for HTML) List shamelessly stolen from Julia Evans[1]. For live links see…

tbh my biggest problem with all these tools is that I really don't want to have to learn one for each of the json-y formats I have to use every day. If jq supported toml and yaml natively I'd be much much much happier to learn its kind of obtuse syntax.

Have you checked out https://www.nushell.sh/? It seems like exactly what you're describing. Although I know of people who are happily using it as their main shell, I only really use it when I need to read and manipulate data in files.
Post reply on HN