piping binary files sometimes fail
I'm having this random bug , sometimes code succeed, sometimes not. It must be noted that I had to choose 5000 to exploit the randomness of it With 10000 it always fail, with 100 it always succeed. Also substituting "take 5000 fibs" with [0..5000] it always succeed, probably because it's much faster.
This is the console output, for 2 consecutive shots. Notice that faster machines, or different kernels could need a different 5000, or never show the bug.
paolino@paolino-desktop:~$ ./prod | cat |./cons 5000 paolino@paolino-desktop:~$ ./prod | cat |./cons cons: <stdin>: hLookAhead: invalid argument (Invalid or incomplete multibyte or wide character)