"Hello, Niklaus Emil Wirth!" (Befunge-98, 222×14=3108)
From Wikipedia:
Niklaus Emil Wirth (born February 15, 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. In 1984 he won the Turing Award for developing a sequence of innovative computer languages.
With a shift of 34, Niklaus Emil Wirth
(18 characters, 14 unique) ends up as p,./$86Bg0,/By,57+
.
Code (try it out here):
88888888+++++++50p50g8+,50g88885+++++00pg,g7+,g7+,g55++,888866+++++,8888+++,50g68++,g886++5/+,g6+,g7+,50g88755+++++,g88++,g77++,8888+++,50g5+,g8+,g886++5/+,g7+,8888+++,50g887+++,g886++5/+,g85++,g87++,g88+5/+,g5/85++,50g00p
Breakdown:
88888888+++++++ # Put eight '8's on the stack and add them together (ASCII 64 = `@`)
50p # Save this value in row 0, column 5 (where the 6th '8' was)
50g8+, # Fetch the value we just saved, add 8 and print it (ASCII 72 = `H`)
50g88885+++++ # Fetch it again and add 37 (4×8+5) (ASCII 101 = `e`)
00p # Save this value in row 0, column 0 (the very first character)
g, # Fetch & print this value (stack is empty, so coordinates will be zero)
g7+,g7+, # Fetch it again, add 7 (ASCII 108 = `l`) and print. Repeat.
g55++, # Print `o`
888866+++++, # Print `,` (4×8+2×6=44)
8888+++,50g68++,g886++5/+,g6+,g7+,50g88755+++++,g # Continue in a similar fashion,
88++,g77++,8888+++,50g5+,g8+,g886++5/+,g7+,8888++ # using integer division (`/`) in
+,50g887+++,g886++5/+,g85++,g87++,g88+5/+,g5/85++, # a few places
50g00p # Fetch the `@` character and put it in cell (0,0)
The last line places a HALT character (@
) at the beginning of the line. When the control wraps around back to this point, the program will stop. This shouldn't actually be necessary, because the @
character at (5,0) is still there and nothing should be output before it is reached. However, the only online Befunge interpreter that will run this monstrosity won't work properly without it.
It is actually possible to make a working solution with just Niklaus Wirth
(12 unique chars, p,./$86By,57+
), but the code is much, much longer.
(Tagged as Befunge-98 because Befunge-93 is limited to a width of 80 characters.)