Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Jqjq: Jq Implementation of Jq (github.com/wader)
134 points by ingve on July 6, 2024 | hide | past | favorite | 16 comments


90% feature coverage, that's wild.

I wonder how many hours have been spent to produce this magnificent blasphemy.


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 that uses thunk/lambdas args it was mostly to grind through the rest. Actually string interpolation was quite tricky also. Also helped that i've worked on various jq other implementations and also written quite a lot of jq in general :)


jqjq seems to be an academic or "because we can" project. fq from the same author has practical use https://news.ycombinator.com/item?id=36175000 It's shortly mentioned in the jqjq README, but maybe someone overlooked the 2 characters...


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 "original" jq like how eval could work, regex literals, some object literal syntax enhancements etc. Also i found a bunch of bugs and confusing behaviours in jq along the way :)

btw i didn't follow what you mean by "overlooked the 2 characters"?


I guess they intended to say that the reference to fq was very short, so people might have missed it while reading


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.

Well, to be fair the probability that my input data or my jq code has bugs might even be higher...

Of course all software has bugs, but I guess most of us have never been bitten by a gcc or Python interpreter bug.

Yeah, the 2 characters deferred to the fq name. The jqjq README has a link, however without mentioning what it is about.


> 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 your doing common things. The bugs i've encountered have usually been in exotic parts, ex https://github.com/jqlang/jq/issues/3128


Great write up too.


Masterful


I’ve posted this comment on only a handful of threads over the 12 years I’ve been active in this site.

This is an absolute waste of time effort and resources, and nobody should have spent any time considering this let alone implementing it.

And yet, they went ahead and implemented it anyway. This is exactly the kind of nonsense I love seeing on here, and it’s what brings me back to this site. I love it.


"thanks" :)


I wonder if it's self-hosting.


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.


Every day we stray further from God.

jk, this is amazing


But seriously, there is only darkness here.


No sure what your talking about, i get happy every time i get to use jq! :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: