conduition on Nostr: I suppose bitcoin devs love #Rust for the same reasons they love Bitcoin. The ...
I suppose bitcoin devs love #Rust for the same reasons they love Bitcoin.
The scarcity and careful auditing of variables passed around in memory mirrors the scarcity and careful auditing of UTXOs passed around Bitcoin's ledger. Allocating new memory is as much an event as mining new bitcoins: Regular, but noted and tracked.
In Rust, a value may be borrowed many times, but its value may be consumed only once. Bitcoins can likewise be IOU'd countless times, but ultimately only belong to one script-pubkey.
By comparison, languages like Go and Javascript feel very... inflationary. They have an opaque, centralized, bloated, and omnipotent garbage collector attached to every runtime which allocates and deallocates memory as it pleases. Memory can be needlessly duplicated thousands of times entirely by accident, or over-collateralized by shared mutable references.
Some languages are the opposite, like C: Total anarchy. "Sure, allocate as much memory as you'd like. Deallocate it whenever. Read whatever you want, write wherever. Just try not to segfault."
Only Rust, like Bitcoin, strikes the perfect balance of organized chaos: a rehearsed ballet, in which all the dancers know their movements by heart.
Published at
2024-03-23 16:47:37Event JSON
{
"id": "22d44c3c390a8eba9b50ba6893dc4a4d0ec45550c973868fda1c5f577048a319",
"pubkey": "feb842e2e624cb58e364f8f7cb363c03407be9519ad48326f518f976b3551059",
"created_at": 1711212457,
"kind": 1,
"tags": [
[
"t",
"Rust"
]
],
"content": "I suppose bitcoin devs love #Rust for the same reasons they love Bitcoin.\n\nThe scarcity and careful auditing of variables passed around in memory mirrors the scarcity and careful auditing of UTXOs passed around Bitcoin's ledger. Allocating new memory is as much an event as mining new bitcoins: Regular, but noted and tracked.\n\nIn Rust, a value may be borrowed many times, but its value may be consumed only once. Bitcoins can likewise be IOU'd countless times, but ultimately only belong to one script-pubkey.\n\nBy comparison, languages like Go and Javascript feel very... inflationary. They have an opaque, centralized, bloated, and omnipotent garbage collector attached to every runtime which allocates and deallocates memory as it pleases. Memory can be needlessly duplicated thousands of times entirely by accident, or over-collateralized by shared mutable references.\n\nSome languages are the opposite, like C: Total anarchy. \"Sure, allocate as much memory as you'd like. Deallocate it whenever. Read whatever you want, write wherever. Just try not to segfault.\"\n\nOnly Rust, like Bitcoin, strikes the perfect balance of organized chaos: a rehearsed ballet, in which all the dancers know their movements by heart.\n",
"sig": "96b75b714d2517378d19faca6bf42828d9c95231bef96dfe756eea4ef52d518a82e211c64f8e36ab6e38b7791af33e58f1a8c182ec93a15253fd5a1373d35197"
}