News for hackers. Stuff that matters.
Re:Show HN: gq – like jq or zq, but you use Go by IceWreck on Wednesday April 27, 2022 @02:44PM (#31184080)
Can someone explain why people are creating so many CLI tools (with a very weird and custom syntax) to extract JSON using a very complicated one line command when you can make one off scripts to do the same using python/go/ruby/node/whatever ?
Re:Show HN: gq – like jq or zq, but you use Go by UncleEntity on Wednesday April 27, 2022 @03:04PM (#31184349)
I wrapped boost::property_tree in a python module to read in a rss xml feed and store the items in a json file to track the TV shows I download all because the pure python version was kind of slow.

The amount of time I spent on getting all that working is probably a lot less than waiting a few extra seconds on a python script I run every few days so…

Re:Show HN: gq – like jq or zq, but you use Go by NAR8789 on Wednesday April 27, 2022 @04:07PM (#31185077)
oneliners are generally nicer for fast data exploration than one-off scripts. With a oneliner I can get started instantly, and build incrementally. With a one-off script my first step is boilerplate input handling.

Maybe a nice middle ground would be for more language runtimes to have an equivalent to perl's `-p` flag. https://perldoc.perl.org/perlrun#-p

This flag is so convenient that I mostly use `perl -pe` instead of `sed` for regex search-and-replace.

Re:Show HN: gq – like jq or zq, but you use Go by QuikAccount on Wednesday April 27, 2022 @02:48PM (#31184137)
I'd argue that it is less about practicality and more about learning a language by recreating a CLI tool.