Skip to content

NIP-7A: comment-based patches - #2438

Open
fiatjaf wants to merge 4 commits into
masterfrom
comment-patching
Open

NIP-7A: comment-based patches#2438
fiatjaf wants to merge 4 commits into
masterfrom
comment-patching

Conversation

@fiatjaf

@fiatjaf fiatjaf commented Aug 18, 2026

Copy link
Copy Markdown
Member

This is inspired by #1091.

The core idea is that this is meant for small quality-of-life improvements, like fixing a typo or adding a missing word, it's not meant to fully replace the original content.

Because of that it is backwards-compatible (i.e. the original event still stands on its own) and these patches at best add some new things, which can be read anyway by any existing client as these patches will just show up as normal comments.

NIP text: https://github.com/nostr-protocol/nips/blob/8fec4a5f8c477a3454eeba411d956919c6a1cbfb/7A.md

The patch format is invented by me because I couldn't find anything that produced reasonably-human-readable output and was simple enough. It works pretty well in my tests, including some edge cases. Here's a stupid playground: https://claude.ai/public/artifacts/fb4718ff-ea13-45eb-8460-f55e9a7e225c

@gsovereignty

Copy link
Copy Markdown
Contributor

Implementation skill https://github.com/gsovereignty/nip9a

@staab

staab commented Aug 18, 2026

Copy link
Copy Markdown
Member

I don't think this is really human readable. Could you choose a different kind at least?

Also, nip 9a is already used by #2194 (and several relays signal for it)

@vitorpamplona

Copy link
Copy Markdown
Collaborator

Don't overload kind 1111.

@fiatjaf

fiatjaf commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

I don't think this is really human readable.

Sure, it isn't fully human readable. Do you think it is possible to make it more human-readable or do you just want to complain?

Could you choose a different kind at least?

Using a different kinds defeats the entire purpose of it, as you should know as the author of the proposal linked above. So no, that can't be the solution.

Also, nip 9a is already used

Changed to 7A.

@vitorpamplona

Copy link
Copy Markdown
Collaborator

This DIFF is complete shit for a regular user. Displaying as text in replies is absolutely horrendous.

@staab

staab commented Aug 18, 2026

Copy link
Copy Markdown
Member

I still think annotations are better #1091. But I've not implemented it so I obviously don't have strong opinions.

@nilskp

nilskp commented Aug 18, 2026

Copy link
Copy Markdown

I'm not a fan of redundant information as it opens up for inconsistency. Why not just:

4 -4 +everyone
14 -6 +Monday
32 -9 +moved to 2pm

@fiatjaf

fiatjaf commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

I'm not a fan of redundant information as it opens up for inconsistency. Why not just:

4 -4 +everyone
14 -6 +Monday
32 -9 +moved to 2pm

You mean the length of the added text? It's because some characters are evil, like newlines.

But I'm ok with this and then we just forbid adding evil characters ever if more people prefer this way.

@fiatjaf fiatjaf changed the title NIP-9A: comment-based patches NIP-7A: comment-based patches Aug 19, 2026
@nilskp

nilskp commented Aug 19, 2026

Copy link
Copy Markdown

You mean the length of the added text? It's because some characters are evil, like newlines.

Got it.

I do think newlines are desirable for edits, but can't they just be escaped \n?

@fiatjaf

fiatjaf commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

What if we did something like this:

4 -5 +8 anyone = everyone

Would it be more naturally readable?

@vitorpamplona

Copy link
Copy Markdown
Collaborator

4 -5 +8 anyone = everyone
Would it be more naturally readable?

You guys have a sense of humor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants