4 ms·
The principles are good, the implementation sadly is not. Plain data streams have outstayed their welcome. Pretty much nothing but the classic old Unix tools c
by dale_glass 3y ago
The principles are good, the implementation sadly is not.
Plain data streams have outstayed their welcome. Pretty much nothing but the classic old Unix tools communicates with plain text streams. Smarter, new commandline tools tend to provide at least JSON, but there's plenty that don't and that makes them absolutely painful to reuse. I've written large amounts of code that amount to running a process, parsing its output, and then translating that to the actual API I want: methods and events. Basically all that work is a waste that doesn't actually get what I want done.
Of all things, Microsoft had a better idea with Powershell: it does the same concept, but far better.
The internet has seen something similar: a huge amount of users take a TCP socket and proceed to build an improvised messaging protocol on top, because that actually fulfills the needs of many applications far better, yet the API doesn't actually provide it.
IMO, there's been too much Unix philosophy worship. We've stuck to an early, simple idea and on the long term it's a huge detriment. Since it's so lacking, everyone builds their proprietary hacks on top.
- pjmlp 3y agoNot only Microsoft, Powershell ideas can be traced back to Xerox PARC REPLs across Smalltalk, Interlisp-D and Mesa/Cedar, or the keyboard+mouse+REPL from Oberon. Also some influences from AmigaDOS and IBM's REXX.
- lioeters 3y ago> classic old Unix tools communicates with plain text streams. Smarter, new commandline tools tend to provide at least JSON And JSON is plain text. If new tools agree to communicate by passing JSON around, it would be in the spirit of the UNIX principles.
- spkm 3y agoFully agree. Also, jq exists, a simple example how open and simple interfaces (text streams) allow for extensibility. There is a reason why so much is built on top of "simple terminals".