We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Two-finger salute

From Esolang
Jump to navigation Jump to search

Two-finger salute is an esoteric programming language by user:raiseafloppafan7741 in 2026 based on Emmental and Mascarpone.

Overview

There is a stack of interpreters, a stack of 8-bit unsigned numbers, and a current interpreter which is the interpreter running the current program.

The null interpreter is simply an interpreter with no commands defined.

Popping from an empty stack is an error and halts the program.

Command Description
^ Pops an interpreter from the interpreter stack and replaces the current interpreter with that one.
v Pushes the current interpreter to the interpreter stack.
@ Pushes the parent interpreter to the interpreter stack, or the null interpreter if there is no parent.
. Pop the top of the interpreter stack and discard it.
: Duplicates the top of the interpreter stack.
% Swap the top two interpreters of the interpreter stack.
& Swap the top of the interpreter stack and the interpreter below the interpreter below the top of the interpreter stack.
, Pop the top of the integer stack and discard it.
; Duplicates the top of the integer stack.
$ Swap the top two integers of the integer stack.
# Swap the top of the integer stack and the integer below the integer below the top of the integer stack.
0 to 9 and a to f Pushes the value of the hexadecimal digit to the integer stack.
+ Pops two integers from the integer stack and pushes their wrapping sum to the integer stack.
- Pops two integers from the integer stack y and x and pushes x - y to the integer stack.
* Pops two integers from the integer stack and pushes to the integer stack their product.
/ Pops two integers from the integer stack y and x and pushes x / y to the integer stack.
? Read user input as a byte and if it is EOF, push 0, else push the byte then 1.
" Pop an integer from the top of the integer stack and print it as a byte.
< Pops an interpreter from the interpreter stack, an integer from the integer stack (which will be treated as a character), and a program in reverse terminated by 0, and overrides that command with that program in that interpreter. The interpreter is then pushed back to the interpreter stack.
> Pops an interpreter from the interpreter stack and an integer from the integer stack. The integer is used as the character code of the command to be extracted from the interpreter. The command is placed into a null interpreter which is then pushed to the interpreter stack.
~ Pops two interpreters y and x from the interpreter stack and pushes a new interpreter with a mix of commands from both interpreters, but y's commands take priority.
` Pops an interpreter from the interpreter stack and a reversed null-terminated program from the integer stack and runs that program in that interpreter.

Examples

Infinite loop

This works by overriding $ to invoke itself, causing infinite recursion.

v094:*<^$

Truth-machine

Pretty similar to Emmental's truth-machine, don't you think?

0 is defined to be " while 1 is defined to be ;"1.

v02f*1+86*<086*1+57*1-6a*1-86*1+<^0?`

See also