Talk:Malbrain

Much prefer this syntax ...

.::.........::::.:::.:........::::::.:::.::::.::.:::.::::. ::.......::::.:::.:....::::::.:::.::::.::.:.::.::::::....... ::..::::::...::.::::...::........::::.:::.:....::::::.:::.::::. ::.:::.::::...::..........::::.:::.:.........::::::.:::.::::.::. ::...:.:::::....:::.::::::...::.:::::::......:.:::::::........:. ::::..::.::.

External Links broken
All the external links are broken, and unavailable via archive.org. - Paul2520 (talk) 03:18, 14 May 2015 (UTC)


 * Okay, here's a compiler implementation, it converts malbrain to C (ish!!) ...

1i\ int mem[30000];int main{register int*m=mem; $a\ _ s/[^>.]//g y/>./NE/ H g s/\n//g s/^N/l/ s/^E/rE/ t nxtl :nxtl s/^rN/l/ s/^lN/u/ s/^uN/d/ s/^dN/o/ s/^oN/i/ s/^iN/b/ s/^bN/e/ s/^eN/r/ t nxtl h s/^\(.\)E.*/\1/ t prti b dele :prti p g s/^\(.\)E/\1/ t nxtl :dele d
 * 1) include\
 * 2) define b while(*m) {\
 * 3) define i {int (_c) = getchar; if(_c!=EOF) *m=_c; }\
 * 4) define o putchar(*m);\
 * 5) define d --*m;\
 * 6) define u ++*m;\
 * 7) define l m-=1;\
 * 8) define r m+=1;\
 * 9) define e }\
 * 10) define _ return 0;}\
 * Rdebath (talk) 07:08, 15 August 2015 (UTC)


 * Cool. How do you compile it? I tried with gcc, but that didn't seem to work. Paul2520 (talk) 12:50, 5 September 2015 (UTC)
 * Heh, heh. Okay, it's a sed script. Use it like this ...

 $ sed -f malbrain.sed HellowWorld.mb > hw.c $ gcc -o hw hw.c $ ./hw Hello World! 
 * Rdebath (talk) 17:07, 5 September 2015 (UTC)