Tag-oriented organisation

META: This file is used to discuss tags in the abstract, without thinking about the potential connection to a file system.

Computed tags

Tags that can be computed from other factors might be wasteful to store on-disk. Imagine a tag mp4 that is always present if the file has the extension .mp4.

Could rules like these could be user-programmable via a Scheme/Lua DSL? If so, how do we keep them fast?

Some computed tags

  • For source repos, Github-style language breakdowns.

Complex indirect tags

Nayuki's article proposes tag cores to address the points where "simple tags" fail. To summarise the issues described in the relevent section:

Most interestingly, these are problems that simple tags were intended to solve! While we have solved many of these problems on the file-level, we now have to deal with them on the tag-level! I can't help but draw analogue to type theory: Many issues solved by types apply to the types themselves, thus leading to dependent type theory. Let's follow that path, and get meta.

Let a tag be a pair (name : Text, target : FileID)

Automatic tagging

Related to Computed tags. New files should be automatically tagged in a variety of ways.

Some automatically-applied tags

  • created by: APPLICATION-NAME — By which application was this file created? Firefox? OBS? bash?

  • owner: USER — To which user does this file belong?

  • date of creation: TIMESTAMP — When was this file created?

Application-specific cases

Tag-aware applications can greatly improve the utility of automatically-applied tags.

Firefox

  • online url: URL — Where on the internet does this file orginate?

OBS

  • duration: DURATION — How long is the recording?

  • recording: {Team Fortress 2, Desktop, ...} — What was being recorded?

Tag implications

While tag implications allow emulation of directories, they're actually more expressive! Like directories, you can draw trees:

digraph tree {
  bgcolor="transparent"
   node [
    style=filled
    fillcolor=gray95
  ]
  Documents [ shape="record" ]
  Books [ shape="record" ]
  Papers [ shape="record" ]
  Documents -> { "Scheme R6RS spec.pdf", "Emacs reference card.pdf", Books, Papers }
  Books -> { "Dummit and Foote.pdf", "Compiling with continuations.pdf" }
  Papers -> { "Why Functional Programming Matters.pdf", "Dependent Optics.pdf" }
}

file:tag-implication-tree.png

Unlike directories (without {hard,sym}links), you can draw diamonds:

digraph tree {
  bgcolor="transparent"
   node [
    style=filled
    fillcolor=gray95
  ]
  "TODO: example lmfao. i'm going back to playing factorio"
}

file:tag-implication-diamond.png

References

[cite:@nayuki2017designing]