Wanda on Nostr: current status: having had a look through the available Rust bit vector crates, I am ...
current status: having had a look through the available Rust bit vector crates, I am currently considering either writing my own or just using a Vec<bool> out of frustration
bitvec. sigh. so much careful work done, so many cool features, and then I get completely fucked over by its serialization support being absolutely batshit.
fun fact: if you #[derive(Serialize, Deserialize)] struct Meow(BitVec);, your stuff won’t deserialize on a machine with a different pointer width. also, if you look at the resulting binary, you’ll see an incredible amount of "bitvec::order::Lsb0" as ASCII, because apparently it serializes its bit order for no good reason (it cannot actually use it on deserialization).
Published at
2025-02-27 16:47:11Event JSON
{
"id": "8ce0c76359d4eb4f6bf7c2946a069228b34c743cebf40a69eaa8dd67f9763367",
"pubkey": "1d84d203be177e209cfa35b40b6fe52986c5023de165c6a2ba03645e92401d3c",
"created_at": 1740674831,
"kind": 1,
"tags": [
[
"proxy",
"https://donotsta.re/objects/54e0c10d-be03-4f41-8ea2-946cca834dd8",
"activitypub"
]
],
"content": "current status: having had a look through the available Rust bit vector crates, I am currently considering either writing my own or just using a Vec\u003cbool\u003e out of frustration\n\nbitvec. sigh. so much careful work done, so many cool features, and then I get completely fucked over by its serialization support being absolutely batshit.\n\nfun fact: if you #[derive(Serialize, Deserialize)] struct Meow(BitVec);, your stuff won’t deserialize on a machine with a different pointer width. also, if you look at the resulting binary, you’ll see an incredible amount of \"bitvec::order::Lsb0\" as ASCII, because apparently it serializes its bit order for no good reason (it cannot actually use it on deserialization).",
"sig": "2edc41c2a578b34458dae56cc0fee79bc42da09eaee5814f01326a02308f6d4e363f5ea3ba5d2dbbd5b187a25f2ddb8d9878c8a260251c10c5bd46767711c6fe"
}