Answer by Misha Lavrov for Generating Brainf*** NOPs
Wolfram Language (Mathematica), 224...
View ArticleAnswer by Tyilo for Generating Brainf*** NOPs
Python 3, 177 bytesfrom random import*n=int(input())r=[0]*n*3p=0a=[43,45]s=choices(a+[60,62],k=n)for c in s:p+=~c%2*(c-61);r[p]+=c%2*(44-c)if any(r+[p]):s=a*(n//2)print(*map(chr,s),sep='')Try it...
View ArticleAnswer by Bubbler for Generating Brainf*** NOPs
Python 3, 163 bytesfrom random import*n=int(input())p=0;d=[0]*n;a=choices(b'+-<>',k=n)for c in a:d[p]+=c%2*(44-c);p+=~c%2*(c-61)if p|any(d):a=n//2*b'+-'print(*map(chr,a),sep='')Try it online!Full...
View ArticleAnswer by Martin Ender for Generating Brainf*** NOPs
CJam, 62 59 bytesThanks to nhahtdh for saving 3 bytes.Because there is no requirement for any particular distribution as long as each no-op appears with finite probability, we can simplify this a lot...
View ArticleAnswer by Martin Ender for Generating Brainf*** NOPs
CJam, 118 116 bytesThis got slightly out of hand... especially the second half seems like it should be very...
View ArticleGenerating Brainf*** NOPs
Sometimes when writing brainfuck code, you feel the need to make it longer than needed to encourage debugging. You could do it by just plopping a >< in there, but what fun is that? You'll need...
View Article
More Pages to Explore .....