Rule 30 by uru

var a,b,c:char;begin
repeat
a:=b;b:=c;read(c);write(chr(35-3*ord((a+b+c>'#  ')|(a+b+c='   '))),'#':ord(eof))until 1=0end.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page