jb55 on Nostr: #Rust is one of the only languages where you can tie the lifetime of an object to ...
#Rust is one of the only languages where you can tie the lifetime of an object to another one. This ‘a thing is a lifetime parameter that says “Note must not outlive Transaction”. Which is incredibly useful since in #nostrdb the pointer to the memory-mapped data is only valid as long as the transaction exists. This is enforced at compile time, making data-read-outside-of-transaction crashes impossible.
gm #nerdstr
Published at
2023-12-15 15:57:24Event JSON
{
"id": "5cb58807b1583355cc3d70d1612a3e1a75168fa6feb7d6b3f81f363db46c971a",
"pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"created_at": 1702655844,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"t",
"nostrdb"
],
[
"t",
"nerdstr"
],
[
"r",
"https://cdn.jb55.com/s/31256b0e5dc9bd93.png"
]
],
"content": "#Rust is one of the only languages where you can tie the lifetime of an object to another one. This ‘a thing is a lifetime parameter that says “Note must not outlive Transaction”. Which is incredibly useful since in #nostrdb the pointer to the memory-mapped data is only valid as long as the transaction exists. This is enforced at compile time, making data-read-outside-of-transaction crashes impossible.\n\ngm #nerdstr\n\nhttps://cdn.jb55.com/s/31256b0e5dc9bd93.png",
"sig": "e56c120b195b12d91c19c1135ba13b5689df32a66e3728a777b5b7a9ee4540d688a92379c8c4bcf051f383fbb545ce4cd70bfd2a8dfed75201dd853baf98d42f"
}