Brainfuck FIXED by murky-satyr

for(A=[O=b=c=''];l=readline();)b+=l+0;[b,I]=b.split('!')
for([,$]in b)(t={'>':'++P','<':'--P','+':'A[P]=-~A[P]','-':'A[P]=~-A[P]','.':'O+=String.fromCharCode(A[P])',',':'A[P]=I.charCodeAt(X++)','[':'while(A[P]){',']':'}'}[$])?c+=t+';':P=X=0
eval(c)
print(O.replace(' W',', w'))

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

download

return to the top page