4
\$\begingroup\$

Today, @HyperNeutrino succeeded merging his two accounts, and finally got the reputation he lost back. Now, it's time to celebrate! Your task is to output this exact text:

                /\
               /  \
              /    \
             /      \
            /        \
           /          \
          /            \
         /              \
        /                \
       /                  \
      /                    \
     /                      \
    /                        \
   /                          \
  /                            \
 /                              \
/                                \
|                                |
|                                |
|  @HyperNeutrino Welcome back!  |
|                                |
|                                |
\                                /
 \                              /
  \                            /
   \                          /
    \                        /
     \                      /
      \                    /
       \                  /
        \                /
         \              /
          \            /
           \          /
            \        /
             \      /
              \    /
               \  /
                \/

Rules:

  • Your program must not take input.

  • The output must be exactly as shown above.

  • Trailing and leading spaces / newlines are allowed.

  • Defaults Loopholes apply.

  • You can provide output by any standard method.

  • This is a celebration, hence the shortest code in each language wins! Have fun!

\$\endgroup\$
12
  • 4
    \$\begingroup\$ I would really like to hear some feedback from the downvoters. \$\endgroup\$
    – Mr. Xcoder
    Jun 23, 2017 at 17:44
  • 6
    \$\begingroup\$ There was a "display a welcome" challenge that was just a few days ago, and this is pretty similar which might be why downvotes? This one is way bigger though \$\endgroup\$
    – nmjcman101
    Jun 23, 2017 at 17:48
  • 4
    \$\begingroup\$ I didn't downvote, but anyone who doesn't know HyperNeutrino might view this as too "inside baseball" or even perhaps self-serving (if they thought you were talking about your own alt account or something). \$\endgroup\$
    – BradC
    Jun 23, 2017 at 18:12
  • 17
    \$\begingroup\$ I think this doesn't add much to existing ASCII art challenges. Lines of slashes, mirror symmetry, and inserting text are all overdone. And the image feels pretty arbitrary. Why is it a diamond with the dull points cut off? Something like HyperNeutrino's profile icon would have been more thematic. \$\endgroup\$
    – xnor
    Jun 23, 2017 at 18:36
  • 10
    \$\begingroup\$ I did not downvote this, but personally I think that this isn't particularly an interesting challenge (sorry if I sound very unappreciative; I do appreciate your welcoming me back :D). I agree with @xnor that drawing ASCII-art of my profile might a) be more symbolic of me, b) be more interesting, and c) add more to other ASCII-art challenges. \$\endgroup\$
    – hyper-neutrino
    Jun 23, 2017 at 18:38

15 Answers 15

5
\$\begingroup\$

V, 64 bytes

i/\
\/16ñH>GMÙXppjÄXppñ5O|³² |M3lR@HyperNeutrino Welcome back!

Try it online!

Hexdump:

00000000: 692f 5c0a 5c2f 1b31 36f1 483e 474d d958  i/\.\/.16.H>GM.X
00000010: 7070 6ac4 5870 70f1 354f 7cb3 b220 7c1b  ppj.Xpp.5O|.. |.
00000020: 4d33 6c52 4048 7970 6572 4e65 7574 7269  M3lR@HyperNeutri
00000030: 6e6f 2057 656c 636f 6d65 2062 6163 6b21  no Welcome back!

Explanation:

i                             " Insert:
 /\<cr>\/                     "   '/\<newline>\/'
         <esc>                " Return to normal mode
16ñ             ñ             " 16 times:
   H                          "   Move to the beginning of the buffer
    >G                        "   Indent every line
      M                       "   Move to the middle of the buffer (the last downward facing part)
       Ù                      "   Duplicate this line downwards
        X                     "   Delete one of the leading spaces
         pp                   "   And paste it between the slashes twice
           j                  "   Move down a line (the first upward facing part)
            Ä                 "   Duplicate this line upwards
             X                "   Delete one of the leading spaces   
              pp              "   And paste it between the slashes twice
5O                            " On the five lines above us, insert:
  |³² |                       "   A bar followed by 32 spaces, followed by a bar
       <esc>                  " Return to normal mode
            M                 " Move to the middle line of the buffer
             3l               " Move 3 characters to the right
               R              " And write the following over the existing text:
@HyperNeutrino Welcome back!  "   Welcome back!
\$\endgroup\$
2
  • \$\begingroup\$ You may be able to use reverse instead of expanding the slashes on both ends? Something like (psuedo) i/\^[ recursively - expand, copy down, reverse, move back up \$\endgroup\$
    – nmjcman101
    Jun 23, 2017 at 17:51
  • \$\begingroup\$ @nmjcman101 Hmmm... I'll give it a shot. I also think it might make sense to start with the middle, and use a recursive command instead of 16 times command. \$\endgroup\$
    – DJMcMayhem
    Jun 23, 2017 at 17:52
5
\$\begingroup\$

Charcoal, 40 bytes

↑³↗¹⁷‖M‖B↓J³¦⁰“]‹baiE_ν﹪↓➙ZKξη¢:Agλ⁸%I”

Try it online! Link is to verbose version of code.

\$\endgroup\$
2
  • \$\begingroup\$ Explanation please. \$\endgroup\$ Jun 23, 2017 at 18:49
  • 2
    \$\begingroup\$ @CalculatorFeline: This is very readable: ↑³ draws a line up 3, then ↗¹⁷ draws a diagonal line. ‖M reflects horizontally while ‖B↓ reflects vertically (and doesn't copy the axis). J³¦⁰ jumps to the start of the text and the rest is a compressed string which is implicitly printed. \$\endgroup\$
    – Neil
    Jun 23, 2017 at 18:53
5
\$\begingroup\$

05AB1E, 87 78 81 79 bytes

-9 bytes because of dictionary compression

+2 bytes because "back" isn't capitalized

-2 bytes because of "mirroring"

17F'/16N-úðN׫∞}'|D32ú«D”|  @HyperNeutrino‡Ý back!  |”'|D32ú«D17F'\Núð16N-׫∞}»

Try it online!


Explanation (split into parts)

Produces the "triangle" at the top

17F            # for N in 0 .. 16
   '/          # push a forward slash
     16N-      # 16 - N
         ú     # put 16 - N spaces in front of the forward slash
          ð    # space character
           N×  # repeated n times
             } # end of for loop

Produces the two lines with vertical bars at the end.

'|       # push a vertical bar
  D      # duplicate
   32ú   # put 32 spaces before the vertical bar
      «  # concatenate, i.e. one line complete
       D # duplicate

Produces the "Welcome back" string; ”| @HyperNeutrino‡Ý back! |”.

Most of it is interpreted as the literal characters, except for ‡Ý, which is interpreted as Welcome.

Exact copy of second section: '|D32ú«D produces second set of vertical bar lines

Produces the "triangle" at the bottom, similar to first part

17F              # for N in 0 .. 16
   '\            # push backslash
     Nú          # put N spaces before backslash
       ð         # space character
        16N-     # 16 - N
            ×    # 16 - N spaces
             «   # concatenate the two strings
              ∞  # mirror
               } # end for

The » at the end joins everything by newlines and implicitly prints.

\$\endgroup\$
6
  • \$\begingroup\$ @Mr.Xcoder: I have a LOT of golfing to do \$\endgroup\$
    – Neil A.
    Jun 23, 2017 at 18:04
  • \$\begingroup\$ Why the down votes? \$\endgroup\$
    – Neil A.
    Jun 23, 2017 at 18:05
  • \$\begingroup\$ That's what I am trying to figure out as well, but regarding the challenge itself. \$\endgroup\$
    – Mr. Xcoder
    Jun 23, 2017 at 18:07
  • \$\begingroup\$ Can you use string compression? \$\endgroup\$
    – sporkl
    Jun 23, 2017 at 18:16
  • \$\begingroup\$ @ComradeSparklePony: I haven't tried that yet; feel free to try that yourself! \$\endgroup\$
    – Neil A.
    Jun 23, 2017 at 18:21
3
\$\begingroup\$

T-SQL, 222 bytes

DECLARE @ INT=1T:PRINT SPACE(17-@)+'/'+SPACE(2*(@-1))+'\'SET @+=1IF @<18GOTO T
PRINT REPLACE('|S|
|S|
|  @HyperNeutrino Welcome back!  |
|S|
|S|','S',SPACE(32))B:SET @-=1PRINT SPACE(17-@)+'\'+SPACE(2*(@-1))+'/'IF @>0GOTO B

Pretty straightforward procedural approach. Formatted:

DECLARE @ INT=1
T:  --count up for top cone
    PRINT SPACE(17-@) + '/' + SPACE(2*(@-1)) + '\'
    SET @+=1
IF @<18 GOTO T

--middle section, string literal with line breaks and a single replace
PRINT REPLACE('|S|
|S|
|  @HyperNeutrino Welcome back!  |
|S|
|S|','S',SPACE(32))

B:  --count back down for bottom cone
    SET @-=1
    PRINT SPACE(17-@) + '\' + SPACE(2*(@-1)) + '/'
IF @>0 GOTO B

Only thing probably worth explaining is that strings in T-SQL can contain line breaks inside the quotes, I take advantage of that here, instead of adding CHAR(13).

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

Python 2, 187 bytes

f,s=lambda s,n=1:'\n'.join((s%(' '*i)).center(34)for i in range(0,34,2)[::n]),'|%s|\n'
print f('/%s\\')+'\n'+s%(' '*32)*2+s%('  @HyperNeutrino Welcome back!  ')+s%(' '*32)*2+f('\\%s/',-1)

Try it online!

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

Mathematica, 165 bytes

T=Table;c=Column;c[{s=c[T[""<>{"/",T[" ",2i],"\\"},{i,0,16}],Alignment->Center],g=c@T[""<>{"|",T[" ",32],"|"},2],"|  @HyperNeutrino Welcome back!  |",g,s~Rotate~Pi}]
\$\endgroup\$
1
\$\begingroup\$

Retina, 107 bytes


17#¶#¶|2@HyperNeutrino Welcome back!2|¶#¶#17
#
|32|
\d+
$* 
\G (?=( *))
$1/$`$`\¶
r`(?<=( *)) \G
¶$1\$'$'/

Try it online! Explanation: The first stage inserts the text and starts outlining the surrounding characters, which are further expanded by the next two stages. The fourth and fifth stages then generate the top and bottom diagonal lines respectively.

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

PHP, 174 bytes

for(;$i<39;)echo($p=str_pad)($p($i>16?$i!=19?$i>21?"\\":"|":"|  @HyperNeutrino Welcome back!  ":"/",$i>16?$i>21?77-$i*2:33:$i*2+1).($i++>16?$i>22?"/":"|":"\\"),34," ",2),"
";

Try it online!

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

///, 306 bytes

/6/"\\//5/\/\///4/"#53/  52/\\%51/\/%50/\\'5-/\/'5,-|%%"3|/-/
5&/3#/1/""5#/3\\5"/3331&/\0% #/#0%#/&0% \/60%\/40" &/"&0"&1\0" #1#041&0" \1606140 &1"&0&1%\0 #1%#0#1%&0 \1%60\1%4\,,'|3@HyperNeutrino Welcome back!3|,,'\2%4- \2%6-#2%&- #2%#-&2%\- &2"&-624-" \26-42&-" #2#-"&2\-" &\"&-%\\4-% \\6-%#\&-% #\#-%&\\/

Try it online!

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

SOGL V0.12, 54 50 bytes

ā'²∫0; /ž}j"ν_‘3∙+╬³"Ξ█a⁄I⅜ģī\↕═<ν▲ΩhΕR$C¹‘4L«žj╬Æ

Try it Here!

Explanation:

ā                                push an empty array
 '²∫     }                       17 times repeat
    0;                             push 0 below the iteration
       /ž                          at [0, iteration] (1-indexed position) insert the slash (so every time it moves  everything one char right)
          j                      remove last blank line (idk why it's there)
           "ν_‘                  push "|                "
               3∙                get an array of 3 of those
                 +               append that to the diagonals mirrored
                  ╬³             mirror horizontally with 0 overlap and swapping chars
                    "..‘         push "@HyperNeutrino Welcome back!"
                        4L«ž     at [4;20] insert that in
                            j    remove last blank line (2nd byte wasted now)
                             Β  mirror vertically
\$\endgroup\$
1
\$\begingroup\$

05AB1E, 57 bytes

žvƒ'/'\N·ú«}'|žvúÂìD”|  @HyperNeutrino‡Ý back!  |”)¦í«.c

Try it online!

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

Canvas, 55 bytes

⁷╵\║:↕|“ ”⁷×+║2*:“×∔]*YV≠²↖:tvxZ}@l J{ 5n\┌⟳sc⤢7‟;∔∔┘∔∔

Try it here!

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

Vyxal C, 47 bytes

\/16꘍¦øṀ÷\|16꘍m:`|  @Hy∧‛NeꜝṘ⋏⇩ ÷… λǐ!  |`WḂḢRJ

Try it Online!

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

Canvas, 40 bytes

⁷╵/|3*∔╫@HyperNeutrino Welcome back!4A«╋

Try it here!

There's already a Canvas answer here but I'd say this uses a fairly different approach.

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

Deadfish~, 2245 bytes

{iii}ii{c}cccccc{i}iiiiic{iiii}iiiiic{{d}ii}ddc{ii}ii{c}ccccc{i}iiiiic{d}dddddcc{iiiiii}c{{d}ii}ddc{ii}ii{c}cccc{i}iiiiic{d}dddddcccc{iiiiii}c{{d}ii}ddc{ii}ii{c}ccc{i}iiiiic{d}dddddcccccc{iiiiii}c{{d}ii}ddc{ii}ii{c}cc{i}iiiiic{d}dddddcccccccc{iiiiii}c{{d}ii}ddc{ii}ii{c}c{i}iiiiic{d}ddddd{c}{iiiiii}c{{d}ii}ddc{ii}ii{c}{i}iiiiic{d}ddddd{c}cc{iiiiii}c{{d}ii}ddc{ii}iiccccccccc{i}iiiiic{d}ddddd{c}cccc{iiiiii}c{{d}ii}ddc{ii}iicccccccc{i}iiiiic{d}ddddd{c}cccccc{iiiiii}c{{d}ii}ddc{ii}iiccccccc{i}iiiiic{d}ddddd{c}cccccccc{iiiiii}c{{d}ii}ddc{ii}iicccccc{i}iiiiic{d}ddddd{cc}{iiiiii}c{{d}ii}ddc{ii}iiccccc{i}iiiiic{d}ddddd{cc}cc{iiiiii}c{{d}ii}ddc{ii}iicccc{i}iiiiic{d}ddddd{cc}cccc{iiiiii}c{{d}ii}ddc{ii}iiccc{i}iiiiic{d}ddddd{cc}cccccc{iiiiii}c{{d}ii}ddc{ii}iicc{i}iiiiic{d}ddddd{cc}cccccccc{iiiiii}c{{d}ii}ddc{ii}iic{i}iiiiic{d}ddddd{cc}{c}{iiiiii}c{{d}ii}ddc{iiii}dddc{d}ddddd{cc}{c}cc{iiiiii}c{{d}ii}ddc{{i}}{i}iiiic{{d}i}dd{cc}{c}cc{{i}d}iic{{d}}{d}ddddc{{i}}{i}iiiic{{d}i}dd{cc}{c}cc{{i}d}iic{{d}}{d}ddddc{{i}}{i}iiiic{{d}i}ddcc{iii}iic{i}ddc{iiiii}dc{d}ic{d}dc{i}iiic{ddd}ddddddc{ii}iiic{i}iiiiiicdcddc{d}iciiiiicic{{d}ii}ic{iiiii}iiiiic{i}iiiic{i}dddc{d}ic{i}iicddc{d}iic{{d}iii}ic{iiiiii}iiiiiicdciic{i}ddc{{d}iii}ddddcdcc{{i}d}iic{{d}}{d}ddddc{{i}}{i}iiiic{{d}i}dd{cc}{c}cc{{i}d}iic{{d}}{d}ddddc{{i}}{i}iiiic{{d}i}dd{cc}{c}cc{{i}d}iic{{d}}{d}ddddc{{i}dd}iic{dddddd}{cc}{c}cc{i}iiiiic{dddd}iiic{ii}iic{iiiiii}c{dddddd}{cc}{c}{i}iiiiic{dddd}iiic{ii}iicc{iiiiii}c{dddddd}{cc}cccccccc{i}iiiiic{dddd}iiic{ii}iiccc{iiiiii}c{dddddd}{cc}cccccc{i}iiiiic{dddd}iiic{ii}iicccc{iiiiii}c{dddddd}{cc}cccc{i}iiiiic{dddd}iiic{ii}iiccccc{iiiiii}c{dddddd}{cc}cc{i}iiiiic{dddd}iiic{ii}iicccccc{iiiiii}c{dddddd}{cc}{i}iiiiic{dddd}iiic{ii}iiccccccc{iiiiii}c{dddddd}{c}cccccccc{i}iiiiic{dddd}iiic{ii}iicccccccc{iiiiii}c{dddddd}{c}cccccc{i}iiiiic{dddd}iiic{ii}iiccccccccc{iiiiii}c{dddddd}{c}cccc{i}iiiiic{dddd}iiic{ii}ii{c}{iiiiii}c{dddddd}{c}cc{i}iiiiic{dddd}iiic{ii}ii{c}c{iiiiii}c{dddddd}{c}{i}iiiiic{dddd}iiic{ii}ii{c}cc{iiiiii}c{dddddd}cccccccc{i}iiiiic{dddd}iiic{ii}ii{c}ccc{iiiiii}c{dddddd}cccccc{i}iiiiic{dddd}iiic{ii}ii{c}cccc{iiiiii}c{dddddd}cccc{i}iiiiic{dddd}iiic{ii}ii{c}ccccc{iiiiii}c{dddddd}cc{i}iiiiic{dddd}iiic{ii}ii{c}cccccc{iiiiii}c{dddd}dddddc

Try it online!

Tio runs 3/4 of it.

\$\endgroup\$

Your Answer

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

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