Twimp
From Esolang
The Twimp programming language was invented by User:Zzo38 in 2004. Some information can be found in http://zzo38computer.cjb.net/esoteric/twimp/ But now I forget mostly how it works (but see the documentation and PHP code).
Contents |
[edit] Features
- There is no way to store numbers.
- Input is a nybble at a time, but output is a byte at a time. This makes a cat program to be a bit long
- If you type AVARTA KADAVRA then it returns a fatal error "Fatal: Bad Magic"
- There are 4 built-in constants: ZERO (actually 1, to confuse you), ONE (actually 0, to confuse me), PI (set to 3, in case you are too much religious), and HOURSINADAY (which can be used as a filter criterion).
- Forced constants are in roman numerals
- You can type a program without ever using the shift key
- You can deal with "half-references" with the REF and PULL commands
- The program can be drunk by using DRINK command
- Duck-sauce replaces the entire equasion with zero
[edit] Preprocessor Commands
- ABREV (abbreviation)
- INSTRUCT
- ACT
- ACTS
- NPR (Combination of NEW, PUSHLN, and RET)
[edit] Program Commands
- RET
- PUSHL
- PUSHLN
- OUT
- POP
- MOVE
- KEYOUT
- KEYIN
[edit] Examples
Copy input to output (cat):
NEW 1 NEW 2 PUSHLN 1 PUSHLN 2 -NO NEW 3 COPY 1 2 MOVE 1 3 COPY 2 2 MOVE 2 3 COPY 3 2 COPY 3 [] NEW 4 FORGET PUSHLN 4 STEP IV POP 3 1 OF [6-[3]] NEW 5 PUSHLN 5 RET 4 ON 5 OUT [[[=====]--[]]-16] RET 2
- This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.

