We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Z-256

From Esolang
Jump to navigation Jump to search

Z-256 is a esolang created on 9/20/2026 by the GitHub user ZViperSw. The language features 6 basic commands.

Semantics

The program is stored inside a multidimensional grid. Each position in the grid is called a cell. Unlike a traditional 2D grid, the grid can have more than two dimensions and is structured as a hypercube.

Syntax

@

Rearranges the velocity components

Before:  X  Y  Z  W
After:   Z  W  X  Y

then all velocity components are summed up

sum = vel.x + vel.y + vel.z + vel.w

For example, if the velocity is:

X = 1
Y = 2
Z = 3
W = 4

After the rearrangement:

X = 3
Y = 4
Z = 1
W = 2

The sum is:

3 + 4 + 1 + 2 = 10

So the resulting velocity is:

X = 13
Y = 14
Z = 11
W = 12

! — Subtract

Subtracts each component from the component after it:

x = x - y
y = y - z
z = z - w

w is unchanged.

For example:

Before: (10, 7, 3, 2)

After: x = 10 - 7 = 3
y = 7 - 3 = 4
z = 3 - 2 = 1
w = 2

Result:

(3, 4, 1, 2)

| — Square Velocity

Squares every velocity component:

x = x × x
y = y × y
z = z × z
w = w × w

For example:

Before: (-2, 3, 4, -5)
After: (4, 9, 16, 25)

* — Copy Components

Sets x to the current value of y, and z to the current value of w.

x = y
z = w

y and w remain unchanged.

For example:

Before: (1, 2, 3, 4)
After: (2, 2, 4, 4)

$ — Output Velocity

Prints the four velocity components in order: xyzw

For example, if:

velocity = (1, 2, 3, 4)

$ outputs:

1234

There are no spaces or separators between the values.

. — Move

Moves the current position according to the current velocity.

x = (x + velocity.x) % 8
y = (y + velocity.y) % 8
z = (z + velocity.z) % 8
w = (w + velocity.w) % 8

In other words, each velocity component determines how far the program moves along its corresponding dimension.

The % 8 causes the position to wrap around when it reaches the edge of the 8×8×8×8 space.

For example:

Position: (1, 2, 3, 4)
Velocity: (2, 1, 3, 2)

After `.`:

Position: (3, 3, 6, 6)

External resources

Credits to original creator, Q_M source code was forked.