Last Notes
Yes, I also used to play a lot when I was a kid
Time to raise some prices 🎢
https://blossom.nosotros.app/e52d7829b947518bcc26851aa7e0658b7df1f44d16201b9858dda75fd54dd1e7.jpg
I think I just crashed indexeddb on chrome, it's refusing to opening the db, restarted the machine, still nothing works.
Está tudo correto nos relays, devem ser o clients mostrando informação antiga, vai atualizar eventualmente
https://blossom.nosotros.app/c283a55d7457cf7991dc2952d3c52724aa51eac08d2dff13b1114778175ada5b.png
Maybe the outbox model won't be enough and clients should indeed be setting additional relays, maybe not.
#nevent1q…kfq2
Ele é um relay diferente, ele é um relay de algoritmo, ele não aceita novos posts, a única coisa que esse relay faz é fazer uma busca de posts em outros relays populares e filtrar os posts mais populares de acordo com as pessoas que você segue. O único uso desse relay é pra acessar o feed dele diretamente em clients com suporte a relay feeds.
Você deveria remover ele da sua lista de outbox e inbox relays, Outbox relays são para os clients achar os posts que você publica, e inbox relays são para os clients achar os comentários que outras pessoas escrevem no seus posts.
Se dizer qualquer outra dúvida só perguntar.
Tentei avisar, mas provavelmente não viu
#nevent1q…ul4m
Next version of nosotros will work, now I can't see your inbox events as read-only because your single inbox-relay is asking for auth
https://blossom.nosotros.app/fa57c94695f4a526a8915787c58105f5794fe338f58fe2bed514048d21c8bb52.png
Boa tarde, remova algo.utxo.one da sua lista de relays, alguns clients não vão funcionar direito e não vão achar seus posts, e coloque wss://relay.damus.io, wss://nos.lol e wss://nostr.mom
https://blossom.nosotros.app/ef29fad1c01b8d46a3f7b78f65cea9bff1b3e065a5e96b368e1fa5534ab2b85b.png
Oh, I thought it was a fake Alex, i'm checking now, a fake Ross Ulbricht messaged me the other day you know 🤣
Got it, then it makes sense for live subscriptions
This gif is also really nice.
https://video.nostr.build/e2536a24789e20584e6d49cce9c078a99a75ec0a58e3b0c638931584a8117bbb.mp4
RxJs is a mental journey, so embrace it haha, I know you do a bunch of functional programming throughout all coracle code, rxjs will just fit if you embrace it's declarative approach, like your `await tryCatch` function is kinda rxjs `catchError`.
If you have any other question or want to schedule a call just let me know
wow, this is looking really good, just found weird req returns "EOSE" | NostrEvent, If I want to listen for "EOSE" I would listen on subscribe({complete: () => {}}) or `finalize` operator, but might going to steal you waitForAuth, I am think I am gonna need it 🤣
I am don't have yet, gonna try to push something later today, I'm currently underwater with a unrelated refactor 😭
Thanks for the code, just doing some quick code review here.
I think the first issue I spotted is the assigning a stream send$ to itself `socket.send$ = send$.pipe` try to think some other way to do that, it's very easy to compose multiple observables that derives from the same source in a functional style.
I would do something like on socket.ts
```ts
this.socket = webSocketSubject('...')
this.events$ = socket.pipe(filter(msg => msg[0] === 'event'))
this.auths$ = socket.pipe(filter(msg => msg[0] === 'AUTH'))
this.authsJoin$ = auths$.pipe(filter(msg => msg[1].kind === 28934))
this.oks$ = socket.pipe(filter(msg => msg[0] === 'OK'))
```
I would also remove the `authState.subscribe` for something like `return authState.pipe(tap(() => {}))`, but AuthState is a subject with a bunch of subscriptions inside there... hmmm, that's a bit bad, by looking at the commit history you basically kinda ported a event emitter system to rxjs right? you gonna have to embrace some heavy changes to see the gains of rxjs.
Try to think this way, let's say you have a single nostr subscription to a single relay, this subscription has all sorts of complex policies attached to the main stream, the main stream is also connected with other subscription stream like getting each user for each note in the main stream with also their own set of policies, then you decided to call unsubscribe() from the main stream, then the entire pipeline is unsubscribed and garbage collected, nothing left, with your current approach I am not seeing this happening, you might ended up with some parts of stream still listening for changes, unless you complete/unsubscribe the streams manually in multiple places which is a lot of work, which is something you have to do with event emitters.
I also did these exact mistakes a year ago, so I really don't judge you 😅
this angular tutorial describes really well the issue.
https://www.youtube.com/watch?v=bxslNFZvOvQ
Yes, relayFilters stream approach was something that I came up with the outbox in mind, it's been very useful and easy to split filters of a single subscription, I also designed in a way to work batching multiple unrelated subscriptions together, everything becomes a queue at the end consumed by the start() operators, this approach has been working really well for me and haven't touch much in a while.
rx-nostr is indeed too tightly coupled and when I started my mind was mainly focus on the batcher.
The way I been designing things is the core the be completely stateless and lazy, you can create a subscription and the core will never initiate any subscription for you, just like rxjs itself wouldn't, it just gives you the building blocks.
Working with websocketSubjects has been very easy and flexible, I can even push messages before the websocket was connected and the subject will buffer after connected.
webSocketSubjects just like the other subjects are multicasted.
this will only open 1 connection no matter how many subscriptions you have
```ts
const relay = webSocketSubject('wss://relay1.com')
relay.subscribe()
relay.subscribe()
```
now creating multiple webSocketSubjects it will open multiple connections.
webSocketSubjects multiplex will make a unicast subscription, this will make multiple nostr subscriptions in the same connection.
```ts
const relay = webSocketSubject('wss://relay1.com')
const sub = relay.multiplex(() => ["REQ", <id>, <filter>], () => ['CLOSE', <id>], (msg) => msg msg[1] === <id>)
sub.subscribe()
sub.subscribe()
```
You can pass the webSocketSubject as you wish as it's also a observable, I store relays as webSocketSubjects in a Map<string, Relay> in the Pool which doesn't do anything special, just blacklist relays with errors so it doesn't try to connect again.
Current my core/pool is doing the relay subscription which is incorrect, the consumer should be responsible to initiate the relay connection because he could put any policy mechanism for a particular relay, something like a rxjs retry to reconnect or some auth policy, currently my pool exposes a open callback and we could do something like this (pseudo code)
https://blossom.nosotros.app/083aa9e2210b20a732c61b0a2a8ec194be3386b3414db73c88068632fa8f188b.png
I am still working on auth and trying to think about some flexible way to do it, I'm a little bit hesitant to replay old messages after a a successful auth as I need to store these messages somewhere, but here's a small authenticator (which I think I should rename to createAuthPolicy or something) what takes a pool, a signer a options like whitelist which is an observable as the user can whitelist a observable after the auth was received.
https://blossom.nosotros.app/7def525444a780d4f31c001003146b54b774009d7129dd4339e4700bd0e93af5.png
Still half backed as I am still testing locally
Highly recommend rxjs, it's been an incredible journey for me and I had to learn some things the hard way.
After a heavy year on rxjs, I manage to build very complex pipelines with have very little state (variables) and close to no imperative code, I kinda got to a point of no way back.
Your approach of takeUntil is totally correct, which is the rxjs way of doing things, a powerful advice to rxjs is to avoid Subjects at all costs, they deviate the concepts of reactive programming and forces you in the imperative approach, people using rxjs with only Subjects aren't really using rxjs at all, just a fancy event emitter (the meme), there's a reason why xstream (a alternative library to rxjs) called their `next` function `shamefullySendNext` (yes, there's use cases for Subjects)
I have no issues with typescript in rxjs, it works pretty well and point-free operators would work just fine, I have issues naming things properly.
You have to be careful as well where you subscribe to the observables, it should be the final stage and usually close to the UI, and unsubscribe when the ui is "unmounted".
I was writing this document for @nprofile…aql4 the other day but never had a change to finish, which is my client approach for nostr subscription in rxjs https://github.com/cesardeazevedo/nostr-observable, the idea was to have a 100% stateless library for nostr.
This file is how I handle subscription and everything else is built on top of it https://github.com/cesardeazevedo/nosotros/blob/main/src/core/operators/subscribe.ts
If you have any questions don't hesitate to ask, I would love to help anything rxjs related.
I think I am getting owned by relays urls ending with a slash
Está funcionando muito bem com TS e com todas as features de LSP, goto definition, renaming e afins.
That's why I use react-strict-dom
Eu também uso vim a muito tempo, acabei largando por outras ides depois meu sistema de configuração simplesmente ficou impossível de configurar pra LSPs e outras coisas, eu não aguentava mais vimscript, voltei pro vim faz um ano (agora com neovim), e estou usando o LazyVim, sempre tem alguns probleminhas mas tem me atendido bem, a configuração do folke é um pouco chatinha.
Atualmente estou portando ao poucos as coisas que eu realmente uso pro kickstart.nvim, que é bem mais limpo e assim consigo ter controle 100% do código
Obrigado Anthony, testes está meio que salvando o projeto aqui com algumas mudanças que estou fazendo, nova versão vai ser beeem melhor e um pouco diferente em termos de navegação, vou tentar lançar uma versão capenga em breve, preciso lançar as coisas mais rápido, keep building 🫡
Appreciate Anthony, really kind words, there's a few things that I am getting close, I did a lot of improvements in the relay selection that fiatjaf had complained, which reduced a lot the number of websocket connections, just need more unit tests and publish.
I am also coming up with a new rich sidebar with dynamic menus for relay feeds and other stuffs, among many other things.
Thanks for the words of encouragement, it really helps moving forward
Appreciate your support and recognition, but I think nosotros isn't ready yet, or at least right now, if nosotros will be added to njump or others, it will happen naturally and without asking
I'm using docker, guess I just learned something new today, just restarted the container with the restart policy, muito obrigado e bom final de semana aí também
It's back, no sure what happed, the container simply exited with code 255 🤷♂️
I am doing well btw, hope you doing too, thanks for reporting
my imgproxy likely exploded or something, checking right now
This is amazing! Nostr devs should organize a game jam for a weekend and develop a game on top of nostr
With observables you have a lot more flexibility to do really cool stuff (specially with all the useful rxjs operators), I managed to avoid a lot of state and imperative code on my code base, here's a simple nostrify wrapper example
https://blossom.nosotros.app/011296f3bf1e02ac0ace853460e3cb244c1b5da1f6d2fac429cd432531eb71ac.png
I miss the smell of char siu everywhere in the streets
Looking really good, what are you using? I really like the avatar as a replacement for "@", might use this idea haha
Thanks for the feedback, makes sense
Sometimes I want to abandon everything, get back to gamedev and work on the game I did in college, The Four Horsemen of the Apocalypse
https://blossom.nosotros.app/032a376c05787625015eee7262256e8404843a8c76f6c3416938b866c60ea5f7.jpg
Appreciate the feedback, will investigate, I have some better direction now
O plebster resetou meus dados no delete, reconfigurei agora, espero que esteja funcionando
Agradeço demais o feedback, de coração, vou implementar links pra outros apps em breve (NIP-89)
If the column is a note column (instead of a feed column), clicking in a reply link (the date of the reply), it will replace the current column with that reply, which will basically flat the reply tree into a single thread, I did this because I wanna leave the feed intact otherwise I will have to deal with scroll restoration, you already can expand comments in the main feed without opening a new column for that note.
Also back buttons for a desktop/web app is very annoying in my opinion.
I am currently not muting hashtags, just authors, but will get it done in the next release.
Really appreciate your feedback 👊
Eu entendo seu comentário e a situação dos clients hoje, a única forma de resolver isso é manter os clients menores com features mais específicas ao invés de fazer tudo, eu quero focar o nosotros em algumas features mais focadas pra outbox e outras coisas relacionadas a relays, estou criando um feed pra home só com relays da lista de pessoas que segue e não faz parte do relays delas, que talvez possa achar notas que você não tenha visto, em fim, não estou lá ainda. No final os clients sempre terão alguma feature ou outra que overlap entre eles.
Em breve vou colocar o numero de contatos em algum lugar, assim te ajuda a saber se a lista está ok, outra coisa é que estou explorando a ideia de finalmente adotar uma sidebar de verdade, meio que tenho evitado a ideia
Nossa, era pra ter respondido em português, foi mal.
A data do comentário é um link, isso ira transformar o formato de árvore para uma única thread, isso ajuda quando a arvora tem muitos níveis de profundidade, espero que isso seja fácil de entender
Yeah I know the issue, has been annoying indeed, gonna fix that soon.
That's indeed incorrect, gonna fix that asap
I don't think I want to implement DMs as I want the keep the client small as possible (I already feel is getting big with kind20 and deck mode), notification badge is partially implemented already but not very real time, live feeds with income counting are coming next and things will feel more realtime, need to dissect NWC spec, maybe it's not that complicated as I thing it is
https://blossom.nosotros.app/7e19899c3f2de52caba23f0a3e9685dac99dd8688c640ed884273f856c854155.png
Can you remove the pwa app and recreate again? previously on click was just expanding the post replies, now I am doing a proper navigation, back button should work now
Estava quase começando a implementar isso esses dias, acabei me distraindo com outras coisas.
How to make nosotros.app better? what you would like see there? what do you hate about it?
I just figure it out
#nevent1q…ha53
Thanks I just figure it out
#nevent1q…ha53
I have figure out, my bad, it was a `deleted:true` property in the kind 0 content that was merged, I manually removed in the json and manually broadcasted, all good now
Yes, but still can't login on primal on ios, can't find any kind 62 from me anywhere, the alert makes no sense to me.
Did I accidentally deleted my nostr account? Primal says so.
I found out my account was logged in a app called Plebstr (now openvibe) in a old android emulator, something I did right when I joined nostr in 2023 for testing, I couldn't find a simple stupid logout button so I ended up clicking on delete account, which I thought it would acted as logout and it did.
But Plebstr actually replaced my kind 0 metadata with a name "deleted account" which I quickly reverted, now, what else it Plebstr signed and broadcasted? a right to vanish kind 62? I can't find it on any major relay, so I don't know, and can't login into Primal on ios.
I thought the delete account button wouldn't have major impact as I have my nsec and run my own personal relay, so @nprofile…q4ys where this information is coming from? any help?
https://blossom.nosotros.app/0b63f55c670300472612385bcd946e24692a6ce3b78125e75c46ee396adc21c0.jpg
GM.
nosotros.app (v0.1.2) has been updated from dev with new stuff.
- kind 20 feeds with multiple uploads
- blossom uploads
- signin with nostrconnect qrcode
- search of users and notes
- relay feeds
- new deck columns (search, kind 20 images, hashtags, relay feeds)
- lots of other improvements and fixes
nosotros supports at https://nosotros.app/?relay=wss://algo.utxo.one
Native observables are coming
https://x.com/benlesh/status/1893053275995357608?s=46&t=Gcnc8IvM2RrI7sbuEtFg6g
Really sorry about that but this was already fixed, it was a bug in the editor when pasting images
Just freed around 650GB of my very old Hackintosh
https://blossom.nosotros.app/3ff0e2b1dc3a27692ce7c791dbf5924d78c6039ce9b4139f1c8cdb4c56eb0559.png
There's any changes on welshman/content that I should know? (I got rid of nostr-editor parser on my client for welshman 🤣)
https://github.com/fiatjaf/khatru
The nostr-editor already handled blossom uploads, just had to add UI and settings, but had fun spinning a blossom server
Testing
https://blossom.nosotros.app/bbbbe3ba78f263c38b803048a12b75a7ae19873d4dd8c0624eab0e6fa5daf858.png