Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Comments on Create an Alphabet Diamond

Parent

Create an Alphabet Diamond

+10
−0

Challenge

Output the following text:

                         A
                        ABA
                       ABCBA
                      ABCDCBA
                     ABCDEDCBA
                    ABCDEFEDCBA
                   ABCDEFGFEDCBA
                  ABCDEFGHGFEDCBA
                 ABCDEFGHIHGFEDCBA
                ABCDEFGHIJIHGFEDCBA
               ABCDEFGHIJKJIHGFEDCBA
              ABCDEFGHIJKLKJIHGFEDCBA
             ABCDEFGHIJKLMLKJIHGFEDCBA
            ABCDEFGHIJKLMNMLKJIHGFEDCBA
           ABCDEFGHIJKLMNONMLKJIHGFEDCBA
          ABCDEFGHIJKLMNOPONMLKJIHGFEDCBA
         ABCDEFGHIJKLMNOPQPONMLKJIHGFEDCBA
        ABCDEFGHIJKLMNOPQRQPONMLKJIHGFEDCBA
       ABCDEFGHIJKLMNOPQRSRQPONMLKJIHGFEDCBA
      ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
     ABCDEFGHIJKLMNOPQRSTUTSRQPONMLKJIHGFEDCBA
    ABCDEFGHIJKLMNOPQRSTUVUTSRQPONMLKJIHGFEDCBA
   ABCDEFGHIJKLMNOPQRSTUVWVUTSRQPONMLKJIHGFEDCBA
  ABCDEFGHIJKLMNOPQRSTUVWXWVUTSRQPONMLKJIHGFEDCBA
 ABCDEFGHIJKLMNOPQRSTUVWXYXWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWXYZYXWVUTSRQPONMLKJIHGFEDCBA
 ABCDEFGHIJKLMNOPQRSTUVWXYXWVUTSRQPONMLKJIHGFEDCBA
  ABCDEFGHIJKLMNOPQRSTUVWXWVUTSRQPONMLKJIHGFEDCBA
   ABCDEFGHIJKLMNOPQRSTUVWVUTSRQPONMLKJIHGFEDCBA
    ABCDEFGHIJKLMNOPQRSTUVUTSRQPONMLKJIHGFEDCBA
     ABCDEFGHIJKLMNOPQRSTUTSRQPONMLKJIHGFEDCBA
      ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
       ABCDEFGHIJKLMNOPQRSRQPONMLKJIHGFEDCBA
        ABCDEFGHIJKLMNOPQRQPONMLKJIHGFEDCBA
         ABCDEFGHIJKLMNOPQPONMLKJIHGFEDCBA
          ABCDEFGHIJKLMNOPONMLKJIHGFEDCBA
           ABCDEFGHIJKLMNONMLKJIHGFEDCBA
            ABCDEFGHIJKLMNMLKJIHGFEDCBA
             ABCDEFGHIJKLMLKJIHGFEDCBA
              ABCDEFGHIJKLKJIHGFEDCBA
               ABCDEFGHIJKJIHGFEDCBA
                ABCDEFGHIJIHGFEDCBA
                 ABCDEFGHIHGFEDCBA
                  ABCDEFGHGFEDCBA
                   ABCDEFGFEDCBA
                    ABCDEFEDCBA
                     ABCDEDCBA
                      ABCDCBA
                       ABCBA
                        ABA
                         A

Notes

  • You can have any amount of leading and trailing whitespace on all directions, as long as all non-whitespace characters are properly aligned to make the diamond shape.
  • A multiline string, character matrix, list of strings, list of lists of characters, and equivalent are acceptable outputs.
  • Shortest answer per language, scored in bytes, wins!
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+4
−0

Canvas, 10 7 6 bytes

Z[]/┼┼

Try it here!

Creates the top portion, centers it, and mirrors it.

-3 bytes from dzaima's hint.

-1, found the 6 byter!

Explanation

Z[]/++
Z          push the alphabet
 []        get all prefixes
   /       diagonalize  by padding each line with one less than the previous
    ++     Quad palindromize, without reflecting letters
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

General comments (6 comments)
General comments
Quintec‭ wrote almost 4 years ago

Why does the canvas alphabet contain ^ instead of V?

Quintec‭ wrote almost 4 years ago

Oh, huh, mirroring is special for that character, I see

dzaima‭ wrote almost 4 years ago

Hint: all palindromization builtins repeated twice disables the fancy mirroring

Razetime‭ wrote almost 4 years ago

wow whut, is that documented anywhere?

dzaima‭ wrote almost 4 years ago · edited almost 4 years ago

In an unfinished completely random file where it definitely doesn't deserve to be, with an unreadable description (where the described "basic overlap", "background overlap", and "mirror vertical" aren't even used by anything), yeah. (also, 6 bytes is possible)

Razetime‭ wrote almost 4 years ago

yep, 6 bytes is possible :P