(2021-12-10) Brander If Headers Did Not Exist It Would Be Necessary To Invent Them

Gordon Brander: If headers did not exist, it would be necessary to invent them. One thing I’ve been thinking about is how to introduce an open-ended metadata primitive to Subconscious app. Key-value metadata is a fundamental pattern that we see emerge repeatedly. Where it doesn’t exist, we often see it bolted on after the fact.

  • note his note is originally from Aug10'2021
  • see his thread
  • cf StructuredWiki - do existing engines follow the "same" "standard"?

Markdown didn’t have the concept of headers, so Jekyll found it necessary to invent them. (see 2nd article-excerpt below)

We really do build entire apps just to tag files with a bit of metadata.

Way back in 1990, BeOS took this insight and ran with it. Files in BeOS could be tagged with any key-value metadata you liked. cf FileSystem

With a bit of metadata sprinkled on top, your notes can gain superpowers:
Use your notes as a CRM
Manage citations for your research
Use it for quantified self tracking
Publish your notes to the web with a static site generator

Here’s another BeOS insight: any key-value metadata can be treated as tabular data. Each file is a row, each key is a column, each value is a value for that column.

Tabular data is a composable alphabet with a massive toolchain, powerful mathematical properties, a deep body of computer science theory. (cf Relational theory)

One of the key things to appreciate about email and HTTP headers is that they are just ordinary plaintext, written at the top of the document. The syntax of headers is easy to understand.
Headers are one-per-line. They are made up of a key, followed by a colon, followed by some value.
The header area ends at the first empty line.
Everything under that is free-range text.

This is even easier to appreciate when we compare headers to the other obvious candidates for structured data:
Unlike HTML, XML, or JSON, headers don’t feel like code.
Unlike YAML, headers are simple, and difficult to screw up.

Header values can also be anything. Header keys can choose whatever format is most appropriate for their values.

The syntax that distinguishes between header fields is specified separately from the internal syntax for particular fields.

This might cause a bit of inconvenience when parsing exotic headers. On the other hand, the syntax of simple metadata values can be written in whatever way is most natural for the type of data

While you can add any headers you like, and they can have any format you like, there are some headers that are standardized, such as To, From, CC, Date. This defines a minimal stable API surface for clients to work with and enables federation between multiple clients and services. (ontology)

Another reason you should always an et cetera escape hatch in your ontology is that it lets you evolve that ontology later on.


Jekyll FrontMatter support

Any file that contains a YAML front matter block will be processed by Jekyll as a special file. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines.

If you want to use Liquid tags and variables but don’t need anything in your front matter, just leave it empty! The set of triple-dashed lines with nothing in between will still get Jekyll to process your file. (This is useful for things like CSS and RSS feeds!)

Predefined Variables for Posts

date

category... categories

tags: Similar to categories, one or multiple tags can be added to a post. Also like categories, tags can be specified as a YAML list or a space-separated string


Edited:    |       |    Search Twitter for discussion