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.

Xwy

From Esolang
Jump to navigation Jump to search
This language is a derivative of New.

Xyw is a language which only has the non-Brainfuck commands in New.

Name

"New" was made in 2023.

There is a function which can be represented in Python as:

def newify(l):
     upper_l = l.upper()
     upper_l_second = upper_l[:-2] + upper_l[-2:] + upper_l[-2:]
     return sum(sum(ord(x) + ord(y) for x in upper_l) for y in upper_l_second)

newify("New") is equal to 2340.

newify("Xwy") andnewify("Xyw") are equal to 2640.

Xyw was made in 2026.

Commands

The tape starts as an infinitely long tape of cells which are all set to 1. These cells can all increase to the value 1114112, and if they increase beyond that point, the modulo of 1114112 is taken and the value is set to that instead.

The commands can be represented by characters or numbers.

Command Description
., 0 Output the value in the current cell as a Unicode character. If the cell to the right is less than or equal to the current cell, then multiply the cell by 2. Otherwise, move left.
!, 1 Add the value from the cell to the right of the current cell to the current cell. If the value of the current cell is 0, reset the current cell to the value of the bits surrounded by non-zero bits in the cells to the right appended to each other in a little-endian fashion (unless the cell is 0, in which case a single 0-bit is appended) until doing it to the next cell N would create a number represented by 21 or more bits. Then, swap the values of the current cell and cell N and move the pointer to cell N.
Otherwise, if the cell to the right is zero, skip the next instruction.
?, 2 Find the value of the current cell subtracted from the previous cell. Take the value of that number modulo the number of instructions in the program, then jump backwards that many instructions in the program.

Computational Class

This is Turing-complete. Prove me wrong.