Skip to main content
Commonmark migration
Source Link

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import push,kolmo

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import push,kolmo

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import push,kolmo

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

changed my import statement to be a little clearer
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import*import push,kolmo

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import*

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import push,kolmo

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

ypost
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then tookwrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the imagestack and ran the following pythonkolmo is a very simple Kolmogorov complexity solving program over it:that attempts to find an efficient way to push a particular string to the stack.

from value import*

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then took the image and ran the following python program over it:

from value import*

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

#Brain-Flak, 487810 327722 75564 + 1 = 75565 bytes

Unfortunately this is a tad big to fit in an answer.

PasteBin

Try it Online

With the -A flag this outputs an ASCII ppm file that looks as follows:

New output

#Explanation

You may have already guessed I did not write this by hand. So here's how I did it:

I first made the image you see above from the image provided by the challenge. It has the distinction of having no color channel that is at any value other than 255 or 0 this way we can wrap it up into a smaller file with the max color channel set to 1. I then wrote a python script to golf a Brain-Flak program that solves this using a module I wrote myself that can be found here. Its not very polished its just a hack I threw together for things like this. push is a function that returns efficient Brain-Flak code to push a number to the stack and kolmo is a very simple Kolmogorov complexity solving program that attempts to find an efficient way to push a particular string to the stack.

from value import*

def group(a, n):
    return zip(*[a[i::n]for i in range(n)]) 

f=open("R.ppm")
a=["".join(x)for x in group(f.read().split()[3:][::-1],3)]
f.close()

def hardcode(string):
    result = push(ord("\n")).join("(<>({})<>"+{"0":"","1":"()"}[x]+")"for x in string)
    return result

last = ""
acc = 0
result = push(ord("0"))+"<>"
for x in a+[""]:
    if x != last:
        string = ("" if not last else kolmo("\n")+hardcode(last))
        result += min([push(acc)+"{({}[()]<%s>)}{}"%string,acc*string],key=len)
        acc=1
    else:
        acc += 1
    last = x
print result+kolmo("P3 100 100 ")

This was quite fun and I hope to improve my answer

small fix
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661
Loading
Golf
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661
Loading
Golf
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661
Loading
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661
Loading