10
In this quine variant, your program must output its source code transposed across the diagonal from the top left to the bottom right. For example:
your program on four lines
outputs
yof
ono
u u
r r
p l
r i
o n
g e
r s
a
m
The whitespace in the output is not arbitrary. Spaces appear in two situations: where there is a space in the original (e.g. between r
and l
in the fourth column) and where it's necessary to pad characters (e.g. all the spaces in the first column.) Both are required, and spaces cannot appear anywhere else in the output.
A single trailing newline in the output can optionally be ignored. Trailing newlines in the source code have no effect on the output, and leading newlines in the source code must be handled as in the example above. Assume that every character that is not a newline is one column wide and one row tall, even though for characters like tab this may lead to an ugly output.
Your solution must have at least two lines with at least two non-newline characters each, and must not be its own transpose (the output cannot be identical to the source.)
Cheating quines that read from the file that contains their source code, pull data from a URL, use quining built-ins, and so on are not permitted.
This is code golf: shortest code in bytes wins.
Does this need to be a true quine? – lirtosiast – 2016-02-16T20:51:58.583
2@ThomasKwa As opposed to? – Martin Ender – 2016-02-16T20:52:30.490
@MartinBüttner Maybe there's a language where literals are echoed transposed. Just in case. – lirtosiast – 2016-02-16T20:53:16.880
@ThomasKwa That's fine as long as it follows all the rules specified. – Luke – 2016-02-16T20:54:33.543
Is the use of external libraries (such as Lodash in Javascript) prohibited? – Mama Fun Roll – 2016-02-17T02:34:42.127
My gut says it's okay as long as you include the necessary code or flags to import the library in your solution, which I think means you'd have to change your Lodash answer a bit. – Luke – 2016-02-17T13:47:21.947