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": "15ea7c8db00eabcc58cd4563c3534f9db30ed79db9f153a77b8b0cae91367c99",
"pubkey": "11c7275dd741db3ec7007f05abb72d50da0fe512f7c6cc43d0789b4d12454b7b",
"created_at": 1726713627,
"kind": 1,
"tags": [
[
"t",
"fractran"
],
[
"proxy",
"https://merveilles.town/@neauoire/113161904310265224",
"web"
],
[
"proxy",
"https://merveilles.town/users/neauoire/statuses/113161904310265224",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://merveilles.town/users/neauoire/statuses/113161904310265224",
"pink.momostr"
],
[
"-"
]
],
"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": "903bdec1ce07f95e1fbe43271e93154dc01b5ddd23f3bed718398839e64ddb7c63c7e7dd0049ba9ac28d29ae4c3a17fb731d956abfafd7f0456337edefd0a7e6"
}