Avatar
j
2590201e2919a8aa6568c88900192aa54ef00e6c0974a5b0432f52614a841ec8
keep nostr weird

Instead of using a database I'm storing events in a file. Memory mapping lets you access a file as if it was entirely in memory, and the OS pages it in and out for you automatically doing the reads and writes and stuff.

Each event just gets appended, which requires a write lock (one writer at a time) but readers can keep reading while writes are happening so it is less contentious than a traditional RWLock which blocks readers while writes happen.

The indexes are functionally similar to key-value btrees which map certain query tuples like (pubkeyhex, createdat, idhex) to an offset into the event file (the length of the event is encoded in the serialization so we just need the offset). The serialization is very minimal, just enough to have a length and to be linear. Each key in each index must be unique (or else we would lose events) which is why they end in the "idhex". We can scan a time slice (before/since) as they are grouped together on the btree, so I can iterate from (pubkey, before) to (pubkey, since+1) to get all that person's events within that time range. I'm intersecting multiple index results by hashing results and checking that map each time I run through the next index, discarding matches that come up missing (from the previous index). That should cover all possible queries, not in an ideal way, but in a simple and relatively fast way. strfry has more indices (all the common ones) and falls back to scanning a flatbuffer event sequence for matches. It also uses LMDB for the events rather than trying to memory map directly. I'm using sled for the indexing. I don't know if my indexing merging scheme is going to be faster or not. Probably slower in most cases, but faster then when strfry doesn't have a suitable index. That's my guess anyhow. My code is at least easy to reason about. I came up with mine before talking to Doug.

This sounds awesome

Almost all the recent gossip development has been by nostr:npub1hlq93jdtkfg29a8s7fqzzzh82q3pkc20rxucwt4geh6e56wk3y2qxdz5wg with nostr:npub10000003zmk89narqpczy4ff6rnuht2wu05na7kpnh3mak7z2tqzsv8vwqk doing design. Those guys deserve zaps.

I'm going through a "pinch point" where my life is really busy (finishing the house, 3 sets of taxes, too much firewood, truck/insurance issue) but I swear I will get back into gossip development (and other nostr-related things like NIPs and my personal relay idea) as soon as I can and finish the most important things (zaps, syncing settings on the network, media cache expire/etag/etc, inbox feed to include if tagged in content, reposting, finish search, DMs, some kind of key rotation/recovery scheme, way better at-mention UI, plus whatever new NIPs I've missed that are relevant and important)

o7

Is there a Latin term for this kind of retort? Just pointing out the single phrase in your interlocutor's statement that reveals a ludicrous unstated assumption?

Kinda heartwarming tbh. Maybe the big blockers can come back to spam and develop non-lightning scaling tech on space chains, drive chains, or something else

Do not feel bad for strangers on the internet. Most of their stories are fake, and the ones that aren't would only benefit from the compassion of people they know in the real world

Anyone that tells you a sob story on the internet, even in the rare circumstance that they're not lying, is trying to manupulate you

Yes, Karen's are better

Lol, OK dawg. My bad. NSA?

When the government has to resort to hiring people like you to "just ask questions", they're not really a threat

Maybe if nostr was centralized like Mozilla, the rust foundation, Wikipedia, and amillions other corpses of the former internet, then we'd have to worry. But your CIA tactics don't work without a central authority to corrupt.

Replying to Avatar Boutaina

Morning Nostriches! So I just saw that the Elon jet tracker joined Nostr. I am outraged that something like this is encouraged by you nostr:npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m. Elon is a father and the information shared about his movement could be dangerous. We are talking about the safety of a family here.

This shows how dangerous Nostr can be. There are NO safety rules. This isn't funny nor cool. To possibly put the safety of a family in danger at very hard economical times. nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6

and all the creators of this space. My question for you guys is how can you guarantee the safety of people in this space? If any information can be out with no moral boundaries. I'm all for freedom of speech but safety is important too.

Lmao, nice try cia

First sentence:

"Moderation is a necessary feature of social spaces."

Sad. Image spending the small amount of time you have here on earth thinking like that.

I don't want to work on a "social space". I want to build a cold arena where ideas that threaten the very foundations of civilization can be discovered. I don't want an "internet community". Everyone online is a loser. Find friends in the real world.