News for hackers. Stuff that matters.
Re:What should a new OS have? by skissane on Friday November 27, 2020 @06:51AM (#25227884)
> I worry that detailed knowledge that results from everyday use of an OS for things like VMS, mainframe OSes, OS/2, Beos, NeXT, Plan9, etc will begin to die off, and UNIX monoculture will consign all other OS ideas to the scrap heap of history.

One idea I suggest people look at is CMS Pipelines (aka Hartmann pipelines). John Hartmann of IBM ported the concept of pipelines from Unix to VM/CMS, but in the process made a couple of major changes: (1) made the pipes record-oriented (they aren't just an unstructured stream of bytes, they have message/record boundaries); (2) made it arguably easier (compared to Unix shells) to build complex pipeline structures with multiple inputs and multiple outputs.

> More simply, I'd like a JSON output option for every unix command. The fact you STILL can't parse ls -la is a crime.

I think Unix pipes could be enhanced to have an out-of-band channel for transferring metadata, content negotiation, etc.

If I do command1 | command2, command1 should be able to send an out-of-band message "here is the MIME type of my output". If command2 knows how to receive these messages (an ioctl? ancillary data/cmsg on recvmsg?) then it can respond appropriately; if it doesn't know, well that's the same situation as at present.

A more advanced idea would be that command1 would send a message saying "I can provide output in these formats". If command2 is enhanced to support this, it can send back a message to command1 over the control channel saying e.g. "send me application/json please". There would have to be some way for the OS kernel to notify command1 if command2 doesn't understand. (e.g. if command2 doesn't call IOCTL_RECEIVE_PIPE_METADATA on the input fd before the first time it reads from it, the OS kernel synthesises an "I don't understand pipe metadata" control message back to command1)

There are no comments on this comment yet.