ShiftEso
ShiftEso is a new esolang created by User:TheCatFromGithub in 2025. It was heavily inspired by brainfuck. It works by manipulating an MxN grid of cells with shifts. The source code can be found at https://github.com/TheCatFromGithub/ShiftEso.
Command | What it does |
---|---|
+ | Increments $ |
- | Decrements $ |
# | Sets % to $ |
@ | Sets $ to % |
! | Sets $ to $ mod 256 |
. | Prints $ (mod 256) |
; | Reads in one char, takes its value, and stores it in $ |
[ | Jumps to corresponding ] if $ is zero |
] | Jumps to corresponding [ if $ is nonzero |
>x,y | Shifts row x to the right, inserting y at the end, and storing the value pushed out in $ |
<x,y | Same as >x,y, but shifts to the left instead of the right |
^x,y | Same as >x,y, but shifts column x up and inserts y at the end |
vx,y | Same as ^x,y, but shifts down instead of up |
Note that all whitespace characters are ignored. Therefore,
> 0 , 1
is equivalent to
>0,1
About the grid
The grid is simply a 2d NumPy ndarray. You can specify the grid size by inserting (width you want)x(height you want) at the top. Otherwise, it will assume 16x16. The grid always starts as all zeros.
An explanation of shifting
ShiftEso uses a somewhat odd definition of "shifting". In the context of ShiftEso, a shift as defined as pushing a row or column one step in any direction. For example: consider we have the grid:
[[0, 0] [0, 0]]
If we shift row 0 (the first row) to the right, and insert 2 at the end, we get:
[[2, 0] [0, 0]]
And then we shift column 0 down, inserting 0:
[[0, 0] [2, 0]]
We can now shift row 0 to the left, inserting 1:
[[0, 1] [2, 0]]
Then we can shift column 0 up, inserting 0:
[[2, 1] [0, 0]]
Note that the value to be inserted is computed after the shift takes place. You can use any integer, $, or %. For example, you can do a rotate right with:
>0,$
Which if we perform on our grid, we get:
[[1, 2] [0, 0]]
Note that you can specify the row or column to be shifted with not just an int, but $ or % too. However, these are computed before the shift happens. Also note that all integers are 64 bit and signed, due to NumPy.
Examples
Cat
;[.;]
Reverse cat
256x1;[#>0,%;]<0,0[.<0,0]
Note that this only works up to 255 characters.
Hello, World!
>0,72<0,0.>0,101<0,0.>0,108<0,0.>0,108<0,0.>0,111<0,0.>0,44<0,0.>0,32<0,0.>0,87<0,0.>0,111<0,0.>0,114<0,0.>0,108<0,0.>0,100<0,0.>0,33<0,0.>0,10<0,0.
XKCD random number
>0,52<0,0.
Please update the examples if you can find a more efficient way to do them.