Communication aspects of interactive mode to stderr

Issue #643 new
Willem Van Onsem created an issue

Most programs with an interactive mode (swipl, gnuplot, ...) use the stderr instead of the stdout for communication aspects. For instance the > marks for the terminal. Only commands who call for output (like print) feed the stdout...

Doing this makes it easier to use the output of one program and feed it as input to the second program...

Comments (3)

  1. Broes De Cat

    As far as I know, this is only the case in interactive mode? Or are there specific use cases we missed? Is there a use-case to pipe interactive mode?

  2. Willem Van Onsem reporter

    Yes, my interactive renderer :D (I solved it although in a less elegant way). Another one: say for instance I have a theory, and I want to do something without knowing the exact theory in advance, I might write a file (bar.prgrm) and the result is then written to another file using idp -i foo.idp < bar.prgrm > result...

    One could for instance immediately draw the structure by performing something like: idp -i foo.idp < bar.prgrm | clang | idpdraw. If you look at the demo.sh file, the result is first written to a file, then clang produces another file and finally the content is given to the idp-draw program. A lot of useless I/O...

  3. Log in to comment