Avatar
Pedro Vicente
4ea843d54a8fdab39aa45f61f19f3ff79cc19385370f6a272dda81fade0a052b
Nostr client and relay is a Nostr C++ engine that allows to build Nostr applications for command line, desktop or web (iOS, Android coming soon) https://pedro-vicente.net/

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

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)

Replying to Avatar Pedro Vicente

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.

Also 💜 that I can write all the stuff above without having to pay $8/month 🙃

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.

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

Replying to Avatar fiatjaf

https://nosta.me/ is still a good place to link to your Nostr profile.

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