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.
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:
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 prints "Hello, World!"
After a few attempts, I gave up on a size 3 Hexagony answer. Given you need a minimum of 12 instructions out of 19 reserved for string literals, along with two ;
s for printing and one @
for ending the program. This leaves only 4 spaces for IP management and memory management, provided you find the optimal path that reuses both the o
and the l
and only uses two ;
s (a reminder that you can only pass through two ;
s in 12 different ways). From all this, I'll rule that a size 3 answer is impossible.
A smaller size 4 program however is very much possible, though so far I've been unable to find one. I've had a few ideas involving #
and reusing the P
from the space and the bang.