News for hackers. Stuff that matters.
Re:Dt: Duck tape for your Unix pipes by euroderf on Friday July 14, 2023 @11:38AM (#36725545)
What if most standard Unix commands had a new option to insert into their output those nifty separators ? (FS, GS, RS, US)

That ought to make life simpler for downstream commands that try to go beyond processing a text stream.

Re:Dt: Duck tape for your Unix pipes by skissane on Friday July 14, 2023 @06:48PM (#36730991)
> What if most standard Unix commands had a new option to insert into their output those nifty separators ? (FS, GS, RS, US)

That's not what I mean by record-oriented IO though. That's signalling record boundaries in-band. I'm talking about signalling them out-of-band. So you have record lengths kept separately from the data, and passed around by APIs separately from the data bytes.

Re:Dt: Duck tape for your Unix pipes by euroderf on Saturday July 15, 2023 @04:32AM (#36734792)
I've had the same idea. It would (I guess) rewriting the kernel from the ground up to turn every stream into two streams ?

Telecoms uses both concepts (in-band signaling and out-of-band signaling) but I guess the Unix developers didn't get the memo ?

Re:Dt: Duck tape for your Unix pipes by skissane on Tuesday July 18, 2023 @07:08PM (#36780228)
> I've had the same idea. It would (I guess) rewriting the kernel from the ground up to turn every stream into two streams ?

Many (but not all) Unix implementations already have support for “record-oriented pipes” in the kernel, it is just that support has rarely been used. Linux has record-oriented Unix domain sockets (SOCK_SEQPACKET), but few use them.

> Telecoms uses both concepts (in-band signaling and out-of-band signaling) but I guess the Unix developers didn't get the memo ?

The original Bell Labs Unix team created STREAMS, which does support true record-oriented IO. Most commercial Unix implementations (such as Solaris and AIX) support it (or at least did at one point). But Berkeley Sockets won the mindshare competition, and open source Unix-likes (such as Linux and BSDs) never added streams support. There was a project to add it to Linux, but Linus was opposed to the idea, so it never got merged, and I think it has since been abandoned.

Even before STREAMS, Unix supported record-oriented IO in the terminal subsystem (cooked mode). But it wasn’t general, it was very specific to the needs of interactive use. STREAMS was intended as a generalisation but it never caught on. So even today all Unix-likes have a purpose-specific (rather than general) record-IO implementation in their tty subsystems, pseudoterminals, etc

Re:Dt: Duck tape for your Unix pipes by euroderf on Wednesday July 19, 2023 @03:22AM (#36783077)
It sounds like the situation is ripe for a couple of dedicated (crazed) developers to pick up the ball.