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.
stjck
Jump to navigation
Jump to search
stjck is an esolang created by user:cleverxia. There are no typos here. It has 2 stacks, a IP stack and a data stack
Program flow
every program in queje consist of some commands that does two things: change the IP, and does someting to a stack. Popping an empty stack gives a random number in [0,IP) and it's the only way to get anything random. IP out of bounds wraps.
in the table below, pop() means pop from data stack and return the popped value
| command | meaning | what it does |
|---|---|---|
_ |
advance/APLWSI | IP+=1 |
@ |
halt | halt |
: |
dup | pop stack top(let it be x),push x twice, then let IP=x |
` |
push | push IP to data stack, then IP+=1 |
_ |
discard | set IP to pop() |
[ |
flag | push current IP to IP stack, then IP+=1 |
] |
branch | set IP to IP stack top (pops) |
? (wimpmode only) |
condition | set IP to IP stack top (pops) if data stack top!=0 (also pops) |
0~9 |
number | push the number (let it be X), then IP+=X (+1 if X==0) |
+ |
add | IP+=pop() |
- |
sub | IP-=pop() |
* |
mul | IP*=pop() |
/ |
div | IP/=pop() (integer divide, rounds to -inf, x/0=0) |
% |
mod | IP%=pop() (always positive, x%0=x) |
< |
output | a=pop(), output a as character, and set IP to it |
> |
input | input a character, push ASCII code to stack and set IP to it |
) |
rroll | roll the stack top to the bottom, and set IP to it |
( |
lroll | roll the stack bottom to the top, and set IP to it |
$ |
swap | pop a, pop b, push a, push b, and set IP to b |
' |
char (wimpmode only) | let the next character's ascii be X. push X, and set IP to X |
Examples
infinite loop
[]
truth machine
WIP