joey@darkstar:~>echo "+>><<[>>,.<<]" | hsbrainfuck
Killed
Strace shows the program sitting in some kind of tight loop,
including:
select(2, [], [1], NULL, {0, 0}) = 1 (out [1], left {0, 0})
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
8096) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
+++ killed by SIGKILL +++
I'm unclear why it gets a SIGKILL; it does not seem to run out of memory.
The brainfuck program was generated using brainfuck-monad,
with this haskell code.
cat = brainfuckConstants 1 $ flip forever $ input >> output
AFAICs that should just print to stdout what's read from stdin.
The program works when run in beef(1).