NIP-XX: Gopherkind documents (kind 31436) - #2429
Open
TheCryptoDonkey wants to merge 3 commits into
Open
Conversation
Three gaps from the first draft. The reasoning for the kind sat in the rationale at the far end, so the case for it arrived after every rule it justifies. It now opens the document. Nothing showed how to subscribe. A whole hole is one filter and a document is that filter narrowed by `#d`, which a client implementer should not have to infer. The prior-art paragraph named "the nsite event family" vaguely. NIP-5A is merged and is the closest existing work, so it is named, along with the three differences that matter: text inline rather than Blossom blob hashes, one event per document rather than a path manifest, and gopher item types for a client with no HTML parser. No normative rule changes.
The previous text forbade every control character in a display. That reads well and forbids what gopherspace actually does: gopher://baud.baby/1/ builds its root menu out of truecolour SGR info lines, and a consumer following the strict rule renders them as literal escape text. A display MAY now carry SGR, that is ESC [ params m, and nothing else. A link still carries no control character of any kind. The distinction is that a link is parsed and acted upon while a display is only shown, so an inert styling sequence in a label costs nothing while anything in a target could be made to matter. A consumer that cannot render SGR strips the sequences rather than rejecting the record, so a plain-text frontend stays conforming without special cases. The reference implementation and an independent Python implementation both follow this, checked against a shared fixture that pins what survives and what is replaced by a space.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an addressable kind for one text or menu node of a gopherhole, so a hole is a set of signed events under a pubkey rather than a directory tied to one hostname. Any bridge that can retrieve a relay copy can serve the hole to an RFC 1436 client.
The kind carries UTF-8 text inline rather than referencing blobs, and gives menus a small host-independent grammar. The rationale for not reusing nsite manifests or kind 30023 is in the draft. No relay changes are required beyond ordinary addressable-event handling.
Implementations and vectors
The Python implementation vendors that fixture unchanged (SHA-256
0f44989ec9d3ed4979d53ccc45dedfad75fe84adb8b3d710f172fa1f5a7bb421) and passes all five sections on Python 3.11 and 3.14. It was written against the draft and fixture without importing or copying the TypeScript parser.The NIP number is left as
XX, and the descriptive filename avoids colliding with other draft PRs.