0123456789.
0123456789., or more efficiently, "Numbers", is a language created by User:Imakesi. This was previously (0123456789!?.), but the code broke and was rewritten. Events were added to the interpreter, but it became too buggy, so it is not going to be worked on for a while. If you would like to use this esolang, it is best to use the following github repository, and download the latest release.
If you want documentation, please read README.md.
As implemented
The language has a bounded tape of unbounded integer cells and an accumulator, as well as two modes; normal and alternate. The tape head is called the cursor. The tape has 50 cells by default, but the !
directive in the main file can change it to any bounded value. The directive must be at the start of the first line of the main file.
A program is made up of several source files called packets, all located in the same directory. Each packet is numbered based on the arbitrary ordering of Python's os.listdir
method. A list of packet URLs is partially supported, but there is no way to set a URL list. In either case, there is a packet pointer which starts at 0 and indexes the list of packets and packet URLs. Execution begins in a separate main file.
In addition to the packet scheme there is an event listener file. This file defines event functions which can be triggered by the rest of the program. Every command will fire an event unique to it. The print commands will send the OUT
event, the packet increment and packet run commands will send the PAC
event, and the memory clear command will send the CLR
event. When an event function is run the EVN
event will be sent.
Comments use the tilde character ~
.
The language also supports an addon system, where custom Python modules can be incorporated in.
Command | Effect | Alternate effect |
---|---|---|
. |
toggle alternate | |
0 |
set cursor position to start | set cell under cursor to 0 |
1 |
increment cursor (move right) | increment accumulator |
2 |
decrement cursor (move left) | decrement accumulator |
3 |
increment cell | increment cell by 10 |
4 |
decrement cell | decrement cell by 10 |
5 |
print cell | print accumulator |
6 |
print Unicode representation of all memory | print Unicode representation of accumulator |
7 |
increment packet pointer | decrement packet pointer |
8 |
run selected packet file | run selected packet URL |
9 |
set all memory cells to 0 | set accumulator to 0 |
There is an official file handling addon. It adds a string register which stores the name of a file to be edited.
Command | Effect | Alternate effect |
---|---|---|
¢ |
register = Unicode representation of the tape | register = numeric value of the accumulator |
£ |
read the file at filename into the tape, starting at the cursor | print the contents of the file |
¥ |
write the Unicode representation of the tape into the file | append the Unicode representation of the tape into the file |
€ |
create the file | delete the file |
Computational class
Looping is non-obvious, but can be done using 8
. If we have one packet file containing just 8
, then it will execute in a loop indefinitely. Events could likely also be used for loops.
Useful conditional execution is nearly impossible. Likely the only way to have some sort of conditional execution based on the state of the tape is to use the file addon. The 1 bit alternate flag could potentially store conditional state, as could the packet pointer. It is not clear how to perform computation using these techniques, though.
Without the file addon, the language is unlikely to be Turing complete.