News for hackers. Stuff that matters.
Re:The Rule of Silence (2006) by TeMPOraL on Tuesday December 13, 2016 @08:07AM (#13166473)
Well, I'm advocating for structured text, not binary. Mostly because I haven't seen a future-proof binary format yet, and editing binary formats indeed would require special tooling. I think - for a data exchange protocol meant to be used between many applications - going structured text instead of binary is a worthwhile tradeoff of little lower efficiency vs. much better accessibility.

EDIT: Some comments here are slowly making me like the idea of a standard structured binary more and more.

Re:The Rule of Silence (2006) by ryandrake on Tuesday December 13, 2016 @10:08AM (#13167291)
Let's say I want to know how many days since an asset on my web server has been modified. With bash + some standard unix tools, from the top of my head I have to do something like this:

    curl -svo /dev/null http://example.com/file 2>&1 | grep Last-Modified | cut -d ' ' -f 3-
And that's just to get the last modified date in text form. Now I'm writing a script that parses that date and gets today's date, convert them to days, and subtract. YUCK!

Wouldn't it be nice if your shell could do this?

    curl(http://example.com/file).response_headers.Last-Modified.subtract(date().now).days
I think it would be nice.
Re:The Rule of Silence (2006) by qwertyuiop924 on Tuesday December 13, 2016 @01:20PM (#13169097)
Yes, but as it stands, most of those would have to be builtins for that to work. I would rather have:

   curl -j example.com|select headers.Last-Modified|time before now|time to days
Where the commands send and receive JSON.
Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @09:46AM (#13167099)
Can you name me a single UNIX configuration file whose format is not "structured"?
Re:The Rule of Silence (2006) by TeMPOraL on Tuesday December 13, 2016 @10:27AM (#13167445)
Config files are less of a problem. The issue is with programs, which you want to use with pipes. Each has its own undocumented, arbitrary pseudo-structure with often inconsistent semantics, optimized for viewing by user.
Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @10:40AM (#13167558)
What programs are you thinking of? Maybe this is my sysadmin bias but about 90% of my UNIX tools usage is on config files...
Re:The Rule of Silence (2006) by JdeBP on Tuesday December 13, 2016 @11:08AM (#13167805)
Let me suggest an incendiary example: systemd

systemctl status wibble.service : Displays human-readable information, with colours, line drawings, and variable-length free-form text; that is exceedingly hard for a program to parse reliably.

Contrast with

systemctl show wibble.service : Outputs machine-readable information, in systemd's favourite form of a Windows INI file.

Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @11:11AM (#13167823)
Yikes. Makes me glad I run Slackware. Though I seem to recall from The Init Wars that it was precisely this quality of SystemD that made people lob the charge that it violated the "Unix philosophy"
Re:The Rule of Silence (2006) by TeMPOraL on Tuesday December 13, 2016 @02:30PM (#13169968)
ls, ps, du, df, ... pretty much all CLI tools. The kind you use in scripts.
Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @03:44PM (#13170801)
All four of which users are enjoined, over and over again, not to try to parse the output of (particularly ls). That is, those are the tools specifically not meant to be connected by pipelines, but merely used for operator convenience.
Re:The Rule of Silence (2006) by qwertyuiop924 on Tuesday December 13, 2016 @05:17PM (#13171666)
...But how do you extract that data otherwise?
Re:The Rule of Silence (2006) by bandrami on Wednesday December 14, 2016 @08:25AM (#13175743)
Instead of ls, find. Instead of ps, you parse the nodes in the /proc filesystem that ps itself parses. Ditto the /sys filesystem and du/df.
Re:The Rule of Silence (2006) by qwertyuiop924 on Wednesday December 14, 2016 @01:30PM (#13178365)
When those tools were written, /sys and /proc didn't exist.