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 Weave Strings Together

APL (Dyalog Unicode), 10 bytes Full program. Prompts for list of strings from stdin. 0~⍨,⍉↑0,¨⎕ Try it online! ⎕ prompt for list of strings 0,¨ prepend a zero to each ↑ convert to orthogona...

posted 4y ago by Adám‭  ·  edited 4y ago by Adám‭

Answer
#3: Post edited by user avatar Adám‭ · 2020-11-22T12:19:17Z (about 4 years ago)
  • # [APL (Dyalog Unicode)], 10 bytes
  • Full program. Prompts for list of strings from stdin.
  • ```apl
  • 0~⍨,⍉↑0,¨⎕
  • ```
  • [Try it online!][TIO-kht2w1tr]
  • `⎕` prompt for list of strings
  • `0,¨` prepend a zero to each
  • `↑` convert to orthogonal matrix (increase rank at cost of depth), padding with 0s
  • `⍉` transpose
  • `,` ravel (flatten)
  • `0~⍨` remove 0s
  • [APL (Dyalog Unicode)]: https://www.dyalog.com/
  • [TIO-kht2w1tr]: https://tio.run/##SyzI0U2pTMzJT///qKO94L9B3aPeFTqPejsftU000Dm04lHfVJDEfwUwKOBSz87My1dXUE/OzEvNTQQycvPLMlPVueDyyfkpqUDh9PycNCRRj0ygGBCFZKQWIanWedTVpO5aUZCTmJdYkpmfpw4A "APL (Dyalog Unicode) – Try It Online"
  • # [APL (Dyalog Unicode)], 10 bytes
  • Full program. Prompts for list of strings from stdin.
  • ```apl
  • 0~⍨,⍉↑0,¨⎕
  • ```
  • [Try it online!][TIO-kht2w1tr]
  • `⎕` prompt for list of strings
  • `0,¨` prepend a zero to each
  • `↑` convert to orthogonal matrix (increase rank at cost of depth), padding with 0s
  • `⍉` transpose
  • `,` ravel (flatten)
  • `0~⍨` remove 0s
  • [APL (Dyalog Unicode)]: https://www.dyalog.com/
  • [TIO-kht2w1tr]: https://tio.run/##SyzI0U2pTMzJT///qKO94L9B3aPeFTqPejsftU000Dm04lHfVJDEfwUwKOBSz87My1dXUE/OzEvNTQQycvPLMlPVueDyyfkpqUDh9PycNCRRj0ygGBCFZKQWIanWedTVpO5aUZCTmJdYkpmfh6TDBewoBccAH6A259KckswyiBIFdf@i5IzEohR1AA "APL (Dyalog Unicode) – Try It Online"
#2: Post edited by user avatar Adám‭ · 2020-11-22T12:11:52Z (about 4 years ago)
  • # [APL (Dyalog Unicode)], 10 bytes
  • ```apl
  • 0~⍨,⍉↑0,¨⎕
  • ```
  • [Try it online!][TIO-kht2w1tr]
  • [APL (Dyalog Unicode)]: https://www.dyalog.com/
  • [TIO-kht2w1tr]: https://tio.run/##SyzI0U2pTMzJT///qKO94L9B3aPeFTqPejsftU000Dm04lHfVJDEfwUwKOBSz87My1dXUE/OzEvNTQQycvPLMlPVueDyyfkpqUDh9PycNCRRj0ygGBCFZKQWIanWedTVpO5aUZCTmJdYkpmfpw4A "APL (Dyalog Unicode) – Try It Online"
  • # [APL (Dyalog Unicode)], 10 bytes
  • Full program. Prompts for list of strings from stdin.
  • ```apl
  • 0~⍨,⍉↑0,¨⎕
  • ```
  • [Try it online!][TIO-kht2w1tr]
  • `⎕` prompt for list of strings
  • `0,¨` prepend a zero to each
  • `↑` convert to orthogonal matrix (increase rank at cost of depth), padding with 0s
  • `⍉` transpose
  • `,` ravel (flatten)
  • `0~⍨` remove 0s
  • [APL (Dyalog Unicode)]: https://www.dyalog.com/
  • [TIO-kht2w1tr]: https://tio.run/##SyzI0U2pTMzJT///qKO94L9B3aPeFTqPejsftU000Dm04lHfVJDEfwUwKOBSz87My1dXUE/OzEvNTQQycvPLMlPVueDyyfkpqUDh9PycNCRRj0ygGBCFZKQWIanWedTVpO5aUZCTmJdYkpmfpw4A "APL (Dyalog Unicode) – Try It Online"
#1: Initial revision by user avatar Adám‭ · 2020-11-22T12:09:59Z (about 4 years ago)
# [APL (Dyalog Unicode)], 10 bytes
```apl
0~⍨,⍉↑0,¨⎕
```

[Try it online!][TIO-kht2w1tr]

[APL (Dyalog Unicode)]: https://www.dyalog.com/
[TIO-kht2w1tr]: https://tio.run/##SyzI0U2pTMzJT///qKO94L9B3aPeFTqPejsftU000Dm04lHfVJDEfwUwKOBSz87My1dXUE/OzEvNTQQycvPLMlPVueDyyfkpqUDh9PycNCRRj0ygGBCFZKQWIanWedTVpO5aUZCTmJdYkpmfpw4A "APL (Dyalog Unicode) – Try It Online"