From Esolang
Jump to: navigation, search

Hexagrid was designed by Emil Svensson (User:fr34k) in 2008. The name comes from how one codes in Hexagrid (hexadecimal grid).


Initially, when you code in Hexagrid, one has a virtual grid of the hexadecimal codes with pointers starting in the uppermost left corner.

>0 1 2 3
 4 5 6 7
 8 9 A B
 C D E F

This is only for clarification, and is never shown when coding. One has to keep track of the pointer in his/her head.

By moving the pointer around one can add hexadecimal codes to different stacks.


Command Function
> Move pointer to the right
< Move pointer to the left
^ Move pointer up
v Move pointer down
+ Add to stack
! Clear stack and reset pointer
o Output stack
x{ } Define a stack where the stack is x



Moving the pointer, defining a stack and adding data to it

Before we can code anything we need to define a stack that we want to work with. Remember that you can work with as many stacks as you like, the only rule is to work with the coding inside the stack limitations ({ and }). Let's call our stack myStack.


First of all we clear the stack and reset the pointer


After that we can move the pointer using <, >, ^ and v. Let's say we want to move our pointer to A in the grid.

We move the pointer two steps to the right, then two steps down.


Let us then add this data to the stack using the + command


If you want to move the pointer anywhere else, keep in mind that the pointer now points at A.

Now let's output the stack. We then use the o command


Wich would output


Hello, world!

This is a Hello, World! program in Hexagrid


which will output

Hello World!

or in hexadecimal code



hexagrid.rb - Hexagrid interpreter in Ruby