Avatar
Adam Ritter | rbr.bio
6e3f51664e19e082df5217fd4492bb96907405a0b27028671dd7f297b688608c
Creator of rbr.bio and nostr-relaypool-ts

Time to code again 😊

Working on RelayPool updates to have caching infrastructure.

Which part of rbr are you the most interested in btw?

Good news everyone!

I added initial web worker support to RelayPool (called RelayPoolWorker). It provides smooth scrolling. You can try it at https://rbr.bio/ , but I'm sure it will get to Iris soon as well.

I hear this push, but I don't think it's good to push these things so forcefully.

Zaps are great, but they have a lot of UX issues (lightning takes time, browser integration is still hard problem, not automatic).

Also what about negative reactions? Can I take money from people if they post things that I don't like? :)

Haha, the ranking is not enabled yet, because it's not yet working. What you see is just a timeline.

You can log in on the main page with extension actually. I already added a bounty for making the like button work :)

I think I forgot to add the author to the view as part, I'll do that, thanks!

My main counterpoint is what Elon Musk is already feeling: he really wants free speech, but he already lost lot of money losing advertisers, and he quickly got in the situation that he has to stop doing what people want and started lying about who is owning the data.

The 2 big things outside lots of UX improvements missing in Nostr that in my opinion can be fixed are

- fast retrieval (that's why I wrote relaypool, but still needs a fast rendering engine with great caching layer to make everything both instant and correct).

- good ranking that doesn't just compete with Twitter / Facebook, but it's actually better. I started working on it a few days ago (I should have started with that, because nobody else has been working on it).

Many people have a dream / think that the only alternative to Twitter / Facebook / TikTok ranking algorithms is old school manual follower based, but it just doesn't work, as managing follower feeds manually is too hard.

I like the usual algorithmic feeds (and have been working on reproducing them), just want to get rid of the clickbait part / have some overrides (less images than what the algorithm would predict and much less clickbait, because I'm wired to click on it and I don't want to see it in the first place).

To see how the ranking algo works, you can see my posts (and also look at my light-client :) ):

https://rbr.bio/npub1dcl4zejwr8sg9h6jzl75fy4mj6g8gpdqkfczseca6lef0d5gvzxqvux5ey

My usual ranking update:

I created and tested a weighted version of logistic regression, although I'm not sure that I wrote the right weighted Hessian (the logistic regression converged to the right solution with different weights).

I made some API change where someone can add ,,only positive examples'', which makes it easyer to use for Nostr.

Next step will be getting a few hundred liked events with their comments /likes and adding them as positive examples to the regression data set.

Even though the implementation slowed down a bit, there's real progress happening every time I work on ranking. I hope in the next update I will be able to write what are the most imporant signals.

Ranking really needs more liked / commented on events (positive examples) to be able to learn feature weights. Right now none of the features give good results with just 8 likes in the data set :(

While ranking training seems like to work now (except timing info :( ), for 1000 retrieved events I have 5 likes (rbr.io is retrieving lots more events than other clients because it shows all parent comments for now).

I guess the solution will be to get liked events as well from the user's relays to get liked / non-liked training data ratio closer to 50% then reweight the liked events to have very small, but much more learnable weights. For example if 5 like events are exchanged to 100, the liked data should have 0.05 item weighting when training.

Of course a modified Hessian for log likelihood needs to be computed for Newton-Ralph method for finding max log likelihood, so if somebody is good at math, they are welcome to help adding item weights to the computation :)

Be careful sharing things like this, you'll be kicked out from Nostr

Another update on ranking:

I optimized the logistic regression a bit (it's about 8ms / iteration on 1000 events x 10 features). It could be made much faster, but I think it's fast enough, as Newton-Raphson method converges well.

I also added the API for groups, so now the model learns if a user likes some event that somebody usually likes, and the user likes some event that a somebody publishes (experimenting with adding a ,,self like'' automatically would be interesting as well).

Next steps are feature / model evaluation without using time, and then adding the time component (which is always a bit hacky, there's no real elegant solution).

Also I separated ranking to a function so that it's easy to include into clients later:

https://github.com/adamritter/light-nostr-client/blob/master/src/lib/ranking.ts

The current function call is this:

function processEventForLogisticRegression(

event: Event,

logisticRegressor: LogisticRegressor,

loggedInUser: string,

parentEvent?: Event

)

(the model can be trained and predictions for events retrieved later)