HNHacker News
TopNewBestAskShowJobs

arandomhuman

340 karma · joined June 17, 2022

submissionscomments
arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
If fq is a primarily a plumbing project, qq is a janitorial one at this stage (Maybe qq can be more akin to plumbing in the future). All things considered really appreciate your work with the community!
arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
Wow this is cool seeing you post here, fq might be most innovative modern cli tool I’ve seen. The historic archival and querying formats fq is providing is a big inspiration.
arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
I mean to be fair the support for semi structured formats is unprecedented with rq so I could see why!

Thanks for sharing about rq here, I really should give OPA a try sometime, it seems really powerful setting policies in kubernetes or terraform for instance. When I first heard of Rego, I was very interested but it didn’t quite click, I can see that would not have been the case had rq been available at the time.

arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
Sorry just posting this for example.

  $ qq tests/test.hcl | jq | qq -o yaml
  app_name: SimpleApp
  database:
  - host: localhost
    password: password
    port: 5432
    username: admin
    ...
arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
You can indeed run “qq input.xml| jq '.' | qq -o hcl”. The tool does aim to serve that purpose that’s why it outputs json by default. The codec is importable as well but there’s a lot of work to be done improving and maintaining it.
arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
Your comment regarding a great project having a test suite for transcoding is very apt and something thought about a lot when putting this together. qq currently has a test that is vaguely akin to that but it's embarrassingly crude[0] at this stage. If something like this had some assertions after converting for all (or applicable) combinations of formats with a given query I think that might be approaching a good testing suite. (Forgive my ignorance I haven't looked in depth at the testing for jq)

Now that you mention it, it would be nice to support a multi output mode in the cli as well. Using the codec library should achieve a similar M+N complexity if I am not mistaken.

[0] https://github.com/JFryy/qq/actions/runs/9654023860/job/2662...

arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
Hi charles,

rq was shared with me yesterday and just wanted to say it's very impressive, I had heard of OPA/Gatekeeper and have looked into Rego before for policy assertions w/ terraform but I was not aware the language was so expressive until I saw rq. Also the amount of codecs rq supports and quality of them is really great.

It is really neat seeing a lot tools solve a similar problem in such unique ways (especially the case with rq) and has been a lot of fun reading your experiences here. Thanks for sharing your experiences and expertise with the de-serializing/serializing content - It is really cathartic to hear you mention the challenges you solved with xml and csv. I really like how you solved for CSV output/input and the conditions on the input data you chose for evaluating it makes a lot of sense and is really comprehensive, it bothered me too since the content would either need to be a matrix or a slice of maps but seeing as jq has string formatting that can convert things to csv and @tsv - I was at a bit of a standstill of how to approach.

Thanks so much for the bread crumbs I look forward to reading this in more detail over the week/weekend :)

arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
That’s it pretty much the only thing of note I’ve encountered. But yes I just mean it may not be a perfect drop in replace in all existing scripts at this time for jq like tools for other formats since they will likely take a lot of care in having the encoder for their designated format working well. qq still has a few bugs to iron out and more testing to do.
arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
Understandable it's good to ask this bluntly as it's not very clear by title alone.

qq currently supports hcl/tf, csv, ini, json, toml, xml and yaml. On the roadmap there are more to come soon such as protobuff, html. as it currently stands yq and qq don't support all the same formats as one another. A few examples:

- qq supports hcl but yq does not.

- yq supports lua, qq does not.

- qq and yq have different quirks in marshalling and unmarshalling data. For instance yq only supports toml output with scalars and on the other hand there's a lot of room for refinement with qq's encodings as of the moment.

qq's goal is to have a very comprehensive set of encodings many of which are yet to be included or represented in a single tool (qq will not cover most binary formats however). It also has a interactive query mode with auto-complete which is pretty handy on top of having a unique and growing set of formats supported.

arandomhuman··on Show HN: Qq: like jq, but can transcode between many formats
This is still under a lot of change, expect more formats to be supported along with some general improvements to interactive mode and autocomplete.
arandomhuman··on The Loneliness of the Mid-Level Vimmer
Similar to the author, Telescope really got me to stop using the file tree and really begin to prefer neovim over vscode (well that and the amazing language server support).
arandomhuman··on Terraform Cloud Pricing Changes Sticker Shock
Just use Atlantis, it’s really great. My company switched from Terraform Cloud to maintaining an Atlantis instance and it made things so much smoother, and it’s OSS.

https://www.runatlantis.io/

arandomhuman··on Even a laptop can run RAM externally thanks to CXL
How's the latency with these vs on board memory?
arandomhuman··on “Most notorious” illegal shadow library (LibGen) sued by textbook publishers
The word "shadow library" was dropped quite a few times in this. I hate how terminology like this is used to frame discussions in favor of the publishers. At the end of the day, this is just a simple matter of exchanging information over the internet, which should be free.
arandomhuman··on Bye Bye Ubuntu, Hello Manjaro. How Did We Get Here?
Using Arch is a dream compared to things like Ubuntu for me. PPAs and release cycles made upgrades awkward on Ubuntu. I've been a user for 3 years on my work laptop and have had everything be almost completely painless. (One time yay broke something and a python module had to be removed lol)
arandomhuman··on Bye Bye Ubuntu, Hello Manjaro. How Did We Get Here?
Arch does "just work" it's more of an issue with booting from a live image you are encountering by the sounds of things. Ironically your preferred OS is derivative of Arch and considered less stable by many users of both systems.
arandomhuman··on Thinking of games as databases
Most single player games are not "true games". They are puzzles. This is also how players perceive them.

This is definitely news to me, I have not ever met someone who feels this way who plays videogames.

arandomhuman··on Kids who get smartphones earlier become adults with worse mental health
I feel like this is a bit unusual: "I told them they can get one when they write an app"

Why are you insisting that they publish an app on the app store, are they keenly interested in software development or something?

arandomhuman··on FTX founder Sam Bankman-Fried’s two bond guarantors unsealed, ties to Stanford
> You can just look at the games that rich black republicans have to play to stay in the club.

Not refuting what you are saying, but could you elaborate on this statement?

arandomhuman··on A celebration of roguelike games
I recently saw a really fun and informative talk on procedural generation from their YouTube channel by a well known developer in the community https://youtu.be/TlLIOgWYVpI.

There's tons of interesting talks there if (traditional) roguelikes or their development really pique your interest.

arandomhuman··on SpaceX said to fire employees involved in letter rebuking Elon Musk
> Are you saying that academia is "not the real world" ?

If you are attempting to compare liberties those in academia have to corporate employees e.g. most people who are employed, no its not like the "real world".

arandomhuman··on Review of Internet for the People: The Fight for Our Digital Future
The author has some agency in the quality of the website due to his expertise and subject matter of the article. Food for thought https://motherfuckingwebsite.com/
arandomhuman··on Review of Internet for the People: The Fight for Our Digital Future
I don't see how my comment was proposing an argument to the content within the article. It was merely a criticism and would hope to it interpreted as such. Wouldn't be nice to see a higher level of quality and consistency in commentaries like this, especially when the title is as ambitious as something as 'fighting for the digital future'?

I don't mean to sound rude, but your response sounds a bit presumptuous and complacent with hypocrisy.

arandomhuman··on Review of Internet for the People: The Fight for Our Digital Future
While that is true, and the author seems biased supporting some degree of federal/international government ownership of the internet while also having borderline satirical levels of tracking, popups and subscriptions on their site. I think saying that the internet is completely healthy at the more abstract level of humans communicating to each other without borders would be incorrect.

Search engines funnel the typical 'surfer' into platforms rife with newsfeeds algorithmically curated to influence them for engagement or garbage SEO spam networks attempting to get every last cent of advertising revenue they can acquire. There is a genuine issue with discoverability on the internet directing people towards content that is meaningful.

arandomhuman··on Review of Internet for the People: The Fight for Our Digital Future
I was not familiar with the publisher posting this article, but briefly overlooked your comment before opening the link. At first glance, I was amused, genuinely thinking this article/website a interesting parody of making a website with all the dark patterns and implementation of sign-up-to-mailing-list/tracking/shopping/subscription/etc. and was excited thinking it was awesome someone was so aware of the problems with the internet today they encapsulated the issues into the website itself satirically.

But upon clicking around around further the author was indeed completely unaware of the irony of its own article.

← PreviousPage 3 of 3