Simple complexity

18

5

Output

                  #         #  #    #  # #####  ##    #         
                  ##        ####    #######  #   #    ##        
                ####        ##      ##    #  ### #######        
                #  #         #       #    ##### ### #  #        
                #  # ### #####   #####    #         #  #        
                ####### ###  #  ###  #    ##        ####        
                ##    #   #  ###  #  #######        ##          
                 #    ##  #####   ##### #  #         #          
                ##    #                   #         #  # #####  
                 #    ##                  ##        #######  #  
                 #######                ####        ##    #  ###
                ### #  #                #  #         #    ##### 
                    #  #                #  # ### #####    #     
                    ####                ####### ###  #    ##    
                    ##                  ##    #   #  #######    
                     #                   #    ##  ##### #  #    
    #  # #####  ##    #                   #                     
    #######  #   #    ##                  ##                    
    ##    #  ### #######                ####                    
     #    ##### ### #  #                #  #                    
 #####    #         #  #                #  # ###                
###  #    ##        ####                #######                 
  #  #######        ##                  ##    #                 
  ##### #  #         #                   #    ##                
          #         #  # #####   #####  ##    #                 
          ##        #######  #  ###  #   #    ##                
        ####        ##    #  ###  #  ### #######                
        #  #         #    #####   ##### ### #  #                
        #  # ### #####    #       #         #  #                
        ####### ###  #    ##      ##        ####                
        ##    #   #  #######    ####        ##                  
         #    ##  ##### #  #    #  #         #                  
                                          #                     
                                          ##                    
                                        ####                    
                                        #  #                    
                                        #  # ###                
                                        #######                 
                                        ##    #                 
                                         #    ##                
                                 #####  ##    #                 
                                ###  #   #    ##                
                                  #  ### #######                
                                  ##### ### #  #                
                                  #         #  #                
                                  ##        ####                
                                ####        ##                  
                                #  #         #                  
                                  #         #  #    #  # #####  
                                  ##        ####    #######  #  
                                ####        ##      ##    #  ###
                                #  #         #       #    ##### 
                                #  # ### #####   #####    #     
                                ####### ###  #  ###  #    ##    
                                ##    #   #  ###  #  #######    
                                 #    ##  #####   ##### #  #    
                                ##    #                   #     
                                 #    ##                  ##    
                                 #######                ####    
                                ### #  #                #  #    
                                    #  #                #  # ###
                                    ####                ####### 
                                    ##                  ##    # 
                                     #                   #    ##

Trailing spaces allowed. Shortest solution wins.

hint0

hint1:

hint1


thanks @Tahg for correcting hint1

ngn

Posted 2017-09-19T18:12:07.403

Reputation: 11 449

1

Is this some sort of a Dragon curve?

– None – 2017-09-19T18:21:24.963

1How can we output this? ASCII only, graph-like like Stewie commented, etc? – Rɪᴋᴇʀ – 2017-09-19T18:24:58.037

@Riker I tagged ascii-art but you can graph it if you like, well, if it leads to shorter code... – ngn – 2017-09-19T18:27:50.247

8

@ngn output only challenges without any explanation to the way the data was formed are usually frowned upon (see https://codegolf.stackexchange.com/q/126037), because the first answer tends to blow off the "mysterious" part

– Uriel – 2017-09-19T18:32:20.910

2@Uriel, what about requiring spoiler tags for such questions? The mystery is appealing -- shame to throw it out altogether... – Jonah – 2017-09-19T18:35:18.807

@Uriel That's what kolmogorov-complexity is about, isn't it? I agree, after it's cracked, there won't be much pleasure in solving the puzzle. All that remains will be basic golfing... – ngn – 2017-09-19T18:36:22.960

16Personally I don't like challenges like this where finding out the rule / recipe is part of the task. Besides, once a person finds it, all others can just follow it, so why not post in the first place? – Luis Mendo – 2017-09-19T18:56:26.530

1This challenge was well received. Perhaps because of all the extra stuff posted along with the string. – H.PWiz – 2017-09-19T19:07:54.237

11@LuisMendo It's an interesting argument. Code golf in its purest form is about "implementing a known solution succinctly." Puzzles in their purest form are about finding a solution -- the implementation is either not relevant or considered busy work. One option would be to post the "trick" in spoilers. That way the pure code golfers to attack the problem as a golfing challenge, and those who like both the golf and puzzle challenges could avoid looking and solve both. – Jonah – 2017-09-19T19:13:06.190

5I think the "mysterious" part is something that I could definitely see more of. Although one answer might find the trick to it, the rest of it is still a regular code-golf challenge... And it provides a good challenge for those who aim to find the pattern in the beginning anyways. – totallyhuman – 2017-09-19T22:22:48.993

3@H.PWiz, I'm not sure that +26/-7 is really "well received". It looks more like "poorly received but managed to hit the HNQ fast enough to get a skewed score". – Peter Taylor – 2017-09-20T11:58:05.913

Can we output an array containing strings of each line? – Shaggy – 2017-09-20T11:59:36.540

@Shaggy I'm afraid the output wouldn't look as desired then – ngn – 2017-09-20T12:14:20.747

Answers

12

SOGL V0.12, 17 16 14 bytes

 #6{³IIč▓┼;I+§

Try it Here!

At a later update č▓ could be removed for 12 bytes - that converts ToS from an array of arrays of characters a multiline string to an array of strings - [["#","#"],[" ","#"]] -> ["##"," #"] - , because - horizontal append - doesn't deal well with arrays of arrays of characters - which I creates, because it's used for array rotation too. In SOGL an array of arrays of characters should be = array of strings, but many things don't support that yet..

Explanation:

 #            push "#"
  6{          6 times do
    ³           create 3 total copies of ToS
     II         rotate clockwise twice
       č▓       normalize as explained above
         ┼      append horizontally
          ;     get the 3rd copy ontop
           I    rotate clockwise
            +   append vertically
             §  reverse horizontally

dzaima

Posted 2017-09-19T18:12:07.403

Reputation: 19 048

1wait what how does this work – Conor O'Brien – 2017-09-22T21:07:59.463

@ConorO'Brien just added an explanation :p – dzaima – 2017-09-22T21:08:31.673

oh nice – Conor O'Brien – 2017-09-22T21:08:40.147

22

JavaScript (ES6), 233 217 213 198 182 170 163 122 bytes

f=_=>[...Array(64)].map((_,x,a)=>a.map(g=(i=(n=64,x),j)=>(n>>=1)?i&n?j&n?g(j,i):` `:j&n?g(i,~j):g(~i,j):`#`).join``).join`
`
document.write(`<pre>${f()}</pre>`)

Edit: Saved 14 18 bytes thanks to @Shaggy. Saved 3 bytes thanks to @ngn. Saved a further 12 bytes thanks to the two working together. Saved 41 bytes by stealing @user202729's observations that the quarters use reflections rather than rotations. Ungolfed:

function f() {
    var s = '';
    for (var i = 0; i < 64; i++) {
        for (var j = 0; j < 64; j++) {
            var x = i, y = j, c = '#'; // Default to #
            // Each non-blank quadrant maps to to the original
            // image by doubling and a reflection. Repeat
            // this six times unless we hit the blank quadrant.
            for (var n = 0; n < 6; n++) {
                if (x >= 32) {
                    if (y >= 32) {
                        // Bottom right quarter is a diagonal reflection
                        var t = x - 32;
                        x = y - 32;
                        y = t;
                    } else {
                        // Bottom left quarter is blank
                        c = ' ';
                        break;
                    }
                } else {
                    if (y >= 32) {
                       // Top right corner is a horizontal reflection
                       y = 63 - y;
                    } else {
                       // Top left corner is a vertical reflection
                       x = 31 - x;
                    }
                }
                x *= 2;
                y *= 2;
            }
            s += c;
        }
        s += '\n';
    }
    return s;
}

Neil

Posted 2017-09-19T18:12:07.403

Reputation: 95 035

Do you need to count the f= here? Nicely done, by the way. – Shaggy – 2017-09-20T10:32:11.537

217 bytes – Shaggy – 2017-09-20T10:36:29.097

@Shaggy No, I was rushing, so I just pasted it into byte-counter. I found an even better place to set n though. – Neil – 2017-09-20T10:43:33.433

Even better :) Looks like you missed the edit to my comment above; save another 2 bytes by assigning 126 to a variable; 2 more by using the same trick you used for placing the assignment of n: https://tio.run/##RY7RCsIwDEXf/QpBhIS1Befow7AbfoeILXOMlNmOTaR@/XTt0Jck9@aeEGteZmpGGp7c@Xs7N95Nvm9F7zuA@aaqixDiPI7mDbLAq3iYASCoQy4ZMYOqMslySjL7ldApoDg5zms6HfPaLsXt87oDmXPLLaOMsIyKOLFkYpkiNrNcFiztllT4I/GS3uo1GiIeEv0jQwL1TmP8BIX15LRe@0bPCIjzBw

– Shaggy – 2017-09-20T10:47:00.217

1You don't need f= in byte count, but code snippet doesn't work without it. – None – 2017-09-20T10:49:55.380

@ThePirateBay Sorry, I accidentally deleted it in the latest edit. – Neil – 2017-09-20T10:57:15.813

intriguing solution, beats my own js – ngn – 2017-09-20T11:23:01.600

i+i and j+j occur way too often - you can save some bytes by assigning them to variables (or default params) – ngn – 2017-09-20T11:28:55.697

@ngn: Well spotted. Applying that gives 201 bytes

– Shaggy – 2017-09-20T11:51:30.097

if instead of introducing new variables, we double i and j themselves (n-- -> (i*=2,j*=2,n--)) replacing i<32 with i<64, it becomes benefitial to assign 64 to a variable 198 bytes

– ngn – 2017-09-20T12:10:29.300

@ngn Thanks, you inspired me to use bit twiddling to shave off another 28 bytes! – Neil – 2017-09-20T12:36:18.923

@Neil if you go on at this rate your byte count will soon be negative :) One small improvement: >>=1 could be /=2 – ngn – 2017-09-20T15:05:55.870

@ngn I'd have to change the test if I did that; 1/2 != 0. – Neil – 2017-09-20T15:08:17.573

@Neil ah... you're right, but it still works - n eventually drops to 5e-324 without affecting the output and then becomes 0 :) it took me a while to figure out why it works when it obviously shouldn't – ngn – 2017-09-20T15:19:39.967

:o What the smeg?! I looked away for a while and half the bytes disappeared! Stellar work :) – Shaggy – 2017-09-21T16:39:11.203

1@Neil Any chance you could add an explanation or an ungolfed version? – Jonah – 2017-09-22T01:31:32.363

1@Jonah I hope you find that helpful. – Neil – 2017-09-22T09:06:46.760

@Neil Thanks, I appreciate it – Jonah – 2017-09-22T19:50:46.807

11

LOGO, 375 341 297 295 278 + 3 bytes

Add 3 bytes because of -p flag, which enable perspective mode by default, thus don't need to run perspective command, saves 9 bytes overall.

Use FMSLogo on Windows with Unix (LF) newline format (FMSLogo have problem with parsing CR newline format)

to R
rt 90
end
to g :w :l
R fd 2*:l R bk :l up 180
run :w
R run :w
fd 2*:l R bk :l run :w
fd 2*:l up 180
end
to h
pu
ask -1[setxyz 0 0 870]g[g[g[g[g[g[rt 45 fd .7 pd fd 0 pu bk .7 lt 45]1]2]4]8]16]32
repeat 64[sety 64-# repeat 64[setx #-1 type if pixel=[0 0 0]""#["\ ]](pr)]
end

Unfortunately, no "Try it online!" link because I can't find any online interpreter support perspective mode.

Idea: Draw a picture of the image, then retrieve the pixels from the picture and print as output.

Picture breakdown to simple repeated parts:

.

Make use of the hint above. However, since LOGO does not support reflection, we can only simulate that by enter 3D (perspective) mode and turn the turtle 180 degree around an axis parallel to the computer screen.

This defines a helper function g, which given 2 parameters l (image side length) and w (procedure used to draw the image), draw 3 copies of its reflected image. (see hint in the question) The procedure h perform the main procedure.

user202729

Posted 2017-09-19T18:12:07.403

Reputation: 14 620

You can probably omit some spaces like 90 fd -> 90fd and save a few bytes. – Jonathan Frech – 2017-09-20T14:14:19.447

@JonathanFrech Unfortunately, FMSLogo doesn't support that. – user202729 – 2017-09-20T14:15:10.190

Why does papert support it then?

– Jonathan Frech – 2017-09-20T14:19:56.450

@JonathanFrech I see, but then papert doesn't support pixel, which is necessary to get the pixel back after drawing. So I must use FMSLogo, and cannot take advantage of omitting those spaces. – user202729 – 2017-09-20T14:21:59.820

2Is this the only answer that actually exploits the pattern rather than bit packing? – Jonah – 2017-09-20T15:58:13.677

@Jonah I'm not sure how the above JS solution work, so I can't be sure. But all the other answers (exclude the JS and TFeld's Python2 which use the same algorithm) pack the whole information in the code. – user202729 – 2017-09-20T16:01:17.540

2@Jonah The JS solution was first to exploit the pattern, though it does it in an interesting way - with modular arithmetic and bit operations instead of concatenating matrices. This LOGO solution is also interesting and unique with its pixel-reading approach. I don't know enough LOGO to understand the code but judging by the description it repeats certain patterns without going all the way down the fractal's structure (which I already gave away in hint1). – ngn – 2017-09-21T13:52:15.073

@ngn thanks for that explanation – Jonah – 2017-09-22T01:29:00.767

10

05AB1E, 30 26 bytes

'#)6F©R®í®'#ð:®ζ)2ä€ø€J˜}»

Try it online!

Emigna

Posted 2017-09-19T18:12:07.403

Reputation: 50 798

8

Python 2, 205 195 ... 145 144 142 144 bytes

g=lambda n,i,j,*_:g(n/2,*[~i,j,i,~j][2*(j&n>0)-(i&n>0):])if n*(i&n<=j&n)else'# '[i&n>0]
r=range(64)
for j in r:print''.join(g(32,j,i)for i in r)

Try it online!

Inspired by Neil's JS answer.

TFeld

Posted 2017-09-19T18:12:07.403

Reputation: 19 246

n>>1 is n/=2. – Jonathan Frech – 2017-09-20T16:21:55.327

a is defined and then used once. Replacing its reference with its value could save four bytes. – Jonathan Frech – 2017-09-20T16:24:46.997

I overlooked a useful simplification - rather than doing everything using rotations, I should have been using reflections instead. It saved me 41 bytes on my answer! – Neil – 2017-09-21T16:32:47.490

I think you can save two bytes by simplifying your [...[x],...[x]][z] selection.

– Jonathan Frech – 2017-09-22T07:19:53.957

You need to include g= in the code and the byte count since it calls itself. – totallyhuman – 2017-11-09T18:41:13.793

1@totallyhuman Fair enough – TFeld – 2017-11-10T08:09:27.930

8

CJam, 30 bytes

"#"]{_W%_32ff&+\_Wf%\z+.+}6*N*

Try it online!

Martin Ender

Posted 2017-09-19T18:12:07.403

Reputation: 184 808

7

Haskell, 126 125 113 106 103 bytes

e=[]:e
z=zipWith
r=reverse
m s=z(++)(r s++map(' '<$)s)$map r s++foldr(z(:))e s
unlines$m$m$m$m$m$m["#"]

A direct implementation of hint1 in the spoiler.

Function m generates the next iteration. The main functions applies m 6 times. Details to m:

m s=                          -- s is the current pattern
     zipWith(++)              -- concatenate pairwise the lines of
                (r s)++       --    the lines of s in reverse order, followed by
                map(' '<$)s   --    each char in s replaced by a space
                              -- and
                map r s++     --    each line of s reversed, followed by
                foldr ... s   --    the transposition of s


e=[]:e;foldr(zipWith(:))e     -- this right fold transposes a matrix

Edit: @ngn saved a byte and @Laikoni another 3. Thanks!

nimi

Posted 2017-09-19T18:12:07.403

Reputation: 34 639

n$n$n$n$n$n["#"] is shorter than iterate n["#"]!!6 :) – ngn – 2017-09-21T16:22:20.970

@ngn: well spotted. Thanks a lot! – nimi – 2017-09-21T16:32:04.610

You can use e=[]:e;foldr(zipWith(:))e instead of import Data.List;transpose and then shorten zipWith. – Laikoni – 2017-09-22T16:25:13.513

6

Java 7, 259 238 237 200 bytes

void f(){char[][]o={{35}},n;for(int s=1,x,y;s<64;s*=2,o=n)for(n=new char[64][64],x=s;x-->0;)for(y=0;y<s;n[s+y++][x]=32)n[s+~y][x]=n[y][2*s+~x]=n[s+x][s+y]=o[y][x];for(char[]b:o)System.out.println(b);}

Saved 2 bytes by removing the {} on the x loop, thanks ngn
Saved 19 bytes from various assignment changes, thanks Jonathan
Saved 24 bytes for print vs return (didn't know this was allowed), and
Saved 13 bytes for loop changes, thanks Nevay

Try it online!

My first challenge, and I think respectable for Java. Uses hint 1, (which is wrong btw, but I can't write comments). It can probably be golfed further, this pass was basically as is, without pretty printing.

Tahg

Posted 2017-09-19T18:12:07.403

Reputation: 81

I am not sure if it might be because of a version difference, but I tested your code on TIO using Java 8, and it prints null characters instead of spaces.

– Jonathan Frech – 2017-09-21T06:17:06.573

It sure did, thanks for noticing. Apparently, Java is quite happy with displaying nulls as spaces in its Strings. – Tahg – 2017-09-21T06:36:13.177

You can save a byte by removing s=1 from your for loop and replacing int s,t,x,y; with int s=1,t,x,y;. – Jonathan Frech – 2017-09-21T06:40:19.540

@Tahg that might depend on the IDE or terminal you're using. In any case, welcome and congratulations for a well-golfed first answer. Consider removing the braces around single-statement for-s. What is wrong with hint1? I might well have made a mistake as I put it together late last night. – ngn – 2017-09-21T06:40:58.460

1n[s-1-y][x]=o[y][x];n[y][t-1-x]=o[y][x]; -> n[s-1-y][x]=n[y][t-1-x]=o[y][x];. – Jonathan Frech – 2017-09-21T06:45:41.570

2the proper transformation matrix is [[V,H],[_,T]] (Either that or there's some subtle difference in your algorithm, but that's what I needed) – Tahg – 2017-09-21T06:47:21.130

'#' -> 35; ' ' -> 32. – Jonathan Frech – 2017-09-21T06:49:59.477

@Tahg bummer... fix coming up soon, thanks – ngn – 2017-09-21T06:54:25.267

201 bytes: void f(){char[][]o={{35}},n;for(int s=1,t,x,y;s<64;s=t,o=n)for(n=new char[t=2*s][t],x=s;x-->0;)for(y=0;y<s;n[s+y++][x]=32)n[s+~y][x]=n[y][t+~x]=n[s+x][s+y]=o[y][x];for(char[]b:o)System.out.println(b);} – Nevay – 2017-09-21T07:30:16.250

5

J, 30 27 bytes

|:@(|:@|.,|.@|:,.])^:6,.'#'

Try it online!

Original version.

((|.,.|."1),' '"0,.|:)^:6,.'#'

Try it online!

FrownyFrog

Posted 2017-09-19T18:12:07.403

Reputation: 3 112

3

Python 2, 586 bytes

import zlib,base64 as b
print zlib.decompress(b.b64decode('eJyVVlsOwzAI++8pJuX+d1zXDGLAUKi0pUp52ATcfj7+Wni3dF2/677ZO1dw+z/Zd3+rJU4SdkVHMcYQS9OuJVGio4N61p31+TGoQkco6eqoU6gSWdBJRrQhjhIdvLQ6YhNrqrEtUsu8yEbjmRqUWXlgYbl5EHfLC7cDQl4sxxAhO4wUv7fFPTx22sUWqOeEJ544Z3vn9FPU+ZmdHtCak6Fk3hfCx0FkOC8DF4YvmgoFMnCEwW2cDBkzftoiGy4GZaNhM8VYSl3YMEV7ctxsjLQKRCHZ3IB6+ATZpKSKmEyGrqZvEHY8lEQBWf8zbuAg0eypWG6nRqTLIzM+NPQa2faN89FlxhMY2vcTKDP7579fl0rmIpJ+grTvSyis798ghb4vM0CuVgbM1SFdvukjnFnfR1Gt3vAEngd6lGrIDdfkDU/ARwl+ecMHf5SzIzct8KhsqHANZ0FqFbpXdad5qH2DzOHJIHGM2pz26oug9i2+EBpX+cXQCpBA7/tne01lLb4wviHjtJE='))

Try it online.


Python 2, 1032 1025 bytes

I like this one more. But it is much longer. It could be golfed down but there is no need for that. officialaimm's approach is much shorter.

-7 thanks to Jonathan Frech

print''.join(' '*int(x)if'/'<x<'@'else("#"*(ord(x)-64),"\n")[x<"#"]for x in'99A9A2A4A2A1E2B4A9!99B8D4G2A3A4B8!88D8B6B4A2C1G8!88A2A9A7A4E1C1A2A8!88A2A1C1E3E4A9A2A8!88G1C2A2C2A4B8D8!88B4A3A2C2A2G8B55!98A4B2E3E1A2A9A55!88B4A559A9A2A1E2!98A4B99B8G2A2!98G88D8B4A2C!88C1A2A88A2A9A4E1!992A2A88A2A1C1E4A5!992D88G1C2A4B4!992B99B4A3A2G4!777A559A4B2E1A2A4!4A2A1E2B4A559A777!4G2A3A4B99B992!4B4A2C1G88D992!5A4E1C1A2A88A2A569!1E4A9A2A88A2A1C88!C2A4B8D88G98!2A2G8B99B4A89!2E1A2A9A559A4B88!55A9A2A1E3E2B4A98!55B8G2A2C2A3A4B88!8D8B4A2C2A2C1G88!8A2A9A4E3E1C1A2A88!8A2A1C1E4A7A9A2A88!8G1C2A4B6B8D88!8B4A3A2G4D8B99!9A4B2E1A2A4A2A9A99!99996A777!99996B992!99994D299!99994A2A992!99994A2A1C88!99994G98!99994B4A98!99995A4B88!9996E2B4A89!9995C2A3A4B88!9997A2C1G88!9997E1C1A2A88!9997A9A2A88!9997B8D88!9995D8B99!9995A2A9A99!9997A9A2A4A2A1E2!9997B8D4G2A2!9995D8B6B4A2C!9995A2A9A7A4E1!9995A2A1C1E3E4A5!9995G1C2A2C2A4B4!9995B4A3A2C2A2G4!9996A4B2E3E1A2A4!9995B4A559A5!9996A4B99B4!9996G88D4!9995C1A2A88A2A4!9999A2A88A2A1C!9999D88G1!9999B99B4A1!99991A559A4B')

Try it online.

Simon

Posted 2017-09-19T18:12:07.403

Reputation: 111

The question allows [t]railing spaces, though your solution omits some spaces. – Jonathan Frech – 2017-09-20T07:19:49.557

allowing trailing spaces means, that I dont have to output them. Is that correct? It would save bytes on my second approach. On the first one it is already done because I deleted the trailing spaces while saving my file... – Simon – 2017-09-20T07:24:27.063

I do not know for sure, but I interpreted it as allowing additional spaces, not allowing missing spaces. – Jonathan Frech – 2017-09-20T07:26:57.667

x=='!' -> x<'#' – Jonathan Frech – 2017-09-20T07:27:17.150

if x.isdigit() -> if"/"<x<"@" – Jonathan Frech – 2017-09-20T07:28:45.937

'\n'if x=='!'else'#'*(ord(x)-64) -> ("#"*(ord(x)-64),"\n")[x<"#"] – Jonathan Frech – 2017-09-20T07:32:53.170

@JonathanFrech Thank you. I should really look at the character table for those comparissons. – Simon – 2017-09-20T07:32:57.950

965 bytes. – Jonathan Frech – 2017-09-20T07:52:42.233

897 bytes. – Jonathan Frech – 2017-09-20T08:00:46.133

3

Mathematica, 112 90 bytes

Thanks to Jonathan Frech for help saving 2 bytes!

""<>Nest[{{(r=Reverse)@#,r/@#},{" "+0#,#}}~Flatten~{{1,3},{2,4}}&,{{"#"}},6]~Riffle~"
"

Try it online! (Mathics)

For some reasons, Mathics prints leading spaces in all lines except the first one when print multiline string. Also Mathics doesn't support operator.

Explanation:

  • {{Reverse@#,Reverse/@#},{" "+0#,#}} : Represent the reverse-horizontally, reverse-vertically, replace-all-by-" ", and transpose ( is transpose operator in Mathematica), corresponding to different ways to reflect or rotate the image.
  • ~Flatten~{{1,3},{2,4}} : Flatten in particular dimensions.
  • Nest[ ... ,{{"#"}},6] : Apply the function inside to {{"#"}} 6 times.
  • ~Riffle~"<literal newline character>" : Riffle a newline character between each line.
  • ""<> : Join all strings together.

user202729

Posted 2017-09-19T18:12:07.403

Reputation: 14 620

You can define replace Reverse with R and define R=Reverse; to save two bytes. – Jonathan Frech – 2017-09-21T13:33:57.157

2

C# (.NET Core), 1016 1002 980 955 bytes

Saved 14 bytes thanks to Kevin Cruijssen!
Saved 47 bytes thanks to Jonathan Frech!

o=>{foreach(var l in new[]{35223185965568,52841249260288,0xf00c0c277f00,0x9004043ee900,0x977c7c200900,0xfee4e4300f00,0xc22727f00c00,73934616658944,0xc2000020097c,73667282210788,0x7f0000f00c27,0xe9000090043e,9895614577696,0xf0000fee430,0xc0000c227f0,4398050918032,325982355457<<21,1092065689603<<20,835235872783<<20,291765223433<<20,0x7c20090000970000,-15289957744513<<17,21955973480545<<17,68788263321667<<16,68799053409<<17,206425089091<<16,0xf00c27277f0000,618546478825<<16,650622541833<<16,0xfee430300f0000,208473439235<<18,72203117569<<18,1<<21,3<<20,15<<20,9<<20,9895936,127<<17,97<<17,67<<16,15969<<17,3829596160,662634496,16105<<16,8201<<16,806289408,4027318272,9217L<<18,537463164,806293476,4027321383,2416182334,2541517856,4276413488,3257346032,1128152720,3254779936,1124073520,2130706672,3909091472,150995095,251658494,201326786,67108931})System.Console.WriteLine(System.Convert.ToString(l,2).PadLeft(64,'0').Replace('0',' ').Replace('1','#'));}

Try it online!


Explanation

The format of the output is stored inside an array of signed 64-bit numbers, which fits perfectly since each line is 64 characters long. Empty spaces are represented by 0 and # is represented by 1.

The numbers are then converted to their binary string, zeros are padded left until the string is 64 characters wide and then the 0 and 1 characters are replaced with   and #.

The code is stored inside a lamba function, more specifically a System.Func<string>.

Some constants in the long[] are shortened by performing some bit-shifting.

Ian H.

Posted 2017-09-19T18:12:07.403

Reputation: 2 431

Is there not an unnecessary space in long[] n=new[]? – Jonathan Frech – 2017-09-20T09:17:51.570

@JonathanFrech Ah you are right, apparently it snuck in there somehow. – Ian H. – 2017-09-20T09:18:55.233

You can save 14 bytes by printing directly and using the new[]{...} directly in the loop: o=>{foreach(var l in new[]{...})System.Console.WriteLine(System.Convert.ToString(l,2).PadLeft(64,'0').Replace('0',' ').Replace('1','#'));} Try it here. 1002 bytes

– Kevin Cruijssen – 2017-09-20T09:44:09.803

@KevinCruijssen Thanks, getting close to the <1000! :P – Ian H. – 2017-09-20T10:12:50.297

I think you can save 11 bytes by shortening some constants using bitshifting. See my Python script for a list of possible replacements.

– Jonathan Frech – 2017-09-20T10:33:38.197

@JonathanFrech Thanks, that's awesome? Actually we can even shorten it by 22 bytes, since C# doesn't require the l suffix! – Ian H. – 2017-09-20T10:48:10.403

Can you not pad the string with spaces in the first place? – Neil – 2017-09-20T11:05:41.383

@Neil That wouldn't save any bytes, as I would have to replace the other 0s in the binary string anyways. – Ian H. – 2017-09-20T11:06:44.423

1You would save 4 bytes by not having to specify the padding character. – Neil – 2017-09-20T11:07:04.280

1

Well, if the trailing l is not needed, you can probably save even more bytes.

– Jonathan Frech – 2017-09-20T11:11:10.573

1Looks like the bottom of this is bugged. – Shaggy – 2017-09-20T11:35:10.950

@Neil Oh you're right, that does help. – Ian H. – 2017-09-20T12:12:31.520

@JonathanFrech It seems some numbers are bugged with your solution, any idea why? – Ian H. – 2017-09-20T12:12:34.727

I am no expert in C#, but replacing all << with L<< seems to fix the issue. Is it possible that a literal number is an integer by default, and so wraps around as only 32 bits are used? – Jonathan Frech – 2017-09-20T12:17:17.590

This code snippet strongly suggests that that might be the problem.

– Jonathan Frech – 2017-09-20T12:20:14.417

Investigating the problem further, I think that any integer literal on the <<'s left side that is larger than 2**31-1 is -- without a trailing L -- interpreted as a 64-bit number. If, however, that literal is smaller or equal to 2**31-1, it is interpreted as a 32-bit number. Bitshifting a 32-bit number results in a 32-bit number, not in a required 64-bit number, and thus the output is buggy. – Jonathan Frech – 2017-09-20T12:45:13.130

Take a look at my improved C# constant golfer, which also implements someone's idea to use hexadecimal literals.

– Jonathan Frech – 2017-09-20T12:59:12.320

@JonathanFrech Hey, that's awesome! i'll improve my post as soon as I can. – Ian H. – 2017-09-20T15:04:25.103

2

Charcoal, 42 bytes

#↓##FE⁵X²ι«‖↑J⁻×³ι¹±⁰ψ⟲OO⁴ײι⟲CJ⁰±φT×⁴ι×⁴ι

Try it online! Link is to verbose version of code. Would be 25 bytes if this worked:

#FE⁷X²ι«‖↑⟲C→⁴⟲CJ⁰±φTιι

Explanation:

#↓##

Manually generate the first recursion, since it's not possible to rotate around (1, 0.5). (Such a rotation would only make sense if it was 180°.)

FE⁵X²ι«

Loop over the first five powers of 2 (1, 2, 4, 8, 16).

‖↑

Reflect the canvas vertically. This completes the top left quarter of the result.

J⁻×³ι¹±⁰ψ⟲OO⁴ײι

Rotate the canvas 180° around a point half-way up the right-hand side. The copy ends up in the correct position for the top right quarter of the result.

⟲C

Rotate the canvas 90° around the bottom right corner. The copy of the top right corner ends up in the correct position for the bottom right corner of the result. The copy of the top left corner is extraneous.

J⁰±φT×⁴ι×⁴ι

Trim the canvas to the size we want. The trim starts at the cursor or the top left of the canvas, whichever is bottom rightmost. The cursor is therefore sent to (0, -1000) to ensure that it doesn't interfere with the trim.

Neil

Posted 2017-09-19T18:12:07.403

Reputation: 95 035

2

Dyalog APL, 29 bytes

⎕←(((⊖,⌽)⍪⊢∘' '¨,⍉)⍣6)1 1⍴'#'

Try it online!

Oberon

Posted 2017-09-19T18:12:07.403

Reputation: 2 881

1((⊖,⌽)⍪∊,⍉)⍣6⍪⍕# with ⎕ML←0. – Adám – 2018-01-30T10:37:47.643

1

Python 2, 715 711 bytes

  • -4 bytes thanks to @Jonathan Frech
for k in range(64):print"".join(ord(i)*" #"[j%2]for j,i in enumerate('												<?<<<89:11222	202	4	$" 	!%$%$&%$($%&'))[k<<6:][:64]

Try it online!

officialaimm

Posted 2017-09-19T18:12:07.403

Reputation: 2 739

1711 bytes. – Jonathan Frech – 2017-09-20T05:46:27.640

@JonathanFrech Thank you, I didn't think there were no new-lines. :D – officialaimm – 2017-09-20T05:52:29.263

1

Perl 5, 452 bytes

451 bytes code + 1 for -p.

Packs all the data into the string, rather than stealing @Neil's correct answer.

$_=unpack"B*","\x00\x00\x20\x09\x09\x7c\xc2\x33\x00\x30\x0f\x0f\xe4\x43\x33\x00\xf0\x0c\x0c\x27\x7f\x33\x00\x90\x04\x04\x3e\xe9\x33\x00\x97\x7c\x7c\x20\x09\x33\x00\xfe\xe4\xe4\x30\x0f\x33\x00\xc2\x27\x27\xf0\x0c\x33\x00\x43\x3e\x3e\x90\x04\x33\x00\xc2\x00\x00\x20\x09\x7c\x00\x00\x43\x00\x00\x30\x0f\xe4\x00\x00\x7f\x00\x00\xf0\x0c\x27\x00\x00\xe9\x00\x00\x90\x04\x3e\x00\x00\x09\x00\x00\x97\x7c\x20\x00\x00\x0f\x00\x00\xfe\xe4\x30\x00\x00\x0c\x00\x00\xc2\x27\xf0\x00\x00\x04\x00\x00\x43\x3e\x90\x09\x7c\xc2\x00\x00\x20\x00\x00\x0f\xe4\x43\x00\x00\x30\x00\x00\x0c\x27\x7f\x00\x00\xf0\x00\x00\x04\x3e\xe9\x00\x00\x90\x00\x00\x7c\x20\x09\x00\x00\x97\x00\x00\xe4\x30\x0f\x00\x00\xfe\x00\x00\x27\xf0\x0c\x00\x00\xc2\x00\x00\x3e\x90\x04\x00\x00\x43\x33\x00\x20\x09\x7c\x7c\xc2\x33\x00\x30\x0f\xe4\xe4\x43\x33\x00\xf0\x0c\x27\x27\x7f\x33\x00\x90\x04\x3e\x3e\xe9\x33\x00\x97\x7c\x20\x20\x09\x33\x00\xfe\xe4\x30\x30\x0f\x33\x00\xc2\x27\xf0\xf0\x0c\x33\x00\x43\x3e\x90\x90\x04\x37\x00\x20\x37\x00\x30\x37\x00\xf0\x37\x00\x90\x37\x00\x97\x37\x00\xfe\x37\x00\xc2\x37\x00\x43\x36\x00\x7c\xc2\x36\x00\xe4\x43\x36\x00\x27\x7f\x36\x00\x3e\xe9\x36\x00\x20\x09\x36\x00\x30\x0f\x36\x00\xf0\x0c\x36\x00\x90\x04\x36\x00\x20\x09\x09\x7c\x34\x00\x30\x0f\x0f\xe4\x34\x00\xf0\x0c\x0c\x27\x34\x00\x90\x04\x04\x3e\x34\x00\x97\x7c\x7c\x20\x34\x00\xfe\xe4\xe4\x30\x34\x00\xc2\x27\x27\xf0\x34\x00\x43\x3e\x3e\x90\x34\x00\xc2\x00\x00\x20\x34\x00\x43\x00\x00\x30\x34\x00\x7f\x00\x00\xf0\x34\x00\xe9\x00\x00\x90\x34\x00\x09\x00\x00\x97\x34\x00\x0f\x00\x00\xfe\x34\x00\x0c\x00\x00\xc2\x34\x00\x04\x00\x00\x43"=~s/[3-9](.)/$1x$&/ger;y/01/ #/;s/.{64}/$&
/g

Reversible output from xxd for 451 byte file:

00000000: 245f 3d75 6e70 6163 6b22 422a 222c 2200  $_=unpack"B*",".
00000010: 0020 0909 7cc2 3300 300f 0fe4 4333 00f0  . ..|.3.0...C3..
00000020: 0c0c 277f 3300 9004 043e e933 0097 7c7c  ..'.3....>.3..||
00000030: 2009 3300 fee4 e430 0f33 00c2 2727 f00c   .3....0.3..''..
00000040: 3300 433e 3e90 0433 00c2 0000 2009 7c00  3.C>>..3.... .|.
00000050: 0043 0000 300f e400 007f 0000 f00c 2700  .C..0.........'.
00000060: 00e9 0000 9004 3e00 0009 0000 977c 2000  ......>......| .
00000070: 000f 0000 fee4 3000 000c 0000 c227 f000  ......0......'..
00000080: 0004 0000 433e 9009 7cc2 0000 2000 000f  ....C>..|... ...
00000090: e443 0000 3000 000c 277f 0000 f000 0004  .C..0...'.......
000000a0: 3ee9 0000 9000 007c 2009 0000 9700 00e4  >......| .......
000000b0: 300f 0000 fe00 0027 f00c 0000 c200 003e  0......'.......>
000000c0: 9004 0000 4333 0020 097c 7cc2 3300 300f  ....C3. .||.3.0.
000000d0: e4e4 4333 00f0 0c27 277f 3300 9004 3e3e  ..C3...''.3...>>
000000e0: e933 0097 7c20 2009 3300 fee4 3030 0f33  .3..|  .3...00.3
000000f0: 00c2 27f0 f00c 3300 433e 9090 0437 0020  ..'...3.C>...7. 
00000100: 3700 3037 00f0 3700 9037 0097 3700 fe37  7.07..7..7..7..7
00000110: 00c2 3700 4336 007c c236 00e4 4336 0027  ..7.C6.|.6..C6.'
00000120: 7f36 003e e936 0020 0936 0030 0f36 00f0  .6.>.6. .6.0.6..
00000130: 0c36 0090 0436 0020 0909 7c34 0030 0f0f  .6...6. ..|4.0..
00000140: e434 00f0 0c0c 2734 0090 0404 3e34 0097  .4....'4....>4..
00000150: 7c7c 2034 00fe e4e4 3034 00c2 2727 f034  || 4....04..''.4
00000160: 0043 3e3e 9034 00c2 0000 2034 0043 0000  .C>>.4.... 4.C..
00000170: 3034 007f 0000 f034 00e9 0000 9034 0009  04.....4.....4..
00000180: 0000 9734 000f 0000 fe34 000c 0000 c234  ...4.....4.....4
00000190: 0004 0000 4322 3d7e 732f 5b33 2d39 5d28  ....C"=~s/[3-9](
000001a0: 2e29 2f24 3178 2426 2f67 6572 3b79 2f30  .)/$1x$&/ger;y/0
000001b0: 312f 2023 2f3b 732f 2e7b 3634 7d2f 2426  1/ #/;s/.{64}/$&
000001c0: 0a2f 67                                  ./g

Try it online!

Dom Hastings

Posted 2017-09-19T18:12:07.403

Reputation: 16 415

1

Jq 1.5, 538 535 488 476 bytes

This is a straightforward representation. I haven't attempted any fancy encodings yet. Replaced 0,0 pairs with Z function.

Thanks again to Jonathan Frech for helping eliminate 3 bytes!

def B:recurse(if.>0then./2|floor else empty end)|.%2;def S:256+.|[B]|reverse[2:]|map(if.>0then"#"else" "end)|join("");def Z:0,0;[[Z,3,1,1,4,5,2],[1,4,5,2,2,3,Z],[Z,Z,2,3,Z],[Z,Z,3,1,1,4]]as$m|[[],[9,15,12,4,124,228,39,62],[Z,Z,Z,Z,124,228,39,62,32,48,240,144],[32,48,240,144,151,254,194,67,194,67,127,233,9,15,12,4],[124,228,39,62,32,48,240,144,32,48,240,144,151,254,194,67],[194,67,127,233,9,15,12,4,9,15,12,4,124,228,39,62]]as$c|$m[]|range(16)as$l|map($c[.][$l]|S)|join("")

Character count

$ wc -c picture.jq
 476 picture.jq

Sample run

$ jq -Mnr -f picture.jq
                  #         #  #    #  # #####  ##    #         
                  ##        ####    #######  #   #    ##        
                ####        ##      ##    #  ### #######        
                #  #         #       #    ##### ### #  #        
                #  # ### #####   #####    #         #  #        
                ####### ###  #  ###  #    ##        ####        
                ##    #   #  ###  #  #######        ##          
                 #    ##  #####   ##### #  #         #          
                ##    #                   #         #  # #####  
                 #    ##                  ##        #######  #  
                 #######                ####        ##    #  ###
                ### #  #                #  #         #    ##### 
                    #  #                #  # ### #####    #     
                    ####                ####### ###  #    ##    
                    ##                  ##    #   #  #######    
                     #                   #    ##  ##### #  #    
    #  # #####  ##    #                   #                     
    #######  #   #    ##                  ##                    
    ##    #  ### #######                ####                    
     #    ##### ### #  #                #  #                    
 #####    #         #  #                #  # ###                
###  #    ##        ####                #######                 
  #  #######        ##                  ##    #                 
  ##### #  #         #                   #    ##                
          #         #  # #####   #####  ##    #                 
          ##        #######  #  ###  #   #    ##                
        ####        ##    #  ###  #  ### #######                
        #  #         #    #####   ##### ### #  #                
        #  # ### #####    #       #         #  #                
        ####### ###  #    ##      ##        ####                
        ##    #   #  #######    ####        ##                  
         #    ##  ##### #  #    #  #         #                  
                                          #                     
                                          ##                    
                                        ####                    
                                        #  #                    
                                        #  # ###                
                                        #######                 
                                        ##    #                 
                                         #    ##                
                                 #####  ##    #                 
                                ###  #   #    ##                
                                  #  ### #######                
                                  ##### ### #  #                
                                  #         #  #                
                                  ##        ####                
                                ####        ##                  
                                #  #         #                  
                                  #         #  #    #  # #####  
                                  ##        ####    #######  #  
                                ####        ##      ##    #  ###
                                #  #         #       #    ##### 
                                #  # ### #####   #####    #     
                                ####### ###  #  ###  #    ##    
                                ##    #   #  ###  #  #######    
                                 #    ##  #####   ##### #  #    
                                ##    #                   #     
                                 #    ##                  ##    
                                 #######                ####    
                                ### #  #                #  #    
                                    #  #                #  # ###
                                    ####                ####### 
                                    ##                  ##    # 
                                     #                   #    ##

jq170727

Posted 2017-09-19T18:12:07.403

Reputation: 411

1Three omittable spaces in B: rec and 16) as $l|. – Jonathan Frech – 2017-09-21T08:02:42.017

1if.==0then" "else"#"end -> if.>0then"#"else" "end. – Jonathan Frech – 2017-09-21T08:03:10.643

1

Python 2, 174 164 154 bytes (based on matrix operations)

  • -10 bytes thanks to ngn.
  • -10 bytes thanks to Jonathan Frech.
from numpy import*
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' '
for l in s:print''.join(l)

Try it online!

mdahmoune

Posted 2017-09-19T18:12:07.403

Reputation: 2 605

import * -> import*; in s.tolist() -> in s – ngn – 2017-09-28T18:53:42.273

1154 bytes. – Jonathan Frech – 2017-11-10T08:25:19.560

1

Canvas, 10 bytes

#6[↔ω⤢∔ω↶×

Try it here!

dzaima

Posted 2017-09-19T18:12:07.403

Reputation: 19 048

0

JavaScript (Node.js), 1233 bytes

_=>` 18# 9# 2# 4# 2# #5 2#2 4#
 18#2 8#4 4#7 2# 3# 4#2
 16#4 8#2 6#2 4# 2#3 #7
 16# 2# 9# 7# 4#5 #3 # 2#
 16# 2# #3 #5 3#5 4# 9# 2#
 16#7 #3 2# 2#3 2# 4#2 8#4
 16#2 4# 3# 2#3 2# 2#7 8#2
 17# 4#2 2#5 3#5 # 2# 9#
 16#2 4# 19# 9# 2# #5
 17# 4#2 18#2 8#7 2#
 17#7 16#4 8#2 4# 2#3
 16#3 # 2# 16# 2# 9# 4#5
 20# 2# 16# 2# #3 #5 4#
 20#4 16#7 #3 2# 4#2
 20#2 18#2 4# 3# 2#7
 21# 19# 4#2 2#5 # 2#
 4# 2# #5 2#2 4# 19#
 4#7 2# 3# 4#2 18#2
 4#2 4# 2#3 #7 16#4
 5# 4#5 #3 # 2# 16# 2#
 #5 4# 9# 2# 16# 2# #3
#3 2# 4#2 8#4 16#7
 2# 2#7 8#2 18#2 4#
 2#5 # 2# 9# 19# 4#2
 10# 9# 2# #5 3#5 2#2 4#
 10#2 8#7 2# 2#3 2# 3# 4#2
 8#4 8#2 4# 2#3 2# 2#3 #7
 8# 2# 9# 4#5 3#5 #3 # 2#
 8# 2# #3 #5 4# 7# 9# 2#
 8#7 #3 2# 4#2 6#2 8#4
 8#2 4# 3# 2#7 4#4 8#2
 9# 4#2 2#5 # 2# 4# 2# 9#
 42#
 42#2
 40#4
 40# 2#
 40# 2# #3
 40#7
 40#2 4#
 41# 4#2
 33#5 2#2 4#
 32#3 2# 3# 4#2
 34# 2#3 #7
 34#5 #3 # 2#
 34# 9# 2#
 34#2 8#4
 32#4 8#2
 32# 2# 9#
 34# 9# 2# 4# 2# #5
 34#2 8#4 4#7 2#
 32#4 8#2 6#2 4# 2#3
 32# 2# 9# 7# 4#5
 32# 2# #3 #5 3#5 4#
 32#7 #3 2# 2#3 2# 4#2
 32#2 4# 3# 2#3 2# 2#7
 33# 4#2 2#5 3#5 # 2#
 32#2 4# 19#
 33# 4#2 18#2
 33#7 16#4
 32#3 # 2# 16# 2#
 36# 2# 16# 2# #3
 36#4 16#7
 36#2 18#2 4#
 37# 19# 4#2`.replace(/(.)(\d+)/g,(_,c,n)=>c.repeat(n))

Try it online!

totallyhuman

Posted 2017-09-19T18:12:07.403

Reputation: 15 378

Ooh, what's the problem now? Erm... Am I missing something? – totallyhuman – 2017-09-19T22:49:50.663

1

I didn't downvote, but, fyi, it can be compressed much more using this.

– None – 2017-09-19T23:54:55.000

I didn't either, but this isn't in the spirit of the question. The pattern was generated, presumably, by some simple recursive procedure. The challenge is determine the rule, at which point your solution will be extremely short. – Jonah – 2017-09-20T01:35:23.287

I upvoted. It's a valid solution, though far from what I expect the best js one to be (<300 chars). – ngn – 2017-09-20T05:20:39.150

1Convert to base 36 to save ~50 bytes. – Shaggy – 2017-09-20T07:30:53.027

2I am completely aware that this is not the optimal solution or the shortest solution or a clever one. I simply tried using an algorithm and it ended up being this. This is, however, a perfectly valid solution and hence doesn't deserve downvotes. Boring solutions should not be upvoted but they shouldn't be downvoted either. – totallyhuman – 2017-09-20T22:01:00.240

As such, I am not switching to a "something compressed something" solution nor am I golfing this any further. – totallyhuman – 2017-09-20T22:05:44.613

0

C# (.NET Core), 976 969 bytes

o=>{foreach(var l in new[]{35223185965568,52841249260288,0xf00c0c277f00,0x9004043ee900,0x977c7c200900,0xfee4e4300f00,0xc22727f00c00,73934616658944,0xc2000020097c,73667282210788,0x7f0000f00c27,0xe9000090043e,9895614577696,0xf0000fee430,0xc0000c227f0,4398050918032,0x97cc20000200000,0xfe44300003<<20,0xc277f0000f<<20,0x43ee900009<<20,0x7c20090000970000,-0x1bcff0ffff020000,0x27f00c0000c20000,0x3e90040000430000,9017629528424448,0x300fe4e4430000,0xf00c27277f0000,0x90043e3ee90000,0x977c2020090000,0xfee430300f0000,0xc227f0f00c0000,0x433e9090040000,2097152,3145728,15728640,9437184,9895936,16646144,12713984,4390912,2093088768,3829596160,662634496,1055457280,537460736,806289408,4027318272,2416181248,537463164,806293476,4027321383,2416182334,2541517856,4276413488,3257346032,1128152720,3254779936,1124073520,2130706672,3909091472,150995095,251658494,201326786,67108931})System.Console.WriteLine(System.Convert.ToString(l,2).PadLeft(64).Replace('0',' ').Replace('1','#'));}

Try it online!

my pronoun is monicareinstate

Posted 2017-09-19T18:12:07.403

Reputation: 3 111

Hi, welcome to PPCG! This looks almost exactly the same as @IanH's C# .NET answer.. So if you have any improvements for his, make a comment instead of creating a new answer that is almost exactly the same. As for your question, you can use <s>969</s> to cross out the previous bytes.

– Kevin Cruijssen – 2017-09-20T11:26:05.110

4I do not have the reputation needed to comment. – my pronoun is monicareinstate – 2017-09-20T11:26:57.317

Please don't try to circumvent the rep requirements. – Shaggy – 2017-09-20T11:33:44.110

2Does this mean that in PPCG I cannot try to help others if my reputation is too low? – my pronoun is monicareinstate – 2017-09-20T11:35:04.323

3@Shaggy to be fair, stackexchange is a bit harsh on newcomers, let's not make it harder for them by assuming malice too quickly – ngn – 2017-09-21T08:51:06.030

0

C# (.NET Core), 739 bytes

_=>{var r="";for(int i=0,j,k=0;i<626;i++)for(j=0;j++<@"4#+#$#&#$##'$$&#=$*&&)$#%#&$:&*$($&#$%#):#$#+#)#&'#%##$#:#$##%#'%'&#+#$#:)#%$#$%$#&$*&:$&#%#$%$#$)*$=#&$$'%'##$#+#<$&#5#+#$##'5#&$4$*)$#5)2&*$&#$%2%##$#2#$#+#&'7#$#2#$##%#'&#;&2)#%$#&$:$4$&#%#$);#5#&$$'##$#*#$##'$$&#5#;)$#%#&$4$:$&#$%#)2&;#&'#%##$#2#$#7'&#+#$#2#$##%2%$#&$*&2)5#$)*$4$&#5'##$#+#5#&$<#+#$##'%'$$&#=$*)$#$%$#%#&$:&*$&#$%$#$%#):#$#+#&'%'#%##$#:#$##%#'&#)#+#$#:)#%$#&$($*&:$&#%#$)&&*$=#&$$'##$#&#$#+#^#a$^&^#$#^#$##%Z)[$&#\#&$S'$$&#S%$#%#&$T#$%#)T'#%##$#T#+#$#T$*&R&*$T#$#+#V#+#$#&#$##'F$*&&)$#D&*$($&#$%B#$#+#)#&'C#$##%#'%'&#G)#%$#$%$#&$F$&#%#$%$#$)G#&$$'%'##$#F$&#5#H#&$4$G)2&F%##$#2#$#J#$#2#$##%F&2)G$4$&#H#5#&$"[i]-34;){r+=i%2<1?' ':'#';if(++k%64<1)r+='\n';}return r;}

Try it online!

Uses the same approach is this other answer.

Charlie

Posted 2017-09-19T18:12:07.403

Reputation: 11 448

0

K (ngn/k), 32 31 27 bytes

6{,[|x;""x],'(+|+x),+x}/"#"

Try it online!

6{ }/ 6 times do

+x transpose

|x reverse vertically

+|+x reverse horizontally

, concatenate vertically

,' concatenate horizontally

,[A;B] is the same as A,B. it helps avoid parentheses around A and around the whole expression

""x use the elements of x as indices in the empty string. out-of-bounds indexing produces spaces, so this expression will return an all-spaces matrix, same size as x

ngn

Posted 2017-09-19T18:12:07.403

Reputation: 11 449