17 ms·
> 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 str
by haberman 14y ago
> 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.
- Arelius 14y ago> I'm just proposing a structured stream of data instead of an unstructured one. That's basically what an API is.
- mattdeboard 14y agoYou are confusing the "how" (the API specification) with the "what" (the data the API exists to provide access to).
- Arelius 14y ago> 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
- darkarmani 14y agoSo things like CSV, XML, and JSON are APIs now?
- 205guy 14y ago> 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.
- darkarmani 14y agoHis 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.