xⁿxₙ

From Esolang
Jump to navigation Jump to search

xⁿxₙ is a minimalist esolang inspired by underload. it was created by User:Yayimhere

memory

memory is stored in a tape starting with only one cell containing the letter A. the tape is circular so going to the end of the tape will bring you back to the start

syntax

Command : current tape - future tape (future program) direction pointer moved

description

[ : x - ([x) *

put the current cell symbol into the code after the command and delete the cell

y] : x - x, y (]) *

delete x and store it in tape

> : x - x (>) >

ignore following command and go left on tape(

1 : x - x (1) <

> but it goes right on tape

$ : x, y - xy ($) *

concatenate the the current cell onto the front of the cell to the right of it

( : x, y - x, x, y (() *

copy all the cells to the right of the pointer, to the right(including whats under the pointer)

) : x, y, z - x ( )yz ) *ª

delete everything right of the pointer and place it in front of the command

^x : x - x (^x) *

if the current cell is equal to the symbol following the ^ delete the following command. this skips x

P : x - x (P) *

print the current cell to STOUT

| : x - x (|) *

skip following command

{ : x - ({x) *

[ but it moves left on tape

here x, y, z are placeholders and in commands they are single chars

examples

hello world:

|H]|e]|l]|l]|o]|,]| ]|w]|o]|r]|l]|d]|!]> $$$$$$$$$$$$$P

turing completeness proof

translation from Underload(only :()^ which is still TC):

the stack starts with a A in it which is not accessible
: -> 1 (space needed)(
^ -> {
(x) -> |x]
(xyz) -> 1|x]|y]|z]> (space needed) then $ repeated as many times as the length of the string

so the infinite loop (:^):^ becomes:

1|(]|1]|{]> $$$1 ({

i think