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.
69
69 is an esolang created by user:cleverxia, who chose the name because 6 and 9 are rotatable and are lucky numbers in some regions in China, not because it's a funny number.
Definitions
The rotation of a number x is defined like that: reverse all x's digits (and drop all leading 0's after the reversal) and then transliterate the digits by
0123456789 -> 012eh59L86
then evaluate it as scientific notation (supplying 1 as mantissa and 0 as exponent when needed, ahb=a*16b, aLb=a*2b). e.g. 9393 -> 3939 -> e6e6 -> 10^10^6.
evaluating a bbunch of commands on a stack means: copy the stack, evaluate the commands on the copied stack and the global queue array, and then return the final TOS on the copied stack. the copied stack is discarded.
commands
This language works on a queue of stacks and a stack called the main stack which starts with a single 6 on it. popping anything empty get a random element from [6,9] and is the only way to get anything random.
| commanad | meaning |
|---|---|
6 |
prepend 6 onto the TOS |
f |
append 6 onto the TOS |
~ |
prepend 9 onto the TOS |
9 |
append 9 onto the TOS |
s |
push current main stack on the stack queue. |
<...> |
evaluate ... on the TOS and push the result.
|
' |
bifurcate the TOS (duplicate and reverse the copy). |
` |
pops a stack from the stack queue, and append the current main stack onto the bottom of the popped stack, then make the main stack be the result stack. |
F |
output TOS as a character |
4 |
output TOS as a integer |
" |
input character and push |
n |
input integer and push |
%.../ and Q...H |
while the TOS isn't a multiple of 3 do ... (can be nested and alternated: %Q/%H/ is valid.) pops the TOS
|
^...2 and ;...v |
if the TOS IS a multiple of 3 do ... (pops the TOS) |
b, }, =, K, + |
subtraction: pop a, pop b, push b-a |
j |
halt |
$...& |
comment |
how to program
- This section is still a work in progress. It may be changed in the future.
Integers
To get the integer 1, we exploit that reverse(3)=(1)e(0)=1, so we can construct a 1 on stack by
''bb's'`bbbb
however this requires the stack to be [6], so it can only be used in the beginning.
computational class
Notice that the code ''6bb'bgenerates a non-multiple-of-3 no matter whether the TOS is 6 or 9, so we can simulate CT by using the stack queue as data queue, with multiples of 3 as 1 and nonmultiples of 3 as 0.
s $push a 1 on initiail data string& <''6bb'bs><>bb $push a 0 on initial dq& ... ''6bb'b% $start of infinite loop& `^ $prod. 1& ... $to push 0/1, see above& 2 `^ $prod. 2& ... $to push 0/1, see above& 2 ... `^ $last production& ... 2 ''6bb'b $push a nonmultiple of 3 to loop& /