$3COND

From Esolang
Jump to navigation Jump to search

$3COND is an esolang by User:BoundedBeans in which the only loop is based on real life time.

Instructions

[(n)(code)(n)] - run the following code for n milliseconds
? - wait (top of stack) milliseconds
_ - push 0 to the stack
+ - increment the top value of the stack
- - decrement the top value of the stack
~ - pop x, move the xth element of the stack
    to the top, removing it from the original spot
. - output the top value as and ascii character
, - input ascii character to the stack
| - discard the top element
/ - pop x, restart the timer of the loop currentdepth - x
    levels deep

If the timer ever reaches the limit in a loop, execution breaks out of that loop and all deeper loops the instruction pointer may be in. This language would be total without the / instruction. The stack contains unbounded non-negative integers. Decrementing from zero is a no-op.