p.s.
Well, actually more completely, something like this:
+---------+
[meta-in] --> | | --> meta-out
| p r o c |
input ==> | | ==> output
+---------+p.s.
Well, actually more completely, something like this:
+---------+
[meta-in] --> | | --> meta-out
| p r o c |
input ==> | | ==> output
+---------+https://unix.stackexchange.com/questions/197809/propose-addi...
The idea is that some output is metadata (such as ps headers) and some is data. With stdmeta we could differentiate between the two.
TBH, it's a great idea, but history proved that we apparently prefer a single stream of data and solving all the problems it brings ...
TCP/IP streams are bidirectional, but there is a limited way of sending "out of band" data, though it is not used as much. It would have been nice if the stdout/stderr multiple streams extended to TCP/IP networking and even HTTP messages too.
It's not real "out of band" data: that's something wholly invented by the Unix socket API. TCP itself just has an "urgent pointer", which addresses some byte further in the data stream that the receiver doesn't have yet, with the intent that higher-level protocols could use it as a signal to flush any data up to that pointer to observe whatever the urgent message is. There's nothing in the protocol itself to actually send a message separately from the rest of the stream.
So, well then: allowing programs to consume and emit JSON - is this progress ?
A plain byte stream can be easily aligned to work with any future or past encoding fashion. Consider the situation if them that designed unix had not been so aggressively minimal. We would probably be complaining how streams had to be ASN1 encoded and how much a pain it is to define the schema for what should be a simple ad-hoc data transfer.
As it stands, you can put whatever object format you want on top of the stream. I think it is the same with the files. I am sort of pleased we are not stuck with some obsolete no longer relevant, screwball structured format from the 70's that all our file have to conform to. instead our file are a simple range of bytes and we can impose whatever structure on them that we want.
https://www.lispworks.com/documentation/lw50/CLHS/Body/v_deb...
https://www.lispworks.com/documentation/lw50/CLHS/Body/v_ter...
p.s. That is pL(n).stderr -> pE.stdin, where pL is the 'business logic' and pE is the system's error processing aspects. I.e. the error processing component's stdin is the stderr of the logical processes (Lp), so there is a uniform process model applicable to both logical and error processing elements of the pipeline.
The issue is how to do this within the limits of line terminal interface (CLI). In code (as in in-process chaining) that aspect is a non-issue.