Thread

Here’s a screenshot of #nostrscript which is currently working inside of damus! This script connects to a specific relay (primal) and fetches their trending data using their custom query. The language im using here is actually AssemblyScript, which compiles to wasm. You can use any programming language in theory to code nostrscripts. Damus executes the wasm binary directly. These scripts will be the engine of custom list views, allowing a very powerful system for pluggable algorithms. You will also be able to broadcasts these scripts to the network, and damus can automatically list and load them, enabling a marketplace of algorithms. image

Replies (28)

β€œ2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the app completely viewable and editable by the user.” 4.7 also talks about the exception for JavaScript.
Super cool. One thing to note is that this is not a supported public API. We iterate rapidly with these things (β€œcache3.primal.net/cache15" πŸ˜‚), and deprecate obsolete stuff without notice. If there is interest in using these trending feeds, we can look into standing up something with better guarantees that it will stay up. Would love to see trending posts in Damus and generally happy to do it for all app devs who wish to use these feeds.