Programming Puzzles & Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Your task is to print the following:

 _     _                            _______                           _ 
| |   | |                          (_______)          _              | |
| |__ | | ____ ____  ____  _   _    _____   ____  ___| |_  ____  ____| |
|  __)| |/ _  |  _ \|  _ \| | | |  |  ___) / _  |/___)  _)/ _  )/ ___)_|
| |   | ( ( | | | | | | | | |_| |  | |____( ( | |___ | |_( (/ /| |    _ 
|_|   |_|\_||_| ||_/| ||_/ \__  |  |_______)_||_(___/ \___)____)_|   |_|
              |_|   |_|   (____/

Remember, this is , so the shortest code wins. Good luck.

Please note that this question is not a duplicate of Minecraft Mirrored as it takes no input, and so it is not necessary to process it.

share|improve this question
2  
@FryAmTheEggman this is quite different from the supposed duplicate Rickroll. Only a few symbols are used: |()/\_ which leads to completely different forms of compression. We have had similar ASCII art challenges before, but I'd like to see this question run to see if anyone takes advantage of the geometry. On the other hand it's not hugely remarkable, and you'r right, we don't need an Easter tag. – Level River St Mar 27 at 1:06
1  
@FryAmTheEggman The best solution to a kolmogorov-complexity depends heavily on the structure of the output. This isn't text, so it isn't a dupe. – lirtosiast Mar 27 at 1:08
7  
@lirtosiast The limited character set might matter, but I feel like this will almost certainly be dominated by the same techniques as in the text based questions. That's just my opinion though, the community gets to decide which of our views to enforce, after all. – FryAmTheEggman Mar 27 at 1:25
4  
Possible duplicate of Minecraft Mirrored – muddyfish Mar 28 at 9:13
1  
This is different, as there is no input, and so it is not necessary to take input and analyze it. – thepiercingarrow Mar 29 at 15:59

16 Answers 16

JavaScript (ES6), 377 373 360 359 345 bytes

Thanks to @Neil for a one byte savings, and to @edc65 for another 14!

Figured I'd give it a shot. Compresses common repeating patterns in the text.

_____ (5 underscores) is stored as _5

      (5 spaces) is stored as  5

 | | | | | (5 of the  | pattern) is stored as ~5


console.log(` _ 5_ 28_7 27_
|~ 2~2 26(_7) 10_ 13~2
|~_2~2 _4 _4 2_4 2_ 3_ 4_5 3_4 2_3|~_ 2_4 2_4|~
| 2_2)|~/ _ ~ 2_ \\| 2_ \\|~3 ~ 2_3) / _ ~/_3) 2_)/ _ 2)/ _3)_|
|~ 2~ ( (~9_|~ ~2_4( (~2_3~2_( (/ /|~ 4_
|_| 2~_|\\_|2_|~|_/|~|_/ \\_2 ~ ~_7)_|2_(_3/ \\_3)_4)_| 2~_|
 13~_| 2~_| 3(_4/`.replace(/(.)(\d+)/g,(_,a,b)=>a.repeat(b)).replace(/~/g,' |'))
share|improve this answer
    
Note the ES6 =>. – CalculatorFeline Mar 27 at 3:43
    
Seems like bytes might be saved by RLEing _s. – CalculatorFeline Mar 27 at 4:14
    
@CatsAreFluffy What do you mean by that? It compresses runs of _ with an _ followed by how many there are in the run – jrich Mar 27 at 4:15
    
Oops, I was still on the 377 byte version. – CalculatorFeline Mar 27 at 5:07
    
~1 or _2 hardly seems worth it. (Why not use |2 for instance?) – Neil Mar 27 at 20:12

Bubblegum, 130 bytes

0000000: 758f b579 0530 18c4 7a4f a1d2 7fe5 8102  u..y.0..zO......
0000010: 5ae4 760f 5de8 91ee b3cc 8400 f523 2c3c  Z.v.]........#,<
0000020: 4656 0850 3f60 5b86 5fe4 8290 15a2 84a0  FV.P?`[._.......
0000030: 5a61 4d0b b64f 2b35 c476 eb1e 844e c841  ZaM..O+5.v...N.A
0000040: 08c8 731d 1a02 ead0 1547 1d70 beba 9fd6  ..s......G.p....
0000050: 31bf 5fdb 6c72 1d7b 1051 ed8a a884 7c76  1._.lr.{.Q....|v
0000060: 0fa7 db91 1503 c43c 9b18 124f cdb3 4220  .......<...O..B 
0000070: 9631 716b a71c 3bd6 ed8b 0b62 7ebd 55cf  .1qk..;....b~.U.
0000080: 7a07                                     z.

Try it online.

Compressed using zopfli --deflate --i10000.

share|improve this answer
    
Isn't this 588 bytes? – thepiercingarrow Mar 27 at 9:39
9  
@MarkWright What quartata posted is a hexdump of the actual code – Sp3000 Mar 27 at 11:08
    
Ah, okay thanks. – thepiercingarrow Mar 27 at 14:51

Brainfuck, 565 378 bytes

This basicly stores the characters used in the array, then navigates through the array, printing them accordingly. Currently quite long, will shorten it up.

+>+++++[<[->>+<<]>>[-<<++>>]<-]<
[>>>+>+>++++>+>+++>+>+++<<<<<<<<<-]
>>+++[->+++++>+++<<]>>->---->>->+++++++++>---->++++++++++
<<<<.>.<.....>.<............................>.......<...........................>.<.>>>>.<<<<<.>.<.>...<.>.<.>..........................<<.>>>.......>.<<..........>.<..............<.>.<.>>>>>.<<<<<.>.<.>>..<.<.>.<.>.>....<.>....<..>....<..>.<...>.<....>.....<...>....<..>...<<.>.<.>>.<..>....<..>....<<.>.<.>>>>>.<<<<<.>..>..>.<<<.>.<.<<.>>>.>.<..<.>..>.<.>>>.<<<<.>..>.<.>>>.<<<<.>.<.>.<.>.<.>..<.>..>...>.<<.<<<.>>>.>.<..<.<<.>>>>...>.<<..>.>.<<<<<.>>>.>.<..>>.<<<<<.>>>.>...>.<.<<.>>>>>.<<<<<.>.<.>...<.>.<<.>>.<<.>>.<.>.<.>.<.>.<.>.<.>.<.>.<.>.<.>.<.>>.<<.>.<.>..<.>.<.>>....<<<.>>.<<.>>.<.>.<.>>...<.<.>.<.>>.<<<.>>.<<.<.>>>.<<<.>>.>.<.>....>.<.>>>>.<<<<<.>>.<<.>...<.>>.<<.>>>>.<<.<<..>>.<<.>.<..>>.<<<<.>>.>.<..>>.<<<<.>>>.>>>.<<..<..<.>..<.>>.......>.<.<<..>>.<<<.>>>...<<<<.>>>.>>>.<<...>.<....>.<.<<.>...<.>>.<<.>>>>>.<<<<..............<.>>.<<.>...<.>>.<<.>...<<.>>>....<<<<.

EDIT: by rearranging the order of the characters in the cells, I saved 186 bytes!

Note: this is 378 bytes, by the encoding described here.

share|improve this answer
6  
That's not how a byte count works. If you can't pass the exact sequence of bytes to the interpreter, you can't claim that number of bytes as your byte count. – Doorknob Mar 27 at 15:13
1  
If there is a BF-interpreter which takes in 3-bits/char. Please add a link to the interpreter and a hexdump/pastebin of the encoded code, if you wish to claim 565 bytes. – Downgoat Mar 27 at 15:23
1  
Yes, there is a 3-bit brainfuck interpreter. Add a link to this in your answer along with a hexdump/binary representation of your code. The language wouldn't be brainfuck anymore so you'd have to specify "CompressedFuck" in the header. I recommend keeping it as-is as when seeing brainfuck people don't expect it to be very short. – Downgoat Mar 27 at 15:28
1  
This doesn't look like a valid BinaryFuck program; it doesn't start with a 1. Please provide a link to an interpreter and the hexdump of the source code so your results can be reproduced. – Dennis Mar 27 at 16:12
1  
Since this is a trivial BF derivative, why not just answer in BF? – lirtosiast Mar 27 at 23:47

JavaScript (ES6), 380 bytes

For completeness this is my effort to use a different compression method, although as it turns out it's not as efficient as run length encoding. Each digit specifies that the last N already generated characters are repeated. Subsequent digits can repeat already repeated characters, e.g. | 23 turns into | | |. I only wish I could compress a run of three characters.

f=(s=` _  26  2479__23   2499_ 
| 2  6  2379(__23)   25_  237|2
| |__ |2 __25  __2  _ 4   ___2   __2  ___| |_  ___6_| |
|  __)| |/ _  |  _ \\6| 24 |  ___) / _  |/___)  _)/ _  )/ ___)_|
| 2  | (2 |248 |_| 23|__2( 2| |___ |2_( (/ /| 2   _ 
|_|   |_|\\_||_| ||_/6 \\__  |3__23)_||_(___/ \\___)_5|   |_|
  237|_|6   (__2/`,r=s.replace(/(.*?)(\d)/,(_,p,n)=>p+p.slice(-n)))=>r==s?r:f(r)

o.textContent = f()
<pre id=o></pre>

share|improve this answer

Perl 5, 305 bytes

perl -M5.01 happy.pl, where happy.pl is:

$_=' _ 5_ 28_7 27_
~~  ~~ 25(_7) 10_ 14~~
~p_ ~~_4 _4  _4  _ 3_ 4_5 3_4  _3~p  _4  _4~~
~ __)~|/ _  ~ _ \~ _ \~4 ~ _3) / _  |/_3)  _)/ _  )/ _3)_|
~~  ~( ( ~8p~~ ~|-4( ( ~p__ ~p( (/ /~~ 3_
p~  p|\_|p~|p/~|p/ \__  ~ p_6)_|p(_3/ \_3)_4)_~  p|
 14p~  p~  (_4/';s/(.)(\d+)/$1x$2/ge;s/~/| /g;s/p/|_/g;say
share|improve this answer
    
Surely you should use L as the shorthand for |_ ;-) – Neil Mar 28 at 17:03

JavaScript, 297 bytes

console.log(` 29 288999002889 3 
19 18899 500_)82891
1__ 1 0_ 02022 290_2 02012020_1
|3_)162|3 \\|3 \\1 19|90) 62|/0)3)62)60)_|
19 |55 1 1 1 1 71910_(5 10 1_(56/193 
7|4\\_|717/176\\_2|9|00_)_|7(06\\0)0_)_|4
8 44950_/`.replace(/\d/g,n=>`___,| |,_  ,  _,   |_|, (,/ ,|_,          ,  `.split`,`[n]))

Simple encoding of the ten most (as far as I can tell) common substrings. They are not in order because of overlaps; my encoder (below) needs to see e.g. '_ ' and ' _' before ' '.

(s,a,t=s)=>a.map((t,i)=>s=s.split(t).join(i))&&[s,(b=>{b=new Map;for(i=0;i<s.length;i++)for(j=0;j<i;j++)b.set(s.slice(j,i),s.length-s.split(s.slice(j,i)).join().length-i+j-1);return[for(x of b)if(x[1]>0&&!/\d/.test(x[0]))x].sort(([a,b],[c,d])=>b-d)})(),t.length-(s+' '+a).length]

This takes a string and an array of substrings to encode and returns a) the encoded string b) the list of potential next savings c) the number of bytes saved so far.

share|improve this answer

C, 517 bytes

main(){printf("\
 _     _                            _______                           _  \n\
| |   | |                          (_______)          _              | | \n\
| |__ | | ____ ____  ____  _   _    _____   ____  ___| |_  ____  ____| | \n\
|  __)| |/ _  |  _ \|  _ \| | | |  |  ___) / _  |/___)  _)/ _  )/ ___)_| \n\
| |   | ( ( | | | | | | | | |_| |  | |____( ( | |___ | |_( (/ /| |    _  \n\
|_|   |_|\_||_| ||_/| ||_/ \__  |  |_______)_||_(___/ \___)____)_|   |_| \n\
              |_|   |_|   (____/\
");}

C, 1014 bytes

main(){

char* z[255]={ 0 }         ;
z[49]=" ";z[57]="         ";
z[50]="  ";z[56]="        ";
z[51]="   ";z[55]="       ";
z[52]="    ";z[54]="      ";
z[53]="     ";z[90]="\n"   ;

      z[65]="| "   ;
    z[66]="| |"      ;
   z[67]="| | |"      ;
  z[68]="| | | |"      ;
 z[69]="| | | | |"      ;
 z[70]="| | | | | |"    ;
 z[71]="| | | | | | |"  ;
z[72]= "| | | | | | | |" ;
z[73]="| | | | | | | | |";
z[82]=        "_________";
 z[81]=        "________";
 z[80]=         "_______";
  z[79]=        "______";
  z[78]=         "_____";
    z[77]=       "____";
    z[76]=       "___";
      z[75]=     "__";
        z[74]=  "_";

char*t="Z1J5_9991P999J1ZB3B998(P)91_95|1|ZBK1B1M1M2M2J3J4N3M2LBJ2M2MBZ|2K)B/1_2|2J1\\|2J1\\D2|2L)1/1J2|/L)2J)/1J2)/1L)J|ZB3|1(1(1I_B2BM(1(1BL1B_(1(/1/B4J1Z|J|3|J|\\J||_B|J/B|J/1\\K2|2|P)J||J(L/1\\L)M)J|3|J|Z95|J|3|J|3(M/";

int i=(-1);while(++i<207)(z[t[i]]?printf(z[t[i]]):putchar(t[i]));

}
share|improve this answer

JavaScript (ES6), 354 bytes

Another attempt. Not as efficient as run length, unfortunately.

i=0,console.log(`1c1bt96zfx1!1n4ikabr1w5!1n4iut4kyue!krgqthnkpkem8!43tb4j2urme!8hwrsagny80!69dfowb7hvk!2xj89rpvcb2!23l14ken5i1!1xzn6ns7j78!1tzyivgb4h2!1yy885vts00!12du7km7f51!1lvpcyzgbfq!17nicizf8og0!1246xqebgb9!1n4j181hywz!`.replace(/\w+!/g,v=>parseInt(v,36).toString(4).replace(/./g,w=>"_ |"[w]||`
()

)/\\\\)//))/)/)
((((((//
\\//\\)(/\\))
(/`[i++])))

Stores a bunch of base-36 numbers in the first string, delimited by a ! separator. Then replaces the numbers (along with the !) with the numbers' base-4 representations. Replaces all the 0's, 1's, and 2's in the base-4 number with _,  , and | respectively, and all the 3's are replaced with the elements in the second string sequentially.

share|improve this answer

Lua, 353 bytes

Program:

a=(" _ 5_ 28_7 27_\n|~ 2~2 26(_7) 10_ 13~2\n|~_2~2 _4 _4 2_4 2_ 3_ 4_5 3_4 2_3|~_ 2_4 2_4|~\n| 2_2)|~/ _ ~ 2_ \\| 2_ \\|~3 ~ 2_3) / _ ~/_3) 2_)/ _ 2)/ _3)_|\n|~ 2~ ( (~9_|~ ~2_4( (~2_3~2_( (/ /|~ 4_\n|_| 2~_|\\_|2_|~|_/|~|_/ \\_2 ~ ~_7)_|2_(_3/ \\_3)_4)_| 2~_|\n 13~_| 2~_| 3(_4/"):gsub("(.)(%d+)",function(a,b)return a:rep(b)end):gsub("~"," |")print(a)

Thanks to @jrich for compression.

share|improve this answer

Ruby, 271 262 248 bytes

require'zlib'
require'base64'
puts Zlib.inflate Base64.decode64'eJx1UMENxDAI+zMFz+bFQpG8CMMX46DeVWpQrJjYhGDp6e7Cj3VBaz0p/CvKbrWBLkStYHAcEH8uafqhUKE6rjoFTWS+BxWdZD9ShHrDakosju6oe7sq8h04hZLPHgX0AdLwODOBG8VOy0a2MRFC31CPOTOiggPrq6LKyW6vqU1+Zhx2A7NMZ9I'

Try it here

share|improve this answer

Racket, 367 364 bytes

(require file/gunzip net/base64)((λ(o)(gunzip-through-ports(open-input-bytes(base64-decode #"H4sIAOhN/lYAA31QwQ3EMAj7dwqezYuFInkRhj+MoWor9UBCmGBDMBhN8cMg+9dhR1hkovhhZwutO/FhSadQzqJQDdXkjsOYfa5Hkm4QEsp0ZeYkEdmeKK8i91GHazesgoyJEdfXzvR4O1ooOLY7oA8QunnfhDdCCSE2oogBV7QN7RhzI3bwYPWUUDXRj9fVpj439h/OlCKU1gEAAA=="))o)(displayln(get-output-string o)))(open-output-bytes))

Ungolfed

(require file/gunzip net/base64)
((λ (o)
   (gunzip-through-ports
    (open-input-bytes
     (base64-decode
      #"H4sIAOhN/lYAA31QwQ3EMAj7dwqezYuFInkRhj+MoWor9UBCmGBDMBhN8cMg+9dhR1hkovhhZwutO/FhSadQzqJQDdXkjsOYfa5Hkm4QEsp0ZeYkEdmeKK8i91GHazesgoyJEdfXzvR4O1ooOLY7oA8QunnfhDdCCSE2oogBV7QN7RhzI3bwYPWUUDXRj9fVpj439h/OlCKU1gEAAA=="))
    o)
   (displayln (get-output-string o)))
 (open-output-bytes))

Based off a similar challenge I answered.

share|improve this answer

𝔼𝕊𝕄𝕚𝕟, 72 chars / 209 bytes

`Эć훼쎧漤詼媰਀㻆僚픈耊Ⓢኍ⋱쬝ᇑ덆䖇䂊՛樥첾㨭쯠ཁ톇:덱螟醮䖉⥊覂削ꇉ漈涹႘챘ඕ꼳⁒᭷Ừ䒕鶀놜㆝〢ﱱꎀ쎴䋈㗂䅉Ⴄቀ쳵菨ⶩ∉툲耀

Try it here (Firefox only).

Well, at least the char count is great, but we can't use the custom code page. It's just an LZString-decompression. I'm also working on another solution - more on that later.

share|improve this answer

Python 3, 377 bytes

from re import*;i=0
r=r'2_.7_./ .|2.| .4_.\\. _._d|.( (.3_). _ .2|_. |2 ._| |.a| |./ _2 .|3 |_. 4_2 . | |.\n'
e='an5n28 t27jf3b26 (t)10n14bfub pcp2n3n4 5_3c3g_2c4gar u)q|erjorjo|bhr k e|/k2n)e)sk_|f3 qlbbbb |g2bplb3_b_ls/q|4ja|mo_iqi/qisou2h|t)_i(3_sokp)ma14 |m3 (p/'
for j in r.split('.'):e=sub(chr(117-i),j,e);i+=1
print(sub('(\d+)(.)',lambda x:int(x.group(1))*x.group(2),e))

similar to the javascript answer, used RLE plus a bunch of replacements for common substrings.

Think I went a bit over the top with the replacing stuff, probably didn't help that much but oh well.

share|improve this answer

Python 3, 263 bytes

Initial pass using builtins.

from base64 import*
from zlib import*
print(decompress(a85decode(b"Gas1Y_%\"=:#lAfQT$<1I,'acT5E):N/+l.oQs`98(esP<+T'c!7p'"
b";rpgIeCXZQ&]8Z,D1U/2<LjGq-FIBH)'D@dH'FCjS[&_Wa(Y9N^<LMJiMJrGNuf@S=?GWT(W34:oA%hQ<"
b"thh3pT#pD4$L]LSa%IG!R,BiQaoor91d>uo0VEQs4+2O[m4o")).decode())

some extra quotes and linebreaks added to avoid horizontal scroll for display purposes only (not counted in score)

share|improve this answer
5  
Don't worry about horizontal scroll. Just copy-paste the text as-is, because that's what we're interested in. – El'endia Starman Mar 27 at 18:44
    
I know, I just prefer to avoid it. May as well also not do hex dumps all pretty. – Nick T Mar 27 at 19:41
    
You could try to store the zlib data in a string. You slould escape some characters, but it's probably a lot shorter. See this answer as reference. – agtoever Mar 28 at 6:05
    
@agtoever the repr() of the raw string was much longer than ascii85 – Nick T Mar 28 at 18:56
2  
@NickT Please remove the additional quotes and whitespace. Your code should be such that we can copy/paste it into a byte-counter and get the same result. Thanks. If you want a nice, displayable version, post an un-golfed version. – mbomb007 Mar 29 at 16:08

CJam, 229

"3WPPEFXvN'vlFBse/cTD>.x:Na,Y&NJH^tZ%xL(NkYzo0Rq%BeV&Zl1T^2y69,W/QC4pL`nv<Jo$'Cq.'m2-3H#9teHi&<uyO>f V)D\E y'*]oGq*ODjQLyoS*GyM7;\Z.n6B;J@OyEaE!4'E5p5MOl^#[,ZtA;`jy,gTP^\;;i<A6^:k1%"' fm91b31b"}*+{~'NHIF\JLM
OGQK)(P/RST|_- \""f=~

No funky characters and no built-in compression :)

Try it online

share|improve this answer

Python 2, 159 bytes

This source contains non-printable characters, so it is presented as a hexdump that can be decoded with xxd -r.

00000000: efbb bf70 7269 6e74 2278 017d 8fb5 7540  ...print"x.}..u@
00000010: 3114 c5fa 3f85 4abb f240 012d a2dd 432f  1...?.J..@.-..C/
00000020: 4cba c732 1302 20ff e0c0 dfc8 1501 e33f  L..2.. ........?
00000030: 580e 9b77 e40b d115 2911 aa23 1c33 05a7  X..w....)..#.3..
00000040: cf54 6ae4 74c7 7310 baa3 8310 c86d 8c27  .Tj.t.s......m.'
00000050: 04ea 6656 9c79 9bfb a5fb 6cdd f6fe b5c5  ..fV.y....l.....
00000060: a2ef 3182 4875 56a4 123d 770f 2702 902b  ..1.HuV..=w.'..+
00000070: 03b2 5bcb 28cf 985b 8520 876d b974 a6dc  ..[.(..[. .m.t..
00000080: be28 20bb f842 f6ee a57a 1e01 c1a2 733e  .( ..B...z....s>
00000090: 222e 6465 636f 6465 2827 7a69 7027 29    ".decode('zip')
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.