Post

two thoughts: 1) this is really cool, very powerful. i like that it's invisible if the consumer doesn't care about the facets. 2) the payloads are massive compared to in-band markups, like markdown or html or bbcode. i wonder if it's possible to lessen or if that matters.

Yes, the size is indeed large... We could get creative by doing something like TOON did, and make the format like `facets: 10_16_b,18_24_i,...` (byteStart_byteEnd_typeKey) and offloading the parsing to the reader. But I don't think the complexity justifies the optimization

This type of processing can also be beneficial for *very* large content - we can load the entire text and in parallel progressively (progressive json) load the facets and apply them in parts when ready (including loading posts and inserting them)

(Also my site uses server components and SSG/ISR [compiled during build, from time to time and when needed] - so the client receives ready-made content and does not know about this data at all)

Thanks 😊 When I was writing essays and theses to order at school or university, I didn't expect that it would turn into a useful skill in development 😅

Great post! I've been building with facets & found it annoying to implement link facets without facilitating linkjacking — "Here's a link to good‧example‧com" with a facet pointing to evil.example.com is tricky without (as Bluesky does) showing a "Trying to take you to evil.example.com " message.

"Here's a link to good.example.com" Good point, it's always useful to have extra UI warnings Also don't forget to check the hostname in the URL class (we had several bugs here due to checking with regular expressions only) 🙃