SimpleScript is an esoteric programming language invented by User:A, similar in many aspects to brainfuck, but regarding its architecture operating on a stack and a single register, while the command set is extended to accommodate for these variations.
A program in this language is offered access to two memory storages: a stack of infinite size intended to store byte values, and a register maintaining an unbounded integer. Both data conditories partake of input and output capacities, and their interrelations may be availed for computations.
SimpleScript's commands embrace strings, instructions composed of a single character, and an iteration facility.
|Pushes the ASCII character codes of the chars in the string unto the stack, in the order of their appearance.
|Empties the stack while outputting its elements as ASCII characters, in the order of their popping.
|Prompts the user for a character and stores its ASCII code in the register.
|Prompts the user for a string and pushes its characters' ASCII codes unto the stack, from left to right.
|Pops a value from the stack and writes it to the register.
|Prints the content of the register as a number.
|Prints the content of the register as the associated ASCII character.
|Pushes the content of the register to the stack.
|Pops a value from the stack and increments the register by this value.
|Pops a value from the stack and decrements the register by this value.
|While the register equals 0, the code betwixt
[ and either the matching
] or, if not present, the end of the program, is executed. If the register does not equal 0, the enclosed code section is skipped.
|Terminates a code section to repeat started by a
The following program prints “Hello, World!” to the standard output:
An infinitely repeating cat program may be implemented as such:
A truth-machine is implemented in the following:
"0" b i [e] e
- Common Lisp implementation of the SimpleScript programming language.