I whole heartedly agree with ssokolow .
I would also go so far as to say that the much meme'd "many small programs that communicate over stdin/stdout with pipes in between" concept was never a particularly wonderful idea, and arose at the time because C was difficult to link to libraries.
The truth is that while stdin/stdout are adequate for the most basic interactive console applications, attempting to shove any significant amount of data through it will bring it to it's knees. It doesn't even require all that much, if you attempt to write a console game thinking it will be easier because you don't have to deal with assets and whatever else, you'll very quickly run into learning you need to batch your writes to stdout rather than just naively writing to the screen line by line. To further underline how dramatic the effect of using stdin/stdout as an IPC method is... I have some utilities I wrote for use at work but as it turned out doing:
caused the utility to take 15 minutes or more to process the file, simply adding an -o flag to the utility and directly writing the output to a file brought the time down to a matter of seconds.
once you realize that it rather quickly becomes obvious that writing against libraries rather than programs is much more ideal, especially as regards things like text processing.
I would also go so far as to say that the much meme'd "many small programs that communicate over stdin/stdout with pipes in between" concept was never a particularly wonderful idea, and arose at the time because C was difficult to link to libraries.
The truth is that while stdin/stdout are adequate for the most basic interactive console applications, attempting to shove any significant amount of data through it will bring it to it's knees. It doesn't even require all that much, if you attempt to write a console game thinking it will be easier because you don't have to deal with assets and whatever else, you'll very quickly run into learning you need to batch your writes to stdout rather than just naively writing to the screen line by line. To further underline how dramatic the effect of using stdin/stdout as an IPC method is... I have some utilities I wrote for use at work but as it turned out doing:
Code:
foo bar.txt > baz.txt
once you realize that it rather quickly becomes obvious that writing against libraries rather than programs is much more ideal, especially as regards things like text processing.
Comment