News for hackers. Stuff that matters.
Re:Bringing the Unix philosophy to the 21st century (2019) by kbrazil on Sunday August 22, 2021 @01:51PM (#28267762)
Yes, I have seen those too! That’s why I also wrote Jello, which is like jq but uses pure python without the boilerplate. Python is nearly universal now and typically easy to read, though more verbose. Jq is just as much a write-once tool as awk and perl for more complex queries. For simple attribute calls, though, it’s both terse and readable.
Re:Bringing the Unix philosophy to the 21st century (2019) by hnlmorg on Sunday August 22, 2021 @05:16PM (#28269701)
This is why I wrote murex shell (https://github.com/lmorg/murex), it's an alternative $SHELL, so you'd use it in place of Bash or Zsh, but it's optimised for modern DevOps tools. Which means JSON and YAML are first class citizens.

It's syntax isn't 100% POSIX compatible so there is some new stuff to learn but it works with all the existing POSIX tools and is more readable than AWK and Perl but while also being terse enough to write one liners.

Re:Bringing the Unix philosophy to the 21st century (2019) by NegativeLatency on Sunday August 22, 2021 @04:19PM (#28269201)
I wrote something similar by description in ruby, I’d be curious to see your python implementation.

I considered python but Ruby’s easier chaining with map/filter/etc made it easier for me to use when writing just one line with it to transform some json.

https://github.com/nburns/utilities/blob/master/rson

Re:Bringing the Unix philosophy to the 21st century (2019) by kbrazil on Sunday August 22, 2021 @04:28PM (#28269291)
Sure thing!

https://github.com/kellyjonbrazil/jello

Other languages are superior in their handling of maps/arrays, but Python is just so damned popular now I thought it was a good choice to democratize JSON handling.

https://blog.kellybrazil.com/2020/03/25/jello-the-jq-alterna...