mleku on Nostr: i use badger pretty much religiously for most system-wide shared data anyway, and ...
i use badger pretty much religiously for most system-wide shared data anyway, and that requires writing accessors anyway and it's concurrent safe
pretty much the main time i use maps is when i am deduplicating keys on a data structure that is basically a key/value... i could even just use sort and write the whole thing as an iteration but it's easier to think about it just copy the key/values to a map and then iterate it back to the slice with all duplicate keys removed.
i basically don't use maps for anything else, except avoiding duplicate records, because if the data set is much bigger than that it's a candidate for storage in the database
Published at
2025-06-03 05:29:21Event JSON
{
"id": "79b2fa273cb9669307b23656a9b712bfe7e44e78400d1d0c2f06de93e53cd7c5",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1748928561,
"kind": 1,
"tags": [
[
"e",
"af15a6100fa9077a9b57a201aaaf5f8d7e3796f4f74fd406a29462300afe0ab8",
"wss://theforest.nostr1.com/",
"root",
"7cc328a08ddb2afdf9f9be77beff4c83489ff979721827d628a542f32a247c0e"
],
[
"e",
"8adc27dff88342a0ea92ff537ee7515c205d68662ee7836a6c9447ff65460d43",
"wss://mleku.nostr1.com/",
"reply",
"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f"
],
[
"p",
"7cc328a08ddb2afdf9f9be77beff4c83489ff979721827d628a542f32a247c0e"
]
],
"content": "i use badger pretty much religiously for most system-wide shared data anyway, and that requires writing accessors anyway and it's concurrent safe\n\npretty much the main time i use maps is when i am deduplicating keys on a data structure that is basically a key/value... i could even just use sort and write the whole thing as an iteration but it's easier to think about it just copy the key/values to a map and then iterate it back to the slice with all duplicate keys removed.\n\ni basically don't use maps for anything else, except avoiding duplicate records, because if the data set is much bigger than that it's a candidate for storage in the database",
"sig": "267e163f7ca89610e9875e3476e6da5eb9df3e1c1b07c726c99646970e7150a6a069dfedf38e7ca44538fb3144cf503977bd56cffb752aacfb5ff8e67275babd"
}