Skip to main content
added 46 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y©Ṛy;⁶$L3ḍƊ¡ZFs3®y

Try it online!Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y©Ṛy;⁶$L3ḍƊ¡ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶$;⁶$        Yield s, possibly with an appendedAppend a space to s...
              L3ḍƊ¡        if the length is divisible by 3.
          y                Transliterate according to the mapping to the left.
                   ZFs3    Zip/transpose, flatten, split into chunks of length 3.
                       ®y  Transliterate according to the mapping in the register.

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶$        Yield s, possibly with an appended space.
          y                Transliterate according to the mapping to the left.
                   ZFs3    Zip/transpose, flatten, split into chunks of length 3.
                       ®y  Transliterate according to the mapping in the register.

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;⁶$L3ḍƊ¡ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;⁶$L3ḍƊ¡ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;⁶$             Append a space to s...
              L3ḍƊ¡        if the length is divisible by 3.
          y                Transliterate according to the mapping to the left.
                   ZFs3    Zip/transpose, flatten, split into chunks of length 3.
                       ®y  Transliterate according to the mapping in the register.
missing $ in explanation
Source Link
Erik the Outgolfer
  • 40.6k
  • 5
  • 45
  • 122

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶ ;L3ḍƊ¡⁶$        Yield s, possibly with an appended space.
          y                Transliterate according to the mapping to the left.
                  ZFs3 ZFs3    Zip/transpose, flatten, split into chunks of length 3.
                      ®y ®y  Transliterate according to the mapping in the register.

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶         Yield s, possibly with an appended space.
          y                Transliterate according to the mapping to the left.
                  ZFs3     Zip/transpose, flatten, split into chunks of length 3.
                      ®y   Transliterate according to the mapping in the register.

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶$        Yield s, possibly with an appended space.
          y                Transliterate according to the mapping to the left.
                   ZFs3    Zip/transpose, flatten, split into chunks of length 3.
                       ®y  Transliterate according to the mapping in the register.
added 1 character in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶         Yield s, possibly with an appended space.
          y                Transliterate according to the mapping to the left.
                  ZFs3     Zip/transpose, flatten, split into chunks of length 3.
                      ®y   Transliterate according to the mapping in the register.

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

Jelly, 29 26 25 bytes

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y

Try it online!

How it works

⁶Øa;3ṗ¤,©Ṛy;L3ḍƊ¡⁶$ZFs3®y  Main link. Argument: s (string)

⁶                          Set the return value to space.
 Øa;                       Append it to "a...z".
    3ṗ¤                    Yield the third Cartesian power of [1, 2, 3].
       ,©                  Pair the results and store the pair in the register.
                           The register now holds
                           [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
         Ṛ                 Reverse the outer array.
           ;L3ḍƊ¡⁶         Yield s, possibly with an appended space.
          y                Transliterate according to the mapping to the left.
                  ZFs3     Zip/transpose, flatten, split into chunks of length 3.
                      ®y   Transliterate according to the mapping in the register.
added 1 character in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825
Loading
added 13 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825
Loading
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825
Loading