Skip to main content
added 77 characters in body
Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 290290 285 bytes

K`19¶19¶19¶19¶19¶19je3¶19jb7¶9c8h10¶9g4f13¶5b1c2e4c17¶3d3c2e22¶2g6c24¶1e9c25¶1f4f27¶2i34¶4jb30¶7j25¶10h21¶13g16¶9c3f13¶8e1f13¶6c2d1d12¶5d2c1b19¶5g24¶6h25¶7i26¶9h28¶12e27¶9b3d26¶9d1c26¶6g28¶6d1c7b18¶6e9e15¶7f7g12¶9f5j8¶11c6jd5¶19jf2¶10b8¶10b8¶19¶19¶19 19¶19¶19¶19¶19¶3je19¶7jb19¶10h9c8¶13f9g4¶17c5b1c2e4¶23d3c2e2¶23g6c3¶23e9c3¶24f4f4¶27i9¶29jb5¶29j3¶29h2¶29g¶22c3f¶20e1f1¶16c2d1d2¶19d2c1b5¶21g8¶25h6¶29i4¶34h3¶36e3¶32b3d3¶31d1c4¶27g7¶18b6d1c7¶15e6e9¶12g7f7¶8j9f5¶5jd11c6¶2jf19¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d * *  P`P^`.+ %`^%`.{19}$ $^$'$&$&$^$` 

Try it online!Try it online! Edit: Saved 4 bytes by encoding the left two thirds instead of the right two thirds. Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P`P^`.+ 

PadLeft-pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`^%`.{19}$ 

Match the firstlast 19 characters on each line.

$^$'$&$&$^$` 

Prefix them withAppend their reversed suffixesprefixes, thus mirroring the output.

Retina, 290 bytes

K`19¶19¶19¶19¶19¶19je3¶19jb7¶9c8h10¶9g4f13¶5b1c2e4c17¶3d3c2e22¶2g6c24¶1e9c25¶1f4f27¶2i34¶4jb30¶7j25¶10h21¶13g16¶9c3f13¶8e1f13¶6c2d1d12¶5d2c1b19¶5g24¶6h25¶7i26¶9h28¶12e27¶9b3d26¶9d1c26¶6g28¶6d1c7b18¶6e9e15¶7f7g12¶9f5j8¶11c6jd5¶19jf2¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d *  P`.+ %`^.{19} $^$'$& 

Try it online! Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P`.+ 

Pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`^.{19} 

Match the first 19 characters on each line.

$^$'$& 

Prefix them with their reversed suffixes, thus mirroring the output.

Retina, 290 285 bytes

 19¶19¶19¶19¶19¶3je19¶7jb19¶10h9c8¶13f9g4¶17c5b1c2e4¶23d3c2e2¶23g6c3¶23e9c3¶24f4f4¶27i9¶29jb5¶29j3¶29h2¶29g¶22c3f¶20e1f1¶16c2d1d2¶19d2c1b5¶21g8¶25h6¶29i4¶34h3¶36e3¶32b3d3¶31d1c4¶27g7¶18b6d1c7¶15e6e9¶12g7f7¶8j9f5¶5jd11c6¶2jf19¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d *  P^`.+ %`.{19}$ $&$^$` 

Try it online! Edit: Saved 4 bytes by encoding the left two thirds instead of the right two thirds. Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P^`.+ 

Left-pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`.{19}$ 

Match the last 19 characters on each line.

$&$^$` 

Append their reversed prefixes, thus mirroring the output.

deleted 237 characters in body
Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 290 bytes

K`19¶19¶19¶19¶19¶19je3¶19jb7¶9c8h10¶9g4f13¶5b1c2e4c17¶3d3c2e22¶2g6c24¶1e9c25¶1f4f27¶2i34¶4jb30¶7j25¶10h21¶13g16¶9c3f13¶8e1f13¶6c2d1d12¶5d2c1b19¶5g24¶6h25¶7i26¶9h28¶12e27¶9b3d26¶9d1c26¶6g28¶6d1c7b18¶6e9e15¶7f7g12¶9f5j8¶11c6jd5¶19jf2¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d * P`.+ %`^.{19} $^$'$& 

Try it online! Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P`.+ 

Pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`^.{19} 

Match the first 19 characters on each line.

$^$'$& 

Prefix them with their reversed suffixes, thus mirroring the output.

I first tried this in Retina 0.8.2 but it has no padding or mirroring primitives, so it has to manually pad the output costing 13 bytes, and the mirroring has to be included in the run length data, taking the total byte count to 338.

Retina, 290 bytes

K`19¶19¶19¶19¶19¶19je3¶19jb7¶9c8h10¶9g4f13¶5b1c2e4c17¶3d3c2e22¶2g6c24¶1e9c25¶1f4f27¶2i34¶4jb30¶7j25¶10h21¶13g16¶9c3f13¶8e1f13¶6c2d1d12¶5d2c1b19¶5g24¶6h25¶7i26¶9h28¶12e27¶9b3d26¶9d1c26¶6g28¶6d1c7b18¶6e9e15¶7f7g12¶9f5j8¶11c6jd5¶19jf2¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d * P`.+ %`^.{19} $^$'$& 

Try it online! Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P`.+ 

Pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`^.{19} 

Match the first 19 characters on each line.

$^$'$& 

Prefix them with their reversed suffixes, thus mirroring the output.

I first tried this in Retina 0.8.2 but it has no padding or mirroring primitives, so it has to manually pad the output costing 13 bytes, and the mirroring has to be included in the run length data, taking the total byte count to 338.

Retina, 290 bytes

K`19¶19¶19¶19¶19¶19je3¶19jb7¶9c8h10¶9g4f13¶5b1c2e4c17¶3d3c2e22¶2g6c24¶1e9c25¶1f4f27¶2i34¶4jb30¶7j25¶10h21¶13g16¶9c3f13¶8e1f13¶6c2d1d12¶5d2c1b19¶5g24¶6h25¶7i26¶9h28¶12e27¶9b3d26¶9d1c26¶6g28¶6d1c7b18¶6e9e15¶7f7g12¶9f5j8¶11c6jd5¶19jf2¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d * P`.+ %`^.{19} $^$'$& 

Try it online! Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P`.+ 

Pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`^.{19} 

Match the first 19 characters on each line.

$^$'$& 

Prefix them with their reversed suffixes, thus mirroring the output.

Source Link
Neil
  • 184.4k
  • 12
  • 76
  • 290

Retina, 290 bytes

K`19¶19¶19¶19¶19¶19je3¶19jb7¶9c8h10¶9g4f13¶5b1c2e4c17¶3d3c2e22¶2g6c24¶1e9c25¶1f4f27¶2i34¶4jb30¶7j25¶10h21¶13g16¶9c3f13¶8e1f13¶6c2d1d12¶5d2c1b19¶5g24¶6h25¶7i26¶9h28¶12e27¶9b3d26¶9d1c26¶6g28¶6d1c7b18¶6e9e15¶7f7g12¶9f5j8¶11c6jd5¶19jf2¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d * P`.+ %`^.{19} $^$'$& 

Try it online! Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P`.+ 

Pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`^.{19} 

Match the first 19 characters on each line.

$^$'$& 

Prefix them with their reversed suffixes, thus mirroring the output.

I first tried this in Retina 0.8.2 but it has no padding or mirroring primitives, so it has to manually pad the output costing 13 bytes, and the mirroring has to be included in the run length data, taking the total byte count to 338.