Oddbean new post about | logout
 DVMs aren't that interesting to me for algo feeds because it requires some external party to do something for you for the feed to work. This means it may eventually stop working once they go away. Not to mention they are kind of spamming and unnecessarily pollute public relays with lots of duplicate lists of things when they are served to specific users.

Damus will always be local first, meaning that the algos run locally and offline, but should be powerful enough to do everything DVMs do, with the benefit that the algo will always work.

Not to say that DVMs aren't useful. web clients don't have powerful local and offline capabilties like native clients do. With fast, custom databases that can store gigabytes of notes, local algos become much more useful.

This becomes even more important for private relay usecases where you want to run algos without any third party knowing what you are up to.

The main difference between DVMs and nostrscript algos is that DVMs are the results of the algorithm's  computation, whereas nostrscript is the algorithm itself in WebAssembly. So instead of relying on some third party to run the algo to get the resulting DVM list, you can just run it yourself, as many times as you want, offline, privately. You can even share and fork these algorithms in a marketplace.

Looking forward to testing nostrscript algo capabilties against DVMs and seeing how it compares!
 
 Is what you're doing similar to the coracle Feeds that you can adapt? 
 its completely different than other approaches. there will be many approaches, we have our own spin on it. 
 Ah cool, I don't know enough to tell the difference, but I believe you 🥲😚 
 Can you just enable the ability to turn relays on and off in the home feed and when posting? Similar to the global section! 
 its not as useful as you might think, we had this at one point. first class relays is likely what people want. 
 It is useful. I literally have to use the global section instead of my home feed to see and follow my friends’ posts because they get buried in my home feed. I do this by turning off all relays except for the ones my friends are using and switching between various ones of those to see different groups of people.

Topical relays are very useful. 

I have no idea what “first class relays” are maybe you can explain… 
 when I say first class relay I think of something like discord servers. where you click on a specific relay to show all the notes in the relay, and when you post, that post gets sent only to that relay.

it's different than the current model that damus currently uses. 
 That’s what I’m asking for, and how I currently use the global feed (for read only) but wish the home feed worked that way. Just add the same wine glass funnel icon thing at the top and let me turn them on and off! 
 Coracle feeds fit within tighter constraints for bandwidth and storage limits. They also allow outsourcing complex computations, for example LLM content classification. Nostrscript is more robust and flexible, but requires you to download all the content you want in advance. Both are good options, on very different parts of the wpectrum of trade offs. 
 💯

This is the way. 
 where can I learn more about this nostrscript thing? 
 nostrscript is just webassembly that can execute aggregation queries on a local relay (nostrdb in the case). so will be available for any client who wants to build on nostrdb.

I started writing up some of the plans on this here:

https://github.com/damus-io/nostrdb/issues/33 
 we actually already have nostrscript integrated into damus ios, I wrote a single-file C wasm interpreter, but all it does right now is run zap scripts:

https://github.com/damus-io/damus/blob/master/damus-c/wasm.c

https://github.com/damus-io/damus/tree/master/nostrscript

I wanted to build out nostrdb first so that these algos can run efficiently. I'm currently using notedeck as my main nostrdb testing bed. 
 Would it be possible to implement nostrscript on top of any database architecture or does it require nostrdb?

I'm working on something that is going to gave a generic database of events, and if your writing algorithms using WASM it would be cool if I could reuse them 
 Damus won't work when you go away... 
 yes it will 
 it’s funny how some people say Third party meaning freedom, and others say it meaning ‘can’t be trusted’ 

but relying on the consistency of others for the reliability of your own app would be unnerving 
 yeah that would drive me insane 
 the beauty of DVM is that you don't have to do sync 👾
workflows like open agents and cascdr are interesting, maybe they make more sense offline  
 It all depends on how much data is needed for each custom feed. It will be hard to make good trending topics work with only local info.

It's similar to translations. In-device translations work really well for simple things/notes but if the text requires advanced knowledge to translate well, online services win.  
 All you are trying to do is get the use to achieve a wide range of topics @Rabble what do you think? Think of the days before personalized responses  
 good point, I wonder if it makes sense for these script to have a negentropy/time sync initiation step to make sure it has all the data it needs first before it runs. 
 Negentropy / time syncs are not optional, IMHO. We will have to add to the mandatory core of Nostr if we want to scale this. We can't keep downloading everything over and over again just to check if the local instance has all the data it needs. 

I am getting more into DVMs that return a Snark/Stark proof these days. I think it could provide some interesting possibilities for verifiable computation. 

If you have the IDs of the events you want to include locally, you can send the IDs alone for a verifiable DVM to compute and return with a proof that it did what it was supposed to do. 

It gets even better if we can add some homophobic encryption to event data. 

Future is bright.  
 I'm studing zkvm and zkwasm. These are nice techs 👍 
 Too bad all of these ZK implementations wasted time in the shitcoin world. They don't need blockchains to offer verifiable computations. 
 I think it's incredibly cool to see the lead Amethyst and Damus developer exchange ideas. I love this!  
 hmm what if there was a dvm that ran wasm code

https://github.com/benthecarman/wasm-dvm 
 lol 
 but why 
 So anyone can make a dvm without all the needed overhead 
 Very balanced take 🤝 
 DVMs are a stupid way to call servers
if you want request-response better use HTTP  
 I think we need multiple agent frameworks.  DVMs were the first, but more will arrive in time.  What would be good would be if nostr and bitcoin were the glue that tied different agents together on different frameworks.   
 nostr:nprofile1qqsd5x8fscqypualfyu8dlqkkx539tj6dah634g4ns779wpr8gxes5gpz9mhxue69uhkummnw3ezuamfdejj7qg4waehxw309aex2mrp0yhxgctdw4eju6t09uq3uamnwvaz7tmwdaehgu3dwp6kytnhv4kxcmmjv3jhytnwv46z7r379p8 
 The dream for DVMs is to be able to fall back to competitors when one doesn’t work, automatically. If a DVM doesn’t respond, you go with another one that solves the task. I’m hopeful we can build this but afaik it’s not a thing yet. For example, using information from dvmdash.live you could find the second most popular algo feed DVm for the feed you want and use that instead. (I plan to expose this capability eventually in a DVM like an API would).

algo feeds will be like 0.1% of DVMs, although they are the most popular right now (see https://dvmdash.live/kind/)

I totally understand the benefit of doing it locally, but you also miss out on the network effects. When @miljan puts out a new one, users of an app can benefit without the client devs touching a thing. 

Tradeoffs. 
 Two big issues with Damus:
1. Damus.io relay is almost always offline;
2. Alby, the wallet app for Damus is broken. I got myself locked out of Primal due to it. 
 the damus relay is rarely offline, maybe your network is blocking it for some reason?

Also, i don’t see why this is an issue with damus. You don’t need to use the damus relay. 
 You can't get zaps if you don't link an Alby. 
 Not true? I get zaps and don’t use alby 
 sounds like different orientations of a same kind of sense, that is, the terms of the transit of what is stored & displayed
as per your description i understand now dvm as something that 'comes from there to here', whereas nostrscript something that is 'built here and sent there to bring back that'
could be so? 
🙏  
 Hey,

Which relays/profiles have posts about this kind of content? Or websites/repos outside of Nostr. I love Primal, and not that posts about peoples mornings aren't lovely, but these kinds of discussions I find to be more interesting. 
 Just follow all the nerds 😂 
 DVMs will be really useful for things that are not feeds or algos.

I like to think of Nostr as the Universal API machine, so a future node or backend has a max of four systems: Bitcoin Node, Nostr Relay, File Storage system, and DVM. 

If you imagine any complex app like an uber app or something running in a Nostr client, almost all of the ride data will flow from customer to customer via Nostr events, but you still probably need the DVM that runs the open street map routing algo on request from a different server.

As a node runner I look forward to the day where there is not seperate backend applets for every little app you want to run on your server, but instead design is done for a universal DVM/Relay framework