Hexagony, 30 29 bytes
H;_e;r;2l.;P.QW;l/P1;@;0d;\o;
Source laid out:
H ; _ e
; r ; 2 l
. ; P . Q W
; l / P 1 ; @
; 0 d ; \ o
; . . . .
. . . .
One more byte off!
Here's a crappy gif of the program in action.
Given there's 2 nops inside the program itself, I'm confidant this can be golfed by at least one more byte. I'm willing to offer a bounty for a smaller version.
###Old version:
Old version:
H;e;r;0Pld;P_1;l;;o;Q\;W\;$2@\
Source laid out:
H ; e ;
r ; 0 P l
d ; P _ 1 ;
l ; ; o ; Q \
; W \ ; $ 2
@ \ . . .
. . . .
Reuses the same tricks as Martin Ender's answer, i.e Q2
printed is the comma, P0 is the space, P1
is the bang, but manages to be 2 bytes shorter through clever mirroring to reuse several ;
s and the o
.
###Explanation:
Explanation:
Here's a coloured Hexagony grid to show the non-branching path that the pointer takes:
The executing code, ignoring mirrors, is:
H;e;l;;o;Q2;P0;W;d$;o;$2r;0Pl;Wd;P1;@
Filtering out the skipped instructions and the literals that are overwritten by other literals, we are left with:
H;e;l;;o;Q2;P0;W;o;r;l;d;P1;@
Which simply prints "Hello, World!"
After a few attempts, I gave up on a size 3 Hexagony answer. You need a minimum of 12 instructions out of 19 reserved for string literals, along with three ;
s for printing and one @
for ending the program. This leaves only 3 spaces for IP management and memory management, provided you find the optimal path that reuses both the o
and the l
. From all this, I'll rule that a size 3 answer is impossible, though I'll give a sizable bounty to anyone who proves me wrong.