News for hackers. Stuff that matters.
Re:Rob Pike: "Current Unix tools are weakened by the built-i... by haberman on Thursday June 14, 2012 @04:42PM (#4113424)
> The direction you're suggesting we take things is, in fact, a fuller API.

Nothing about my proposal has anything to do with an API. I'm just proposing a structured stream of data instead of an unstructured one.

> They're slower and worse.

I am proposing avoiding a serialize/parse step between every pair of pipeline elements (or using a more structured/optimized format if a serialization step is desired). Doing less work cannot possibly be slower.

> The amazing thing about text is that it's a lowest-common denominator. Think of communicating with a person.

Communicating with a person is an endless process of content negotiation. What are you and I talking about? Using our interface of plain text, we could be talking about literally anything. I could suddenly start talking about kumquat farming in Russia. At that point you could decide to follow suit and weigh in with your opinions on kumquat farming, or you could stop talking to me altogether because I've gone off-topic. If I start speaking complete jibberish, you could try to learn the language that I'm speaking, or you could start doing something equally nonsensical.

You and I can respond to unexpected communications in useful ways because we are fully autonomous, intelligent, sovereign beings that are capable of learning, creativity, and curiosity. I don't know about you, but I don't want my software to be autonomous or react to unexpected situations in unpredictable ways.

Data processing software should be as simple, predictable, and deterministic as possible. To use your example, if I somehow got an email address in my list called "send $1000 to Lucy," I don't want PayPal to decide to get smart and interpret the invalid email address as a command to send money to Lucy.

Re:Rob Pike: "Current Unix tools are weakened by the built-i... by 205guy on Friday June 15, 2012 @07:12AM (#4115926)
> Communicating with a person is an endless process of content negotiation. What are you and I talking about?

Right. So how does grep know it's talking to ls about dir contents with a (disk) size field and not talking to ps about process table contents with a (mem) size field? Some sort of slower content negotiation, I presume.

> cannot possibly

I suggest that every time you think that, you double-check your assumptions. In this case, I think you're just pushing all the extra hard work off onto some other part of the algorithm.

Re:Rob Pike: "Current Unix tools are weakened by the built-i... by darkarmani on Friday June 15, 2012 @12:36PM (#4117332)
His point is that he's pushing off the extra hard work to be done only once, rather than at every pipe. I'm not sure how he needs to recheck his assumptions there since he stated them.
Re:Rob Pike: "Current Unix tools are weakened by the built-i... by Arelius on Thursday June 14, 2012 @08:12PM (#4114274)
> I'm just proposing a structured stream of data instead of an unstructured one.

That's basically what an API is.

Re:Rob Pike: "Current Unix tools are weakened by the built-i... by darkarmani on Friday June 15, 2012 @10:11AM (#4116546)
So things like CSV, XML, and JSON are APIs now?
Re:Rob Pike: "Current Unix tools are weakened by the built-i... by Arelius on Saturday June 16, 2012 @02:45AM (#4120033)
Can any of those not be an interface to an application layer?
Re:Rob Pike: "Current Unix tools are weakened by the built-i... by haberman on Saturday June 16, 2012 @02:54PM (#4121315)
Plain text also "can be an interface to an application layer" (see SMTP, IMAP, POP, etc). Your argument is meaningless.
Re:Rob Pike: "Current Unix tools are weakened by the built-i... by mattdeboard on Thursday June 14, 2012 @10:08PM (#4114592)
You are confusing the "how" (the API specification) with the "what" (the data the API exists to provide access to).
Re:Rob Pike: "Current Unix tools are weakened by the built-i... by Arelius on Saturday June 16, 2012 @02:47AM (#4120036)
> I'm experimenting with the idea of letting people specify the output of command-line utilities as a Protocol Buffer schema, for example:

Looks like an API spec to me