yeah i think rustup is what should be used.

notedeck is powered by a custom C database I wrote built on lmdb: https://github.com/damus-io/nostrdb all notes are stored as aligned structs and the entire db is mmap’d in memory. So db query results are just pointers into virtual memory. its super fast!

Reply to this note

Please Login to reply.

Discussion

Reviewing. You should have used tdb, of course, but as Tridge said, you don't need an excuse to rewrite something!

never heard of tdb. Docs are sparse on nostrdb, i need to work on that 😅

Yeah, it's a well-kept secret unfortunately.

Rough skimming code review:

1. bool is your friend, int is for old people :(

2. You should use ccan/ directly not in pieces: easier to update.

3. Your cursor API makes me cry, can I rewrite it? It's going to hurt somebody.

4. Do you want neatening pull requests?

sure, happy to have any help

Let's see what I can do after lunch then. Fun!

👀

Simple rework PR up. I also want to update your BOLT11 parser to the latest (it's buggy).

I need to think harder about your cursor API: my instinct is to split it into two types, one for reading, one for writing. But you do a lot of lookahead in your parsing, so the classic "mark cursor invalid if we hit an error" pattern doesn't fit. Hmm....

nostrdb should be rebranded to Sharingan (a reference for you anime fans out there).

There is no "refresh" lag. It seems to always be up to date, almost as if it predicts new notes. hard to explain.

After using primal web and damus for more than a year now, i got used to "force refreshing" the feed. This thing just works. There is no Twitter "pull to refresh". not sure if that's technically correct, but that's how it feels.

nostr:note1zpwrktjys830tsq334swhp5fhsx5d5f49q3xjwzhhd7prasgw8ssk6tza8