Your job is quite simple, write a program that prints Hello, world!
, that when twisted creates a program that prints Twister!
.
How strings are twisted
The twisting algorithm is very simple. Each column is shifted down by its index (col 0 moves down 0, col 1 moves 1, ...). The column shift wraps to the top. It kinda looks like this:
a
ba
cba
----
cba
cb
c
With everything under the line wrapping to the top. Real example:
Original:
\\\\\\\\\\\\
............
............
............
Twisted:
\...\...\...
.\...\...\..
..\...\...\.
...\...\...\
(Further examples and a twisters in your favorite language are here)
Scoring
Your program must be a padded rectangle. This is code-golf so lowest byte count wins!
Rules
- Your first program must print
Hello, world!
. Only one trailing newline is allowed. - Your first and second programs must be in the same language.
- Your second program must print
Twister!
. Only one trailing newline is allowed. - Your program must have at least 2 rows and 2 columns.
½
and takes the square root of a number. Which one of the two should be considered the newline for this challenge? \$\endgroup\$