hey! looks like you're using a weird or otherwise quirky web browser. this basically means, the website will
not work for you correctly. I might fix it in the future but I have very limited time to work on this
website and so don't have an estimate on when that might happen.
as I alluded to here, treehouse is built to decay gracefully
as you take away the fancy parts.
that's because the JS handles stuff like lazy loading of linked trees.
you may have seen a brief "Loading…" text flash before your eyes as you opened this
about this branch - that's it downloading another tree and pasting it into this document
when JS is unavailable we fall back to a plain old <a> link through a
<noscript> tag. if you have uBlock Origin, or any other JS blocker, you can try
that out yourself!
the JS also lets you select text in these <details> elements without them collapsing
as you release the mouse button.
I have no clue why it is this way by default, but frankly it's like a 5 line
usability fix, so why not.
if you have accessibility concerns about this decision, please let me know.
it also saves your progress as you read. if you refresh the page, you'll notice you end up exactly where you left off!
by default, if you link to an element by its id and it's contained within a <details>, the <details> will not expand.
therefore there's a bit of JS to make that work, and to tie that together with lazy loading.
treehouse will not work as fine without CSS though - the <details> will look extremely
janky, but the content should still be fully readable.
myself, I'm writing this content in a bespoke format called .tree.
the structure of .tree files is extremely minimal. there are only a few syntactic features to speak of.
here's a taste of .tree:
% id = "root"
- this is a branch
% id = "child"
- this is a child branch
+ this is a branch that is collapsed
- and this is a child of that branch
% content.link = "some-other-tree"
- and this branch links to another tree
the .tree format is line-based. that means the %, -, and + tokens are only
interpreted when at the beginning of a line.
the basic unit of .tree is a branch. branches…
…are located at a specific indent level
…may or may not have attributes - that's what the percentage sign % begins
…may or may not be expanded by default (this is the branch's kind) - that's what the minus - and plus + tokens do
each branch is constructed in this order: optional attributes, kind, content
and ends when another line beginning with %, -, or + is found.
other than that, .tree assumes nothing about what format the branch attributes or content are encoded in.
I chose TOML and Markdown for their ease of use and flexibility, but the parser couldn't care less.
…actually, that's a lie. see that code example above? Markdown code fences ``` are handled specially to let embed .tree source code blocks within .tree files. that's all.
you may have noticed in that code example above that almost every branch has an id attribute.
this is because I want every branch to be individually linkable and quotable.
if you ever want to link anything I said in an argument online: hover over a branch, right-click that little permalink icon that's on the right side of the screen, and Copy Link.
but manually coming up with ids for branches would be quite the nuisance.
that's why with the power of Tools Programming™, I built a tool that fills out all the ids for me.
I chose ulids for generated ids, for a few reasons:
they're guaranteed to be unique, so I can be sure no two branches end up having the same id
which is precisely what lets me pull the trick where I embed one tree within another, and you just dig into index.html.
they embed a timestamp, which I can use to display the date/time when a branch was written, because I generally fix branches right after writing
as well as highlight branches which were added since your last visit
not that either of these features are implemented as of writing this (2023-08-20)