Hacker News new | ask | show | jobs
by KirinDave 3631 days ago
Powershell accomplishes this by making the pipes pass tagged objects around containing streams. This actually has a lot of nice properties when you go to manipulate the objects programatically.

And it's a logical extension of the UNIX stream model, where in reality you're passing around a whole heck of a lot more than text when you type 'cat | sed'. You're passing environment context, multiple streams, etc.

The idea that this is "more complex" than unix pipes is understandable, but the reality is that IPC is pretty complex and a whole lot of magic and shared expectations go into the "simplicity" that bash offers. And even then that model breaks down all the time (e.g., as Docker becomes common as a deploy target the idea that you should output error conditions to STDERR has rapidly become problematic).

1 comments

I do not understand what is the problem when using Docker. Please explain?
It's somewhat involved, but life is a lot easier if your Docker containers just log everything to stdout, when you go to ship software that uses them.

Stderr is sort of an annoying detail. Especially given how inconsistent output to it is and how it has different rules for how output flushes.