Devine Lu Linvega on Nostr: Today in chaotic batshit crazy computing: A stack-machine can be implemented in ...
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
Published at
2024-09-19 02:40:27Event JSON
{
"id": "166985990a6b60472d6d0c9fd6294cc27af41c31abae370b6c269131a4c0fafb",
"pubkey": "2c470abbac95a49cd0ed5b3b9e628ffda1dbb03c14caba1a225a9b8bf1dc9d5f",
"created_at": 1726713627,
"kind": 1,
"tags": [
[
"t",
"fractran"
],
[
"proxy",
"https://merveilles.town/users/neauoire/statuses/113161904310265224",
"activitypub"
]
],
"content": "Today in chaotic batshit crazy computing: A stack-machine can be implemented in #Fractran, but it's not for the faint of heart. \n\nThe 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.\n\n- Pushing a 0 onto the stack is equivalent to doubling the number.\n- Pushing a 1 is equivalent to doubling and adding 1.\n- Popping is equivalent to dividing by 2, where the remainder is the value",
"sig": "ff2ace59ef61a9ed004b0c9951695896858c66d2b20bdc4775063567b39b5137bda9413f03002f0a65c363f9d20fe7bae089cb4a2666b368a8e4e8efb4db75a4"
}