treehouse/content/about-treehouse.tree

309 lines
14 KiB
Plaintext
Raw Normal View History

2023-08-20 18:37:00 +02:00
% id = "01H89RFHCQCD3E1XS5XAPW86J5"
- liquidex's treehouse can be thought of as many things.
% id = "01H89RFHCQQMBNFETGPY4HHDT6"
+ ### the treehouse is a reflection of my own personality
% id = "01H89RFHCQ4XHDXK0FH376SNZ8"
- this is a literal braindump
% id = "01H89RFHCQEQ2RAWRTRN6HZ8A3"
- whatever's on my mind at the time that I wanna share with the world, I write down here
% id = "01H89RFHCQY5EE9Y46PHJT9DFR"
- I built this treehouse because I love sharing cool stuff with people
% id = "01H89RFHCQR0H2CRNA81XAGXWJ"
- and also because I am obsessed with many things and I wanna share this obsession with the world
% id = "01H89RFHCQDC73N0MD2ZF629MF"
- wouldn't you make yourself at home?
% id = "01H89RFHCQKAPHSGCDN832QRMD"
+ ### the treehouse is a statement of artistic expression
% id = "01H89RFHCQAD7WKW59CAFAX814"
- the treehouse is not your typical blog
% id = "01H89RFHCQKJPNXX7QKWM9X8GM"
- as you can tell the structure is quite different
% id = "01H89RFHCQJNJSTJCTXSDCVF6C"
- instead of containing finished posts, it just sort of… is
% id = "01H89RFHCQHWWE24N1NF1N2V85"
+ nesting indefinitely
% id = "01H89RFHCQNX4PP80E49AWWQPM"
+ like really, where does it end?
% id = "01H89RFHCQCCWWMZCXEXF704Q3"
+ *where?*
% id = "01H89RFHCQW4NN6PW6V6RFCVH3"
2023-08-22 22:35:17 +02:00
content.link = "about-treehouse/the-end-is-never"
2023-08-20 18:37:00 +02:00
+ ***WHERE???***
% id = "01H89RFHCQPAMNSN81SRVH2TZ5"
- always evolving and shaping and shifting
% id = "01H89RFHCQEJZQFXKVVQ92816R"
- so that I never need to *finish* anything
% id = "01H89RFHCQ3Q6W2Q0QKRHRVFVW"
- I can just sit down, type something out
% id = "01H89RFHCQCTZFY3RV0J5MPMW9"
- then forget about it
% id = "01H89RFHCQ3J04CRY0RAVN8YG5"
- then come back again, type out something more
% id = "01H89RFHCQYK8R7SG5SNH5JNC8"
- isn't this just way more pleasant?
% id = "01H89RFHCQ4F0AWTGVWVQXFFGK"
- isn't that… in the spirit of [Agile](https://en.wikipedia.org/wiki/Agile_software_development)
% id = "01H89RFHCQHS0R71CP198SRX16"
- …of all things?
% id = "01H89RFHCQYH846FGW8Z8EFX2E"
- not that I designed around its ideas, but there's a semblance, isn't there?
% id = "01H89RFHCQQK8Q1WHZK4ZK1EK1"
+ it is designed to be elegant and clutter-free
% id = "01H89RFHCQ4N6GMFF0Q2N4PCM6"
- the treehouse contains no ads to annoy you, no sidebars to interrupt
% id = "01H89RFHCQDMWX7WNSMBDWJC9G"
- it doesn't even have a navigation bar, because it doesn't need one
% id = "01H89RFHCQ9WEBCQMQH7PSQDFS"
- it's built to focus on the substance
% id = "01H89RFHCQ9PVANQV8YNKBY399"
- it's built to let your imagination go free
% id = "01H89RFHCQR2R4XX7CRX8HZRAF"
- it's just a cool space to let go of your worries, and breathe
% id = "01H89RFHCQ6WVDR3CWVY99F87M"
+ it is designed to be user-friendly
% id = "01H89RFHCQBDVZX9Y7JTSGRV5G"
- because there is too much software nowadays that does not care about _you_
% id = "01H89RFHCQEFERYSZ77ZD2DS0M"
- and that frustrates me, too
% id = "01H89RFHCQ3EAP0F6PRSEK7S1T"
- there are bits of JavaScript that power this site, to make it just that little bit more pleasant
% id = "01H89RFHCQGF3R8FAP0QHYB6WM"
- but without overwhelming your computer or bandwidth
% id = "01H89RFHCQ1XA3BB3BTKXH36CX"
- you can disable the JavaScript, and everything will still work
% id = "01H89RFHCQS2WW7PBP1YV0BEJZ"
- but you may not find the experience favorable
% id = "01H89RFHCQ7HTZSP6P2RZR8JHE"
+ but most importantly of all, it is *weird*.
% id = "01H89RFHCQTRVPZ0AJ0DGJHXKX"
- weird as me
% id = "01H89RFHCQ3D3Z82YGJRNV8ASR"
- writing this "poem"
% id = "01H89RFHCQXB6F45KN28P91YCK"
+ can you even call it that?
% id = "01H89RFHCQ48R7BCZV8JWPVFCY"
- have I invented something new here?
% id = "01H89RFHCQAXJ0ST31TP1A104V"
+ ### the treehouse is a mostly statically generated website
% id = "01H89RFHCQ2GWJPTAKTRGS1QAC"
- weird poems and philosophical talk are over, it's time to focus on the tech.
- call this an overview, Defense of Design, or what have you
2023-08-20 18:37:00 +02:00
% id = "01H89RFHCQF4N9T05B9DVWX67K"
- treehouse is built in the programming language that gives me the most pleasure coding.
2023-08-20 18:37:00 +02:00
- no need for you to know more. :shhh:
% id = "01H89RFHCQRA4BBBWDC8K68BB0"
- I don't currently have the software open source because I wanna figure out a strategy for
building *it* (the software) and *this* (the content) in parallel,
% id = "01H89RFHCQA32MCR4MDCANDNC7"
- but being the altruist I am - don't worry, it _will_ be open source one day.
- in case you're reading this in the far future, and this is still here…
2023-08-22 19:24:21 +02:00
you wouldn't mind [dropping me a line][branch:01H89P3CH8CD28KGX9GVRFK60E] would you?
2023-08-20 18:37:00 +02:00
% id = "01H89RFHCQAQVXP6B2H0T8NNDS"
- personally… the language you build a personal project with almost never matters. it's rather how you execute your ideas.
2023-08-20 18:37:00 +02:00
+ therefore I find boasting that my project is powered by a `$LANGUAGE` or a `$FRAMEWORK` unnecessary.
+ but if you really care that much, it's built with Rust, plain HTML5, plain CSS, and
[Vanilla JS](http://vanilla-js.com/).
- (yes, I know that website is super old, but I still find it incredibly funny :hueh:)
% id = "01H89RFHCQFWC2FWBAE9PVNC08"
2023-08-22 19:24:21 +02:00
- as I alluded to [here][branch:01H89RFHCQ3EAP0F6PRSEK7S1T], treehouse is built to decay gracefully
2023-08-20 18:37:00 +02:00
as you take away the fancy parts.
- you will be able to read it just fine without JavaScript, just that it'll be a little
less pleasant.
- 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!
- but, there is one very crucial piece of JavaScript that makes this website tick, and your experience **will be degraded** if you disable it. that feature is linking to branches.
- by default, if you link to an element by its id and it's contained within a `<details>`, the `<details>` will not expand. :ralsei_dead:
- therefore there's a bit of JS to make that work, _and_ to tie that together with lazy loading.
2023-08-20 18:37:00 +02:00
- 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
2023-08-20 18:37:00 +02:00
\+ this is a branch that is collapsed
2023-08-20 18:37:00 +02:00
\- and this is a child of that branch
2023-08-20 18:37:00 +02:00
\% content.link = "some-other-tree"
\- and this branch links to another tree
```
2023-08-20 18:37:00 +02:00
- 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
2023-08-20 18:37:00 +02:00
- and ends when another line beginning with `%`, `-`, or `+` is found.
2023-08-20 18:37:00 +02:00
- 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.
2023-08-20 18:37:00 +02:00
- 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](https://github.com/ulid/spec) 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)
- they're much more compact than [uuids](https://en.wikipedia.org/wiki/Uuid)
- which use 32 hexadecimal digits separated unevenly by 4 dashes, giving you 36 characters.
- who even remembers how many digits there are between each dash? I know I don't.
- ulids on the other hand are 26 digits encoded with [Crockford's base32](https://www.crockford.com/base32.html)
- which is cool because it's much denser while avoiding ambiguous characters - `0`, `O`, and `o` are all interpreted as `0` (zero).
- noticed how fast the treehouse restores your state? there's basically no delay.
- this is because it restores your state _as it's loading in_, by using [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements).
- despite many people calling that API extremely low-level, I beg to differ. it's actually pretty easy and pleasant to use.
- most importantly it lets me enhance vanilla `<li>` elements with custom behavior executed on load, which I use to restore your reading progress as the page is loading in.
- linked branches also use Web Components by the way.
2023-08-20 18:37:00 +02:00
- while not strictly a technical topic, I'd like to shout out [Recursive](https://recursive.design) for being an awesome font :ralsei_love:
- (not to be confused with Font Awesome, which I do not use here. icon designs are my own.)
- being a variable font, I can tweak the text's look and feel on many different axes.
- the one that I wanted to shout out in particular is `CASL`, which lets me make it look a lot more happy and playful.
+ almost like Comic Sans, but without all the stigma.
- I actually considered using [Comic Neue](https://comicneue.com/) as the font on this website, but ultimately chose Recursive.
- Comic Neue and not the Real™ Comic Sans MS because it's licensed under the SIL Open Font License, which means I could redistribute it on my website.
- not everyone runs Windows or macOS, so just assuming the reader has Comic Sans installed isn't ideal.
- in particular the variant on my website is 100% casual (`CASL`), and -2.0 slanted (`slnt`).
+ that little bit of slant makes it look just a little more like handwriting.
- I actually thought of handwriting all the text in the treehouse, but ultimately thought it would be too much work. and a technical challenge too.
- how to make it scalable (as in, how to keep it smooth when you zoom in?)
- how to make it scalable (as in, my hand really fucking hurts from writing this much, and I *really* do not wanna go back to the times of writing school essays please?)
- how to make it scalable (as in, how to distribute this many images to the user without tanking their internet connection?)
- not to mention I'd have to handwrite a lot of text, and *then* either use OCR or type it all out again for accessibility. yeah, no thanks methinks.