Revomer is an esoteric programming language where the programs work by removing the lines of their own source code. It was created by Tomasz "Zyx" Jedrzejewski (User:Zyx) and Krzysztof Piecuch in the summer Category:2006.
The name Revomer is the English word "remover" written backwards. Combined with the rule IN-IS (Is Negative - Is Good), we get all the basic ideas of the project:
- Generally speaking, removal, negation, substraction (and even division!) are good. Addition and the rest are baad.
- If we manage to add something, this always costs something, because it is baad.
- The execution of the program is based on self-modification of the source code.
- If the interpreter does not know what to do, it tries to guess what the programmer wanted (read: performs a random operation).
On 28 August 2006 the project authors came to the summer science camp of the city of Lublin in Poland. The talk after the arrival delved into esoteric programming languages, and they decided to create their own. For five days, under strange conditions, they created the language itself and began to write the interpreter. It is worth mentioning that the first reference manual was written on toilet paper, which is currently kept by Zyx in an honourable place.
- Functions (with function management)
- Input/output commands
- Code management
- Mathematical operators
- Revomer Logic Model
Revomer has a very strict syntax, which resembles Assembler somewhat. There are no comments, and whitespace is allowed only at the end of a line. Each line contains one command and its parameters. The program is executed from bottom to top.
The syntax rules are:
- Every command must end with a tilde, except those commands that must not. The exception from the exception is the
ropecommand, which works both with a tilde and without it.
- There are no comments, because the interpreter does not like it when someone comments its work. Moreover, you are only free to use whitespace at the end of a line.
- The parameters are separated with commas and are usually pointers to memory cells containing actual values.
- Some commands use brackets. The opening bracket is
}and the enclosing bracket is
A program in Revomer consists of functions, which have a name. The language accepts the situation when many functions share the same name. The interpreter should then run a random one whenever the program wants to call one of them. A function begins with a declaration:
and ends with
A function is executed until its source code, between the declaration and
almukantarat, is removed. The program stops when the main function's source code is removed.
- The program can use a 64-kb memory divided into 1-byte cells. The command parameters are usually pointers to the memory cells that contain the exact values. It is possible to read and write longer (2- and 4-byte) values.
- Revomer uses its own Revomer Logic System, where false is 0 and true is -1. There is only one operator, similar to NAND, and two reductors, which convert other values to true or false.
The following commands are available in the language:
conf– replaces two functions with a name.
rf– removes a function (but does not cause it to stop :)).
charm– calls a function.
unless– conditional code removal. If the value in the specified memory cell contains 0, removes the next command to execute.
come here– allows moving parts of the source code from place to place.
if– includes a file and removes itself from the source.
real– removes the specified code line.
shuffle– shuffles the specified part of the source code.
gifs– are used to put constant values in the memory.
gifts– input command: reads an ASCII character or a typed number from the input.
pos– output command: prints an ASCII character on the screen.
sars– changes the length of the parameters passed to commands (allowed lengths: 1, 2 or 4 bytes). Moreover, changes endianness every time it is called.
nope– does nothing.
rope– performs a random operation. This is a very important operation, because it handles every unexpected situation.
????&– the only operator in the Revomer Logic System (similar to NAND)
in– Is Negative - the optional Revomer Logic Reductor, returning -1 for negative numbers and 0 for 0 and positive numbers
Here is a simple program that prints
HI UNIVERSE on the screen:
almukantarat~ nope~ null% almukantarat~ come here $1, $1, $3 gifs 3~ hide $3 gifs 29~ hide $2 gifs 29~ hide $1 pos $0~ gifs 69~ pos $0~ gifs 83~ pos $0~ gifs 82~ pos $0~ gifs 69~ pos $0~ gifs 86~ pos $0~ gifs 73~ pos $0~ gifs 78~ pos $0~ gifs 85~ pos $0~ gifs 32~ pos $0~ gifs 73~ pos $0~ gifs 72~ hide $0 %
The program below does multiplication, but currently it is a bit tricky, because it uses the illegal
num operation to print the result on the screen. The problem was that the number printing requires multiplication and to test the multiplication, we needed
num :). In the near future the listing will be updated.
almukantarat~ mul_null% almukantarat~ conf mul_null, n~ unless}$506# ????& $506, $507 in $507 in $506 @&%^" $508, $506 conf n, mul_null~ @&%^" $501, $508 @&%^" $501, $507 gifs 1~ hide $508 gifs 1~ hide $507 gifs 1~ hide $506 ~].?&* $505, $503~ ~].?&* $503, $504~ @&%^" $504, $503 ~].?&* $503, $505~ ~].?&* $505, $502~ ~].?&* $502, $501~ @&%^" $501, $502 ~].?&* $502, $505~ n% almukantarat~ nope~ nope~ nope~ nope~ foo% almukantarat~ come here $520, $521, $522 gifs 3~ hide $522 gifs 17~ hide $521 gifs 17~ hide $520 charm $66 gifs 110~ hide $66 gifs 0~ hide $504 @&%^" $509, $503 ~].?&* $500, $503~ gifs 1~ hide $502 gifs 0~ hide $509 m% almukantarat~ come here $500, $501, $502 gifs 3~ hide $502 gifs 14~ hide $501 gifs 14~ hide $500 num $504 charm $66 gifs 109~ hide $66 gifs 8~ hide $501 gifs 8~ hide $500 %
Except for memory limits, the language is believed to be Turing-complete, but this has not been proved yet.
The next version of the language is being developed. It will be compatible with the first release, but will have many more features:
- Filesystem support
- Network Source Code Transmission Protocol
- System console support - the programs will be able to have a simple interface
- Multiexceptioning - a revolutionary connection of multitasking and exceptions
- Elements of RPG
- Standard Useless Function Library
- Memory management