Fixed output challenges usually state that the program "must take no input". I usually interpret this as "The standard input is empty", but after thinking about this, there are actually several valid interpretations:
- The program has to ignore the standard input, that is, it should work regardless of what is given as input.
- The program has to work only when an empty stream is piped into the standard input.
- The program has to work without piping anything into it. It may block for user input, but can expect the input to be empty.
- The program has to work without piping anything into it and it must not block for user input.
There are probably even more interpretations. The last three are worth distinguishing: for instance, my own language Retina was until recently not able to prevent blocking for user input when nothing was piped in - so to really run it without any input one had to do
echo "" | ./Retina -s program.ret
I imagine there are other languages which have this limitation.
So what should the default meaning of "your program must take no input" be?
(There was a related discussion for languages which plainly incapable of executing any code at all if no input is given.)