News for hackers. Stuff that matters.
Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by mason55 on Friday June 05, 2020 @05:36PM (#23434291)
Yes, you can re-write it without using cat, but many people (including me) think it's clearer to read from left-to-right. Plus the mixing of sending the file through stdin and then using a pipe always makes my brain pause.

I just personally find that using cat as the first part of the pipeline makes everything easier.

Plus, if you're going to argue against useless use of cat, there's also no reason to send the file in through stdin. jq can read the file directly.

Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by hombre_fatal on Friday June 05, 2020 @08:14PM (#23435498)
Agreed. Keeping the source on the far left (whether cat or curl) just makes things easiest to follow.
Re:Show HN: Jqview, a simple native GUI for inspecting JSON ... by amake on Friday June 05, 2020 @10:08PM (#23436189)
You can put `<json` on the left no problem.

(But it makes the pipeline harder to edit so actually I have no problem with `cat JSON`)