Today in chaotic batshit crazy computing: A stack-machine can be implemented in #Fractran, but it's not for the faint of heart.
The theory is that we can keep a stack of zeros and ones in a single register using binary encoding for that number, a little like Church encoding but with bit-shifting.
- Pushing a 0 onto the stack is equivalent to doubling the number.
- Pushing a 1 is equivalent to doubling and adding 1.
- Popping is equivalent to dividing by 2, where the remainder is the value.
This entry was edited (2 months ago)
Devine Lu Linvega
in reply to Devine Lu Linvega • • •Implementation and examples in Fractran: https://wiki.xxiivv.com/site/fractran.html#stack
abstract machine used in a formal logic and theoretical computer science
Contributors to Wikimedia projects (Wikimedia Foundation, Inc.)Devine Lu Linvega
Unknown parent • • •ThaCuber
in reply to Devine Lu Linvega • • •Content warning: dumb
Devine Lu Linvega
in reply to ThaCuber • • •Content warning: dumb