Skip to main content
added 32 characters in body
Source Link
lyxal
  • 34.3k
  • 2
  • 64
  • 141

Vyxal j, 74 bitsv2, 9.25 bytes

\|/:¦↳:t↲Ḋ

Try it Online!Try it Online!

Bitstring:

01101010100010101110000101000000110001011111111110001111111100110011110001

Explained

\|/:¦↳:t↲Ḋ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁢​‎‏​⁢⁠⁢‌­
\|/         # ‎⁡Split on "|"s
   :¦       # ‎⁢Push the cumulative sums without popping. This acts as the space length before each section
     ↳      # ‎⁣Pad each item right with spaces to length in ^
      :t↲   # ‎⁤And pad each item left with spaces to length of tail of ^
         Ḋ  # ‎⁢⁡Append " {comment char}" to each
‎⁢⁢Implicitly join on newlines
💎

Created with the help of Luminespire and not this challenge.

Vyxal j, 74 bitsv2, 9.25 bytes

\|/:¦↳:t↲Ḋ

Try it Online!

Bitstring:

01101010100010101110000101000000110001011111111110001111111100110011110001

Explained

\|/:¦↳:t↲Ḋ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁢​‎‏​⁢⁠⁢‌­
\|/         # ‎⁡Split on "|"s
   :¦       # ‎⁢Push the cumulative sums without popping. This acts as the space length before each section
     ↳      # ‎⁣Pad each item right with spaces to length in ^
      :t↲   # ‎⁤And pad each item left with spaces to length of tail of ^
         Ḋ  # ‎⁢⁡Append " {comment char}" to each
‎⁢⁢Implicitly join on newlines
💎

Created with the help of Luminespire and not this challenge.

Vyxal j, 74 bitsv2, 9.25 bytes

\|/:¦↳:t↲Ḋ

Try it Online!

Bitstring:

01101010100010101110000101000000110001011111111110001111111100110011110001

Explained

\|/:¦↳:t↲Ḋ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁢​‎‏​⁢⁠⁢‌­
\|/         # ‎⁡Split on "|"s
   :¦       # ‎⁢Push the cumulative sums without popping. This acts as the space length before each section
     ↳      # ‎⁣Pad each item right with spaces to length in ^
      :t↲   # ‎⁤And pad each item left with spaces to length of tail of ^
         Ḋ  # ‎⁢⁡Append " {comment char}" to each
‎⁢⁢Implicitly join on newlines
💎

Created with the help of Luminespire and not this challenge.

Source Link
lyxal
  • 34.3k
  • 2
  • 64
  • 141

Vyxal j, 74 bitsv2, 9.25 bytes

\|/:¦↳:t↲Ḋ

Try it Online!

Bitstring:

01101010100010101110000101000000110001011111111110001111111100110011110001

Explained

\|/:¦↳:t↲Ḋ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‎⁡⁠⁣‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁢​‎‏​⁢⁠⁢‌­
\|/         # ‎⁡Split on "|"s
   :¦       # ‎⁢Push the cumulative sums without popping. This acts as the space length before each section
     ↳      # ‎⁣Pad each item right with spaces to length in ^
      :t↲   # ‎⁤And pad each item left with spaces to length of tail of ^
         Ḋ  # ‎⁢⁡Append " {comment char}" to each
‎⁢⁢Implicitly join on newlines
💎

Created with the help of Luminespire and not this challenge.