Write language name in 3D ASCII: Difference between revisions

m
→‎{{header|Perl 6}}: white-space padding, flatten lazy list
(→‎{{header|Java}}: Added explanation of how it works)
m (→‎{{header|Perl 6}}: white-space padding, flatten lazy list)
Line 2,209:
=={{header|Perl 6}}==
Produces a good old-fashioned stereogram, meant to be looked at by focusing beyond the screen, not by crossing your eyes. If you can't get it to converge, try shrinking the font size till the images are closer together than your eyes. Also helps to be old enough to have progressive lenses, so you can look through the reading part of your glasses. Or borrow glasses from someone who's farsighted. <tt>:-)</tt>
<lang># must be evenly padded with white-space$
<lang>my $text = q:to/END/;
 
@@@@@ @@
@@@@@ @ @@ @ @@@
@ @ @ @@@
@ @ @@@ @ @@ @ @@
@ @ @@@ @ @@ @ @@ @ @ @@@@@
@ @@@@ @ @ @@ @ @ @@ @@@
@ @ @@@@ @ @ @@ @@
@ @@@ @ @@ @@ @@
@ @@@ @ @@ @@@@
 
END
 
say '' for ^5;
for $text.lines -> $_ is copy {
my @chars = |「-+ ., ;: '"」.comb.pick(*) xx *;
my $/;
my @chars = 「-+ ., ;: '"」.comb.pick(*) xx *;
s:g [' '] = @chars.shift;
print " $_ ";
2,392

edits