I'm trying to wrap my head around the programming language Hexagony. I've looked at a few sample programs and have tried writing a simple program to read input and print Hey [input]!
. Here's what I have.
, < . . C $
. . { . # . ;
. . . # . . 2 '
. . . . # C 3 < .
. # . # . . * . ; .
. E . . E . ; . . > /
= . . . } y . . 3 .
. . . . ; . . 3 .
. . . e $ . ; .
. . ; . . @ .
. H . . > &
If there is no input it prints Hey !
as expected. But with any input it prints EE!
. I'm pretty sure my issue is I don't understand how the memory pointers work on the hexagonal grid. I'm assuming my code has issues with over writing values if the input is too many string but I'm not concerned with that as of yet. I confused as to the exact rules for which edge is selected with the {
and }
commands and how the direction of the MP is affected with this.
If anyone could give me a more explicit explanation of how the memory works how the MP is oriented with a shift that would be appreciated
H;e;.i....7....y;*32;\@><.....>,<.$..
– ParraH;e$$/$;y;<./6/i@.,
- 19 bytes – ParraH;e;7i/;$,y;..$@i6<
- 19 bytes – Parra