Revaver LanguageIn this ReversibleProgrammingLanguage, each command is the reverse of itself. If you run the program forward with 1 input, and then run that output through the program running in reverse order, then you will be back with the input it started with! Interpreter URL: http://zzo38computer.cjb.net/esoteric/revaver
It always starts at the line label TERMINATE (.). There can only be 1 of these in the whole program. The TELEPORT (*) command is the only way to jump to another place in the program. The PUSHPOP (;) command pops the top stack value if it is same as it's given parameter, otherwise, it pushes that value.
Example:
*. . < _1 ;1 < *.Long Text Example:
TELEPORT TERM TERMINATE SWAP SUBTRACT 1 PUSHPOP 1 SWAP TELEPORT TERMThis example in reverse:
TELEPORT TERM SWAP PUSHPOP 1 SUBTRACT 1 SWAP TERMINATE TELEPORT TERMCopying number to other stack example:
SWAP PUSHPOP # SWAPAnd at the end to remove where it used to be (otherwise it would be both places):
PUSHPOP #
'Some spelling and grammar issues fixed above -- PhilCooper?
How would one compute the value of a non one-to-one function (such as "sin x" or "floor x") in such a language?
Some possibilities; none seems attractive:
What are the commands in this language?
EditText of this page
(last edited March 19, 2009)
or FindPage with title or text search