Supporting DID links to sphere content #51
Description
Recently the team has been discussing the value of supporting a did link form for sphere content. This has many upsides.
DIDs are identifiers (stable and globally unique). Slashlinks are locators (they tell you how to find stuff), but not identifiers. Given that slashlinks dereference to sphere DIDs under the hood, it would be a nice fallback if slashlinks could reference DIDs directly. It would also be nice if that form were a stable identifier.
This choice has cascading effects on the UX of Subconscious, the UX of writing Subtext, the parsing of Subtext, and more. Design is navigating tradeoffs by values. To that end, This note is an attempt to explore and reflect on these interconnected aspects, how they intersect with the design values of Subtext, and to find a balance of tradeoffs that best suit our values.
Values:
- DIDs are an important modular interface.
- If DIDs are a lego dot, then supporting them means you can click together with many other systems.
- DIDs are not user-friendly, but
@petnames
are.- "If we ever show a DID to a user we have failed."
- To that end, we want to bias the ecosystem toward
@petnames
, while supportingdids
. - Adding more structured syntax to dids exacerbates the problem.
- Chaining dids is pathological.
- Conformability. E.g. Leaning into valid did syntax makes us conformable to a large number of other systems.
- Reduces corner cases, sharp edges, surprises.
- Subtext should be simple to write, simple to read, simple to parse.
- The best Subtext syntax is no syntax (e.g. auto-linking http URLs).
- The second best syntax is what you would write anyway (e.g.
> blockquote
). - The third best syntax is popular syntax from existing systems (e.g.
_italic_
or@handles
). - Subtext is less like Markdown, more like the auto-syntax you get in a social media site. We should not support deep structure or features.
- The second best syntax is what you would write anyway (e.g.
- Things like URLs should just work when you paste them into Subtext...
- ...Within the limits of keeping parsing simple and unambiguous.
- E.g. we only auto-link URLs starting with http:// or https:// for this reason.
Previously-resolved tradeoffs:
- URLs are ASCII only. Slashlinks support UTF-8. See Consider how to handle unicode characters in slashlinks #28
- Resolution: there are specifications for translating between URLs and UTF-8 representations. We should use those. https://en.m.wikipedia.org/wiki/Internationalized_Resource_Identifier
- Did/URL paths and slugs have different syntax.
- Resolution: slug syntax should always be a simplified subset of paths.
- They should not get more complicated than
([\w\-]+)(\/[\w\-]+)*
Activity