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.
Stacklan
Jump to navigation
Jump to search
- Not to be confused with StackLang.
| Paradigm(s) | imperative |
|---|---|
| Designed by | User:Rock_Pie |
| Appeared in | 2026 |
| Computational class | Unknown |
| Major implementations | Reference implementation |
| Influenced by | Brainfuck |
| File extension(s) | .stck |
Stacklan (short for "Stack language") is a brainfuck derivative that, instead of a memory tape, uses a stack (and an 8-bit register referred to as 'reg').
Commands
| Command | Description |
|---|---|
>
|
Push 1 onto the stack |
<
|
Pop and discard the topmost item on the stack |
+
|
Add the topmost item on the stack with the one below it |
-
|
Subtract the item below the topmost item on the stack with the topmost item |
.
|
Output the (extended) ASCII character that corresponds to the value of the topmost character on the stack |
,
|
Input an (extended) ASCII character and push its value on the stack (or push 0 on the stack if EOF) |
[
|
Jump past the matching ] if the topmost item on the stack is 0
|
]
|
Jump back to the matching [ if the topmost item on the stack is nonzero
|
!
|
Swap the topmost item on the stack with 'reg'. |
?
|
Pop the two topmost off of the stack, combine them into a 16-bit integer (topmost item is the high byte, second topmost item is the low byte), and use the result of that to address the item on the stack to swap with the then-third (now first) topmost item (stack indexing is zero-based) (for example: {1, 2, 3, 1, 0} -> {1, 3, 2}) |
Examples
See the external resources.