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

Post History

77%
+5 −0
Challenges Diagonalized alphabet

Canvas, 17 11 bytes Z2n⤢J{×7«mT Try it here! Z The alphabet 2n split into pairs: ["AB","CD","EF",…] ⤢ transposed: ["ACEGI…","BDFHJ…"] J remove and pu...

posted 3y ago by dzaima‭  ·  edited 3y ago by dzaima‭

Answer
#3: Post edited by user avatar dzaima‭ · 2021-06-11T12:04:15Z (over 3 years ago)
  • # [Canvas](https://github.com/dzaima/Canvas), 17 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
  • Z2n⤢K↔+‾¹[«:↔7«mP
  • [Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJCJXUyMTk0JXVGRjBCJXUyMDNFJUI5JXVGRjNCJUFCJXVGRjFBJXUyMTk0JXVGRjE3JUFCJXVGRjREJXVGRjMw,v=8)
  • ```text
  • Z The alphabet
  • 2n split into pairs: ["AB","CD","EF",…]
  • transpose: ["ACEGI…","BDFHJ…"]
  • K take the last item
  • reverse it
  • + and append it back: ACEGIKMOQSUWYZXVTRPNLJHFDB
  • ‾¹[ repeat 13 times:
  • « move the first character to the end
  • : duplicate (so the next loop iteration has an item to start with)
  • ↔ reverse
  • 7«m cut off everything after 14 chars
  • P print that
  • ```
  • [This](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJBJXUyMTk0JXVGRjBCJXUyMDNFJUI5JXVGRjNCJUJCJXVGRjFBJXVGRjE3JUFCJXVGRjREJXVGRjMw,v=8) should work for 16 bytes, but `»` is broken.
  • # [Canvas](https://github.com/dzaima/Canvas), <s>17</s> 11 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
  • Z2n⤢J{×7«mT
  • [Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJBJXVGRjVCJUQ3JXVGRjE3JUFCJXVGRjREJXVGRjM0,v=8)
  • ```text
  • Z The alphabet
  • 2n split into pairs: ["AB","CD","EF",…]
  • ⤢ transposed: ["ACEGI…","BDFHJ…"]
  • J remove and push the first item: ["BDFHJ…"], "ACEGI…"
  • { for each character of "ACEGI…"
  • × prepend horizontally: "ABDFHJ…" → "CABDFHJ…" → …
  • 7«m cut off everything after 14 chars
  • T print that, leaving the item on the stack for the next iteration
  • ```
#2: Post edited by user avatar dzaima‭ · 2021-06-11T11:55:10Z (over 3 years ago)
  • # [Canvas](https://github.com/dzaima/Canvas), 17 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
  • Z2n⤢K↔+‾¹[«:↔7«mP
  • [Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJCJXUyMTk0JXVGRjBCJXUyMDNFJUI5JXVGRjNCJUFCJXVGRjFBJXUyMTk0JXVGRjE3JUFCJXVGRjREJXVGRjMw,v=8)
  • ```text
  • Z The alphabet
  • 2n split into pairs: ["AB","CD","EF",…]
  • ⤢ transpose: ["ACEGI…","BDFHJ…"]
  • K take the last item
  • ↔ reverse it
  • + and append it back: ACEGIKMOQSUWYZXVTRPNLJHFDB
  • ‾¹[ repeat 13 times:
  • « move the first character to the end
  • : duplicate (so the next loop iteration has an item to start with)
  • ↔ reverse
  • 7«m cut off everything after 14 chars
  • P print that
  • ```
  • # [Canvas](https://github.com/dzaima/Canvas), 17 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
  • Z2n⤢K↔+‾¹[«:↔7«mP
  • [Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJCJXUyMTk0JXVGRjBCJXUyMDNFJUI5JXVGRjNCJUFCJXVGRjFBJXUyMTk0JXVGRjE3JUFCJXVGRjREJXVGRjMw,v=8)
  • ```text
  • Z The alphabet
  • 2n split into pairs: ["AB","CD","EF",…]
  • ⤢ transpose: ["ACEGI…","BDFHJ…"]
  • K take the last item
  • ↔ reverse it
  • + and append it back: ACEGIKMOQSUWYZXVTRPNLJHFDB
  • ‾¹[ repeat 13 times:
  • « move the first character to the end
  • : duplicate (so the next loop iteration has an item to start with)
  • ↔ reverse
  • 7«m cut off everything after 14 chars
  • P print that
  • ```
  • [This](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJBJXUyMTk0JXVGRjBCJXUyMDNFJUI5JXVGRjNCJUJCJXVGRjFBJXVGRjE3JUFCJXVGRjREJXVGRjMw,v=8) should work for 16 bytes, but `»` is broken.
#1: Initial revision by user avatar dzaima‭ · 2021-06-11T11:40:26Z (over 3 years ago)
# [Canvas](https://github.com/dzaima/Canvas), 17 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
    Z2n⤢K↔+‾¹[«:↔7«mP

[Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjEyJXVGRjRFJXUyOTIyJXVGRjJCJXUyMTk0JXVGRjBCJXUyMDNFJUI5JXVGRjNCJUFCJXVGRjFBJXUyMTk0JXVGRjE3JUFCJXVGRjREJXVGRjMw,v=8)

```text
Z                The alphabet
 2n              split into pairs: ["AB","CD","EF",…]
   ⤢             transpose: ["ACEGI…","BDFHJ…"]
    K            take the last item
     ↔           reverse it
      +          and append it back: ACEGIKMOQSUWYZXVTRPNLJHFDB
       ‾¹[       repeat 13 times:
          «        move the first character to the end
           :       duplicate (so the next loop iteration has an item to start with)
            ↔      reverse
             7«m   cut off everything after 14 chars
                P  print that
```