Here you go. Started with just a CMake script that defines a library used by ‘test’ and ‘bench’. Tested in Linux and made a pull request. The ‘test’ program fails with an assertion by the way. CMake is just a must have build tool for cross compiling https://github.com/damus-io/nostrdb/pull/1
Got it. I just created a fork of your new database and will try to do that CMake build and Windows port soon. Curious about the performance, and it seems so simple (I like simple things). Cheers. https://github.com/pedro-vicente/nostrdb
The strfry database seems super complex. Why just not go with a “conventional” DB, like SQLite, or SQL server (with ODBC connection)? Me, I use a JSON array of Nostr events as “database”, with linear search :-) . This is a database with one record. Simple (also happens to be my first ever Nostr post) https://github.com/pedro-vicente/nostr_client_relay/blob/main/database/database.json
nostr has its issues. but for those who figure it out, it’s the most powerful network that exists today. challenge is helping more people figure it out.
likely most of that won’t come from social use cases, but rather the microapps that #[0] originally envisioned and folks like #[1] are focused on building.
the power of this thing is the ecosystem part. it’s permission-less, meaning anyone can build whatever they want, and it has a permission-less global payment system readily available through bitcoin. but neither will sell people on joining it.
if the apps built on top of nostr do valuable things, like https://highlighter.com does, then every nostr app and use case benefits, including the social clients.
this is going to be a long road, but one that fundamentally changes the way people experience the internet. if it doesn’t succeed itself, it will certainly inspire the thing that does.
💯
Grand ol’ weird internet time for sure. 🙃 “Free speech is essential to a functioning democracy” https://fee.org/articles/did-elon-musk-just-save-free-speech/
C is the way to code here. That JSON library, JSMN, is pretty slick, very low level, I used it before, but I use C++ now and ‘JSON for modern C++’ . Still working on my CMake port , will post here when done https://github.com/damus-io/nostrdb/commit/32b0e572e418b81af515224cc7eb3b1e8598d906
*meant to say C is the way to go, but the “way to code “ works too… probably some Damus auto correct 🙃
C is the way to code here. That JSON library, JSMN, is pretty slick, very low level, I used it before, but I use C++ now and ‘JSON for modern C++’ . Still working on my CMake port , will post here when done https://github.com/damus-io/nostrdb/commit/32b0e572e418b81af515224cc7eb3b1e8598d906
Thanks. I’m trying to port nostrdb for windows using Cmake , seems very easy because the code is so simple. Fixed 2 build errors and test works only fails because I have to allocate memory in ndb_tag (declared as c pointer instead of that array zero size declaration)
“Fastest database on the planet” sound ambitious. Unrelated: I added CMake build and a Windows port for nostril couple months ago, submitted a pull request , but got no response (also adds the secp256k1 source, but that can be taken out) https://github.com/jb55/nostril/pull/30
Great question. The beauty of Nostr is that is so simple, it is basically only NIP-01, so any change must keep that in mind. Going by parts:
1) kind 2: recommend_server. This seems to be an optional feature, and optional features are bad to begin with in any spec (imo).
This one seems not to have a good chance to be "correctly" implemented.
If a relay is behaving good or badly, we can just advertize that in the community?
No need to be written in spec. And if no one uses it, then yes, get rid of it (that's the first thing I do when a function
is depecretated, remove it from the code base).
2) NIP-12. when adding new features to a spec, we should ask. What are the pros and cons? Does it make the spec more complex?
With complexity, we loose adopters. But by adding useful but not essentially required features to a functional spec, we gain
adopters. So, it's a trade-off. In this case, NIP-12 seems to have *very* good use cases, like the
#g ("geohash") tag to associate a post with a physical location (See Leaflet of Google Maps). Maye an alternative in the middle between
putting this NIP and others into the main NIP and leaving it alone, could be to do a "Core NIPS" or "Top 5" kind of thing. Don't know.
3) NIP-20. This one seems super important too, an acknowledgement reponse (just noticed that is not required in Nostr).
I think most Internet protocols, like HTTP or FTP, have a response built in, which seems critical in life saving missions
or money transactions (but not posting cat pictues to a relay). So, same answer as 2) , either in main NIP or "top 3".
** Inserting an idea for NIP-01 here **. Add a boolean key/pair "response": true/false that says , I do require a response or not. This
fits nicely into JSON, boolean types (it seems Nostr has none) . Is this a good idea? If yes, I'll write a proposed change to NIP-01.
4) NIP-16 replaceable events. Maybe not a Top one, don't know.
I’m a big fan of the Internet as a human invention. Once wrote an article telling just that, with a paragraph about Berners-Lee. https://pedro-vicente.net
In see, pub/sub thing over websockets sounds like #nostr. Amazing. Also amazing that you worked with Tim Berners-Lee 🫡
My Mail to the W3C Technical Architecture group to say that Web3 is not the web
"web3 is a scam that we shouldn't make respectable by association with HTTP" -- Roy Fielding
https://lists.w3.org/Archives/Public/www-tag/2023Jul/0000.html
In 2018, Berber’s-Lee had a project called Inrupt, that according to this article, had the purpose of “to decentralize the web and take back power from the forces that have profited from centralizing it.” But that project seems to have gone nowhere, do you happen to know what happened. Without knowing much about it, it seems some ideas are adopted by #Nostr? https://www.fastcompany.com/90243936/exclusive-tim-berners-lee-tells-us-his-radical-new-plan-to-upend-the-world-wide-web
Doing a bit of self promotion here: nostr_client_relay is a C++ engine that allows to build Nostr apps for command line, desktop or web. Check it out: programming guide, GitHub repo, live web interface 👻🐙🤗 https://pedro-vicente.net/nostr/nostr.html
