Hacker News new | ask | show | jobs
by Tarean 3709 days ago
It is more that unix shells are built on piping and piping is systematically broken in unix shells. It just becomes extremely obvious after using for powershell for any time which doesn't require most of the work to scrap and rewrite ouput to make it compatible withan other program.

Doing piping well is extremely hard and basically requires that all commands give metadata about their arguments but doing it better wouldn't be all that hard.

You could do the same thing with text streams but structured piping would be a lot harder. If all programs would read and write something like json or msgpack and have a unified argument parser and dumper working with the shell would be a lot easier and faster.

1 comments

I'm not really sure what you mean when you say "piping is systematically broken". It sounds like you might be trying do something that isn't really meant for piping. The general idea behind UNIX programming is that projects should be broken down into small, simple programs that rather than overly complex monolithic programs[1][2].

See also my reply to blakeyrat[3].

[1] http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id...

[2] http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id...

[3] https://news.ycombinator.com/item?id=11547241