Avatar
fiatjaf
3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d
~

This is the state of web development:

I don't get why Nostrudel publishes my notes to a bunch of default relays instead of only to my outbox relays.

Does anyone know of anyone who has ever used Bandcamp artist communities?

Yes, years ago I replaced PouchDB with it, but it was also bad with writes and everything kept lagging. The real fix is to be moderate with the writes and do them slowly over time I guess.

Oh, writes are super slow, I didn't benchmark writes. I guess I didn't even think about that part as I thought only reads were important, so maybe take my claims with a grain of salt.

For reads I think it doesn't matter how many records are stored so I only tried low values <5000 as I thought that was realistic for Nostr web clients.

Replying to Avatar hzrd149

No but it looks a lot like another package I made last year :)

https://github.com/hzrd149/nostr-idb

Ill give it a try and I hope its faster, but it wont make me stop hating indexeddb

Everything in browsers is stupid and awful. IndexedDB is implemented on top of SQLite for Firefox, I think, which makes it completely insane.

And on Chrome it's on a pile of JS on top of LevelDB which is already much slower than something like LMDB, but I don't know what I'm talking about.

Apparently the biggest issue (for reads) is that for iterating you have to switch on every row between native code and JS code. That gets much better if you fetch stuff in batches.

Also storing (and reading too, apparently) JS objects is much slower than storing JSON strings, because the act of deep copying objects and then encoding/decoding them is magnitudes slower than the superfast JSON.stringify/parse of browsers.

When are we going to fragment the internet? Is that like that thing in which we all had to jump at the same time to move the earth and prevent global warming?

Replying to Avatar Dawn

nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9us2xuyp I'm sorry we keep meeting like this... wss://relays.land/spatianostra appears to be down. The whole of https://relays.land is 502.... and good morning.

Thanks again. I guess I should set up some kind of automated monitoring system but this is good too as it also serves as an small ad for the concept.

Translations are evil.

Replying to Avatar hzrd149

Found this article after digging around a lot https://jlongster.com/future-sql-web

It shows its faster ( for 100k+ entries ) to load a wasm of sqlite into memory and then run it off an in-memory file system than it is to use indexeddb

https://priceless-keller-d097e5.netlify.app/

Apparently I have free access to Primal Studio and I had no idea.

I'm feeling like an influencer now. I'm influencing so much. Look at these crazy influence numbers:

This is good, now we just need a way to quickly browse relay feeds by clicking on them, seeing recommended relay feeds from friends, publishing to a single relay with NIP-70.

OK, I've figured this now. Spotify is evil and recently has started blocking everything unless I'm a registered company with 250k MAU and go through their process. It's so great that they don't tell you this before you wasted time making your app and everything appears to work ok with your own account.

But, well, I can still manually whitelist your Spotify email beforehand then it should work.

If someone else wants it please let me know your Spotify email here or via DM.

nostr:npub1nmr6w7qk0ta36vxysv77jv3d5rqghfc6d8sez8240rf3gja4vsmsd2yha8

Replying to Avatar Anthony Accioly

nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9us2xuyp, side question as I'm still working on some Nak, Khatru, and Njump-related stuff. Are all of those staying on GitHub for now, or do you plan to move any of this to grasp any time soon (say, within the next couple of weeks)?

No, I think those will stay on GitHub for some years still.

Well, I have "khatru v2" on https://pkg.go.dev/fiatjaf.com/nostr/khatru now (I hate the Golang "/v2" paths, it's better to make a new name and break everything), that will go to Grasp.

Yes, please. Someone manage to find an edge case in my infallible code, but now I think it won't break anymore.

Replying to Avatar balas

502 :/

Oops, it should be working now.

Can you try this, please? https://spotify-scrobbler.fiatjaf.com/

This should connect to your Spotify account and publish an event for every track you listen to.

You'll need to trust the server with a bunker for it to work for now.

I'm working on a simple client to browse the activity and other ways to scrobble.

1. this wouldn't block following people from that relay or browsing their notes or profiles specifically, this would only block it from "global" feeds (like replies feed for such and such).

2. this is one user blocking stuff for himself, not a server admin blocking on behalf of others.

3. in practice reading "global" (i.e. any filter without an "authors" or "ids") would have to be done from a limited set of relays anyway, which means all others are "blocked" by default -- this would be just moving this specific relay out of the whitelist.

In any case I'm not saying this is what the UX should be for Nostr, far from that, this was just an illustrative example idea (I'm taking nostr:npub1acg6thl5psv62405rljzkj8spesceyfz2c32udakc2ak0dmvfeyse9p35c's words here as mine, but I also think he agrees).

They go into a black hole because Nostr is too small today and we're living with these public relays anyone can write. That situation cannot work if Nostr gets bigger, there will be too much spam. Many relays will be forced to close themselves only to users that meet a certain criteria (payment, relationship, content quality, PoW, etc), then once you have that it becomes in the interest of these relays to exclude people who aren't behaving well, therefore reporting them to the relays they use becomes a meaningful act.

https://pyramid.fiatjaf.com/ has a reports page where presumably I or other users can check if some bad actor got accidentally invite and remove them, for example (not that it has ever happened).

Anyway, the crucial part is that what can be bad behavior for me may not be for you, so my relay may only accept notes full of love and kindness, but yours may accept notes full of rage and sarcasm, and both are ok -- that brings us to the next step: if a user only wants to see love and kindness they should be able to configure their stuff to only see replies that come from my relay in some situations, for example.

How all of this works in practice I cannot say for sure, but I see zero centralization pressure in any of these steps.

Some form of "moderation" is absolutely necessary if you want any open space to remain usable by good people.

And shared blocklists are a completely inefficient solution, it belongs more to the domain of "p2p-like ideas that are very cool but do not work at scale".

The only solution I can see is to do it with smart relays that the users choose to act on their behalf, relays with clear policies, reputation and name-recognition, community relays etc -- all interchangeable, of course, and easily swappable on the client side.

Muting people or hiding posts from people outside of your WoT can good solutions to catch anything that slipped through relays, but they cannot work in an actually adversarial environment without destroying the experience in multiple different ways.

nostr:nevent1qvzqqqqqqypzqwlsccluhy6xxsr6l9a9uhhxf75g85g8a709tprjcn4e42h053vaqyd8wumn8ghj7urewfsk66ty9enxjct5dfskvtnrdakj7qgmwaehxw309aex2mrp0yh8wetnw3jhymnzw33jucm0d5hsqgzj0wmlflrx3x05xdmft5pg0nsshyneuefe24dek2j5udsales6z555pkus

"Even as a technical horse rider I find the car to be very hard to ride and a hassle."

None of the current clients has done relays right, and Nostr isn't valuable enough for anyone to be worth spamming or learning to defend against spam at this point.

If you want Nostr to work you have to stop denying that it is different from other things and trying to accommodate to the old paradigm. You can't change the world if you can't even get up from your couch to get the TV remote.

Blocklists and client-side filtering cannot do what proper relay selection can, because bad users can still make you use all your bandwidth and CPU on their trash.

Even rate-limits are already a form of moderation, so there is no point to not do better than that, and custom.

What I'm trying to say is that you don't have to talk about Bitcoin all the time if you're a Bitcoiner.

Just made a website which tracks nostr projects I've created that are approximately useful: https://stuff.fiatjaf.com/

Maybe they will be approximately useful to you too.

This is only a little bit inspired by:

nostr:nevent1qvzqqqqqqypzp978pfzrv6n9xhq5tvenl9e74pklmskh4xw6vxxyp3j8qkke3cezqy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qgwwaehxw309ahx7uewd3hkctcqyzynqeq9h5l0nwrfujpnv9ek0654w5pkc2vlpprn9yrjfqyw03hkjljd5ph

This is true, I remember her saying something like that but I had never actually browsed through wss://theforest.nostr1.com/. I wonder what exactly it is doing as I see some of my posts there but I don't publish to it.

nostr:npub1syjmjy0dp62dhccq3g97fr87tngvpvzey08llyt6ul58m2zqpzps9wf6wl you should add that one to the default list on Jumble maybe. And also wss://nostr.land/ and the ones I mentioned above maybe.

And maybe wss://yabu.me if you detect the user is from Japan? I'm sure there are other regional relays, like the Thai ones? The Damus source code has some of these hardcoded at https://github.com/damus-io/damus/blob/eeea9d3266adda856bc9732812d07240c9630ed0/damus/Util/Relays/RelayBootstrap.swift but I don't know if they're all worth using as a pure feeds or if they're full of spam.

By the way, nostr:npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl, if I build these relays I'm mentioning after this post it's just because I want them to exist and be tried, not because I'm pre-marketing an existing product. I don't have them built here nor I know of anyone who is working on them.

You meant to say "finally!".

Hi, nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9us2xuyp. I have an idea for using Nostr's existing network architecture to allow for optionally DNS-free relays. It would ideally be applied to Nostr & Blossom.

Relays could have their own Nostr pubkey which they would use to

1. Send a new, IP address location event type to Nostr relays containing their current IPv6 or IPv4 address & port number, &

2. Sign the data they send to clients so that clients can verify that they're receiving the data from the expected relays.

With this setup, for a client to find their DNS-free relays, they would

1. Attempt to connect to their last known IP locations

2. If this fails, they would query all relays they know the location of for the most recent location broadcasts they have

3. Reattempt to connect using the new location data

This way, a relay could run without a domain name of any kind on a non-static IP address that could change at any time. As soon as the relay detects that its IP address has changed, it could broadcast its new location so it could be quickly connected to again.

What are your thoughts?

I'd say it's extra complexity that is not really solving any problem we have. Nostr is already pretty resilient against DNS issues.

But if someone is really out to get someone and Nostr isn't good enough then DNS isn't much worse than the entire IP protocol that relies on one central registry and hierarchy of addresses that is very permissioned.

If we are to spend efforts on this layer then I'd rather go for the entire IP thing and make it possible for networks to be assembled in decentralized and permissionless ways using local cables and wireless infrastructure, then merge together forming an ever-growing parallel internet, with decentralized routing that scales globally.

This is my idea: nostr:naddr1qqyr2wpjvd3kgvtyqyghwumn8ghj7enfv96x5ctx9e3k7mgzyqalp33lewf5vdq847t6te0wvnags0gs0mu72kz8938tn24wlfze6qcyqqq823c53smcd

But, if Nostr is already struggling to get a few users and not be irrelevant, imagine something like this.

https://blog.tangled.sh/stacking nostr:npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr nostr:npub1useke4f9maul5nf67dj0m9sq6jcsmnjzzk4ycvldwl4qss35fvgqjdk5ks this is interesting.

Could this work more-or-less automatically under NIP-34 by just making patches refer to previous patches with tags? Without using any martial arts?

It's very hard to make a proper client that doesn't take shortcuts that undermine the entire point, and JavaScript and browsers are a magnitude slower than what a proper native client should be.

Have you tried Gossip?

Still, it should be possible to do reasonable web clients if you buy into the correct architecture and don't try to vibecode the logic.

I still think Coracle is pretty good. Jumble I like too, but I only use it to browse relays directly -- which is a much easier flow to implement than an outbox-powered "following" feed. Recently I'm playing with https://wip.alphaama.com/ and I like the style, it feels fast enough.

But I must reiterate that all of these still feel slow in comparison with a native client, but they do _not_ feel slow in comparison with almost all other websites on the web, everything is crazy slow, including X and centralized platforms. I've basically given up loading websites on my phone.

I wish all these web developers spent a week with a computer and a cell phone that wasn't the best of the best just so they could contemplate their life mistakes.

Replying to Avatar Josua Schmid

nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 todays implementations don‘t convey the „censorship resistant“ well. I often wonder whether the sink received my message.

I didn't get your mention on my inbox relay, by the way, I'm seeing it now by accident elsewhere.