1
0
mirror of git://jb55.com/damus synced 2024-09-18 19:23:49 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
William Casarin
db2ec0a00a Fix npub mention bugs, fix slowness when parsing large posts
Switch the post parser to use the same code as the content parser. This
was causing many issues, including performance issues.

Changelog-Fixed: Fix lag when creating large posts
Changelog-Fixed: Fix npub mentions failing to parse in some cases
Changelog-Added: Add r tag when mentioning a url
Changelog-Removed: Remove old @ and & hex key mentions
2023-07-11 09:15:13 -07:00
William Casarin
97f10e865f NostrScript
NostrScript is a WebAssembly implementation that interacts with Damus.
It enables dynamic scripting that can be used to power custom list views,
enabling pluggable algorithms.

The web has JavaScript, Damus has NostrScript. NostrScripts can be
written in any language that compiles to WASM.

This commit adds a WASM interpreter I've written as a mostly-single C
file for portability and embeddability. In the future we could
JIT-compile these for optimal performance if NostrScripts get large and
complicated. For now an interpreter is simple enough for algorithm list
view plugins.

Changelog-Added: Add initial NostrScript implementation
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-03 14:31:38 -07:00
Bartholomew Joyce
668b0a94df cleanup nostr bech32 entity parsing
Closes: #911
2023-04-15 15:04:13 -07:00
William Casarin
b30d0c01db nip19: allow empty relays in nprofile and nevent 2023-04-11 12:45:45 -07:00
Bartholomew Joyce
ea14099b62 Improved parsing of bech32 entities 2023-04-11 10:23:34 -07:00
William Casarin
13354b0eb5 Refactor NIP19 implementation and add tests
Closes: #837
2023-04-09 22:03:51 -07:00