NoSubject

From Esolang
Jump to navigation Jump to search

NoSubject is a pseudonatural esolang where every sentence has no subject. It is invented by User:None1.

There is an accumulator, which is a reference to a variable. It is undefined behavior to access data using the accumulator before setting it to a reference of an existing variable. Variables store unbounded signed integers.

Commands

makes A

Define a variable named A, initially zero. If the variable already exists, do nothing.

is A

Let the accumulator be the reference of A.

adds by A

Add the accumulator by A.

speaks

Print the accumulator as an integer.

talks

Print the accumulator as an ASCII character.

listens

Read an integer and store it into an accumlator.

hears

Read an ASCII character and store it into an accumlator.

negates itself

Negate the sign of the accumulator.

becomes integer/A

Let the data pointed by the accumulator become the value of an integer or another variable.

disappears

Delete the variable at the accumulator.

jumps to integer/A

Jump to line specified by the integer or variable. First line is line 0.

stops

Stop.

jumps to integer/A using integer/B

If integer/B is nonzero, the line specified by integer/A is jumped.

says "string"

Prints the string.

Examples

Hello, World!

says "Hello, World!"

Cat program

makes A
is A
hears
talks
jumps to 1

Truth machine

makes A
is A
listens
speaks
jumps to 2 using A

A+B Problem

makes A
is A
listens
makes B
is B
adds by A
speaks

Errors

There are two cases that cause errors: Jumping out of bounds and deleting non-existent variables. If one of these two errors occur, the program prints fuck and terminates.