# Empty

Not to be confused with Whitespace.

Empty is an esoteric programming language designed by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff that was designed to be really hard to make an interpreter for.

## Math

To create numbers, ∅ is used as 0, and then you use operations (+,-,•,^). Math is followed in left to right. To make a part go first, prefix it with a number. Bigger numbers go first. (The minus sign is –, not -) For example:

```∅^∅+∅^∅
```

yields 1, however

```∅^∅+∅1^∅
```

yields 2.

The interpunct represents division x/y, while the semicolon and slash represent y/x, also, modulo is M.

The B operation takes the number before it, and if its less than zero, it becomes 0. For example:

```∅-∅1^∅B+∅2^∅
```

yields 1. The # character deletes the current values. So,

```∅^∅#+∅1^∅
```

yields 1, not 2 Also, spaces are no-op

## Strings

Any character that is not a command will be treated as part of a string. For example:

```Hell+o
```

yields "Hello"

The ``` instruction turns strings into integers, and vice versa. So,

```∅^∅`+.+∅1^∅1``
```

yields 1.1

The `"` instruction treats the next character as a string and ignores it.

## Errors

If an error occurs like `∅^∅•∅` (division by 0), then the program jumps back to the S that has a [`letter`] after it, while keeping the properties of the most nearest S that has a [`letter`] after it, where `letter` is the letter after the place where the error occurred. The letter directly after an expression is not counted as part of a string unless it has a " behind it. For example:

```∅^∅Te#Se;∅1^∅e
```

returns 1.

## I/O

To have a string inputted, you use the I command. To output a number, you use a colon. So

```∅^∅+∅1^∅+∅2^∅:
```

prints `3` to the console

## Robots

A robot is made with the letter R, after that is the robot's one-letter name. The robot can be called the same way you make it. After that the robot stores the value that was being executed. If a robot was called before an input command, the robot's value is inputted, and it stays the same. When the program jumps, all Robots reset to the state they were at the matching T. For example

```∅^∅Rr#∅+∅RrI+∅1^∅1+∅2^∅:
```

print the string "3" to the console

## Operations between strings and numbers

Adding two strings together combines them. Adding a string and a number together returns the string.

```ab+c:
```

prints "abc"

### Subtraction

If both are strings, all characters in y are removed from x

```abc-bc:
```

prints "a"

Otherwise, the string is returned

### Division

if x is a string and y is a number, x is duplicated 1/y times

```a•∅1^∅1•∅2^∅2+∅3^∅:
```

prints "aa" If y is a string, return x

### Modulo

if both are strings replace all instances of "%" with y in x, if "%" is not in x, replace all instances of y with "%" in x (similar to `%` in Txet)

if one (A) is a number and the other (B) is a string, take the first A letters of B.

```Buy%Milk:
```

```BuyM∅2^∅2+∅3^∅:
```

prints "Bu"

Unless A is 0, then convert B using escape characters

Comments start with `模` and end with that too. code inside comments will not run

```∅模2^∅2+∅3模^∅:
```

prints 1

## Programs

### Hello, World!

```Hello," World!:
```

```I:
```

### Digital Root

```I-∅1^∅M∅5^∅4+∅5^∅4+∅5^∅3^∅8^∅8+∅9^∅+∅2^∅:
```

### FizzBuzz

```Sl+∅1^∅TlTfTuTiM∅5^∅4+∅5^∅4+∅5^∅;∅f∅7;∅8^∅iSf#Fizz:∅7;∅8^∅nSiM∅5^∅4+∅5^∅4+∅5^∅4+∅5^∅4+∅5^∅;∅b∅7;∅8^∅uTbSb"B+uzz:∅7;∅8^∅nSu:#TnSn
∅9^∅9•∅l
```

### Infinite Loop

```SiTi∅•∅i
```

### 99 bottles of beer

```∅30^∅20+∅30^∅•∅40^∅10•∅30^∅20+∅30^∅20+∅30^∅20+∅30^∅20+∅30^∅20-∅5^∅-∅5^∅;∅5^∅s;∅5^∅+∅5^∅TfTw:" bottles" of" beer" on" the" wall,
:∅5^∅/∅wSw:" bottles" of" beer.
" Take" one" down," pass" it" around,
:∅5^∅/∅fSf-∅5^∅:" bottles" of" beer" on" the" wall.

SsTs1" bottle" of" beer" on" the" wall,
1" bottle" of" beer.\nTake" one" down," pass" it" around,
No" more" bottles" of" beer" on" the" wall.:
```

### Truth-machine

```I-∅5^∅;∅5^∅o∅5^∅/∅zSoTo∅5^∅:∅5^∅/∅oSzTz∅:
```

### Quine

```%"Rq"Rq"I"M"Rq": RqRqIMRq:
```

### Palindrome

```#∅^∅:∅^∅#
```

Always outputs `1`

### Calculator

```∅^∅•∅bSpI`+I10`:∅5^∅•∅eSsI`-I10`:∅5^∅•∅eSmI`•∅10^∅10•I20`:∅5^∅•∅eSdI`•I10`∅5^∅•∅eSb模

```

### Fibonacci sequence

```"1`Ra"1`bSlRaI+RbI:RaRaI+RbI:Rb"1`•∅l"
```

## How to cheat

Instead of using ∅s, to make x do `"{digitof(x)}``