Compare commits

..

No commits in common. "c87662419a8805831aa65fd6e113debc5e53e734" and "0f8d05adebfe323908be487187d9afe6aaa2df36" have entirely different histories.

4 changed files with 3 additions and 54 deletions

View file

@ -1,10 +1,8 @@
% id = "01JDDE33S6T32XGTM21T6581Z5"
- overcoming [fear of the unknown][page:philosophy/fear-of-the-unknown], episode 1.
- overthinking my [furry][page:philosophy/furry] self again.
my heart is pounding.
% id = "01JDDE33S66AG2JQCBQT3GYACX"
- I play Blue Calx.
- as the first notes come in, I sense warm feeling, as if being hugged by someone.
@ -33,8 +31,6 @@
- the metronome starts fading away.
it really is going to be okay.
% id = "01JDDE33S606YTH6EXW70Y6YTB"
- thank you, Richard.
% id = "01JDDE33S61ZHW39ZZ03STAF6Z"
- my heart's still pounding, but hearing this track made me feel a little better about myself.

View file

@ -1,36 +1,5 @@
%% title = "what's going on inside the house? (a changelog)"
% id = "01JDDE4YE6RT06B7EC1R7KBTJH"
- *revision 13:* [virtual insanity](https://www.youtube.com/watch?v=4JkIs37a2JE){.secret}
% id = "01JDDE4YE6NQBA6Q0TJDEFHYQK"
- removed version history :cry:
% id = "01JDDE4YE6A70Q8WT8N3MVTK1G"
+ the quality of this feature was too low for my standards.
this was caused by the treehouse's codebase being one giant pile of spaghetti, onto which bolting a version history feature only caused more havoc :oh:
% id = "01JDDE4YE6Q6NY2NT12HY4Y510"
- if you've ever run across broken branch links, you can thank version history jank for that.
% id = "01JDDE4YE6VY4FWQ21H7X2VGQ4"
- I refactored treehouse (the software) to no longer generate files upfront!
instead, there's a _virtual file system_ from which the web server sources files.
% id = "01JDDE4YE6K43DMZZ9GGNYT5G6"
- this virtual file system, or at least [the part that assembles the page as it's served to you][vfs target], generates pages lazily---which causes my dev experience to be _faaaaaaaAAAAAAAAAAAAAAAAAAAA_
st
[vfs target]: https://src.liquidev.net/liquidex/treehouse/src/commit/0f8d05adebfe323908be487187d9afe6aaa2df36/crates/treehouse/src/generate.rs#L511
% id = "01JDDE4YE6RQH27JGPN28ZAJYC"
+ this generally doesn't mean anything for you, but for me... man, does the treehouse feel fast to edit now!
% id = "01JDDE4YE61YX8TC6NH1F0F2HF"
- generating all the page versions upfront meant I needed to wait over a second for the page to refresh, which made editing any minute details _really_ painful.
imagine I did all the previous layout refurnishment with that...
% id = "01JBWHXTMC7GZEMTH2WT7TN1GT"
- *revision 12:* refurnishment

View file

@ -1,24 +1,17 @@
%% title = "treehouse virtual file system design"
% id = "01JDDE33S14N7HWB2W1Z603K94"
- notes on the design; this is not an actual listing of the virtual file system
% id = "01JDDE33S1CXBQ9EB4ENYG3JNP"
- `content` - `GitDir(".", "content")`
% id = "01JDDE33S1G9B80CJDM09TG5MJ"
- `GitDir` is a special filesystem which makes all files have subpaths with commit data sourced from git.
their entries are ordered by how new/old a commit is
% id = "01JDDE33S11P6NP1NNMVF6EX52"
- `inner/<commit>` - contains the file content and a revision info fork
% id = "01JDDE33S1EK8JKHKVGXSR46HB"
- `inner/latest` - same but for the latest revision, if applicable.
this may be the working tree
% id = "01JDDE33S1X9GT32HCZE12455A"
- `template` - `PhysicalDir("template")`
% id = "01JDDE33S14FEG7XHBRCN3H8WM"
- `static` - `PhysicalDir("static")`

View file

@ -1,6 +1,6 @@
use std::{error::Error, fmt, future::Future, path::PathBuf};
use log::{debug, error, info};
use log::{error, info};
use tokio::task::JoinSet;
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
@ -36,35 +36,26 @@ impl Edit {
pub fn apply(self) -> impl Future<Output = Result<(), ApplyFailed>> + Send {
async {
match self {
Edit::NoOp => debug!("no op edit"),
Edit::NoOp => (),
Edit::Write(edit_path, content) => {
tokio::fs::write(&edit_path.path, &content)
.await
.inspect_err(|err| error!("write to {edit_path:?} failed: {err:?}"))
.map_err(|_| ApplyFailed)?;
debug!("wrote {} bytes to {edit_path:?}", content.len())
}
Edit::Seq(vec) => {
debug!("begin sequence of {} edits", vec.len());
for edit in vec {
Box::pin(edit.apply()).await?;
}
debug!("end sequence");
}
Edit::All(vec) => {
debug!("begin parallel {} edits", vec.len());
let mut set = JoinSet::new();
for edit in vec {
set.spawn(edit.apply());
}
while let Some(result) = set.join_next().await {
while let Some(result) = set.try_join_next() {
result.map_err(|_| ApplyFailed)??;
}
debug!("end parallel");
}
Edit::Dry(edit) => edit.dry(),
}