Quantcast
Channel: Generating Brainf*** NOPs - Code Golf Stack Exchange
Browsing all 8 articles
Browse latest View live

Answer by Misha Lavrov for Generating Brainf*** NOPs

Wolfram Language (Mathematica), 224...

View Article



Answer 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 Article

Answer 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 Article

Answer by l4m2 for Generating Brainf*** NOPs

JavaScript (Node.js), 160...

View Article

Answer 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 Article


Answer 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 Article

Answer by LegionMammal978 for Generating Brainf*** NOPs

Mathematica, 350...

View Article

Generating 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

Browsing all 8 articles
Browse latest View live




Latest Images