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/

nostr:npub15ypxpg429uyjmp0zczuza902chuvvr4pn35wfzv8rx6cej4z8clq6jmpcx yes, let’s start with a website, and nostr:npub1melv683fw6n2mvhl5h6dhqd8mqfv3wmxnz4qph83ua4dk4006ezsrt5c24 was the only one that is interested. But I have to take a bit of time off from #nostr. My project was not approved by nostr:npub10pensatlcfwktnvjjw2dtem38n6rvw8g6fv73h84cuacxn4c28eqyfn34f so I have to focus on other projects that allow to pay bills. All this work was mainly because of the money from the OpenSats grant.

Ah, ok, I’m kind of a new Android user. Always found the UI frustrating to navigate compared to iOS. Couple years ago did a multi-platform game app using this great C++ game engine, but Android was always a pain to make it work, mostly because of the Eclipse IDE, maybe things got better in the last 10 years. This engine allows native UI, but can use C++ with NDK , but is mostly an OpenGL front end for games https://www.cocos.com/en/cocos2d-x

Just bought a brand new Android device and installed Amethyst. Looks really neat, easy to find things on threads. Interesting that the feed is automatically translated to 🇵🇹 from 🇬🇧 , so I found out that relay is rele' in 🇧🇷 . nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 Only downside i found was that to install the app i had to do a google age verification and enter a credit card for that, that was the only app that asked me that

Time for sure. Just imagine one person alone doing a iOS Twitter like client compared to Twitter itself that has hundreds of devs and probably took years to build.

The GitHub repo has a file BUILDING.md that explains how to build the software. For those who just want to try the binaries, this link has executable for Windows, Linux, Mac (these clients display JSON only as of now) https://pedro-vicente.net/nostr/nostr.html

nostr:npub1qny3tkh0acurzla8x3zy4nhrjz5zd8l9sy9jys09umwng00manysew95gx Thanks for the update. I applied but I’m having a bit of trouble in knowing the level of detail that you require to describe the project. My first application was rejected, maybe because all I did was to send a link to a GitHub repo and nothing else (so, understandable). Would it be possible to put on your site some more details of what and what not should we describe? I never applied to a grant, so I really have no idea. Should we give a time table with goals and expected time to complete? Should we include a budget? And if yes, is the budget based on what? An hourly rate for the average software programmer where we live? The title of my project is “Nostr client and relay is a C++ engine that allows to build Nostr applications for command line, desktop or web.” My goal is to build the reference C++ for #nostr and to built an iOS client similar to Twitter. But this will require probably one year or two of work. I will do it anyway, grant or not, because, for me this is just something fun to do. But it would nice to get paid if the project is useful to someone. Thanks again 🫡 nostr:npub1dergggklka99wwrs92yz8wdjs952h2ux2ha2ed598ngwu9w7a6fsh9xzpc nostr:npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m https://github.com/pedro-vicente/nostr_client_relay

Also looking forward to try nostrdb, I’m doing (slowly doing) a Windows / Cmake port. It seems the latest benchmarks are very good nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s In my case I have no real DB, and the bottleneck is the time to query relays. For 1 relay only it takes about 4 seconds to get a feed of about 20 follows. But I guess there is not much room here for improvement because of the decentralized nature. So, the idea of having all locally cached in DB, and query asynchronously in background, for example https://github.com/pedro-vicente/nostrdb

So, the idea is to do a book for programmers (like we have thousands of books about some particular language so that programmers can learn the API). Problem is, there is no “official” API. With that in mind, for now, and until that happens, I guess we could include what we have: NDK from nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 Swift code from nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub1n0sturny6w9zn2wwexju3m6asu7zh7jnv2jt2kx6tlmfhs7thq0qnflahe C++ code from nostr:npub1f65y84223ldt8x4ytaslr8el77wvryu9xu8k5fedm2ql4hs2q54s7uaq28 (actually also C code from nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s ) . Mix the code with the algorithms . I did not get a good idea of how to do things just by reading the NIPs. The only way I was able to know how to get a list of follows, for example, was to debug nostr:npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas and dump some json to files. That is from the programming side. Also include some background for the motivation of #nostr. Like from an historical point of view, starting with the invention of the WWW by Berners-Lee. I did a small write up on that , in the link below, that tells that we need a “global digital public square that is essential to the survival of humanity” ( more or less quoting Elon Musk here) , I guess what Twitter was supposed to be (and is, but with issues it has now) https://pedro-vicente.net/

So, the idea is to do a book for programmers (like we have thousands of books about some particular language so that programmers can learn the API). Problem is, there is no “official” API. With that in mind, for now, and until that happens, I guess we could include what we have: NDK from nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 Swift code from nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub1n0sturny6w9zn2wwexju3m6asu7zh7jnv2jt2kx6tlmfhs7thq0qnflahe C++ code from nostr:npub1f65y84223ldt8x4ytaslr8el77wvryu9xu8k5fedm2ql4hs2q54s7uaq28 (actually also C code from nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s ) . Mix the code with the algorithms . I did not get a good idea of how to do things just by reading the NIPs. The only way I was able to know how to get a list of follows, for example, was to debug nostr:npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas and dump some json to files. That is from the programming side. Also include some background for the motivation of #nostr. Like from an historical point of view, starting with the invention of the WWW by Berners-Lee. I did a small write up on that , in the link below, that tells that we need a “global digital public square that is essential to the survival of humanity” ( more or less quoting Elon Musk here) , I guess what Twitter was supposed to be (and is, but with issues it has now) https://pedro-vicente.net/

We need a #nostr book. A programming guide. If anybody interested, give me a shout nostr:npub1melv683fw6n2mvhl5h6dhqd8mqfv3wmxnz4qph83ua4dk4006ezsrt5c24 nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub1n0sturny6w9zn2wwexju3m6asu7zh7jnv2jt2kx6tlmfhs7thq0qnflahe nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 nostr:npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m nostr:npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft nostr:npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas nostr:npub1qny3tkh0acurzla8x3zy4nhrjz5zd8l9sy9jys09umwng00manysew95gx nostr:npub10pensatlcfwktnvjjw2dtem38n6rvw8g6fv73h84cuacxn4c28eqyfn34f nostr:npub1dergggklka99wwrs92yz8wdjs952h2ux2ha2ed598ngwu9w7a6fsh9xzpc nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z nostr:npub18ams6ewn5aj2n3wt2qawzglx9mr4nzksxhvrdc4gzrecw7n5tvjqctp424

@Fabian Thanks for the tip! I was going to start with SwiftUI, but after reading this, UIKIt is the way to go. It seems SwiftUI is a kind of "declarative" format, and UIKit is a more traditional widget response like touch, etc. In my C++ iOS, I used QML, which is a declarative language that interacts with Qt's C++, but that is geared for small devices like microcontrollers and automative. https://getstream.io/blog/uikit-vs-swiftui/

nostr:npub1n0sturny6w9zn2wwexju3m6asu7zh7jnv2jt2kx6tlmfhs7thq0qnflahe Great write-up on MISSION.md "We don’t need to store our data on random relays, and hope our contact list doesn’t get lost, or leak metadata to the public. We can store everything on our device". This is EXACTLY what I was thiking for my app. Have a small database like SQLite on the device and load that first. Them query relays for updates. Have a standard import/export format for Nostr that different clients can use. Have this format be an official NIP . This format could be as simple as a linear array of EVENTS in JSON format. This is what I use in my dev database, as you can see a "database" can be as simple as 100 lines of code, with functions to read(), save(), append() and request(), (from relays) nostr:npub1melv683fw6n2mvhl5h6dhqd8mqfv3wmxnz4qph83ua4dk4006ezsrt5c24 nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 nostr:npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m https://github.com/pedro-vicente/nostr_client_relay/blob/main/src/database.cc

@Fabian Great write-up on MISSION.md "We don’t need to store our data on random relays, and hope our contact list doesn’t get lost, or leak metadata to the public. We can store everything on our device". This is EXACTLY what I was thiking for my app. Have a small database like SQLite on the device and load that first. Then query relays for updates. Have a standard import/export format for Nostr that different clients can use. Have this format be an official NIP . This format could be as simple as a linear array of EVENTS in JSON format. This is what I use in my dev database, as you can see a "database" can be as simple as 100 lines of code, with functions to read(), save(), append() and request(), (from relays) @melvincarvalho @fiatjaf @Will @jack https://github.com/pedro-vicente/nostr_client_relay/blob/main/src/database.cc