Quantcast
Channel: Write a Stack Exchange compliant brainfuck explainer - Code Golf Stack Exchange
Viewing all articles
Browse latest Browse all 17

Answer by a stone arachnid for Write a Stack Exchange compliant brainfuck explainer

$
0
0

C (clang), 191 188 bytes

-3 thanks to @ceilingcat

*S="><+-.,[]";i;l;d;f(char*a,**e){for(i=5,l=printf("    %s \n",a);*a;printf("%*s%s\n",l-i,"",e[d?d-(int)S:8]))for(d=index(S,*a),printf("%*c",i++,*a);!d&!index(S,*++a);)i+=write(1,a,*a>0);}

Try it online!Assumes explanations are in the order > < + - . , [ ] NOP.


Viewing all articles
Browse latest Browse all 17

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>