Pathological Programming in SNUSP
I have a pretty keen interest in programming languages, and sometimes this leads me to esoteric or even perverse extremes. For instance, I had fun with brainfuck for a while, even writing a compiler for the language that fit in my .signature file:
#define P(C,X)case C:printf(#X);break; /* bftoc.c by markv@pixar.com */ main(){int c;printf("char a[9999];main(){char*p=a;");while((c=getchar())>=0) {switch(c){P(62,p++;)P(60,p--;)P(43,++*p;)P(45,--*p;)P(46,putchar(*p);)P(44, *p=getchar();)P(91,while(*p){)P(93,});}}printf("exit(0);}");exit(0);}
For an interesting complication of this idea, surf on over to the Good Math, Bad Math blog and check out
Pathological Programming in SNUSP. It’s… well, I think it’s pretty cool.
[tags]Brainfuck,SNUSP,Good Math,Esoteric Programming Languages[/tags]
Addendum: I coded up a SNUSP interpreter in about an hour, which draws the program on the screen and animates the position of the program counter using curses. It’s kind of interesting to watch programs execute, particularly the Ackerman’s function, which has the unique attribute of somtimes executing loops in a clockwise direction, and other times executing them in the reverse direction.
I suspect the world would be better if that percentage were even greater.
Apparently 15% of all web traffic is cat related. There's no reason for Brainwagon be any different.
Thanks Mal! I'm trying to reclaim the time that I was using doom scrolling and writing pointless political diatribes on…
Brainwagons back! I can't help you with a job, not least because I'm on the other side of our little…
Congrats, glad to hear all is well.