Talk:Malbrain
		
		
		
		Jump to navigation
		Jump to search
		
Much prefer this syntax ...
.::.........::::.:::.:........::::::.:::.::::.::.:::.::::. ::.......::::.:::.:....::::::.:::.::::.::.:.::.::::::....... ::..::::::...::.::::...::........::::.:::.:....::::::.:::.::::. ::.:::.::::...::..........::::.:::.:.........::::::.:::.::::.::. ::...:.:::::....:::.::::::...::.:::::::......:.:::::::........:. ::::..::.::.
--(this comment by Rdebath at 13:54, 25 August 2013 UTC; please sign your comments with ~~~~)
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\
#include<stdio.h>\
#define b while(*m) {\
#define i {int (_c) = getchar(); if(_c!=EOF) *m=_c; }\
#define o putchar(*m);\
#define d --*m;\
#define u ++*m;\
#define l m-=1;\
#define r m+=1;\
#define e }\
#define _ return 0;}\
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
- $ sed -f malbrain.sed HellowWorld.mb > hw.c $ gcc -o hw hw.c $ ./hw Hello World!