Skip to content

Instantly share code, notes, and snippets.

%c=qw(XX $p++ XZ $p-- XY D++ YX D-- ZY D&=255;while(D){ YZ D&=255;} YY print+chrD ZZ D=ord(getc) ZX print+join(",",@b),"\n");
$/=$,;$_=<>;s/[XYZ]//g;s/\(\.\)/X/g;s/\[\.\]/Y/g;s/{\.}/Z/g;s/[^XYZ]//g;s/../$c{$&}; /g;s[D]'$b[$p]'g;eval;
=begin comment
/* From: https://gist.github.com/ELLIOTTCABLE/402586 */
/* I wrote “Hello, world!” for whatever mad, mad genius wrote this version of Brainfuck:
http://pastie.org/private/siw6uoan1cd6shuao7r8hw (dead link)
*/
(.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] {.}[.] (.)(.) (.)[.] (.)[.] (.)[.] (.)[.]