1
\$\begingroup\$

Your task is to print this exact text:

     | | | | | |
    &***********&
    | Code Golf |
   | e---------f |
  | d___________l |
 | o-------------o |
| C_______________G |
 ###Dennis$Dennis###
#####################

Rules

  • Trailing or leading newline is allowed
  • , so shortest code wins!
\$\endgroup\$
1
  • 1
    \$\begingroup\$ The numbers being weird like that doesn't make sense and makes this challenge even less interesting than it is. I would recommend moving the candles inwards by one so that there are only 5 and then you can do 0 2 4 6 8 or 1 3 5 7 9 \$\endgroup\$
    – hyperneutrino
    Commented Jan 18, 2022 at 18:46

6 Answers 6

5
\$\begingroup\$

Vyxal, 71 bytes

\|6*Ṅ`&`×6*+∞`¬꘍ »₆`:⌈Rvf÷4ɾd7+‛-_f4Ẏ*$++J‛ |Ḃ∇++÷`###%$`∞‛ṫ¹%\#21*WøĊ⁋

Try it Online!

=== Top bit ===
\|6*Ṅ`&`×6*+∞
\|6*          # Six |
    Ṅ         # Join by spaces
     `&`   +  # Append to an &
        ×6*   # six asterisks
            ∞ # Palindromise that

=========== Code Golf bit ===========
`¬꘍ »₆`:                              # Compressed string `Code Golf`, two copies
        ⌈R                            # Split on spaces and reverse each word
          vf÷                         # Make each a char list and push each
             4ɾ                       # 1...4
               d7+                    # Double + 7 -> 9, 11, 13, 15
                  ‛-_f4Ẏ              # Extend `-_` into length 4 and turn into char list
                        *             # Repeat characters by numbers
                         $++          # Join the `Code Golf` bit by those
                            J         # Append `Code Golf`
                             ‛ |Ḃ     # Push ` |` and `| `
                                 ∇++  # Prepend `| ` and append ` |` to each
                                    ÷ # Push each value to the stack.

=== Final bit ===
`###%$`               # Literal string `###%$`
       ∞              # Palindromised
        ‛ṫ¹%          # Format (replace % by) "Dennis"
            \#21*     # 21 #
                 WøĊ⁋ # Output the stack, centred and joined on newlines.
\$\endgroup\$
2
\$\begingroup\$

Charcoal, 69 bytes

× |³⸿×*⁶&⸿E⁵⁺ק_-ι⁺⁵ι |E²×#⁺χι‖O←M±⁶±²…Dennis$¹³↗↖Golf←floG edo↙CedoC

Try it online! Link is to verbose version of code. Explanation: Outputs the right half of the cake body, reflects it, then adds in the lettering.

× |³⸿

Handle the candles.

×*⁶&⸿

Handle the icing.

E⁵⁺ק_-ι⁺⁵ι |

Draw the bulk of the cake.

E²×#⁺χι

Draw the base of the cake.

‖O←

Reflect to complete the cake body.

M±⁶±²…Dennis$¹³↗

Cyclically extend the string Dennis$ to 13 characters and output it in the appropriate position.

↖Golf←floG edo↙CedoC

Add the two copies of Code and Golf.

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

JavaScript (ES6), 145 bytes

_=>` 5|@@@@@
 4&*11&
 4| Code Golf@
 3| e-9f@
 @ d_11l@
@ o-13o@
| C_15G@
 #3Dennis$Dennis#3
#21`.replace(/@|.(\d+)/g,([c],n)=>c.repeat(n)||' |')

Try it online!

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

Retina 0.8.2, 114 bytes


    6$*¦¶    &11$**&¶   ¦ Code Golf¦¶  ¦ e9$*-f¦¶ ¦ d11$*_l¦¶¦ o13$*-o¦¶| C15$*_G¦¶ ###D$D###¶21$*#
¦
 |
D
Dennis

Try it online! Explanation:


    6$*¦¶    &11$**&¶   ¦ Code Golf¦¶  ¦ e9$*-f¦¶ ¦ d11$*_l¦¶¦ o13$*-o¦¶| C15$*_G¦¶ ###D$D###¶21$*#

Insert most of the cake using run-length encoding.

¦
 |
D
Dennis

Make a couple of substitutions that save a few bytes. (In particular, the ¦ substitution allows me to write 6$*¦ to mean | | | | | |.)

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

Perl 5 + -p0513, 119 bytes

Pretty much just RLE, nothing too exciting.

s''4 6P
4 &11*&
3 P Code GolfP
  P e9-fP
 P d11_lP
P o13-oP
| C15_GP
 3#Dennis$Dennis3#
21#';s/\d+(.)/$1x$&/ge;s/P/ |/g

Try it online!

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

05AB1E, 77 bytes

„| 11∍'*11×'&.ø”|ƒËŠˆ |”©Âá4.£v'|y„-_NèN·9+×y®á2ä`‡««‚Ć}”¼´$”13∍…###.ø¬21×».c

Try it online.

Explanation:

„|               # Push string "| "
   11∍           # Extend it to size 11: "| | | | | |"
'*              '# Push character "*"
  11×            # Repeat it 11 times: "***********"
     '&.ø       '# Surround it with leading/trailing "&": "&***********&"
”|ƒËŠˆ |”        # Push dictionary string "| Code Golf |"
         ©       # Store it in variable `®` (without popping)
                # Bifurcate it (short for Duplicate & Reverse copy):
                 # "| floG edoC |"
 á               # Only leave the letters: "floGedoC"
  4.£            # Only leave the last 4 characters: "edoC"
     v           # Foreach `y` over these characters:
      '|        '#  Push character "|"
      y          #  Push character `y`
      „-_        #  Push string "-|"
         Nè      #  Index (0-based modular) the map-index into this string
           N·    #  Push double the map-index
             9+  #  Add 9
               × #  Repeat the character that many times
      y          #  Push the character again
       ®         #  Push "| Code Golf |" from variable `®`
        á        #  Only leave its letters: "CodeGolf"
         2ä      #  Split it into two equal-sized parts: ["Code","Gold"]
           `     #  Pop and push both separated to the stack
            ‡    #  Transliterate
      ««         #  Append the top three strings together
      ‚          #  Pair it with the "|"
       Ć         #  Enclose; append its own head (the "|")
     }           # Close the foreach
”¼´$”            # Push dictionary string "Dennis$"
     13∍         # Extend it to size 13: "Dennis$Dennis"
        …###.ø   # Surround it with leading/trailing "###":
                 # "###Dennis$Dennis###"
¬                # Push the first character (without popping): "#"
 21×             # Repeat it 21 times: "###################"
»                # Join each list on the stack by spaces,
                 # and then all strings on the stack by newlines
 .c              # Centralize it, adding leading spaces where necessary
                 # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”|ƒËŠˆ |” is "| Code Golf |" and ”¼´$” is "Dennis$".

\$\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.