20
\$\begingroup\$

Challenge

Print or return the Stack Exchange favicon, as provided below:

 ___________________
/                   \
---------------------
|                   |
---------------------
|                   |
---------------------
\__________    _____/
           |  /
           | /
           |/

This is , so the shortest answer in each language wins.

\$\endgroup\$
7
  • 2
    \$\begingroup\$ Is the top left corner intended to be slightly misaligned? \$\endgroup\$ Jul 1, 2017 at 1:04
  • \$\begingroup\$ @ETHproductions It was intended, but I'm changing it now. It looks kind of awkward either way. \$\endgroup\$ Jul 1, 2017 at 1:18
  • 2
    \$\begingroup\$ The actual output is 219 bytes, for reference. \$\endgroup\$ Jul 1, 2017 at 1:55
  • \$\begingroup\$ Trailing lines and/or trailing spaces on lines are allowed, right? \$\endgroup\$
    – dzaima
    Jul 1, 2017 at 12:55
  • 1
    \$\begingroup\$ Related \$\endgroup\$ Jan 8, 2018 at 17:38

37 Answers 37

43
\$\begingroup\$

Operation Flashpoint scripting language, 263 195 bytes

f={r="                   ";t="---------------------\n";s=" ___________________\n/"+r+"\\n"+t+"|"+r+"|\n"+t+"|"+r+"|\n"+t+"\__________    _____/\n           |  /\n           | /\n           |/";s}

Not the right tool for the job.

Call with:

hint call f;

Output:

The formatting fails, because the font is not monospaced.

\$\endgroup\$
5
  • 49
    \$\begingroup\$ Just what makes you look at a challenge and think "oh, I should answer that in Operation Flashpoint" puzzles me... \$\endgroup\$ Jul 1, 2017 at 1:53
  • 8
    \$\begingroup\$ @totallyhuman I guess its scripting lang is just fun to write in. It has quite a few quirks and limitations, so you sometimes need to use some strange workarounds, which makes it interesting (yet not very practical). \$\endgroup\$
    – Steadybox
    Jul 1, 2017 at 2:08
  • 5
    \$\begingroup\$ Hardcoding the answer would probably give you a better score. \$\endgroup\$
    – Maya
    Jul 1, 2017 at 8:26
  • 3
    \$\begingroup\$ @NieDzejkob Now it's shorter than just hardcoding the output, but more boring than the previous version. \$\endgroup\$
    – Steadybox
    Jul 1, 2017 at 14:28
  • 1
    \$\begingroup\$ @totallyhuman And with this challenge in particular, I wanted to test how the language would fare with a Kolmogorov-complexity challenge (for which it's far less than ideal for). \$\endgroup\$
    – Steadybox
    Jul 1, 2017 at 22:00
11
\$\begingroup\$

Charcoal, 38 37 33 30 bytes

←×_χ↓F/||⟦ι¹¹⟧\×_⁹‖B_×ψ⁴↙↙³↑↑³

Try it online! Link is to verbose version of code. Edit: Managed to save a byte with the help of a reflection, although @CarlosAlejo shows that it can in fact be done in 37 bytes without reflecting. Saved a further 4 bytes by drawing the left ¾ and reflecting the final ¼. Edit: Previous 33-byte answer depended on ReflectButterflyOverlap() not overprinting the overlap area with the reflection, so in case this behaviour changed, I sought a solution that didn't rely on that, and the result turned out to be shorter anyway, thanks to my creative use of printing an array. Explanation:

←×_χ                            Print 10 `_`s leftwards (top row)
    ↓                           Move down to the next row
     F/||                       For each character in the string `/||`
          ι                     Current character
           ¹¹                   Integer 11, prints as `-----------`
         ⟦   ⟧                  Put both into an array
                                Implicitly print on separate lines
              \                 Implicitly print `\`
               ×_⁹              Implicitly print 9 `_`s
                  ‖B            Reflect right, overlapping the axis
                    _           Implicitly print `_`
                     ×ψ⁴        Implicitly delete 4 characters
                        ↙↙³     Move down left and print three `/`s
                           ↑↑³  Move up and print three '|'s
\$\endgroup\$
2
  • 2
    \$\begingroup\$ Very well played. I love that there's four Charcoal answers to this question! ‖BO wasn't in the language the last time I used it--I'll have to keep that in mind for the future. \$\endgroup\$
    – DLosc
    Jul 2, 2017 at 1:04
  • \$\begingroup\$ I had to see for myself what you meant with "reflecting the final ¼". Well played indeed! \$\endgroup\$
    – Charlie
    Jul 2, 2017 at 21:13
9
\$\begingroup\$

///, 98 bytes

/'/  //&/
"""
|!! |//%/\\\/
!'|//#/_____//"/-------//!/'''' / ###____
\/!! \\&&
"""
\\##''#%'% %\/

Try it online! Or, see it interactively!

\$\endgroup\$
3
  • 3
    \$\begingroup\$ Is there a utility that allows me to see the different "step"s of a /// program? (Partial execution after each replace.) That could help me to understand them better. \$\endgroup\$
    – CAD97
    Jul 1, 2017 at 4:25
  • \$\begingroup\$ @CAD97 I've been fiddling around with the online interpreter, and it usually would come with debug options, but the way the online interpreter orders arguments, it doesn't function that way. You could grab a copy of the interpreter yourself and do something like perl slashes.pl -d1 code.txt. I'm presently working on an online execution environment for ///, but that might take some time. \$\endgroup\$ Jul 1, 2017 at 19:21
  • 3
    \$\begingroup\$ @CAD97 Said online thing is up, take a look! \$\endgroup\$ Jul 1, 2017 at 23:06
8
\$\begingroup\$

Python 2, 115 bytes, more creative idea

t,u,v,w,x,y,z='\n -/\\_|';k=w+t+11*u+z;i=t+21*v+t
print u+19*y+t+w+19*u+x+(i+z+19*u+z)*2+i+x+10*y+4*u+5*y+k+u,k,k+w

Try it online!

Python 2, 102 bytes, boring idea

print'eNrjUojHBFz6CpgghksXG+CqwaK2hgpqYxDuASkDM/S5kDUqKKDxUbn6XADUmClx'.decode('base64').decode('zip')

Try it online!

\$\endgroup\$
10
  • 2
    \$\begingroup\$ I am down voting this since I have seen this method used way too many times. It is just boring to see over and over again. \$\endgroup\$
    – R. Kap
    Jul 1, 2017 at 18:26
  • 8
    \$\begingroup\$ @R.Kap Unless there's a shorter way, that's a rather arbitrary reason to downvote. \$\endgroup\$
    – Dennis
    Jul 1, 2017 at 20:37
  • 1
    \$\begingroup\$ @Dennis Maybe, but I still stand by my opinion and have every right to express it. I have seen this method used countless times on these kinds of challenges and it requires little to no creativity on the OP's part, which are big aspects, at least in my opinion, of Kolomogorov complexity challenges, and hence my reason for the down-vote. \$\endgroup\$
    – R. Kap
    Jul 1, 2017 at 21:08
  • 2
    \$\begingroup\$ @R.Kap If general purpose compression algorithms can beat manual ones that easily, that's a problem of the challenge, not the answer. I didn't even manage to beat Bubblegum with Jelly, and decompression had very little overhead in Jelly. \$\endgroup\$
    – Dennis
    Jul 1, 2017 at 22:45
  • 2
    \$\begingroup\$ @Dennis I am not even talking about code length here. I am talking about effort and creativity, which this answer, in my opinion, fails to showcase in a language where one can do so much more, which is the reason I down-voted. Now, if you disagree with my reasoning that is fine. In that case, let us just agree to disagree and end this conversation right here before it gets too long. :) \$\endgroup\$
    – R. Kap
    Jul 2, 2017 at 0:05
8
\$\begingroup\$

JavaScript (ES6), 113 112 bytes

(Saved a byte thanks to @Craig Ayre.)

let f=

_=>` _19
/ 19\\
-21
| 19|
-21
| 19|
-21
\\_10 4_5/
 11| 2/
 11| /
 11|/`.replace(/.(\d+)/g,([a],b)=>a.repeat(b))
 
 console.log(f());

\$\endgroup\$
5
  • \$\begingroup\$ Looks like you have a stray space before the replacement function. I had just come up with a similar update for my JS solution at 113 bytes. Don't know whether I should post it or let you have it. \$\endgroup\$
    – Shaggy
    Jul 1, 2017 at 18:45
  • \$\begingroup\$ Ah, wait, only seeing now that you posted your solution before I posted mine. I'll delete mine when I get to a computer and you can save a byte with replace(/.(\d+)/g,(a,b)=>a[0].repeat(b)). \$\endgroup\$
    – Shaggy
    Jul 1, 2017 at 19:36
  • \$\begingroup\$ Thanks, Shaggy. I had written a program to automate this type of answer, and it was silly to have it output an unneeded space. Your suggested replace statement is certainly an improvement, which I've now incorporated in my program. \$\endgroup\$ Jul 1, 2017 at 22:06
  • 1
    \$\begingroup\$ Can you save a byte array matching a: ([a],b)=>a.repeat(b))? \$\endgroup\$
    – Craig Ayre
    Jul 4, 2017 at 15:26
  • \$\begingroup\$ Yes, thanks! I was unfamiliar with that syntax. \$\endgroup\$ Jul 4, 2017 at 15:30
7
\$\begingroup\$

SOGL V0.12, 32 31 bytes

^$∙r↑Ψ«2τγæΕž‘╬Æ╬⁷"ƧΡ⅟?0Ξ³‘6«8ž

Try it Here!

Explanation:

...‘               push a quarter of the icon
    Β             palindromize vertically
      ╬⁷           palindromize horizontally (these two should be ╬3 together, but spacing doesn't work correctly (though now it does since I fixed it))
        "...‘      push the extention
             6«8ž  at coordinates [12; 8] in the quad-palindromized image put that in

The quarter:

 __________
/
-----------
|
-----------

and the other part:

    
|  /
| /
|/
\$\endgroup\$
2
  • \$\begingroup\$ "togethe"? "trough"? Also, it took a little while to figure out that . in the explanation meant string. Maybe use ^...' and "...'? \$\endgroup\$ Jul 1, 2017 at 16:50
  • \$\begingroup\$ @CalculatorFeline I usually did ... for compressed strings (aka nonsense) but lately I started doing one or two. And feel free to fix my mistakes and grammar :p \$\endgroup\$
    – dzaima
    Jul 1, 2017 at 16:55
6
\$\begingroup\$

Python 2, 124 bytes

a,b,d,e,f,g,h=' _-|/\\\n';r=d*21+h+e+a*19+e+h;n=f+h+a*11+e;print a+b*19+h+f+a*19+g+h+r*2+r[:22]+g+b*10+a*4+b*5+n+a*2+n+a+n+f

Try It Online!

\$\endgroup\$
2
  • \$\begingroup\$ You don't ever use c, so you can eliminate it for 3 bytes. Try it online! \$\endgroup\$ Jul 1, 2017 at 16:39
  • \$\begingroup\$ @musicman523 I don't even know why I put that there. Thanks for the catch! :) \$\endgroup\$
    – R. Kap
    Jul 1, 2017 at 16:42
6
\$\begingroup\$

C (gcc), 187 bytes

Saved 2 bytes thanks to Cody Gray, and 3 bytes thanks to Keyu Gan!

#define a"         "
#define s a" "a
#define l"\n---------------------\n"
f(){puts(" ___________________\n/"s"\\"l"|"s"|"l"|"s"|"l"\\__________    _____/\n"a"  |  /\n"a"  | /\n"a"  |/");}

Try it online!

\$\endgroup\$
2
  • 2
    \$\begingroup\$ puts would be trivially shorter, if a trailing new-line is acceptable. \$\endgroup\$ Jul 2, 2017 at 6:39
  • \$\begingroup\$ you may use f() instead of main(). A function is also acceptable. \$\endgroup\$
    – Keyu Gan
    Jul 2, 2017 at 15:52
5
\$\begingroup\$

C, 167 bytes

i;char*d=" q    /()\\   A   |()|    A   |()|    A   \\h#c/  #&|!/   #&| /   #&|/",c,b;main(j){while(c=d[i++],b=c%5==2||c>123?c:c>95?95:c>45?45:c>=32?32:++c,i<47)for(j=c;j-->=b;)putchar(b);}

Try it online!

Note: a lot of apparent spaces above are actually the tab character.

Readable version:

i;
char *d = " q   /()\\   A   |()|    A   |()|    A   \\h#c/  #&|!/   #&| /   #&|/", c, b;
main(j) {
    while(
        c = d[i++],
        b = c % 5==2 || c > 123 ? c:
            c > 95 ? 95:
            c > 45 ? 45:
            c >= 32 ? 32:
            ++c,
        i < 47
    )
        for(j = c; j-- >= b;)
            putchar(b);
}

Explanation:

The data array, d, encodes the answer in literal single characters and coded repeated characters. Each character, c, in the data array is mapped to a base character, b, and a number of repetitions. It is then printed that many times.

Characters that are used only singly (slashes and the pipe) have ASCII codes 47, 92, and 124. Two of these are divisible by 5 with a remainder of 2 (c%5=2||c>123). I couldn't find a shorter condition to test for all three.

Characters that are repeated (underscore, dash, and space), with ASCII codes 95, 45, and 32 respectively, are coded with a higher ASCII code--increased by one per repetition. So, for example, a single space is just a space, but two spaces can be coded by the next ASCII character, the exclamation point. Where a coded character would be unsuitable because it meets the above modulo condition, it can be split, as with #& to represent eleven spaces. The same technique is used to avoid overlap between the space and dash character ranges.

Finally, the ten newlines are encoded as tabs to save bytes that would have been spent escaping the newlines with a backslash, then incremented for printing (++c).

\$\endgroup\$
3
  • \$\begingroup\$ Well done! I knew there were better C answers out there. \$\endgroup\$ Jul 2, 2017 at 0:37
  • \$\begingroup\$ Thanks! It was a fun challenge. I spent something like four hours on it, so I'm glad it worked out in the end. \$\endgroup\$
    – jamrolls
    Jul 2, 2017 at 0:44
  • \$\begingroup\$ 156 bytes \$\endgroup\$
    – ceilingcat
    May 25, 2023 at 7:42
4
\$\begingroup\$

Rust, 181 bytes

||" ___________________
/2\\
1
1
3
\\__________    _____/
4|  /
4| /
4|/".replace("1","3
|2|").replace("2",&" ".repeat(19)).replace("3",&"-".repeat(21)).replace("4",&" ".repeat(11))

Try it online!

Rust, 184 bytes

This version may be more golfable as adding further replace cost fewer bytes each. The first replace isn't part of the loop because it pulls double duty changing s into a String instead of a &'static str.

||{let mut s=" 5__5__5
/2\\
1
1
3
\\55    5/
4|  /
4| /
4|/".replace("1","3
|2|");for p in vec![("2"," ",19),("3","-",21),("4"," ",11),("5","_",5)]{s=s.replace(p.0,&p.1.repeat(p.2))}s}

Try it online!

\$\endgroup\$
4
\$\begingroup\$

Charcoal, 49 37 bytes

↓⁵\…_χ↓↓³↗↗³…_⁵↑/↑⁵↖\←…_¹⁹↓ /F³«P²¹¶¶

Try it online!

At last I could golf this a bit. This answer (unlike all other Charcoal answers) does not use reflection, but draws all the contour in one pass, leaving the horizontal bars for the end.

Link to the verbose version.

\$\endgroup\$
3
  • \$\begingroup\$ "Unlike all the other Charcoal answer" Actually my first answer did not use reflection either, but I will admit that I didn't spot the chance to golf a byte off by starting the drawing with the left vertical line. (The only other changes between our solutions are that you use Range where I used Times and you print a \ where I just printed :UpLeft 1 step.) \$\endgroup\$
    – Neil
    Jul 2, 2017 at 0:07
  • \$\begingroup\$ Although it seems the reflecting is till the way to go... \$\endgroup\$
    – Neil
    Jul 2, 2017 at 0:38
  • \$\begingroup\$ Also that's twice now that my s key didn't work... \$\endgroup\$
    – Neil
    Jul 2, 2017 at 0:38
3
\$\begingroup\$

Bubblegum, 40 bytes

Saved 1 byte by removing a trailing newline, thanks @ovs!

00000000: 5388 c704 5cfa 0a98 2086 4b17 1be0 aac1  S...\... .K.....
00000010: a2b6 860a 6a63 10ee 0129 0333 f4b9 9035  ....jc...).3...5
00000020: 2a28 a0f1 51b9 fa00                      *(..Q...

Try it online!

\$\endgroup\$
4
  • \$\begingroup\$ Without a trailing newline, this gets 40 bytes. \$\endgroup\$
    – ovs
    Jul 1, 2017 at 7:17
  • \$\begingroup\$ Thanks! I think my text editor automatically put one in. \$\endgroup\$ Jul 1, 2017 at 16:07
  • \$\begingroup\$ How did you create this? zlib.compress(s.encode(), 9) outputs 46 bytes, and the answer seems to be zlib. \$\endgroup\$
    – Maya
    Jul 3, 2017 at 18:44
  • \$\begingroup\$ Per Dennis's suggestion, I used zopfli --deflate to generate the raw DEFLATE stream, then used xxd to convert it into the xxd format. I believe zlib leaves a checksum, or is not a raw DEFLATE stream for some other reason. \$\endgroup\$ Jul 3, 2017 at 18:50
3
\$\begingroup\$

Charcoal, 38 bytes

←…_χP↑⁵P\F³«↑P¹¹↑»↗¹…_χ‖BM²¦⁷P↓⁴… ⁴↙↙³

Try it online!

I used Carlos's answer in its original form as a jumping-off point, but saved a good bit by using a reflection, taking advantage of horizontal symmetry. (Vertical symmetry wasn't worth it because the underscores ended up on the wrong row.) You can see the evolution of the canvas at each step here.

Here's the verbose version.

\$\endgroup\$
2
  • \$\begingroup\$ btw you can use -d to show each step (also sorry i've been changing charcoal so much, i'm not sure very many of the new ideas are very useful, especially the goat ascii-art builtin and part of the wolfram language haha) \$\endgroup\$
    – ASCII-only
    Jul 27, 2017 at 3:07
  • 1
    \$\begingroup\$ most useless charcoal program ever \$\endgroup\$
    – ASCII-only
    Jul 27, 2017 at 3:19
3
\$\begingroup\$

Python 2, 119 117 116 bytes

print''.join(' \n-/|\\_'[ord(x)/8-4]*int('1245abjl'[ord(x)%8],36)for x in' V(8&H(7(@&@(7(@&@(7(HT"S8(%@!8(%@ 8(%@8')

Try it online!

A bit of tortured run-length encoding...

EDIT: Save 3 bytes by replacing the set of lengths:

[1,2,4,5,10,11,19,21][ord(x)%8]

with

int('1245abjl'[ord(x)%8],36)

\$\endgroup\$
3
  • \$\begingroup\$ Wow! I was trying to think of an effective way to do this myself. \$\endgroup\$
    – GarethPW
    Jul 2, 2017 at 2:03
  • \$\begingroup\$ Nice code, but it seems that it is 119 bytes? \$\endgroup\$
    – mdahmoune
    Jul 2, 2017 at 15:11
  • \$\begingroup\$ @mdahmoune: Quite right - forgot to use r'' when checking the length... \$\endgroup\$
    – Chas Brown
    Jul 2, 2017 at 18:25
3
\$\begingroup\$

C++ 11 - 162 159 154 152 150 bytes

MSVC:

void f(){char*i="b t_b\nb/t b\\b\nv-b\nb|t b|b\nv-b\nb|t b|b\nv-b\nb\\k_e f_b/b\nl b|c b/b\nl b|b b/b\nl b|b/";while(*i)cout<<string(*i++-97,*i),i++;}

GCC: (+4 chars)

int f(){char*i="b t_b\nb/t b\\b\nv-b\nb|t b|b\nv-b\nb|t b|b\nv-b\nb\\k_e f_b/b\nl b|c b/b\nl b|b b/b\nl b|b/";while(*i){cout<<string(*i-97,*(i+1));i+=2;}}

Input string i is coded in char pairs:

  1. Count of chars to repeat (added to 'a' to be a legible character)
  2. Char to print

I think, there's still a lot of room for improvement here.

Edit:

  1. Replaced putchar with cout<<
  2. Remove while, Use string constructor to repeat chars
  3. Removed space before pointer and a spurious semi-colon ;;
  4. Compounding instructions with comma, removing braces.
\$\endgroup\$
4
  • \$\begingroup\$ C++11 does not support auto as a return type, that's a C++14 feature. However, you can fix this and save a byte by making the return type int. It doesn't appear that this code works, though; could you test it on Try it online! and see if you can fix it? \$\endgroup\$ Jul 2, 2017 at 23:14
  • \$\begingroup\$ Changed the return type auto -> void. I was testing on Visual Studio 2017 - automatically C++14. Added a version for gcc. \$\endgroup\$ Jul 3, 2017 at 0:32
  • \$\begingroup\$ Oh okay, gotcha. I'm running Linux so I don't have VS. Nice job! \$\endgroup\$ Jul 3, 2017 at 1:50
  • \$\begingroup\$ Hi Robert - your run length encoding approach is similar to my own; see here. I additionally pack each (length,char) pair into a single char instead of 2. There are 7 possible characters, and 8 distinct lengths; so I use the 56 characters in ' '..'X' for encoding; which saves 40 bytes with a little extra overhead for decoding. \$\endgroup\$
    – Chas Brown
    Jul 3, 2017 at 2:46
3
\$\begingroup\$

Pyth, 74 bytes

J*21\-L*db+d*19\_++\/y19\\V2J++\|y19\|;J++++\\*T\_y4*5\_\/V3+++y11\|y-2N\/

Try it online!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Welcome to PPCG! \$\endgroup\$ Feb 9, 2018 at 23:30
3
\$\begingroup\$

R16K1S60 Assembly, 152 144 Bytes

Writes output to screen peripheral the R16K1S60 in ASCII. Runs on The Powder Toy save 2012356. (See link in header for info)

The byte size of the program is the compiled result (Cells Used * 2), not the assembly.

You know you've done well when the logo takes more space than your bytecode.

a:
mov ex, ip
mov ax, .string
mov sp, ip
mov dx, 0x1000
send sp, dx
.loop:
mov bx, [ax]
cmp bx, ip
je .end
cmp bx, ip
je .newline

shr bx, cx, 8
and cx, 0x00FF
.inner:
send sp, cx
sub bx, ex
jnz .inner
.reentry:
add ax, ex
jmp .loop
.newline:
add dx, 0x0020
send sp, dx
jmp .reentry
.string:
dw 0x0120
dw 0x135F
dw 0x000C
dw 0x012F
dw 0x1320
dw 0x015C
dw 0x000C
dw 0x152D
dw 0x000C
dw 0x017C
dw 0x1320
dw 0x017C
dw 0x000C
dw 0x152D
dw 0x000C
dw 0x017C
dw 0x1320
dw 0x017C
dw 0x000C
dw 0x152D
dw 0x000C
dw 0x015C
dw 0x0A5F
dw 0x0420
dw 0x055F
dw 0x012F
dw 0x000C
dw 0x0B20
dw 0x017C
dw 0x0220
dw 0x012F
dw 0x000C
dw 0x0B20
dw 0x017C
dw 0x0120
dw 0x012F
dw 0x000C
dw 0x0B20
dw 0x017C
dw 0x012F
dw 0x0009
.end:
hlt

Explanation

The assembly code above implements a simple compression algorithm, with the words 0x000C being a newline and 0x0009 being the command to stop execution.

The other words are encoded simply, like this: 0xTTCC

  • T: Times to repeat the value

  • C: The ASCII character to print

The ASM uses every register available to it, including some of the less commonly used ones:

  • The Instruction Pointer, to get a few known values into quick recall to save some bytes (A constant value in an instuction that's not just a register uses an extra byte to store it)

  • The Stack Pointer is used as 6th general purpose register, because none of the code uses the stack.

Only AX, BX, CX, and DX are actually used for important data. EX and SP are used to store some constants that get frequently used.

It's somewhat simple, and has nil chance of winning, but it was fun to write!

See revision history for the old answer (It's just as large in terms of ASM)

funfact: if this was measured in words (in the case of the R16K1S60,16 bits) it'd be smaller than the pyth answer, at 72 bytes

\$\endgroup\$
2
\$\begingroup\$

Jelly, 50 48 45 bytes

21“©&Ẇƥ⁸þ/Ẉoụ’ḃ1pF“CṣʠėHẹỊtṡḤḶ’ṃ“ _/\-|”¤xs¹Y

Try it online!

\$\endgroup\$
0
2
\$\begingroup\$

V, 49 bytes

i ±¹_
/±¹ \2ÙÒ-jÓÓ/|
3äkGR\±_´ µ_/
±± |  /2ñÙlx

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Mathematica, 163 bytes

Row@Map[Column,Characters/@{" /-|-|-\\   ",r="_ - - -_   ",r,r,r,r,r,r,r,r,r,"_ - - - |||","_ - - -   /","_ - - -  / ","_ - - - /  ",r,r,r,r,r," \\-|-|-/   "},{1}]
\$\endgroup\$
2
\$\begingroup\$

PHP, 86 bytes

<?=gzinflate(base64_decode("U4jHBFz6CpgghksXG+CqwaK2hgpqYxDuASkDM/S5kDUqKKDxUbn6AA"));

Try it online!

PHP, 118 bytes

<?=strtr(' 333____
/00   \
11-
|02
11-
|02
11-
\33    3/
2  /
2 /
2/',['        ','----------',"           |",_____]);

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Python 2, 171 bytes

p,u,q,v,r,s,F=' ','_','/','|','-'*21,'\\',lambda f,m:f+m*19+f;B=lambda n:p*11+v+p*n+q
print'\n'.join([F(p,u),q+p*19+s,r,F(v,p),r,F(v,p),r,s+u*10+p*4+u*5+q,B(2),B(1),B(0)])

Each line is exactly 85 bytes! Hoorah!

\$\endgroup\$
2
\$\begingroup\$

Zsh, 244 bytes

This is specifically written for Zsh, not Bash, as it allows a bit more in terms of weird syntax.

alias p=printf
function r { p "$1%.s" {0..$2}}
function l { p $1;r $2 19;p $3;p "\n"}
l " " _ " "
l / " " \\
l - - -
l \| " " \|
l - - -
l \| " " \|
l - - -
p \\
r _ 10
r " " 4
r _ 5
p "/\n"
r " " 11
p "|  /\n"
r " " 11
p "| /\n"
r " " 11
p \|/

Note: when I tried to run it on tio.run the output is different than on my terminal. The fix to this is replacing

function r { p "$1%.s" {0..$2}}

with

function r { p "$1%.0s" {0..$2}}

which would make it 245 bytes (link).

Edit Seems like I was too eager to hit that post button and I missed some spaces, making my solution a bit less efficient. My new output seems off though, but I think I counted correctly (but it wouldn't change the length anyway).

\$\endgroup\$
4
  • \$\begingroup\$ Welcome to PPCG! Notice that the lower line of underscores has a gap of four spaces in it, which is missing from the output of your code. \$\endgroup\$
    – Steadybox
    Jul 1, 2017 at 16:53
  • \$\begingroup\$ @Steadybox Ohh silly me. I've updated the answer, thanks for pointing it out! \$\endgroup\$ Jul 1, 2017 at 20:26
  • \$\begingroup\$ No problem! Unfortunately, I think it's still a bit off, but this should fix it (and it saves you a byte too!). \$\endgroup\$
    – Steadybox
    Jul 1, 2017 at 21:23
  • \$\begingroup\$ I think you can save a few bytes by using 'funcname(){}' instead of 'function funcname{}' \$\endgroup\$
    – Winny
    Jul 2, 2017 at 2:27
2
\$\begingroup\$

Retina, 74 bytes


 _18¶/ 18\-| 18|-| 18|-\_9 3_4%  % %/
-
¶-20¶
%
/¶ 10|
\d+
$*
+`(.)1
$1$1

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Python 2, 159 153 139 bytes

s=" "*19;e="-"*21;a=" "*9;print" %s\n/%s\\\n%s\n|%s|\n%s\n|%s|\n%s\n\%s    %s/\n%s|  /\n%s| /\n%s|/"%("_"*19,s,e,s,e,s,e,"_"*8,"_"*7,a,a,a)

Try it online!

EDIT: Saved 6 bytes by using % formatting instead of .format().
EDIT: Saved another 14 bytes by fixing the output, thanks to musicman523.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This isn't printing the exact text (extra lines are present). Fixing this will probably save some bytes as well. \$\endgroup\$
    – 0xffcourse
    Jul 1, 2017 at 5:29
  • \$\begingroup\$ Here is a fixed version, coming in at a hot 139 bytes \$\endgroup\$ Jul 1, 2017 at 22:18
2
\$\begingroup\$

Japt, 79 72 71 bytes

" _p
/ p\\
{"-r
| p|
"²}-r
\\_g a_b/
 h|  /
 h| /
 h|/"r".%l"_g p6nZÅnH

Test it

  • 7 bytes saved thanks to ETHproductions' excellent suggestion of using base 32 integers for the repetition values.
\$\endgroup\$
1
1
\$\begingroup\$

JavaScript (ES6), 151 bytes

_=>` 2_________
/0\\
1
|0|
1
|0|
1
\\2    _____/
3|  /
3| /
3|/`.replace(/\d/g,a=>a.repeat.call(...[[" ",19],["-",21],["_",10],[" ",11]][a]))

Test Snippet

f=
_=>` 2_________
/0\\
1
|0|
1
|0|
1
\\2    _____/
3|  /
3| /
3|/`.replace(/\d/g,a=>a.repeat.call(...[[" ",19],["-",21],["_",10],[" ",11]][a]))

O.innerHTML=f()
<pre id=O>

\$\endgroup\$
1
\$\begingroup\$

Retina, 89 bytes


1"""____¶/19\¶##-¶|19|¶##-¶|19|¶##-¶\""4"/¶11|2/¶11|1/¶11|/
#
!!
"
_____
!
-----
\d+
$* 

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Charcoal, 48 bytes

↙¹→P¹¹↓↓¹P¹¹‖B↓¦↘→×¹⁰_M⁷↑←←×¹⁰_‖BJ¹¹¦⁶→×⁴ ↙↙³↑↑³

Try it online!

Somewhat different internals than Carlos's, although not visible at first.

\$\endgroup\$
1
\$\begingroup\$

,,,, 115 101 98 bytes

I am absolutely ashamed that this is the best I can produce. >.>

"|/
"' 11×:"| /
"⇆:"|  /
"⇆'
'/'_5×' 4×'_10×92c'
'|' 19×'|'
'-21×+++++3×110⇆⊣"\
"' 19×'/'
'_19×' #
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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