ModulR
Jump to navigation
Jump to search
- Not to be confused with Modulo.
ModulR is a language where there're only unbounded registers(ModulR) to store data and the only operation is the modulo(ModulR)
All registers initilize with 0. x%0 = 1+x
.
Commands
the special symbol is #
, which indicates how many registers you should have.
A #
s at the start of the program means A registers, other #s mark line comments.
Command | Meaning | Notes |
---|---|---|
+ |
increment the register pointer, wraps | |
%
|
Takes an argument(number of *s after it).
modulo register at pointer with the register at the argument and store at the pointer division quotient stores at argument register. |
x/0 = x, x%0 = x+1. |
[...] |
loop while pointer != 0. | |
. |
output current register value as ASCII | if 0, input and store instead. |
Example
Cat eof returns 0
##%*[+..+]
Computational class
Turing-complete. It can have any amount of registers, 2 registers can simulate a stack, 2 stacks can simulate a tape. That's it.