| author | Alan Dipert
<alan@tailrecursion.com> 2026-11-12 01:38:56 UTC |
| committer | Alan Dipert
<alan@tailrecursion.com> 2026-11-12 01:38:56 UTC |
| parent | 47d188b66dc269a6825a26efa3415aac5921f89e |
| md/.htaccess | +2 | -1 |
| md/Home.md | +1 | -1 |
| md/Lisp.md | +1 | -1 |
| md/{ => Lisp}/MutableLocals.md | +1 | -1 |
diff --git a/md/.htaccess b/md/.htaccess index 15b416a..4c4c29e 100644 --- a/md/.htaccess +++ b/md/.htaccess @@ -1,3 +1,4 @@ DirectoryIndex Home.html -Redirect 301 /~alan/_MutableLocals.html /~alan/MutableLocals.html +Redirect 301 /~alan/_MutableLocals.html /~alan/Lisp/MutableLocals.html +Redirect 301 /~alan/MutableLocals.html /~alan/Lisp/MutableLocals.html diff --git a/md/Home.md b/md/Home.md index 2d5dfeb..a396563 100644 --- a/md/Home.md +++ b/md/Home.md @@ -33,7 +33,7 @@ What I am building now, followed by talks, papers, interviews, workshops, and ol | Date | Note | |:-----------|:-------------------------------------------------------------------------------------------------------------------------------------------| -| 2026-11-11 | [Mutable Locals in Clojure, the Hard Way](./MutableLocals.md): compiling mutable locals and jumps back into ordinary Clojure. | +| 2026-11-11 | [Mutable Locals in Clojure, the Hard Way](./Lisp/MutableLocals.md): compiling mutable locals and jumps back into ordinary Clojure. | | 2026-08-10 | Refined [TechWorks](./TechWorks.md) and [Open Source](./OpenSource.md) around current work and evidence-backed history. | | 2026-08-09 | Added [Open Source](./OpenSource.md), an evidence-backed catalog of software I created, maintained, revived, and contributed to. | | 2026-08-09 | Added [Recovered Technical Writing](./RecoveredTechnicalWriting.md), a curated guide to technical essays recovered from my old blog. | diff --git a/md/Lisp.md b/md/Lisp.md index d007d62..18a2a89 100644 --- a/md/Lisp.md +++ b/md/Lisp.md @@ -6,4 +6,4 @@ I have been interested in all things Lisp since around 2009, when I learned Cloj * [Lisp:GherkinHistory](./Lisp/GherkinHistory.md) provides context around an interpreter I wrote in 2013 that was extremely gratifying. * [Lisp:DestinationDrivenCompilation](./Lisp/DestinationDrivenCompilation.md) compares statement-context emission to destination-driven code generation for bracketed host languages. - +* [Mutable Locals in Clojure, the Hard Way](./Lisp/MutableLocals.md) explains how Blacktide compiles mutable locals and jumps into ordinary Clojure. diff --git a/md/MutableLocals.md b/md/Lisp/MutableLocals.md similarity index 96% rename from md/MutableLocals.md rename to md/Lisp/MutableLocals.md index 869b6d8..17f088f 100644 --- a/md/MutableLocals.md +++ b/md/Lisp/MutableLocals.md @@ -191,6 +191,6 @@ To interrupt a function before it returns, you can throw something. [flambard/ta [Farolero](https://github.com/IGJoshua/farolero) uses thrown signals too. A callback can jump out through intervening function calls, running `finally` cleanup along the way. This is a _nonlocal exit_. Farolero's [`tagbody`/`go` implementation](https://github.com/IGJoshua/farolero/blob/6dbd299d25b37d22370a3134541bc49bb5c41273/src/cljc/farolero/core.cljc#L144-L196) feeds those signals into a `loop`/`case` dispatcher and checks that an escape targets the right, still-active execution of `tagbody`. It also supplies `block`/`return-from`, all within a larger system of Common Lisp-style conditions and restarts: tools for reporting problems and choosing how to recover. -A jump that stays in one function gives the compiler another option. My [2020 JACL draft, §3.3.3](./documents/jacl-els-2020-draft.pdf#page=4) describes compiling Common Lisp's local `GO` operations into JavaScript's labeled `continue`. If all jumps to a `TAGBODY` are local, its generated `try`/`catch` disappears too. I later learned that [cxxxr's Valtan](https://github.com/cxxxr/valtan/blob/8d8ba20ded78f53502a6004609b29bb50872f866/library/valtan-core/compiler/hir-optimize.lisp#L237-L284) already optimized local jumps, and shortened the final paper accordingly. +A jump that stays in one function gives the compiler another option. My [2020 JACL draft, §3.3.3](../documents/jacl-els-2020-draft.pdf#page=4) describes compiling Common Lisp's local `GO` operations into JavaScript's labeled `continue`. If all jumps to a `TAGBODY` are local, its generated `try`/`catch` disappears too. I later learned that [cxxxr's Valtan](https://github.com/cxxxr/valtan/blob/8d8ba20ded78f53502a6004609b29bb50872f866/library/valtan-core/compiler/hir-optimize.lisp#L237-L284) already optimized local jumps, and shortened the final paper accordingly. That's the division of labor I'd want in a fuller `tagbody`: use Blacktide-style compilation wherever a jump can become ordinary control flow, and reserve exception unwinding for exits through function calls. Both paths still owe us our `finally` blocks. Blacktide currently sticks to its compiled region.