<script data-pm-proxy="intercept"></script><?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Programming Simplicity]]></title><description><![CDATA[Exploring simplicity in programming]]></description><link>https://programmingsimplicity.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png</url><title>Programming Simplicity</title><link>https://programmingsimplicity.substack.com</link></image><generator>Substack</generator><lastBuildDate>Wed, 02 Sep 2026 15:54:10 GMT</lastBuildDate><atom:link href="/__u/programmingsimplicity.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Paul Tarvydas]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[programmingsimplicity@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[programmingsimplicity@substack.com]]></itunes:email><itunes:name><![CDATA[Paul Tarvydas]]></itunes:name></itunes:owner><itunes:author><![CDATA[Paul Tarvydas]]></itunes:author><googleplay:owner><![CDATA[programmingsimplicity@substack.com]]></googleplay:owner><googleplay:email><![CDATA[programmingsimplicity@substack.com]]></googleplay:email><googleplay:author><![CDATA[Paul Tarvydas]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[TDPL, BUPL, and the Trade-Off We Never Revisited]]></title><description><![CDATA[2026-08-31]]></description><link>https://programmingsimplicity.substack.com/p/tdpl-bupl-and-the-trade-off-we-never</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/tdpl-bupl-and-the-trade-off-we-never</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Mon, 31 Aug 2026 20:50:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There&#8217;s an old, slightly obscure acronym worth resurrecting: <strong>TDPL</strong>, &#8220;Top-Down Parsing Language.&#8221; It was coined by Aho and Ullman in <em>The Theory of Parsing, Translation and Compiling</em>, describing formal work Alexander Birman had done a couple years earlier under the name &#8220;TMG Schema.&#8221; TDPL &#8212; and its generalization, GTDPL &#8212; modeled the kind of backtracking recursive-descent parser that programmers had already been writing by hand.</p><p>Most of the parsers we actually learned in school, though, came from the other direction. YACC and its descendants are bottom-up. There&#8217;s no equally catchy acronym for that lineage, so let&#8217;s coin one to match: <strong>BUPL</strong>, &#8220;Bottom-Up Parsing Language.&#8221; It&#8217;s a fair pairing, because the two approaches aren&#8217;t just different algorithms &#8212; they carve up the space of expressible languages differently. BUPL-style parsers are built to handle context-free grammars. TDPL-style parsers, as it turns out, are strictly more powerful: GTDPL can recognize some languages that aren&#8217;t context-free at all.</p><p>That gap is the part I want to dwell on.</p><p>Context-free grammars were never chosen because they were the natural shape of the languages we wanted to describe. They were chosen because they were the shape we could <em>analyze</em> &#8212; tractably, on 1960s and 70s hardware, with the theory available at the time. CFGs are a technology-driven compromise, not a human-driven one. The rules people actually want to express &#8212; &#8220;this identifier must already be declared,&#8221; &#8220;indentation determines scope,&#8221; &#8220;this word means something different depending on what came before it&#8221; &#8212; are context-sensitive by nature. We just got very good at designing around that fact, and then forgot it was a workaround.</p><p>TDPL-style parsing didn&#8217;t disappear; it resurfaced as <strong>packrat parsing</strong> and PEG (parsing expression grammar) technology. Packrat parsers take the old backtracking recursive-descent idea and make it linear-time by memoizing every partial match. The result is a parser that can express things a CFG struggles with &#8212; longest-match rules, syntactic predicates, lookahead-sensitive grammar &#8212; in a single, readable grammar, without the contortions BUPL grammars require to fake context sensitivity.</p><p>The reason packrat parsing lost the popularity contest for so long comes down to one word: <em>slow</em>. Naive backtracking parsing can blow up combinatorially, and memoizing every rule at every position isn&#8217;t free &#8212; it trades time for space, aggressively. In the 20th century, that trade was a real cost. Memory was precious; cycles were precious. &#8220;Slow&#8221; meant something concrete and often disqualifying.</p><p>But &#8220;slow&#8221; in the 21st century is a different animal. We routinely throw gigabytes of RAM and billions of cycles per second at problems that would have been unthinkable to solve this way fifty years ago. A packrat parser&#8217;s memory appetite, once a dealbreaker, is now a rounding error on a phone. The trade-off that justified CFGs and bottom-up parsing was a trade-off against <em>scarcity</em>. We&#8217;re not scarce anymore, at least not in the way that mattered when the decision was made.</p><p>So it&#8217;s worth asking, plainly: if the constraint that shaped our parsing technology has largely dissolved, why are we still defaulting to the grammar formalism that constraint produced? Context-sensitive, TDPL-style, packrat-flavored parsing isn&#8217;t a curiosity from before the field &#8220;matured&#8221; &#8212; it may be the more honest match for how humans actually express structure. We just needed the hardware to catch up to the idea. It has.</p><h1>References</h1><p><a href="https://en.wikipedia.org/wiki/Packrat_parser">packrat parsing</a></p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a><br><em>Notes and Back of the Napkin Scribbles</em>: <a href="https://github.com/guitarvydas/napkin-notes%5D">https://github.com/guitarvydas/napkin-notes</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/tdpl-bupl-and-the-trade-off-we-never/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/tdpl-bupl-and-the-trade-off-we-never/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/tdpl-bupl-and-the-trade-off-we-never?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/tdpl-bupl-and-the-trade-off-we-never?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Experiment — Projectional Viewer]]></title><description><![CDATA[2026-08-26]]></description><link>https://programmingsimplicity.substack.com/p/experiment-projectional-viewer</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/experiment-projectional-viewer</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 26 Aug 2026 15:37:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hhmN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Purpose</h2><p>Modern programming languages bury structure under implementation detail. The signal-to-noise ratio is too low &#8212; there&#8217;s too much <em>how</em> cluttering up the <em>what</em> &#8212; and that makes it hard to reason about anything beyond fairly simple problems.</p><p>This experiment asks whether implementation detail can be elided from code, rather than removed. The detail stays in the source; it&#8217;s just toggled out of view in the editor. The goal is a clearer picture of a solution&#8217;s structure, without having to wade through the mechanics of how that structure gets executed.</p><p>The immediate irritant was PEG (parsing expression grammar) libraries. I know grammars reasonably well, and most PEG implementations I&#8217;ve used smear the grammar itself under a layer of code for capturing and acting on matches during and after the parse. The grammar &#8212; the actual structure of what&#8217;s being recognized &#8212; disappears into the plumbing.</p><p>A full round-trip projectional editor, where you edit the elided view and it writes back to the source, is hard to build well. So this experiment settles for a one-way trip: elide the detail for reading, without trying to support editing the elided form. The question is whether that lesser goal is easy to reach and still worth having.</p><p>Underlying this is a way of treating a &#8220;grammar&#8221; as a DSL for pattern matching &#8212; one little language embedded in another. If eliding works here, it suggests a broader path: composing many small special-purpose languages into a single codebase, instead of forcing every concern through one general-purpose paradigm.</p><h2>Method</h2><p>I started from a small, real example: a phone-number grammar written in Rebol, implementation detail and all.</p><pre><code><code>parse "(416)555-1234" [
    "(" copy area 3 digits ")"
    copy exch 3 digits "-"
    copy line 4 digits
    (print rejoin [area "-" exch "-" line])
]</code></code></pre><p>The <code>copy area</code>, <code>copy exch</code>, <code>copy line</code>, and the trailing <code>(print rejoin ...)</code> block are all implementation detail &#8212; they&#8217;re about capturing values and doing something with them, not about the shape of a valid phone number. Stripped of that, the grammar itself is just:</p><pre><code><code>parse "(416)555-1234" [
    "(" 3 digits ")"
    3 digits "-"
    4 digits
]</code></code></pre><p>To get from one to the other automatically, I had Claude Sonnet 5 Code write an Emacs Lisp file, <code>pelide-view.el</code>, that shells the buffer (or region) out to a small pipeline built on T2T: an OhmJS parser followed by RWR rewrite semantics. The pipeline reads the annotated source and hands back the elided grammar, which the elisp code then displays back in the editor.</p><p>The grammar for the pipeline&#8217;s parser (<code>pelide.ohm</code>) and its rewrite rules (<code>pelide.rwr</code>) are in the appendix, as is the generated <code>pelide-view.el</code>. The rest of the code lives in the <a href="https://github.com/guitarvydas/rebol">github repo</a>.</p><p>Given the time available, I only ran this against the one example above. Whether it generalizes to messier grammars is an open question.</p><p>To reproduce it: eval and load <code>pelide-view.el</code>, load <code>ex.r</code> into Emacs, then hit <code>C-c p t</code>to toggle into the elided view, and again to toggle back.</p><h2>Observations</h2><p>The pipeline did what it was supposed to: it elided the <code>copy</code> clauses and the trailing action block, and left behind the bare grammar shown above. Toggling back and forth in Emacs worked as expected.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!hhmN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 424w, /__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 848w, /__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 1272w, /__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!hhmN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png" width="486" height="340" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/afebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:486,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 424w, /__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 848w, /__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 1272w, /__u/substackcdn.com/image/fetch/$s_!hhmN!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafebce7e-ce9b-4a0a-9245-0ec36a6c9219_486x340.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!HfrX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 424w, /__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 848w, /__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 1272w, /__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!HfrX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png" width="486" height="340" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:486,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 424w, /__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 848w, /__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 1272w, /__u/substackcdn.com/image/fetch/$s_!HfrX!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b748079-bab5-4602-9d1c-8f722ab2d013_486x340.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Under the hood, this is my T2T transmogrifier technology at work: OhmJS does the parsing, and a custom DSL I call RWR does the filtering, rewriting, and eliding. The result is handed back to Emacs for read-only viewing.</p><h2>Conclusions</h2><p>Even from this one example, the elided grammar reads better than the annotated original &#8212; it&#8217;s easier to see, at a glance, what pattern is actually being matched. That&#8217;s a good sign for the general idea.</p><p>It&#8217;s a small enough result that I&#8217;d want to try it against more grammars before drawing strong conclusions, but it seems worth pursuing. A natural next step would be writing elision grammars for other, more current PEG implementations &#8212; Lua&#8217;s and Janet&#8217;s come to mind.</p><p>This also suggests that using T2T as a filter is fast and usable enough on modern hardware &#8212; the lag when toggling is almost imperceptible. I don&#8217;t expect that to change as long as we keep the little languages little: there&#8217;s no need to write grammars for Turing-complete behemoths here, since small code snippets are all that&#8217;s required.</p><p>The experiment also points at a follow-on problem worth tackling: writing grammars that can detect the presence of elidable code within a larger file, rather than assuming the whole file is a single elidable unit.</p><h3>Further ideas: composing many little languages instead of one paradigm</h3><p>This experiment is one piece of a larger question: how do you let many small DSLs coexist inside a single project, instead of forcing everything through one general-purpose language?</p><p>One direction already underway is transmogrification rather than elision: writing in a small meta-language and generating standard target languages from it. The PBP kernel is built this way &#8212; three source files (<code>0d.rt</code>, <code>stock.rt</code>, <code>jit.rt</code>) written in the <code>.rt</code> meta-language, currently transmogrified into Python, JavaScript, and Common Lisp. The transmogrifier itself works (see the <a href="https://github.com/guitarvydas/pbp/tree/main/kernel">kernel repo</a> for details), but I haven&#8217;t yet run the projectional-viewing experiment against it.</p><p>A further-out direction is diagrammatic programming: generating code snippets from a diagrammatic programming language (DPL) rather than text. There are small, early examples of this using drawio &#8212; a <a href="https://github.com/guitarvydas/dtree">decision-tree repo</a> and a <a href="https://github.com/guitarvydas/sm-pbp">state-machine repo</a> &#8212; but again, the elision experiment hasn&#8217;t been done against them, and it isn&#8217;t even clear yet how drawio would couple to Emacs.</p><div><hr></div><h2>Appendix &#8212; Generated <code>pellide-view.el</code> Code</h2><pre><code><code>;;; pellide-view.el --- Shell out to PELLIDE for a condensed view -*-
;;; lexical-binding: t; -*-

(defgroup pellide-view nil
  "Shell buffer/region out to the PELLIDE tool for a condensed view."
  :group 'tools)

(defcustom pellide-view-command "pellide"
  "Shell command to run. Reads source on stdin, writes condensed view on stdout."
  :type 'string)

(defcustom pellide-view-command-args nil
  "Extra CLI args to pass to `pellide-view-command'."
  :type '(repeat string))

(defvar-local pellide-view--original nil
  "Buffer-local stash of the pre-toggle source, used by `pellide-view-toggle-in-place'.")

(defun pellide-view--run (text)
  "Pipe TEXT through `pellide-view-command'; return its stdout as a string."
  (with-temp-buffer
    (insert text)
    (let ((exit-code (apply #'call-process-region
                             (point-min) (point-max)
                             pellide-view-command t t nil
                             pellide-view-command-args)))
      (unless (zerop exit-code)
        (error "%s exited %s: %s" pellide-view-command exit-code (buffer-string)))
      (buffer-string))))

;;;###autoload
(defun pellide-view-region-or-buffer ()
  "Shell the region (or whole buffer) out to PELLIDE; show the result read-only
in a `*PELLIDE View*' side window. Non-destructive -- source buffer is untouched."
  (interactive)
  (let* ((text (if (use-region-p)
                    (buffer-substring-no-properties (region-beginning) (region-end))
                  (buffer-string)))
         (mode major-mode)
         (result (pellide-view--run text))
         (out-buf (get-buffer-create "*PELLIDE View*")))
    (with-current-buffer out-buf
      (let ((inhibit-read-only t))
        (erase-buffer)
        (insert result)
        (funcall mode)
        (setq buffer-read-only t)))
    (display-buffer out-buf
                     '((display-buffer-reuse-window display-buffer-in-side-window)
                       (side . right) (window-width . 0.5)))))

;;;###autoload
(defun pellide-view-toggle-in-place ()
  "Toggle the CURRENT buffer's text between source and PELLIDE's condensed view.
Destructive: only safe if you don't edit while in the condensed view --
PELLIDE is not assumed invertible, so toggling back just restores the stashed
original, discarding any edits made to the condensed text."
  (interactive)
  (if pellide-view--original
      (let ((orig pellide-view--original)
            (modified (buffer-modified-p)))
        (setq pellide-view--original nil)
    (setq buffer-read-only nil)
        (erase-buffer)
        (insert orig)
        (set-buffer-modified-p modified))
    (let ((orig (buffer-string))
          (modified (buffer-modified-p)))
      (erase-buffer)
      (insert (pellide-view--run orig))
      (setq buffer-read-only t)
      (setq pellide-view--original orig)
      (set-buffer-modified-p modified))))

(global-set-key (kbd "C-c p v") #'pellide-view-region-or-buffer)
(global-set-key (kbd "C-c p t") #'pellide-view-toggle-in-place)

(setq pellide-view-command "~/projects/rebol/pellide")

(provide 'pellide-view)</code></code></pre><h2>Appendix &#8212; T2T Grammar <code>pelide.ohm</code></h2><pre><code><code>pelide {
  main = "parse" spaces item spaces pGrammar spaces
  item = string | id
  string = "\"" (~"\"" any)+ "\""
  id = letter idtail*
  idtail = alnum
  pGrammar = "[" grammarItem+ "]"
  grammarItem =
    | space -- space
    | string -- string
    | copyItem -- copy
    | topLevelActionItem -- action
    | ~"[" ~"]" ~"(" ~")" ~"copy" ~space ~string any -- other
  topLevelActionItem = "(" spaces actionItem+ spaces ")"
  copyItem = "copy" spaces id spaces int? spaces id
  actionItem = 
    | "(" spaces actionItem+ spaces ")" -- recparen
    | "[" spaces actionItem+ spaces "]" -- recbrack
    | ~"]" ~"[" ~"(" ~")" ~"copy" any -- other
  int = digit+
}</code></code></pre><h2>Appendix &#8212; T2T Rewrite Rules <code>pelide.rwr</code></h2><pre><code><code>%rewrite pelide {
  main [_parse ws1 item ws2 pGrammar ws3] = &#8219;parse&#171;ws1&#187;&#171;item&#187;&#171;ws2&#187;&#171;pGrammar&#187;&#171;ws3&#187;&#8217;
  item [x] = &#8219;&#171;x&#187;&#8217;
  string [lq cs+ rq] = &#8219;&#171;lq&#187;&#171;cs&#187;&#171;rq&#187;&#8217;
  id [letter idtail*] = &#8219;&#171;letter&#187;&#171;idtail&#187;&#8217;
  idtail [alnum] = &#8219;&#171;alnum&#187;&#8217;
  pGrammar [lb item+ rb] = &#8219;&#171;lb&#187;&#171;item&#187;&#171;rb&#187;&#8217;
  grammarItem_space [s] =&#8219;&#171;s&#187;&#8217;
  grammarItem_string [s] =&#8219;&#171;s&#187;&#8217;
  grammarItem_copy [x] =&#8219;&#171;x&#187;&#8217;
  grammarItem_action [x] =&#8219;&#171;x&#187;&#8217;
  grammarItem_other [x] = &#8219;&#171;x&#187;&#8217;
  topLevelActionItem [lp ws1 A+ ws2 rp] = &#8219;&#8217;
  copyItem [_copy ws1 id ws2 int? ws3 id2] = &#8219;&#171;int&#187;&#171;ws3&#187;&#171;id2&#187;&#8217;
  actionItem_recparen [lp ws1 a+ ws2 rp] =&#8219;&#8217;
  actionItem_recbrack [lb ws2 a+ ws3 rb] =&#8219;&#8217;
  actionItem_other [x] =&#8219;&#8217;
  int [digit+] = &#8219;&#171;digit&#187;&#8217;
}</code></code></pre><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a><br><em>Notes and Back of the Napkin Scribbles</em>: <a href="https://github.com/guitarvydas/napkin-notes%5D">https://github.com/guitarvydas/napkin-notes</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/experiment-projectional-viewer?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/experiment-projectional-viewer?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/experiment-projectional-viewer/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/experiment-projectional-viewer/comments"><span>Leave a comment</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Simplicity Is in the Eye of the Beholder]]></title><description><![CDATA[2026-08-18]]></description><link>https://programmingsimplicity.substack.com/p/simplicity-is-in-the-eye-of-the-beholder</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/simplicity-is-in-the-eye-of-the-beholder</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Fri, 21 Aug 2026 14:03:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#8220;General Purpose Languages&#8221; promise to make programming easier by covering every case. What they actually do is force everyone, regardless of what they&#8217;re building, to adopt the same pile of complexity &#8212; instead of letting each of us go looking for the simplicity that actually fits our problem. I don&#8217;t think that&#8217;s an accident of language design. I think it&#8217;s what happens when you forget that &#8220;simple&#8221; was never one thing to begin with.</p><h1>What Is Simplicity?</h1><p>Ask most engineers what &#8220;simple&#8221; means and you&#8217;ll get some version of &#8220;easy to understand&#8221; or &#8220;not complicated.&#8221; That&#8217;s circular &#8212; it just restates the word. Here&#8217;s a sharper definition, one that actually does work: <strong>simplicity is a lack of nuance.</strong></p><p>That sounds backwards. We&#8217;re trained to admire nuance. A &#8220;nuanced&#8221; argument is a sophisticated one; a nuanced understanding is a deep one. But nuance is also where complexity hides. Every special case, every &#8220;well, except when,&#8221; every extra rule bolted on to handle one more scenario &#8212; that&#8217;s nuance accumulating. A system with a lot of nuance is a system with a lot of surface area for things to go wrong, and a lot of surface area a newcomer has to learn before they can be trusted with it.</p><p>But there&#8217;s a second, harder truth sitting underneath the first one: simplicity isn&#8217;t a property of the thing itself. It&#8217;s a property of the thing <em>relative to what you&#8217;re trying to do with it</em>. Simplicity is in the eye of the beholder.</p><p>If you&#8217;re an accountant, a spreadsheet is about as simple as tools get &#8212; rows, columns, formulas, done. But if you&#8217;re trying to analyze a program for self-consistency and correctness, a spreadsheet stops being simple the moment you try to use it for that job. It doesn&#8217;t have the nuance to represent the edge cases correctness analysis actually needs, so you end up bolting nuance on by hand until it can &#8212; at which point it&#8217;s not the simple tool you started with anymore.</p><p>The same split shows up in language design. If you&#8217;re trying to invent a new software system, garbage collection is a genuine boon &#8212; it lets you stop thinking about low-level memory management and put your attention on the design instead, and deep type checking mostly gets in your way while you&#8217;re still figuring out what you&#8217;re building. But if you&#8217;re production-engineering that system afterward &#8212; dotting every i, crossing every t, squeezing real efficiency out of the design &#8212; the opposite is true. Now you want to get rid of generalized garbage collection in favor of memory management tuned to exactly this project, and you want as much type checking as you can get, because that&#8217;s what catches the edge cases before they ship. A language that makes deep type checking effortless is &#8220;simple&#8221; for that job. A language that lets you manipulate memory in excruciating detail, while still checking that every operation is self-consistent and safe, is &#8220;simple&#8221; for that job too &#8212; a different job, a different simplicity.</p><p>Physics has a name for this kind of move: much-greater-than (<code>&gt;&gt;</code>) analysis. You look at a system, decide which effects dominate in the regime you actually care about, and drop everything that&#8217;s small by comparison. It&#8217;s how you get a spherical cow: an idealization that&#8217;s genuinely useful for the question in front of you, and genuinely wrong the moment you forget it was only ever an idealization of one regime. The discipline isn&#8217;t in finding the simplification &#8212; it&#8217;s in remembering which domain it&#8217;s valid for, and knowing that you&#8217;ll eventually need to superimpose several such simplifications, each valid in its own regime, to get back something closer to the full picture.</p><p>I think we&#8217;ve largely forgotten that our dominant notation for programming &#8212; the functional one &#8212; is exactly this kind of simplification. It was built for a specific regime: analyzing programs, proving things about them, reasoning about what they compute. It was not built for designing them, and it was not built for controlling machines. Most of what we actually mean by &#8220;programming,&#8221; in practice, is writing software that controls a machine &#8212; I/O, timing, hardware, concurrency, the physical world leaking in at the edges &#8212; and that&#8217;s a domain the functional simplification was never valid for. We inherited the <code>&gt;&gt;</code> analysis, forgot it was one, and started treating a tool for analyzing programs as though it were the definition of what a program is.</p><h1>Examples of Simplicity</h1><p>With that caveat in front of you &#8212; that every example below is simple <em>for a purpose</em>, not simple in some absolute sense &#8212; here are some cases where someone found the edges of a domain and built a notation that fit only inside them.</p><p><strong>UNIX</strong> made this move at the level of the whole operating system. Devices, pipes, sockets, regular data on disk &#8212; wildly different things &#8212; all get normalized to one kind of object: a file, addressed through a file descriptor. You don&#8217;t need a special API for talking to a printer versus reading a config versus piping output from one program into another. It&#8217;s all <code>read()</code> and <code>write()</code> on a descriptor. That single normalization is why shell pipelines work at all, and it&#8217;s a textbook case of stripping nuance out of an interface until only one shape is left.</p><p><strong>Forth Haiku</strong> shows the same move at a much smaller scale. A few lines of dense, unglamorous Forth notation can expand into a hundred lines of GLSL shader code. The notation is small because it says exactly what needs to be said and nothing else &#8212; the complexity of the output is real, but it isn&#8217;t paid for in the complexity of the source.</p><p><strong>Forth</strong> itself and <strong>Lisp 1.5</strong> both make this trade at the language-design level: an almost absurdly small set of primitives (words and a stack in Forth&#8217;s case, s-expressions and a handful of special forms in Lisp&#8217;s) that compose into everything else. Neither language tries to have a construct for every situation. They have one or two constructs and trust you to build the rest.</p><p><strong>BNF</strong>, and its descendant eBNF, do for grammars what UNIX did for I/O: instead of describing &#8220;how to parse this particular language,&#8221; they give you one small notation for describing <em>any</em> string-matching grammar. Once you know BNF, you can read the shape of a language you&#8217;ve never seen before, because the notation for describing structure is separated from the structure itself.</p><p><strong>CPU opcodes</strong> are simplicity imposed on physics. Underneath every instruction is a genuine rat&#8217;s nest of electronics &#8212; gates, latches, timing &#8212; but the opcode gives you one normalized unit of action (&#8220;add these two registers&#8221;) instead of asking you to reason about the rat&#8217;s nest directly. It&#8217;s the same move UNIX makes with files: pick one small vocabulary and hide the mess behind it.</p><p><strong>Feynman diagrams</strong> did this for particle physics. Before them, interactions were described with sprawling functional equations. Feynman gave physicists a small set of lines and vertices that could be composed like a notation, and the diagrams could be read and manipulated almost visually instead of algebraically. Complicated interactions became combinations of a few simple pictures.</p><p><strong>K&amp;R C</strong>, compared to the ANSI C that came after it, is a smaller and blunter language. It defined every routine as a &#8220;function,&#8221; full stop, and it shipped with a type-checking model that was good enough to build real systems software without trying to be good enough for everything. It didn&#8217;t cover every case. That was the point &#8212; it covered <em>enough</em> cases, and refused the temptation to keep adding nuance to cover the rest.</p><p>UNIX itself makes the point sharper. It wasn&#8217;t invented in C &#8212; it was invented in assembler, and stayed that way until Version 4 rewrote the kernel in C in 1973. Assembler was &#8220;simple enough&#8221; for inventing the core of an operating system; K&amp;R C came later, as a step toward production-engineering and extending what the original, simpler constructs had already proven out. Ivan Sutherland&#8217;s Sketchpad tells the same story from computer graphics &#8212; also built in assembler, also invented rather than production-engineered. Asked how he&#8217;d managed to build the first interactive graphics program, the first non-procedural programming language, and the first object-oriented software system in a single year, Sutherland said, &#8220;Well, I didn&#8217;t know it was hard.&#8221; Assembler was &#8220;simple&#8221; for what he was doing &#8212; not because it had fewer nuances than a high-level language would have, but because inventing didn&#8217;t yet need the nuances a high-level language exists to manage.</p><p><strong>Prolog</strong>, and relational programming generally, buys simplicity of expression at a real cost: you describe relationships instead of steps, and the language figures out how to satisfy them, at the cost of runtime performance. Simplicity, here, is a trade of your cognitive load for CPU cycles &#8212; not a free lunch, just a different bill.</p><p><strong>Children&#8217;s LEGO blocks</strong> are maybe the purest physical example. There&#8217;s exactly one type of connector &#8212; a round peg of fixed dimensions &#8212; and every block uses it. No block is tightly coupled to any other specific block; anything connects to anything. That single, boring, unglamorous decision is why a five-year-old can build things an engineer would call &#8220;extensible&#8221; without ever hearing the word.</p><p><strong>Multi-stage computation</strong> &#8212; pipelines where each stage does one thing and does it well &#8212; applies the same idea to how we structure programs, not just interfaces. When a stage only has to do one job, the person writing it can actually think about that job deeply, instead of splitting their attention across five concerns and reaching for workarounds to keep them from tangling.</p><h1>Examples of Anti-Simplicity</h1><p>The failure mode isn&#8217;t &#8220;trying and failing to be simple.&#8221; It&#8217;s usually nuance creeping in disguised as generality &#8212; someone reaching to cover every domain at once instead of admitting which one they&#8217;re actually in.</p><p><strong>Overuse of the functional paradigm</strong> is the clearest case. Forcing every problem into the shape of a mathematical function creates workarounds wherever the problem doesn&#8217;t naturally fit that shape, and a lot of real problems don&#8217;t. This isn&#8217;t an accident of language design; it&#8217;s a hangover from using CPUs to automate <em>mathematics</em> first, and programming second. Most languages are built around &#8220;functions&#8221; even though the CPUs underneath them don&#8217;t implement functions at all &#8212; you need extra code just to turn a subroutine into something that behaves like one. We inherited a nuance we didn&#8217;t have to have.</p><p><strong>User-defined types</strong> are another. Machines fundamentally have only a couple of types &#8212; a bit, and a pointer to a bit, optimized into bytes for convenience. Every user-defined type is a new layer of invented structure sitting on top of that, and each layer needs its own type-checking rules. It&#8217;s nuance stacked on nuance, and it&#8217;s why type systems keep growing more elaborate instead of settling down.</p><p><strong>Using &#8220;functions&#8221; to describe asynchronous parts</strong> is the sharpest case, because it&#8217;s a category error dressed up as convenience. A function call is synchronous by nature &#8212; the caller blocks and waits for the callee to answer. Asynchronous parts are, definitionally, not that. Describing async behavior with a synchronous vocabulary doesn&#8217;t just add nuance &#8212; it adds nuance that actively lies about how the system behaves.</p><p><strong>BNF</strong>, held up above as a genuine simplification, is also a cautionary tale in how a simplification gets captured by one purpose and then mistaken for having only that purpose. Almost immediately after BNF appeared, its main use became building the same kind of thing over and over: niggly, bottom-up, over-burdened parser state machines that are &#8220;simple&#8221; only if your job is shipping production-quality parsers. That&#8217;s a narrow reading of a notation good for a lot more than that &#8212; specifying string matchers for programming-tool development, for instance, matching recursive text structures in ways plain regular expressions can&#8217;t easily reach. PEG &#8212; formalized by Bryan Ford in the mid-2000s, with OhmJS a well-known later implementation &#8212; finally gave recursive-descent, top-down parsing a first-class alternative to BNF&#8217;s bottom-up habits, but even PEG is still mostly discussed as competition for production parser generators, not as a door into a different way of building programming tools altogether.</p><p><strong>Operating systems</strong> are the anti-simplicity example that&#8217;s easiest to miss, because we&#8217;ve stopped being able to imagine programming without one. Step back far enough, though, and the concept isn&#8217;t actually necessary &#8212; early gaming systems are a working proof of that. A game cartridge plugged into hardware that had no operating system on it at all, and none of the complicated, brittle fluff that comes bundled with a modern OS was needed to make that work.</p><p>The original intent was reasonable: supply common libraries of code so program development goes faster. But instead of building those libraries the way LEGO blocks are built, joined through one small interchangeable connector instead of welded tightly to each other, we built them inside the functional paradigm, and got a huge ball of over-coupled functionality that ships to every user whether they need 2% of it or 90%, and gets cherry-picked at runtime. Instead of production-engineering individual applications, we kept adding nuance and complication to the libraries themselves, hoping a big enough general-purpose pile of code could solve every production problem in advance. And because the functional paradigm was never suited to expressing asynchronous operation or the composition of programs in the first place, that pile keeps growing without closing the gap &#8212; getting closer to the asymptote, never reaching it.</p><p>Operating systems genuinely make software development simpler, and that part is worth keeping. Where the reasoning breaks down is the next step: shipping that same sprawling, general-purpose pile whole-hog to every end user&#8217;s machine. Underneath the megabytes and gigabytes, an operating system is mostly a much more complicated replacement for hardware that used to be a rotary switch or a game cartridge &#8212; simpler to use, simpler to reason about, and not carrying around code for every possibility it will never be asked to serve.</p><p>GPUs are one production-engineering answer to a simple problem: how do you provide a lump of code for every pixel on a screen? Maybe the simpler answer &#8212; in hardware and in software &#8212; would have been one small CPU, with its own private memory, per pixel.</p><h1>How Do You Teach Simplicity?</h1><p>I don&#8217;t know yet.</p><p>What I notice, looking back over the examples above, is that they all seem to come from the same place: <a href="https://guitarvydas.github.io/2022/05/25/Programming-First-Principles-Thinking.html">first-principles thinking</a> &#8212; refusing to solve a problem with the first niggly fix that comes to mind, and instead asking what the smallest true thing underneath it actually is, <em>for the regime you&#8217;re actually in</em>.</p><p>In my first physics course at university, before we were allowed to solve a single problem, we were taught to invent notations for the problem domain &#8212; essentially small, purpose-built DSLs &#8212; and only then start reasoning inside them. That&#8217;s <code>&gt;&gt;</code> analysis again, just applied to notation instead of forces: decide what regime you&#8217;re in, build the smallest language that&#8217;s valid there, and don&#8217;t pretend it generalizes further than it does.</p><p>I don&#8217;t have a tidy answer for how you teach that skill. Pattern-matching a problem to its right regime seems to take taste as much as method. But I&#8217;m fairly sure teaching it starts by refusing the premise I opened with &#8212; that one notation, sufficiently general, could ever replace it.</p><p>I&#8217;ve written about this before, if you want to keep pulling on the thread:</p><ul><li><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cows-of-programming?r=1egdky">The Spherical Cows of Programming</a></p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/the-wrong-spherical-cow-first-principles?r=1egdky">The Wrong Spherical Cow &#8212; First Principles of Parts Based Programming</a></p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cow-we-forgot-we-were?r=1egdky">The Case for Composable Notations (1 of 5) The Spherical Cow We Forgot We Were Riding</a></p></li></ul><h1>References</h1><p><a href="https://www.theregister.com/on-prem/2025/12/23/unix-v4-tape-successfully-recovered/2701023">Unix V4 Tape Successfully Recovered</a><br><a href="https://forthsalon.appspot.com/">Forth Haiku Salon</a><br><a href="/__u/programmingsimplicity.substack.com/p/what-ive-learned-from-forth-haiku?r=1egdky">What I&#8217;ve Learned From Forth Haiku Thus Far</a> (see, also, the substack listed below for articles related to Forth Haiku)<br>OhmJS</p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/simplicity-is-in-the-eye-of-the-beholder/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/simplicity-is-in-the-eye-of-the-beholder/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/simplicity-is-in-the-eye-of-the-beholder?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/simplicity-is-in-the-eye-of-the-beholder?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Macros With OhmJS]]></title><description><![CDATA[2026-08-12]]></description><link>https://programmingsimplicity.substack.com/p/macros-with-ohmjs</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/macros-with-ohmjs</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Thu, 13 Aug 2026 02:50:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mntW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>grammar</h2><pre><code><code>macro {
  main = stuff+
  stuff = 
    | applySyntactic&lt;HamburgerAndFries&gt; -- macro
    | any -- other
  HamburgerAndFries = "hamburger" "and" "fries"
}</code></code></pre><p>&#8220;ApplySyntactic&lt;&#8230;&gt;&#8221; is unique to OhmJS. A capitalized rule skips spaces automagically. You can&#8217;t use a syntactic rule (capitalized) within a lexical rule (non-capitalized) unless you specify <code>applySyntactic&lt;...&gt;</code>.</p><p>The parser looks for &#8220;hamburger and fries&#8221; with any number of spaces and newlines in between the words - i.e. a syntactic rule.</p><h2>test</h2><pre><code><code>a b c hamburger and bacon d e f hamburger and fries g h i</code></code></pre><p>This test shows that &#8220;hamburger and bacon&#8221; is rejected as a macro pattern . The parser sees only &#8220;hamburger and fries&#8221; as a macro pattern. Everything else is a &#8220;stuff_other&#8221;, parsed character by character - wildly inefficient by 20th century standards, but quite reasonable using 21st century hardware. (Not reasonable for production code, but, macros are used for development code, wherein the definition of &#8220;efficiency&#8221; is different from what we&#8217;ve been led to believe by 20th century biases)</p><p>What happens to the macro match depends on the semantics code attached to that grammar rule (&#8220;stuff_macro&#8221;). The simplest thing to do is to simply rewrite it as a different string. That&#8217;s what T2T (using <code>.rwr</code> rules) does&#8230;</p><h2>ohm-editor</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!mntW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 424w, /__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 848w, /__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 1272w, /__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!mntW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png" width="1456" height="726" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1829e09-9601-473f-887f-27cebe1032b6_1712x854.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:726,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 424w, /__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 848w, /__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 1272w, /__u/substackcdn.com/image/fetch/$s_!mntW!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1829e09-9601-473f-887f-27cebe1032b6_1712x854.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>Appendix - T2T</h1><p>T2T is one of the tools in the PBP toolkit &#8212; once you install PBP, you have access to T2T.</p><h1>Appendix RWR</h1><p>RWR is part of T2T. This is the <a href="https://github.com/guitarvydas/pbp/blob/main/t2td/doc/rwr/RWR%20Spec.pdf">specification for RWR</a></p><h1>Appendix - PBP</h1><p><a href="https://github.com/guitarvydas/pbp">PBP tools</a></p><h1>Appendix - Further About PBP</h1><p><a href="https://www.youtube.com/watch?v=IFcIptdG2sY&amp;list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards Parts Based Programming</a><br><a href="https://www.youtube.com/watch?v=EFTzFA82YRc&amp;list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP cookbook playlist</a><br><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYhpvWSvJNJdrsZE8lNHza7">Decision Tree Diagram Transmogrifier</a><br><a href="https://www.youtube.com/watch?v=ecJGkrpUhQQ&amp;list=PLHh2_dCKBPjZEvCymkt1ZVualP7gt3e1O&amp;index=17">State Machine Diagram Tool</a></p><p><a href="https://github.com/guitarvydas/fdd-llm">FDD LLM - 5 Whys Tool - code repository</a><br><a href="https://github.com/guitarvydas/sm-pbp">State Machine Tool - code repository</a><br><a href="https://github.com/guitarvydas/dtree">Decision Tree Tool - code repository</a><br><a href="https://github.com/guitarvydas/pbp">PBP all tools (PBP, T2T, das2json)</a></p><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cows-of-programming">The Spherical Cows of Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-wrong-spherical-cow-first-principles?r=1egdky">The Wrong Spherical Cow - First Principles of Parts Based Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cow-we-forgot-we-were?r=1egdky">The Case For Composable Notations (1 / 5) - The Spherical Cow We Forgot We Were Riding</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations?r=1egdky">The Case For Composable Notations (2 / 5) - The Restrictions That Came With The Cow</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-e6c?r=1egdky">The Case For Composable Notations (3 / 5) - State Isn&#8217;t The Enemy</a> <a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-2bd?r=1egdky">The Case For Composable Notations (4 / 5) - Ease of Expression Is the Whole Point</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-f31?r=1egdky">The Case For Composable Notations (5 / 5) - UNIX Already Showed Us the Way</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-0d3?r=1egdky">The Case For Composable Notations (6 / 5) - WIP - Notations in Progress</a><br># See Also</p><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/macros-with-ohmjs/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/macros-with-ohmjs/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/macros-with-ohmjs?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/macros-with-ohmjs?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Skipping With OhmJS]]></title><description><![CDATA[2026-08-12]]></description><link>https://programmingsimplicity.substack.com/p/skipping-with-ohmjs</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/skipping-with-ohmjs</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Thu, 13 Aug 2026 02:24:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!3CZs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>grammar</h2><pre><code><code>skip {
  main = stuff+
  stuff = 
    | "(" stuff* ")" -- recursive
    | ~"(" ~")" any -- other
}</code></code></pre><h2>test</h2><pre><code><code>function foo (bar, baz) {
  xyz;
  f(g(1,h(2)),99);
}</code></code></pre><h2>ohm-editor</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!3CZs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 424w, /__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 848w, /__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 1272w, /__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!3CZs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png" width="1456" height="726" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:726,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 424w, /__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 848w, /__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 1272w, /__u/substackcdn.com/image/fetch/$s_!3CZs!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11e39b8b-f03a-4781-a628-f0751cae7894_1712x854.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/skipping-with-ohmjs/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/skipping-with-ohmjs/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/skipping-with-ohmjs?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/skipping-with-ohmjs?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Preventing the Collapse of Civilization]]></title><description><![CDATA[2026-08-11]]></description><link>https://programmingsimplicity.substack.com/p/preventing-the-collapse-of-civilization</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/preventing-the-collapse-of-civilization</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 12 Aug 2026 19:26:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A comment from a non-programmer family member sent me back to Jonathan Blow&#8217;s lecture, <a href="https://www.youtube.com/watch?v=ZSRHeXYDLko">Preventing the Collapse of Civilization</a>. Watching it again, I found myself nodding along to most of the same points as before, e.g.</p><ul><li><p>abstraction leads to complication not simplification<br></p><ul><li><p>&#8220;&#8230; [32:24] but somewhere through this chain it becomes wrong and that that&#8217;s how people are wrong a lot of the times right like you start out by being right and then you extrapolate it too far into wrong territory &#8230;&#8221;</p></li></ul></li><li><p>the majority of modern programmers don&#8217;t know how CPUs work<br></p><ul><li><p>&#8220;[33:11] I certainly don&#8217;t know what the CPU is doing in response to the code that I&#8217;ve written&#8221;</p></li></ul></li><li><p>technology does not automatically improve</p></li><li><p>software is in decline</p></li><li><p>software has been free-riding on hardware<br></p><ul><li><p>software technology, itself, has not improved for quite a while</p></li><li><p>so I would characterize software as having small local technological improvements like machine learning with overall inertia or degradation in the rest of the field and we&#8217;re very impressed by the improvements</p></li><li><p>we simply don&#8217;t expect software to work anymore</p></li><li><p>if you&#8217;re using a program and it does something wrong you&#8217;re just like yeah it&#8217;s software restart it whatever and that didn&#8217;t used to be and if our standards are shrinking over time how low can they shrink before it becomes unsustainable</p></li></ul></li><li><p>Five 9&#8217;s<br></p><ul><li><p>four nines would be ninety-nine point nine nine whatever and we don&#8217;t use this anymore I think in part because the number of nines would be going down and we can&#8217;t make it go up again and [&#8230;] certain parties don&#8217;t seem to care</p></li><li><p>IMO correct code does not imply correct design</p></li></ul></li><li><p>&#8220;if you haven&#8217;t seen an entire industry produce robust software for decades what makes you think they actually can&#8221;</p></li><li><p>&#8220;[34:01] but programmers are not more productive now than they used to be in fact it looks to me like productivity [34:08] per programmer is approaching zero&#8221;</p></li><li><p>&#8220;[36:31] (Kernighan) programmers aren&#8217;t productive these days like that and everybody laughs but it&#8217;s funny but it&#8217;s not funny&#8221;</p></li><li><p>&#8220;LSP Is The Devil&#8221;</p></li><li><p>&#8220;[57:26] counterpoint to this and what if we just let software get really complicated and then just make an AI that understands it [57:32] and that&#8217;s fine and it&#8217;s like okay maybe but you really want human beings to not be able to understand software it&#8221;</p></li><li><p>&#8220;Q: [58:40] my way of thinking changed don&#8217;t you think that tools they somehow [58:46] force us to think in the certain type of way and for you making a new language as a somehow to break through this &#8230; A: [58:55] &#8230; I I think I would agree with that and I would also [59:00] say though you know because we think with tools often unnecessary complications or bugs in the tools [59:07] interfere with the thought process right like you&#8217;re in flow you&#8217;re doing stuff and then something bad happens and &#8230;&#8221;</p></li></ul><p>Here&#8217;s where I diverge: I think we&#8217;ve backed ourselves into a corner by writing software in a brittle paradigm &#8212; the functional paradigm &#8212; and then treating it as the only legitimate way to build anything. That assumption pushes us toward bad designs, and we paper over the mismatch with workarounds (&#8220;epicycles&#8221;) that force fundamentally non-functional operations into a functional shape.</p><p>We got here due to false advertising about C. C is a functional programming language (albeit, not sufficiently anal retentive). C is not &#8216;close to the hardware&#8217;. K&amp;R C was close to PDP-7 hardware, but not to other, non-PDP CPU architectures. UNIX was written in assembler, not C. When UNIX was rewritten in C (V4 UNIX), it was written in a language called K&amp;R C, not ANSI C. K&amp;R C was a tool that helped programmers to create boilerplate assembler code suitable for implementing UNIX. K&amp;R C had #asm. ANSI C is a different language - it emphasizes portability to architectures that are not similar to PDP style architectures. ANSI C should not be called &#8220;C&#8221;.</p><p>The <a href="https://www.reddit.com/r/EngineeringPorn/comments/ul49zt/the_original_pong_video_game_had_no_code_and_was/">1972 version of Atari Pong</a> fits on one page of paper. A <a href="https://www.youtube.com/watch?v=jZqYXSmgDuM">Lua version of Pong</a> looks nothing like that original design, mostly because the design has been warped to fit into a functional mold.</p><p>Work on theorem proving builds better theorem provers but does not imply better, more reliable software in general. Only a small class of people want to prove theorems. Most people don&#8217;t care about this ability nor about research in this direction. A program is not a theorem. A program is a set of instructions that direct a dumb machine to perform various actions, often seen as useful to humans. Humans reading a program should be able to understand exactly what the architect had intended the machine to do - if the readers have to theorize about the program, then the DI (Design Intent) has not been clearly stated. This is a problem - trying to solve the problem by using a programming notation that straddles both domains (instructing a machine, expressing DI) isn&#8217;t working as we&#8217;d hoped. I&#8217;m experimenting with black box notation (which I call PBP) to see if the box structure and wiring between boxes is more informative to humans while the innards of the boxes provide methodical instructions to machines.</p><p>You can&#8217;t use software functions like black boxes. A function delivers control flow as well as data to the receiver and the function must block itself waiting for a result from the receiver. This is strong coupling and is the antithesis of how black boxes (aka LEGO blocks) work.</p><p>We need to be researching simplicity not how to add more complexity.</p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/preventing-the-collapse-of-civilization/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/preventing-the-collapse-of-civilization/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/preventing-the-collapse-of-civilization?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/preventing-the-collapse-of-civilization?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Opinions About Compiler Building]]></title><description><![CDATA[2026-08-12]]></description><link>https://programmingsimplicity.substack.com/p/opinions-about-compiler-building</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/opinions-about-compiler-building</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 12 Aug 2026 09:40:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My random opinions about compiler building in the 21st century based on 30+ years of software consulting. I think of language design and compiler-building as two different things. One should actually avoid building <em>compilers</em> in the 21st century - we have enough compilers already. There&#8217;s always room for new languages, though. (In fact, I favour languages that use something better than characters for syntax, but, I digress&#8230;)</p><p>(Caveat: some of the links below point to experimental code, I write more about this stuff in my substack articles, blog, YouTube (all listed below))</p><ul><li><p>prototype the language and play with it first</p><ul><li><p>use OhmJS to whip together a parser</p><ul><li><p>OhmJS is based on PEG technology which makes it easy to write grammars</p></li><li><p>use Ohm-editor (part of the OhmJS package) - it&#8217;s essentially a REPL for grammar writing that shows parse trees (CSTs), it saves a lot of time up front</p></li><li><p>when satisfied, you can re-code the grammar using whatever other technology you deem is necessary (e.g. Pratt parsing, whatever)<br></p><ul><li><p>writing the code twice (or more) is more efficient than starting out dealing with implementation issues right off the bat</p></li></ul></li><li><p>the easiest part of building a compiler is writing a parser (and scanner if you use something other than PEG), but, it&#8217;s been formalized and therefore discussed more often than the hard parts</p></li></ul></li><li><p>you can build an MVI (Minimum Viable Implementation) of a language by transpiling code written in the language to some already existing language (e.g. Python, Javascript, etc.)<br></p><ul><li><p>I favour using a text-to-text transmogrifier (&#8220;transpiler&#8221;) like the T2T stuff in <a href="https://github.com/guitarvydas/pbp">Parts Based Programming</a></p></li><li><p>Steve Philips invented a new language <a href="https://revolutionize.dev/">Voltair</a> by transpiling Voltair code into Go code. I think that he used an LLM to build the transpiler.</p></li><li><p>Alan Kay is on record saying that new languages should use existing languages as &#8220;assembler&#8221;</p></li></ul></li></ul></li><li><p>type checking is best expressed as a relational program</p><ul><li><p>use something like Prolog or one of its descendants</p></li><li><p>use triples only, don&#8217;t bother with the OO extensions to Prolog<br></p><ul><li><p>a triple is <code>relation(subject,object)</code></p></li><li><p>you can code up your own exhaustive search inferencer based on <a href="https://www.t3x.org/prolog6/">Nils Holm&#8217;s Prolog in Scheme code</a> or my <a href="https://github.com/guitarvydas/js-prolog">automated port</a> of it to Javascript, but why bother? Write it first in Prolog (or &#8230;), then when satisfied re-code it in something else</p></li></ul></li><li><p>type checking is much harder and more involved than parsing, start by expressing the rules in relational form and getting the rules right before calcifying implementation details</p></li></ul></li><li><p>when doing code emission, emit &#8220;dumb&#8221; code first, then clean it up with a peepholer as described in <a href="https://www.researchgate.net/publication/220404697_The_Design_and_Application_of_a_Retargetable_Peephole_Optimizer">Fraser/Davidson</a> or <a href="https://books.google.ca/books/about/An_Orthogonal_Model_for_Code_Generation.html?id=X0OaMQEACAAJ&amp;redir_esc=y">Cordy&#8217;s OCG</a> (GCC uses RTL, IMO, Cordy&#8217;s OCG is even better)</p><ul><li><p>go for simplicity first, make code emission easy, then tighten up later after measurements prove which parts need to be tightened up</p></li></ul></li><li><p>Holt et al, invented <a href="https://dl.acm.org/doi/10.1145/24039.24051">Data Descriptors</a> - a way to normalize all data into the same form, which then makes things like allocation easy to think about</p></li><li><p>I favour a UNIX-y pipeline approach - use multiple stages, each written in a language that is better suited to each particular problem, e.g. Ohm for parsing, Prolog for type checking, Cordy&#8217;s MISTs for portability, etc.</p></li><li><p>making a compiler blazing fast and efficient is a different problem from creating a language, Production Engineers should worry about efficiency, but these issues should not impose themselves on the initial design, MVI of a language</p></li><li><p>first, write an interpreter for the language, and only then tighten up efficiency by building a compiler for the language</p></li><li><p>a compiler / language is just a really big program that takes a long time to implement</p></li><li><p>Javascript or Lisp are pretty good IRs (Intermediate Representation), LLVM is overkill and complicated, Python is good but it&#8217;s indentation-based syntax is painful to generate (I &#8220;solve&#8221; this problem by generating code in a meta-python (Python with braces instead of indentation) then use a small (40 lines of JS) program to replace brace-bracketed code with properly indented code)</p></li><li><p>what we &#8220;know&#8221; about compiler-building is based on crufty old ideas from the 20th century, we have better tools and machines today and we should be able to do better</p><ul><li><p>my <a href="https://www.youtube.com/watch?v=emTYAFU0rJU&amp;list=PLnOtrEC4-PpkacN3fJVVyOHte-2Ke9Yrg&amp;index=5">PBP kernel</a>] (&#8220;multi-tasking&#8221;, &#8220;coroutining&#8221;) (especially <code>0d.rt</code>, <code>stock.rt</code>, <code>jit.rt</code>) is written in a meta-language <code>.rt</code> that generates the kernel in multiple languages (Python, JS, CL - it can do more, but I ran out of interest)</p></li></ul></li></ul><h1>Appendix - T2T</h1><p>T2T is one of the tools in the PBP toolkit &#8212; once you install PBP, you have access to T2T.</p><h1>Appendix RWR</h1><p>RWR is part of T2T. This is the <a href="https://github.com/guitarvydas/pbp/blob/main/t2td/doc/rwr/RWR%20Spec.pdf">specification for RWR</a></p><h1>Appendix - PBP</h1><p><a href="https://github.com/guitarvydas/pbp">PBP tools</a></p><h1>Appendix - Further About PBP</h1><p><a href="https://www.youtube.com/watch?v=IFcIptdG2sY&amp;list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards Parts Based Programming</a><br><a href="https://www.youtube.com/watch?v=EFTzFA82YRc&amp;list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP cookbook playlist</a><br><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYhpvWSvJNJdrsZE8lNHza7">Decision Tree Diagram Transmogrifier</a><br><a href="https://www.youtube.com/watch?v=ecJGkrpUhQQ&amp;list=PLHh2_dCKBPjZEvCymkt1ZVualP7gt3e1O&amp;index=17">State Machine Diagram Tool</a></p><p><a href="https://github.com/guitarvydas/fdd-llm">FDD LLM - 5 Whys Tool - code repository</a><br><a href="https://github.com/guitarvydas/sm-pbp">State Machine Tool - code repository</a><br><a href="https://github.com/guitarvydas/dtree">Decision Tree Tool - code repository</a><br><a href="https://github.com/guitarvydas/pbp">PBP all tools (PBP, T2T, das2json)</a></p><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cows-of-programming">The Spherical Cows of Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-wrong-spherical-cow-first-principles?r=1egdky">The Wrong Spherical Cow - First Principles of Parts Based Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cow-we-forgot-we-were?r=1egdky">The Case For Composable Notations (1 / 5) - The Spherical Cow We Forgot We Were Riding</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations?r=1egdky">The Case For Composable Notations (2 / 5) - The Restrictions That Came With The Cow</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-e6c?r=1egdky">The Case For Composable Notations (3 / 5) - State Isn&#8217;t The Enemy</a> <a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-2bd?r=1egdky">The Case For Composable Notations (4 / 5) - Ease of Expression Is the Whole Point</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-f31?r=1egdky">The Case For Composable Notations (5 / 5) - UNIX Already Showed Us the Way</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-0d3?r=1egdky">The Case For Composable Notations (6 / 5) - WIP - Notations in Progress</a></p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/opinions-about-compiler-building/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/opinions-about-compiler-building/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/opinions-about-compiler-building?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/opinions-about-compiler-building?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Stop Confusing Languages With Compilers]]></title><description><![CDATA[2026-07-17]]></description><link>https://programmingsimplicity.substack.com/p/stop-confusing-languages-with-compilers</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/stop-confusing-languages-with-compilers</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Fri, 17 Jul 2026 22:29:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most programmers treat &#8220;language&#8221; and &#8220;compiler&#8221; as the same thing. Say &#8220;I built a new language&#8221; and people hear &#8220;I built a new compiler&#8221; &#8212; parser, type checker, code generator, the works. Months of effort, before you&#8217;ve written a single line in the thing.</p><p>I don&#8217;t think that&#8217;s right, and untangling the two ideas changes what&#8217;s possible.</p><p>A language is just a notation. It&#8217;s a way of writing down a problem so you can think about it more clearly &#8212; nothing more mystical than that. A compiler is a separate piece of machinery: code that takes a notation and turns it into instructions a CPU can run. We&#8217;ve bundled them together for so long that it&#8217;s easy to forget they&#8217;re doing different jobs. One is about human thought. The other is about machine execution.</p><p>Once you pull them apart, a question follows naturally: can you build a new language in a fraction of the time it takes to build a language <em>and</em> a full compiler for it? I think the answer is yes, and it&#8217;s yes by a wide margin. There are a few ways to get there.</p><h2>Markdown for code</h2><p>The first way is to treat a new language the way markdown treats formatted text: a thin, readable notation that gets translated into something else, rather than compiled from scratch down to machine code. That&#8217;s what I was exploring in <a href="/__u/programmingsimplicity.substack.com/p/experiment-separating-architecture?r=1egdky">Separating Architecture From Code</a> and <a href="/__u/programmingsimplicity.substack.com/p/implementing-the-experimental-st?r=1egdky">Implementing The Experimental ST Meta-Syntax</a>, using a tool called T2T. The new language isn&#8217;t compiled in the traditional sense &#8212; it&#8217;s transformed. You get the benefit of a purpose-built notation without paying the traditional cost of a purpose-built compiler.</p><p>There&#8217;s a second idea worth pulling out of that markdown comparison, beyond just &#8220;lightweight notation.&#8221; Markdown lets you nest headings &#8212; <code>#</code>, <code>##</code>, <code>###</code> &#8212; so a document can be collapsed down to its top-level outline or expanded to full detail, depending on what the reader needs. I think code notations can do the same thing: present a system in layers that can be elided or drilled into, rather than as one flat wall of implementation. That has real consequences for onboarding. Instead of a new team member reading an entire codebase to understand it, they could read the top layer to get the architecture, then descend a layer at a time into whatever part they actually need to touch. People could understand a given architecture and its implementation down to whatever level of detail they care to delve into, and no further.</p><h2>Explain it to an LLM</h2><p>The second way is more recent, and honestly a bit strange to say out loud: describe your new language to an LLM, in plain language, and have it generate code from any source written in that notation. No parser to write, no grammar to formalize up front, no code generator to hand-tune. You explain the rules the way you&#8217;d explain them to a new hire, and the model does the translation.</p><p>To my understanding, this is roughly what Steve Phillips did with <a href="https://revolutionize.dev/posts/voltair/">Voltair</a>, a new language he&#8217;s been designing. At least in the early stages, he had Voltair source transpiled into Go rather than building a traditional compiler for it first &#8212; letting the language&#8217;s design settle before investing in dedicated compiler machinery.</p><p>This is where the language/compiler split really pays off, and it pays off regardless of which route you take. Whether you&#8217;re using something like T2T to transform a notation into another form, or an LLM that&#8217;s been told how your notation works, the cost of inventing a new language drops from months to hours.</p><h2>Nobody has to like the target language</h2><p>Here&#8217;s the part that trips people up. A lot of programmers dislike JavaScript for the same reasons they dislike assembler or C &#8212; verbose, error-prone, full of sharp edges. That dislike is real, and it&#8217;s earned. But it stops mattering the moment a machine, not a human, is the one writing the JavaScript.</p><p>We tend to judge languages by a single standard: does it prevent and catch the kinds of bugs humans make? That&#8217;s exactly the right standard when a human is going to sit down and type the code. It&#8217;s close to irrelevant when a machine is generating it. A &#8220;good&#8221; target language for generated code has a completely different set of criteria: syntax that&#8217;s easy to generate mechanically, and enough semantic flexibility that you&#8217;re not fighting the language&#8217;s opinions &#8212; GOTOs included, if that&#8217;s what the generator needs to produce. That last point actually narrows the field: neither JavaScript nor WASM supports raw GOTOs, while C and assembler do, since both are built around structured control flow rather than arbitrary jumps. That&#8217;s a real constraint on which target language makes sense for a given generator. Sometimes the deciding factor is even more mundane: you need to hook into something that only speaks a specific language. OhmJS, for instance, requires its semantic actions to be written in JavaScript (WASM support has recently arrived). If your generated code needs to talk to OhmJS, JavaScript stops being a matter of taste and becomes a matter of plumbing.</p><p>Once you separate &#8220;language good for humans to write&#8221; from &#8220;language good for machines to generate,&#8221; the reflexive dislike of JS or C or assembler just stops being relevant to half the conversation.</p><h2>Little languages, on purpose</h2><p>Little languages exist to make it easier for humans to work out solutions to specific problems &#8212; that&#8217;s the whole point of a domain-specific notation. If we accept that generating a little language is now cheap, it opens the door to a different way of building software altogether.</p><p>I call these project-specific notations SCNs &#8212; Solution Specific Notations &#8212; and I think a single project can reasonably contain many of them, each shaped around a particular slice of the problem rather than one general-purpose language stretched to cover everything.</p><p>The usual objection is that designing and implementing a language is hard &#8212; genuinely, historically hard. But look at where that difficulty actually comes from. From the language-builder&#8217;s side, yes, compilers are complicated machines. But from the language-<em>user&#8217;s</em> side, the difficulty is different: it&#8217;s that learning a new, general-purpose language tends to mean learning something big and overly complicated, because general-purpose languages have to cover every use case anyone might ever have. If the languages we asked people to learn weren&#8217;t so sprawling and so generalized &#8212; if each one only had to cover the one small problem it was built for &#8212; we might be a lot more willing to pick up a new little language every time we needed one. That objection made complete sense as long as &#8220;new language&#8221; meant &#8220;new compiler&#8221; and &#8220;compiler&#8221; meant &#8220;months of general-purpose language design.&#8221; But if a plethora of small, specialized, low-cost languages is actually within reach &#8212; sketched out with something like T2T, or handed to an LLM with a short explanation &#8212; then the complexity argument stops being a wall and starts being a leftover assumption from a different era of tooling.</p><p>That&#8217;s the shift I&#8217;m interested in: not one language to rule a whole project, but as many small ones as the problem actually calls for, each one cheap enough that inventing it isn&#8217;t a decision you have to agonize over.</p><h1>Appendix - T2T</h1><p>T2T is one of the tools in the PBP toolkit &#8212; once you install PBP, you have access to T2T.</p><h1>Appendix RWR</h1><p>RWR is part of T2T. This is the <a href="https://github.com/guitarvydas/pbp/blob/main/t2td/doc/rwr/RWR%20Spec.pdf">specification for RWR</a></p><h1>Appendix - PBP</h1><p><a href="https://github.com/guitarvydas/pbp">PBP tools</a></p><h1>Appendix - Further About PBP</h1><p><a href="https://www.youtube.com/watch?v=IFcIptdG2sY&amp;list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards Parts Based Programming</a><br><a href="https://www.youtube.com/watch?v=EFTzFA82YRc&amp;list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP cookbook playlist</a><br><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYhpvWSvJNJdrsZE8lNHza7">Decision Tree Diagram Transmogrifier</a><br><a href="https://www.youtube.com/watch?v=ecJGkrpUhQQ&amp;list=PLHh2_dCKBPjZEvCymkt1ZVualP7gt3e1O&amp;index=17">State Machine Diagram Tool</a></p><p><a href="https://github.com/guitarvydas/fdd-llm">FDD LLM - 5 Whys Tool - code repository</a><br><a href="https://github.com/guitarvydas/sm-pbp">State Machine Tool - code repository</a><br><a href="https://github.com/guitarvydas/dtree">Decision Tree Tool - code repository</a><br><a href="https://github.com/guitarvydas/pbp">PBP all tools (PBP, T2T, das2json)</a></p><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cows-of-programming">The Spherical Cows of Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-wrong-spherical-cow-first-principles?r=1egdky">The Wrong Spherical Cow - First Principles of Parts Based Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cow-we-forgot-we-were?r=1egdky">The Case For Composable Notations (1 / 5) - The Spherical Cow We Forgot We Were Riding</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations?r=1egdky">The Case For Composable Notations (2 / 5) - The Restrictions That Came With The Cow</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-e6c?r=1egdky">The Case For Composable Notations (3 / 5) - State Isn&#8217;t The Enemy</a> <a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-2bd?r=1egdky">The Case For Composable Notations (4 / 5) - Ease of Expression Is the Whole Point</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-f31?r=1egdky">The Case For Composable Notations (5 / 5) - UNIX Already Showed Us the Way</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-0d3?r=1egdky">The Case For Composable Notations (6 / 5) - WIP - Notations in Progress</a></p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/stop-confusing-languages-with-compilers/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/stop-confusing-languages-with-compilers/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/stop-confusing-languages-with-compilers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/stop-confusing-languages-with-compilers?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Simplification and Two Kinds of Code]]></title><description><![CDATA[2026-07-16]]></description><link>https://programmingsimplicity.substack.com/p/simplification-and-two-kinds-of-code</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/simplification-and-two-kinds-of-code</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Thu, 16 Jul 2026 11:25:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Simplification has its benefits. Sometimes it&#8217;s the whole point.</p><p>I built a little DSL &#8212; a Solution Centric Notation, or SCN, my name for a small language aimed at one specific problem rather than general-purpose programming. I called this one &#8220;RWR,&#8221; and I leaned on three simplifications to make it:</p><ul><li><p>Make it easy to transpile to an existing language, like JavaScript, instead of writing a real compiler.</p></li><li><p>Use only strings as the data model &#8212; no arrays, no objects, no user-defined structures.</p></li><li><p>Lean on <code>eval()</code> during development, which gives you most of the benefit of a compiler with a fraction of the ceremony.</p></li></ul><p>RWR solves one narrow problem. OhmJS, the parser generator I was using, expects you to write its &#8220;semantics&#8221; actions &#8212; the code that runs when a grammar rule matches &#8212; in JavaScript. We usually can&#8217;t see the forest for the trees. Rewriting text is a simple problem, but we&#8217;re tempted to reach for all the overkill a general-purpose language makes available anyway, just because it&#8217;s sitting right there.</p><p>The point here is that we&#8217;ve overcomplicated our own problems by trying to generalize, by trying to produce general-purpose languages. By thinking about only what&#8217;s needed to successfully generate SCNs, I discovered I only needed strings and a handful of simple string operations. Those operations are a subset of what&#8217;s available in most modern programming languages, so it was like cherry picking &#8212; choose the minimal subset of what would actually be useful, and ignore the rest of the complications that have accreted onto programming languages over time.</p><p>So RWR is a tiny notation for expressing rewrites as string operations &#8212; raw characters plus interpolation &#8212; and nothing else.</p><p>The trick is how it gets executed. A tool I called T2T calls OhmJS twice: once to transmogrify RWR source into JavaScript, and once to <code>eval()</code> that generated JavaScript into real semantics actions and run OhmJS again on the actual source. Two grammars, one <code>eval()</code>, bolted together. The whole T2T implementation came to about 26 lines plus 33 lines of supporting code, written in roughly an hour and a half.</p><p>That last detail is the part worth dwelling on, because it&#8217;s not really about RWR.</p><p>Code like this &#8212; quick, narrow, string-only, held together with <code>eval()</code> &#8212; is not production quality by any reasonable definition. But that&#8217;s the wrong yardstick. In the 21st century we have the luxury of writing at least two kinds of code:</p><ul><li><p>Code for production release.</p></li><li><p>Code purely to speed up our own development workflow.</p></li></ul><p>Different customers, different lifespans, different acceptable failure modes.</p><p>That wasn&#8217;t always an option. In the 20th century, CPU cycles and memory were expensive enough that almost all code had to justify itself against one yardstick: will this run efficiently and reliably for years. Under that constraint, &#8220;quick and disposable&#8221; wasn&#8217;t a real category. That economic pressure shaped what we assumed code had to be &#8212; including the assumption that all programming languages must operate synchronously and sequentially, like a CPU executing instructions one at a time. It&#8217;s so deep it barely feels like an assumption.</p><p>But it isn&#8217;t the only substrate, even historically. Prolog and relational programming lean on backtracking to search for solutions instead of dictating steps. Forth has its own calling convention built around an explicit stack. Atari&#8217;s Pong, in 1972, ran as discrete logic gates in massive asynchronous parallelism &#8212; no clock ticking through instructions, just circuits reacting to each other at once. &#8220;Synchronous and sequential&#8221; was always a choice, made for good reasons at the time, never the only option.</p><p>Once you accept that some code only has to serve you, for a short time, to save you effort, you stop needing that code to look like production code or run the way production code runs. RWR and T2T are a small example: a DSL held together with interpolation and <code>eval()</code>, built in ninety minutes, whose only job was to save me from writing JavaScript by hand. Bad way to build a shipped product. Exactly the right way to build a tool for myself, this week, for this problem. The tool was, indeed, built quickly, but I&#8217;ve been fruitfully using it for years.</p><p>The broader move is to notice how many other &#8220;assumed&#8221; constraints are leftover 20th-century economics, and ask what changes if you loosen them &#8212; not just for what you ship, but for the string-matching tools, ASTs, and little SCNs you build purely to make your own next project faster. We can afford better shovels now, and the shovels don&#8217;t have to be cathedrals.</p><h1>Appendix - T2T</h1><p>T2T is one of the tools in the PBP toolkit &#8212; once you install PBP, you have access to T2T.</p><h1>Appendix RWR</h1><p>RWR is part of T2T. This is the <a href="https://github.com/guitarvydas/pbp/blob/main/t2td/doc/rwr/RWR%20Spec.pdf">specification for RWR</a></p><h1>Appendix - PBP</h1><p><a href="https://github.com/guitarvydas/pbp">PBP tools</a></p><h1>Appendix - Further About PBP</h1><p><a href="https://www.youtube.com/watch?v=IFcIptdG2sY&amp;list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards Parts Based Programming</a><br><a href="https://www.youtube.com/watch?v=EFTzFA82YRc&amp;list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP cookbook playlist</a><br><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYhpvWSvJNJdrsZE8lNHza7">Decision Tree Diagram Transmogrifier</a><br><a href="https://www.youtube.com/watch?v=ecJGkrpUhQQ&amp;list=PLHh2_dCKBPjZEvCymkt1ZVualP7gt3e1O&amp;index=17">State Machine Diagram Tool</a></p><p><a href="https://github.com/guitarvydas/fdd-llm">FDD LLM - 5 Whys Tool - code repository</a><br><a href="https://github.com/guitarvydas/sm-pbp">State Machine Tool - code repository</a><br><a href="https://github.com/guitarvydas/dtree">Decision Tree Tool - code repository</a><br><a href="https://github.com/guitarvydas/pbp">PBP all tools (PBP, T2T, das2json)</a></p><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cows-of-programming">The Spherical Cows of Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-wrong-spherical-cow-first-principles?r=1egdky">The Wrong Spherical Cow - First Principles of Parts Based Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cow-we-forgot-we-were?r=1egdky">The Case For Composable Notations (1 / 5) - The Spherical Cow We Forgot We Were Riding</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations?r=1egdky">The Case For Composable Notations (2 / 5) - The Restrictions That Came With The Cow</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-e6c?r=1egdky">The Case For Composable Notations (3 / 5) - State Isn&#8217;t The Enemy</a> <a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-2bd?r=1egdky">The Case For Composable Notations (4 / 5) - Ease of Expression Is the Whole Point</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-f31?r=1egdky">The Case For Composable Notations (5 / 5) - UNIX Already Showed Us the Way</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-0d3?r=1egdky">The Case For Composable Notations (6 / 5) - WIP - Notations in Progress</a></p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/simplification-and-two-kinds-of-code/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/simplification-and-two-kinds-of-code/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/simplification-and-two-kinds-of-code?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/simplification-and-two-kinds-of-code?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Implementing The Experimental ST Meta-Syntax]]></title><description><![CDATA[2026-07-13]]></description><link>https://programmingsimplicity.substack.com/p/implementing-the-experimental-st</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/implementing-the-experimental-st</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Tue, 14 Jul 2026 14:04:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!LnR9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Creating a new language no longer implies that you have to write a full-blown compiler, too.</p><p>As a follow-on to a <span>previous </span><a href="/__u/programmingsimplicity.substack.com/p/experiment-separating-architecture?r=1egdky">article</a><span> on</span> architectural comments, this 80-minute, Twitch-like <a href="https://youtu.be/IKzClQ1auWU">video</a> shows how easy it is to implement new meta-syntaxes over top of existing programming languages.</p><p>Starting with a fresh working directory, the PBP toolset is cloned (mostly for its inclusion of the T2T tools). The Ohm-editor is used to rough-in a grammar and to examine the resultant parse tree in a REPL-like manner. Then, the grammar and rewrite rules are iteratively improved until valid Python (and Javascript) are produced.</p><p>We strictly focus only on <code>test.st</code>. This allows the implementation process to proceed quickly and to leverage on the capabilities of existing compilers. If one concedes that<code>test.st</code> represents an interesting view of a part of an architecture (the Tiny PBP kernel in this case), then this video shows how to map that meta-syntax into valid Python and Javascript while, hopefully, making the Design Intent (DI) of this portion of the kernel more clear to readers.</p><p>A highlight of this technique is that it is possible to use T2T and OhmJS to &#8220;skip&#8221; over code. With this trick, you don&#8217;t need to write grammar rules for every millimetre of a language. T2T (Ohm, PEG, recursive descent) parses in a top down manner, whereas LR tools like YACC work in a bottom-up manner. The bottom-up approach needs a scanner that tokenizes everything and the associated grammar must then handle every combination in an excruciatingly detailed manner that takes a lot of development effort. The top-down approach lets you skip over text that you don&#8217;t want to deal with. This makes it possible to write little &#8220;skins&#8221; to wrap around existing languages - you don&#8217;t have to parse all of the existing language bits - you can just skip over other-language code.</p><p>T2T (text to text transmogrification) works in two stages<br>1. parse<br>2. rewrite.</p><p>This means that the same grammar (step 1. parse, above) can be used to create different rewriters for multiple target languages. In fact, PBP encourages this multiple back end approach, as seen in this snippet from the PBP kernel directory:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!LnR9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 424w, /__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 848w, /__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 1272w, /__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!LnR9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png" width="1456" height="1029" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1029,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 424w, /__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 848w, /__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 1272w, /__u/substackcdn.com/image/fetch/$s_!LnR9!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff158dd1b-2bdd-4e1f-9e63-e6ad6a59b083_1962x1386.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>whereas simply using shell scripts - as is done in the example herein - doesn&#8217;t encourage the multiple back end approach (it can still be done using scripts, but it doesn&#8217;t naturally suggest this kind of approach).</p><p>Unlike with REGEX, top-down parsing can be used to write recursive rules, so this trick can be used to drill down into nested languages (which, say, use brace brackets, etc.).</p><p>Most modern programming languages use a line-oriented syntax, whereas Lisp uses a recursive syntax. Top-down parsing makes it easier to write recursive grammar rules (as opposed to the eBNF and Kleene-star stuff that we&#8217;ve become used to) for handling Lisp. Maybe we can invent more recursive-syntax languages and notations? A notation only needs to map onto hardware CPUs, it does not necessarily need to mimic CPU operational characteristics, like most modern programming languages do today.</p><p>[disclaimer: <code>test.st</code> is only an isolated snippet of code and DI. It has not yet been bench-tested, hence, this example might contain errors. The point of this video is only to show a technique for implementing meta-syntaxes.]</p><h1>Appendix</h1><p><a href="https://github.com/guitarvydas/st">st meta-syntax github</a><br><a href="https://github.com/guitarvydas/pbp">PBP tools github repository</a> (the PBP tools include T2T)<br><a href="https://github.com/guitarvydas/tinypbp">tinypbp (WIP)</a></p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/implementing-the-experimental-st/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/implementing-the-experimental-st/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/implementing-the-experimental-st?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/implementing-the-experimental-st?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Experiment - Separating Architecture From Code]]></title><description><![CDATA[2026-07-10]]></description><link>https://programmingsimplicity.substack.com/p/experiment-separating-architecture</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/experiment-separating-architecture</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Sun, 12 Jul 2026 15:56:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!MJeS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Highlights</h2><ul><li><p>invention of a trivial architectural meta-syntax (DI - Design Intent)</p></li><li><p>dynamic scoping for text-based languages to eliminate some function parameters</p></li><li><p><code>@proc</code> == <code>proc ()</code> procedure call syntax, no arguments, probable side-effects</p></li><li><p>images in comments</p></li><li><p>architecture is for humans, code is for machines</p></li></ul><h2>Accompanying Video</h2><p><a href="https://youtu.be/y39p1fm8mcY">video</a></p><h2>Introduction</h2><p>I think that software architecture is more important than code.</p><p>This is an experiment for a simple way to include architectural descriptions in code.</p><p>In essence, this is just a psychological trick. I split &#8220;comments&#8221; into two classes on the basis that a programmer/architect might be more inclined to explain <em>why</em> one is writing code to control a computer vs. <em>how</em> the written code is supposed to accomplish the purpose.</p><p>The two classes of comments are:<br>1. architectural comments<br>2. code comments</p><p>We already have code comments in all programming languages. Code comments tend to be used in an overloaded manner - sometimes they are comments about the architecture and sometimes they are about the code.</p><p>We can add architectural comments by layering a meta-syntax over top of existing languages with a layer of meta-code using T2T tools (text-to-text transmogrification: parse the meta-code text, then rewrite it into existing languages, i.e. by treating existing programming languages as &#8220;assembler&#8221;).</p><p>In addition, I think that it is important to present architecture in successive layers. We can do this by using something akin to a markdown syntax. I have chosen (arbitrarily) to use the unicode character &#8220;&#8901;&#8221; in the same way that markdown uses ASCII &#8220;#&#8221;. A top-level architectural comment is prefixed by a single &#8220;&#8901;&#8221;. The next most important comment is prefixed by &#8220;&#8901;&#8901;&#8221; (two markers). And so on.</p><p>I&#8217;ve chosen to use a markdown-like syntax for including images in architectural comments, such as <code>![punt][200](tpbp-punt.drawio.svg)</code> where the <code>[200]</code>represents the width, on a per-image basis, of the displayed SVG image.</p><p>My choices for this architectural comment syntax is arbitrary. Others might wish to change and improve it.</p><p>For this experiment, I prompted Claude to create <em>elisp</em> functions to use with my emacs editor.</p><p>The resulting display of the meta-code in my editor can be seen in the below screenshots and in the video.</p><p>The repository, listed below, contains an <code>elisp/</code> subdirectory containing the generated elisp code.</p><p>The code in the video - <code>test.st</code> - can be transmogrified into Python and Javascript using the PBP toolset (namely T2T). I hope to create a twitch-like video of how I do this. The working transmogrifier code is in a github repository (see appendix).</p><p>If it&#8217;s not obvious, this is just a beginning, some brainstorming. I hope that it inspires better ideas.</p><p>Below is the script for the video.</p><h1>Script</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!MJeS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 424w, /__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 848w, /__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 1272w, /__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!MJeS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;title&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="title" title="title" srcset="/__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 424w, /__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 848w, /__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 1272w, /__u/substackcdn.com/image/fetch/$s_!MJeS!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00f7bceb-4464-4e07-910a-ee2d611a6042_1920x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">title</figcaption></figure></div><p>This is an experiment on separating architecture from code. Comments and suggestions welcome.</p><p>In my mind, code is just a building material, system architecture is more interesting than code.</p><p>In this video, I&#8217;ll just show a simple technique for writing an architectural description and how to browse it in layers.</p><p>Then we can look at the code to see how it maps to the Design Intent (DI) of the architect.</p><p>I imagine that in the future we might invent several more precise languages to describe architecture with, like the Parts Based Programming (PBP) stuff I describe elsewhere, but, for this video we&#8217;ll just use English and some SVG pictures.</p><div><hr></div><p>[show M-0 code only view of test.st]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!bGAk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!bGAk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!bGAk!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb29b29e6-b47c-45a4-8863-b5484ef223f9_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>What does this code do?</p><p>To figure that out, we have become used to reading the code and reverse-engineering why the architect wrote the code that way.</p><div><hr></div><p>I&#8217;ve been trying to re-create the reference version of the Parts Based Programming (PBP) kernel.</p><p>I&#8217;m inventing a meta-language on the fly that is intended to emit Python code, and to emit code in other languages like Javascript, Odin, etc. The meta-language is like Python with braces along with a few keywords that begin with <code>$</code> and <code>@</code>. You don&#8217;t need to understand the meta-language at this point. I only want to show how to use layers to describe an architecture by spiralling into it in a layered manner.</p><p>I&#8217;ve been writing comments in ASCII text to explain what&#8217;s going on, and what the meta-code is meant to accomplish, but it would be easier to explain in stages and to use diagrams.</p><p>I am drawing SVG diagrams using drawio and I&#8217;ve asked Claude to write elisp code to elide code and comments based on key bindings.</p><div><hr></div><p>[display M-1 view] Here&#8217;s an interim snippet of meta code. The algorithm that I want to describe is called<code>container-handler</code>. It takes one parameter <code>self</code> that&#8217;s defined elsewhere.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!NacI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!NacI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/afb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!NacI!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb42f8d-6c07-4e97-99cf-3d5a566c937e_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p>[M-2]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!yACu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!yACu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!yACu!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7c35014-e403-4f82-8659-04c8b8700dfe_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At level 2, we describe the <em>purpose</em> of this function.</p><p>We are writing the algorithm for how to handle parts that are composed of other parts.</p><p>This is kind of like lisp lists that contain other lists.</p><div><hr></div><p>[M-3]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!6lAU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!6lAU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!6lAU!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0d48c5a-b9e2-462f-8542-14f871bab3c8_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At layer 3, I say more about the algorithm.</p><p>First we punt the incoming message down to children parts.</p><p>Then, we cycle and step the innards of this container until all internal events have subsided.</p><p>I use the word <code>mevent</code> here to mean an event which causes a reaction - a message event.</p><div><hr></div><p>[M-4]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!xv6M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!xv6M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!xv6M!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dbf45b2-8097-43db-bd65-2a7d7827c432_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At level 4, I choose to show red arrows for how to punt mevents down to children.</p><p>The interesting point here is that one incoming mevent is copied twice and fanned out to two inner children.</p><p>I think that the diagram shows what is happening better than words.</p><div><hr></div><p>[M-5]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Bz6b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Bz6b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Bz6b!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9a684a0-2123-4ab5-a901-87427ae450ad_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At the next level, I say that the algorithm <em>steps until quiescense</em></p><p>and show what I mean in the next level down</p><div><hr></div><p>[M-6]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!brlY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!brlY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/138d5158-c917-4e71-8b9d-542faca005a7_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!brlY!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138d5158-c917-4e71-8b9d-542faca005a7_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The diagram shows that the incoming mevent caused a reaction from two inner parts which then sent two more mevents which then generated two more mevents which got fanned into the output of the composite part.</p><p>Again, the diagram says this better than my words.</p><div><hr></div><p><code>[M-0] [M-0]</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!pLpu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!pLpu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!pLpu!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54db3da9-5a55-4097-b71b-55eb46a3f32b_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here, I&#8217;ve hit the key to show all architectural comments with code embedded within them.</p><div><hr></div><p>[M-0]</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!bWHD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!bWHD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png" width="903" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 424w, /__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 848w, /__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 1272w, /__u/substackcdn.com/image/fetch/$s_!bWHD!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83e6c1da-06a2-497a-8809-b027f6c299f9_903x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And here, I hit the toggle key to turn off all architectural comments, showing only the code.</p><p>We already saw this code at the beginning of this presentation, but now we have a better idea of why the code was written this way.</p><p>If I wanted to study the code some more, I could continue to hit hot keys to turn on various architectural layers as needed.</p><h1>Appendix - Code Repositories</h1><p><a href="https://github.com/guitarvydas/st">st repository</a> example <code>test.st</code> including code generators to Python and JS (see README.md) <a href="https://github.com/guitarvydas/tinypbp">tiny pbp repository</a> - WIP (work in progress) re-writing the PBP kernel in<code>.st</code>form</p><p>The <code>st-mode</code> elisp code used in this experiment is contained in the <code>elisp/</code> subdirectory of the <code>st</code> repository. I included the generated elisp code in my init.el, and turn it on with <code>M-x st-mode</code> on a per-buffer basis.</p><h1>Appendix - References and Further Reading</h1><p>The Parts Based Programming (PBP) toolset contains T2T as one of the tools: <a href="https://github.com/guitarvydas/pbp">PBP all tools (PBP, T2T, das2json)</a></p><p>The tools are already included in the <code>st</code> repository mentioned above.</p><h1>Appendix - Dynamic Scoping</h1><p>The generated code includes boilerplate code for creating several stack data structures - one stack for <code>container</code> objects and a separate stack for <code>cause</code> objects. The point of this example is to demonstrate techniques - you don&#8217;t need to understand what <code>containers</code>and <code>causes</code> are, to understand how to use these techniques. These objects are just constructs required for describing the full architecture from which <code>test.st</code> was copied (the &#8220;tiny pbp&#8221; architecture).</p><p>In most modern programming languages, we would use pass-through parameters instead of these stacks, i.e parameters that get passed into functions which only pass the same parameters, unused, through to other functions that get called. Pushing the data onto stacks is like wrapping a dynamic scope (&#8220;with-&#8230;&#8221;) around certain call chains. This stack-based technique can cause bugs in hand-written code, but is a useful and viable approach for use in generated code.</p><p>The &#8220;with-&#8230;&#8221; syntax and dynamic scoping is borrowed from the Lisp world and can be applied to newly-invented meta-syntaxes such as the <code>st</code> syntax shown in this example.</p><h1>Appendix - Emacs Key Bindings</h1><p>M-1 (meta-1) - display only lines that begin with a single unicode character &#8220;&#8901;&#8221;, hide all other lines M-2 - display lines that begin with one or two &#8220;&#8901;&#8221; M-3 - display lines that begin with one, two or three &#8220;&#8901;&#8221; M-4 - display lines that begin with one, two, three or four &#8220;&#8901;&#8221; M-5 - display lines that begin with one, two, three, four or five &#8220;&#8901;&#8221; M-6 - display lines that begin with one, two, three, four, five or six &#8220;&#8901;&#8221; M-0 - toggle between showing all lines and between showing only lines that are not prefixed by any &#8220;&#8901;&#8221;, i.e. show everything or show only the code</p><p>The elisp code, generated by Claude, inserted into my init.el</p><pre><code><code>; this is code that I pasted into my ~/.emacs.d/init.el to install st-mode

;;; elision for .st files - invoke explicitly with M-x my-dsl-outline-mode
;;; -*- lexical-binding: t; -*-

(defvar st-al-char "&#8901;"
  "Character marking an architectural line (AL).")

(defvar st-default-image-width 400)

(defun st--line-al-level ()
  "AL level of the current line: count of leading &#8901; after whitespace, 0 if none."
  (save-excursion
    (beginning-of-line)
    (skip-chars-forward " \t")
    (let ((start (point)))
      (skip-chars-forward st-al-char)
      (- (point) start))))

;; --- images ---

(defun st-remove-images ()
  (interactive)
  (remove-overlays (point-min) (point-max) 'st-image t))

(defun st-display-images ()
  "Render ![alt][width](path) links as inline images."
  (interactive)
  (st-remove-images)
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward
            "!\\[\\([^]]*\\)\\]\\(?:\\[\\([0-9]+\\)\\]\\)?(\\([^)]+\\))"
            nil t)
      (let* ((width (if (match-string 2)
                         (string-to-number (match-string 2))
                       st-default-image-width))
             (path (match-string 3))
             (full-path (expand-file-name
                         path (file-name-directory (or buffer-file-name default-directory))))
             (beg (match-beginning 0))
             (end (match-end 0)))
        (when (and (file-exists-p full-path)
                   (image-type-available-p 'svg))
          (let* ((img (create-image full-path 'svg nil :max-width width))
                 (ov (make-overlay beg end)))
            (image-flush img)
            (overlay-put ov 'st-image t)
            (overlay-put ov 'display img)))))))

;; --- level-based line visibility (M-1..M-9, M-0) ---

(defvar st-level-invisible-symbol 'st-level-hidden)
(defvar-local st--non-al-only nil)

(defun st--hide-region (beg end)
  (let ((ov (make-overlay beg end)))
    (overlay-put ov 'st-level-overlay t)
    (overlay-put ov 'invisible st-level-invisible-symbol)))

(defun st-clear-level-overlays ()
  (remove-overlays (point-min) (point-max) 'st-level-overlay t))

(defun st-show-level (n)
  "Show only AL lines with level 1..N; hide deeper AL lines and all non-AL lines."
  (setq st--non-al-only nil)
  (add-to-invisibility-spec st-level-invisible-symbol)
  (st-clear-level-overlays)
  (save-excursion
    (goto-char (point-min))
    (while (not (eobp))
      (let ((level (st--line-al-level)))
        (unless (and (&gt; level 0) (&lt;= level n))
          (st--hide-region (line-beginning-position)
                            (min (point-max) (1+ (line-end-position))))))
      (forward-line 1))))

(defun st-show-everything ()
  (remove-from-invisibility-spec st-level-invisible-symbol)
  (st-clear-level-overlays))

(defun st-show-only-non-al ()
  (add-to-invisibility-spec st-level-invisible-symbol)
  (st-clear-level-overlays)
  (save-excursion
    (goto-char (point-min))
    (while (not (eobp))
      (when (&gt; (st--line-al-level) 0)
        (st--hide-region (line-beginning-position)
                          (min (point-max) (1+ (line-end-position)))))
      (forward-line 1))))

(defun st-toggle-non-al ()
  "M-0: toggle between showing everything and showing only non-AL lines."
  (interactive)
  (if st--non-al-only
      (progn (st-show-everything) (setq st--non-al-only nil))
    (st-show-only-non-al)
    (setq st--non-al-only t)))

;; --- keymap &amp; mode ---

(dotimes (i 9)
  (let ((n (1+ i)))
    (eval
     `(defun ,(intern (format "st-show-level-%d" n)) ()
        ,(format "Show only AL lines with level &lt;= %d." n)
        (interactive)
        (st-show-level ,n)))))

(defvar st-mode-map
  (let ((map (make-sparse-keymap)))
    (dotimes (i 9)
      (let ((n (1+ i)))
        (define-key map (kbd (format "M-%d" n))
          (intern (format "st-show-level-%d" n)))))
    (define-key map (kbd "M-0") #'st-toggle-non-al)
    map)
  "Keymap for `st-mode'.")

(define-minor-mode st-mode
  "Minor mode for architecturally-annotated code with leveled folding."
  :lighter " ST"
  :keymap st-mode-map
  (when st-mode
    (setq-local outline-regexp (concat "[ \t]*" (regexp-quote st-al-char) "+"))
    (setq-local outline-level #'st--line-al-level)
    (outline-minor-mode 1)
    (st-display-images)))</code></code></pre><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/experiment-separating-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/experiment-separating-architecture?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/experiment-separating-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/experiment-separating-architecture/comments"><span>Leave a comment</span></a></p>]]></content:encoded></item><item><title><![CDATA[Languages That Stretch Your DI Capabilities and Imagination]]></title><description><![CDATA[2026-07-11]]></description><link>https://programmingsimplicity.substack.com/p/languages-that-stretch-your-di-capabilities</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/languages-that-stretch-your-di-capabilities</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Sat, 11 Jul 2026 16:18:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>DI means Design Intent &#8212; what people usually call &#8220;software architecture,&#8221; the expression of <em>intent</em> rather than just code. I&#8217;ve come to believe you don&#8217;t become a good architect by getting really good at one paradigm. You become a good architect by studying many paradigms, deliberately, including the ones that feel foreign or obsolete.</p><p>Most of us today learn one paradigm deeply &#8212; the function-based / functional paradigm &#8212; and mistake fluency in it for architectural skill. But DI is bigger than functions and call stacks. Below is a list of books, papers, systems, and talks that pushed my own thinking outside that box. None of them are &#8220;productivity hacks.&#8221; They&#8217;re worldviews.</p><h3>Smalltalk</h3><p>Start with the <a href="http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf">Smalltalk Blue Book</a> &#8212; specifically <strong>Section Four</strong>, which quietly disappeared from the more commonly circulated Purple Book. Smalltalk isn&#8217;t &#8220;objects with methods&#8221; the way most OOP languages borrowed the idea. It&#8217;s a complete environment where everything, including the language itself, is a live, inspectable object. Section Four is where that worldview is most exposed: it gives an implementation of Smalltalk in a subset of Smalltalk, including code for the virtual machine and the then-new generational garbage collector.</p><h3>Parsing as a paradigm</h3><p><a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar">Parsing Expression Grammars</a> &#8212; Bryan Ford&#8217;s original concept and paper &#8212; reframe parsing as ordered choice rather than ambiguous grammar resolution. It&#8217;s a genuinely different way to think about structuring recognition and control flow. <a href="http://ohmjs.org/">OhmJS</a> is a modern, very approachable implementation of these ideas, and worth playing with directly rather than just reading about.</p><p>BNF, and its more common successor properly called eBNF, is itself a DSL for writing parsers. PEG and OhmJS use a syntax very much like eBNF&#8217;s. But the purpose differs from what came before: traditional compiler-compiler tools like YACC are meant for specifying <em>languages</em>, whereas OhmJS is better understood as a DSL for specifying <em>parsers</em>.</p><p>Before PEG, I used recursive descent, and S/SL. PEG just makes this so much easier &#8212; almost like discovering regexes after years of hand-rolled string matching. PEG&#8217;s greatest contribution is arguably the return of backtracking, which had been mostly banished during the 20th century out of a bias toward premature optimization. Backtracking makes it much easier to describe parsers, even where it costs you some raw performance.</p><p>One of the first things I wrote in OhmJS (which I think of as an improved PEG) was a DSL I call <a href="https://github.com/guitarvydas/pbp-dev/blob/dev/t2t/doc/rwr/RWR%20Spec.pdf">RWR</a>. Using OhmJS plus RWR, I built a small tool called T2T, part of a larger toolkit called <a href="https://github.com/guitarvydas/pbp">PBP</a>. With T2T &#8212; and the Ohm-editor grammar REPL &#8212; I can crank out custom little languages in minutes or hours. At this point I transmogrify these little languages into running Python code, often as PBP components or as stand-alone Python. I&#8217;ve also generated JavaScript, Common Lisp, and Odin code from the same little-language definitions.</p><h3>Statecharts</h3><p>David Harel&#8217;s statecharts extend finite state machines with hierarchy, concurrency, and broadcast communication &#8212; and they express <em>behavior</em> as a first-class architectural artifact instead of burying it in conditionals. I made a video of my reading of the original paper: <a href="https://guitarvydas.github.io/2023/11/27/Statecharts-Papers-We-Love-Video.html">Statecharts &#8212; Papers We Love video</a>.</p><h3>Logic programming</h3><p>The bare essence of Prolog is that you can write exhaustive search using very little code. In our current bevy of programming languages, you need to write tangled code that contains loops within loops and encourages bugs and incomplete search strategies. Prolog and its descendants invert the usual relationship between data and control: you state relations, and the engine searches for solutions. See my <a href="/__u/programmingsimplicity.substack.com/p/prolog-related-references?r=1egdky">Prolog-related references</a>roundup, and <a href="http://minikanren.org/">miniKanren</a> for a minimal, embeddable take on the same idea &#8212; relational programming small enough to implement in an afternoon and deep enough to reshape how you think about search and backtracking.</p><h3>Atari Pong (1972)</h3><p>This one is the sharpest possible contrast to &#8220;software architecture&#8221; as we usually mean it. The original 1972 Pong hardware fits on <a href="https://www.reddit.com/r/EngineeringPorn/comments/ul49zt/the_original_pong_video_game_had_no_code_and_was">one page</a>, is built from asynchronous components, and has <strong>no code at all</strong>. It&#8217;s pure architecture &#8212; signal flow and timing &#8212; with none of the sequential, function-call baggage we now treat as unavoidable. If you want a jolt to your assumptions about what &#8220;a program&#8221; even is, look at this schematic.</p><h3>Sketchpad</h3><p>Ivan Sutherland&#8217;s <a href="https://en.wikipedia.org/wiki/Sketchpad">Sketchpad</a> (1963) predates almost everything we now consider modern in interactive and object-oriented computing &#8212; constraints, prototypes, real-time graphical manipulation. It&#8217;s worth understanding as the ancestor a lot of paradigms forgot they had. Sketchpad was written in assembler &#8212; Sutherland did not need automated type checking and all of the baubles we&#8217;ve since added to create useful software.</p><h3>The Big OOPs</h3><p>Casey Muratori&#8217;s talk <a href="https://www.youtube.com/watch?v=wo84LFzx5nI">The Big OOPs</a> argues that mainstream language design &#8212; OOP in particular &#8212; took a wrong turn for a huge class of real-world problems, game programming among them. Whether or not you agree with his conclusions, it&#8217;s a useful antagonist to sit with: it forces you to defend or abandon assumptions you probably never examined.</p><h3>Unix V1 and the C that almost wasn&#8217;t</h3><p><a href="https://en.wikipedia.org/wiki/Research_Unix">Research Unix</a> is usually remembered as &#8220;written in C,&#8221; but V1 was assembler, and only V4 was ported to K&amp;R C. K&amp;R C and ANSI C are not the same language in spirit: K&amp;R C is unapologetically tied to the utility of a specific machine (the PDP-7), while ANSI C is built around portability and type-checking across many architectures. Reading Unix history with that distinction in mind changes how you read the code &#8212; it&#8217;s a different set of design pressures than the C we write today.</p><h3>Small-C</h3><p><a href="https://archive.org/details/dr_dobbs_journal_vol_05_201803">Small-C</a>, also published in Dr. Dobb&#8217;s Journal, is where I learned what a compiler actually does &#8212; by implementing it on a V7 Unix system running on a PDP-11. Everything compilers have added since then is, in a real sense, just improvements on this basic idea. The Dragon Book is largely a way to make this same idea more efficient.</p><h3>Holt&#8217;s Concurrent Euclid, the UNIX System, and TUNIS</h3><p>Richard Holt&#8217;s book, <em><a href="https://www.amazon.com/Concurrent-Euclid-Addison-Wesley-computer-science/dp/0201106949">Concurrent Euclid, The UNIX System, and TUNIS</a></em>, especially <strong>Chapter 10, &#8220;Implementing a Kernel,&#8221;</strong> is a masterclass in expressing concurrent system design with a language built specifically for it, rather than bolting concurrency onto a sequential language after the fact.</p><h3>S/SL</h3><p><a href="https://research.cs.queensu.ca/home/cordy/pub/downloads/ssl/">S/SL (Syntax/Semantic Language)</a> is dataless &#8212; control flow only. It&#8217;s arguably the epitome of OOP and modularity, stripped of everything except the control structure that OOP is supposedly about. Seeing that idea in its purest form is clarifying in a way that &#8220;real&#8221; OOP languages, cluttered with data and syntax, rarely are. The code repository contains the S/SL specification, a version of S/SL written for C, and a full-blown compiler (PT Pascal) written in a Pascal version of S/SL.</p><h3>Cordy&#8217;s Orthogonal Code Generator</h3><p>James Cordy&#8217;s Ph.D. thesis work on orthogonal code generation &#8212; published with Richard Holt as <a href="https://onlinelibrary.wiley.com/doi/abs/10.1002/spe.4380200306">Code Generation Using an Orthogonal Model</a> (<em>Software&#8212;Practice and Experience</em>, 1990) &#8212; is worth reading right alongside S/SL, since it comes out of the same Toronto compiler lineage. In it, Cordy touches on techniques that look strikingly modern today: ideas that rhyme with Justine Tunney&#8217;s work on <a href="https://justine.lol/lambda/">Binary Lambda Calculus</a>, with Holt&#8217;s own <a href="https://dl.acm.org/doi/10.1145/24039.24051">Data Descriptors</a> paper, and with a small DSL Cordy built for generating portable code using decision trees, which he called MISTs. Data descriptors in particular show how normalization &#8212; treating machine-level addressing as data to be normalized rather than handled as ad hoc special cases &#8212; can make code generation dramatically simpler to write.</p><h3>Tiny BASIC</h3><p><a href="https://en.wikipedia.org/wiki/Tiny_BASIC">Tiny BASIC</a> is a minimal BASIC interpreter designed to fit in a few kilobytes of memory on early microcomputers. The canonical source is in Volume 1 of <a href="https://archive.org/details/dr_dobbs_journal_vol_01/page/n129/mode/1up">Dr. Dobb&#8217;s Journal</a> &#8212; short enough to read whole, in one sitting, rather than in disconnected fragments.</p><h3>Frits van der Wateren&#8217;s Lisp</h3><p><a href="https://github.com/guitarvydas/frits-van-der-wateren-lisp">Frits van der Wateren&#8217;s Lisp</a> is another small, complete implementation worth reading end-to-end &#8212; the kind of codebase small enough to hold entirely in your head at once, which is exactly the point of studying it.</p><h3>SectorLisp</h3><p><a href="https://justine.lol/sectorlisp2/">SectorLisp</a> is a Lisp interpreter that fits in a 512-byte boot sector. It&#8217;s tiny &#8212; purer than pure functional programming, in the sense that there&#8217;s no room left for anything but the essence of the idea. A good antidote to the notion that expressive power requires size.</p><h3>Prolog Control in 6 Slides</h3><p>Nils Holm&#8217;s <a href="https://www.t3x.org/prolog6/prolog-6-slides.pdf">Prolog Control in 6 Slides</a> distills the control mechanism of Prolog &#8212; unification, backtracking, the resolution loop &#8212; into something you can hold in your head in one sitting. Short, dense, and worth re-reading more than once.</p><h3>Forth</h3><p><em><a href="https://www.forth.com/wp-content/uploads/2018/11/thinking-forth-color.pdf">Thinking Forth</a></em> by Leo Brodie isn&#8217;t really about the Forth language &#8212; it&#8217;s about a design philosophy: factoring problems into small, composable words, thinking bottom-up, and treating the language itself as something you extend to fit the problem rather than the other way around.</p><h3>Rebol and Altscript</h3><p><a href="https://en.wikipedia.org/wiki/Rebol">Rebol</a>, designed by Carl Sassenrath &#8212; also the architect of the Amiga OS kernel &#8212; is one of the first languages to have PEG-style parsing built directly into the language itself. The result is that Sassenrath was able to build very powerful libraries using a surprisingly small amount of code. (See also the <a href="https://www.rebol.com/">official Rebol site</a>.)</p><p>Sassenrath&#8217;s successor project, <a href="https://altscript.com/">Altscript</a>, proposes a very interesting and very rich set of fundamental data types &#8212; around fifty lexically recognized &#8220;atoms&#8221; built directly into the language.</p><h3>Video presentations</h3><p>Two talks that belong in this list even though they&#8217;re not papers or code:</p><ul><li><p>Alan Kay, <a href="https://www.youtube.com/watch?v=oKg1hTOQXoY">The Computer Revolution Hasn&#8217;t Happened Yet</a> &#8212; a reminder that most of what we call &#8220;modern&#8221; computing is still a fairly narrow, accidental slice of what was actually envisioned.</p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/capt-grace-hopper-on-future-possibilities?r=1egdky">Capt. Grace Hopper on Future Possibilities</a> &#8212; my own writeup of her talk, which is startlingly prescient about where computing was headed.</p></li></ul><h3>Why this matters for DI</h3><p>None of these are &#8220;better&#8221; than the functional paradigm. That&#8217;s not the point. Each one makes a different set of tradeoffs <em>visible</em> &#8212; between data and control, between synchronous and asynchronous, between portability and machine-specific utility, between huge and minimal. If you&#8217;ve only ever thought in one paradigm, you don&#8217;t know which of your assumptions are fundamental and which are just habits picked up from the tools you happened to learn first.</p><p>Studying paradigms outside your comfort zone is how you build the vocabulary to express Design Intent clearly &#8212; not just to write code that runs, but to build systems whose architecture says what it means.</p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/languages-that-stretch-your-di-capabilities/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/languages-that-stretch-your-di-capabilities/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/languages-that-stretch-your-di-capabilities?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/languages-that-stretch-your-di-capabilities?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Five Whys for Software Component Isolation]]></title><description><![CDATA[2026-07-05]]></description><link>https://programmingsimplicity.substack.com/p/five-whys-for-software-component</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/five-whys-for-software-component</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Sun, 05 Jul 2026 09:05:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Q: Why can&#8217;t we plug software modules together like LEGO&#174; blocks?<br>A: Because software is too complicated.<br>Q: Why is software too complicated?<br>A: Because we can&#8217;t plug software modules together like LEGO&#174; blocks.<br>Q: Why can&#8217;t we plug software modules together?<br>A: Because the interfaces are too complicated.<br>Q: Why are interfaces too complicated?<br>A: Because libraries and APIs have hidden dependencies.<br>Q: Why do libraries and APIs have hidden dependencies?<br>A: Because we use programming languages that hide dependencies.<br>Q: What kind of dependencies are hidden by languages?<br>A: CALL / RETURN leaves breadcrumbs on stacks, forming dynamic dependency chains.<br>Q: Why does CALL/RETURN leave breadcrumbs on the stack?<br>A: RETURN needs to follow the breadcrumbs back to the caller.<br>Q: What happens when a CALLed routine calls another routine?<br>A: The callee becomes the caller and leaves another breadcrumb on the stack. <br>Q: Why is a stack used? Why not just use a register?<br>A: Stacks are used so that previously laid breadcrumbs are not over-written. If we didn&#8217;t have an automatic stack mechanism to save our breadcrumbs, we&#8217;d have to save them manually in some sort of list.<br>Q: Is the stack of breadcrumbs a dynamic data structure?<br>A: Yes.<br>Q: Is the stack of breadcrumbs a dependency chain?<br>A: Yes:<br>Q: Is the stack not just a list?<br>A: Yes, but it is an optimized list.<br>Q: Why is it necessary to optimize lists to make stacks?<br>A: Because we need to optimize memory usage.<br>Q: Why do we need to optimize memory usage?<br>A: Because memory is expensive<br>Q: Why is memory expensive?<br>A: Memory used to be expensive in the 20th century.<br>Q: Is memory still expensive in the 21st century?<br>A: No.<br>Q: Why do we use techniques to optimize memory usage, when memory is no longer expensive?<br>A: Uh, because we&#8217;ve always done it that way.<br>Q: Did we notice that the ground truth has shifted? Memory used to be expensive, but is no longer expensive?<br>A: Uh, no, we didn&#8217;t notice.<br>Q: Why didn&#8217;t we notice?<br>A: Uh, because we believe in building on the shoulders of giants.<br>Q: Why don&#8217;t we simply use many CPUs each with private memory, each containing single thread?<br>A: Because CPUs were expensive.<br>Q: Are CPUs still expensive in the 21st century?<br>A: No.<br>Q: Why do we share memory between cores instead of using completely isolated CPUs?<br>A: Because using shared memory can be faster for some applications, like graphics.<br>Q: Does the use of shared memory lead to needing extra software and complication?<br>A: Yes. We call that &#8220;thread safety&#8221;.<br>Q: Could we simplify programs and programming languages by removing all of the extra code needed to solve thread safety issues?<br>A: Yes. Massively. Isolated CPUs can&#8217;t share memory, hence, do not have thread safety issues.<br>Q: Why do we keep relying on shared memory models for programming?<br>A: Uh, because we&#8217;ve always done it this way.<br>Q: Is there a good reason not to switch to a message-passing model for programming in the 21st century?<br>A: Not really.<br>Q: Then, why do we keep hanging on to an old-fashioned, inefficient and complicated model?<br>A: Uh, because we&#8217;ve always done it this way.<br>Q: Could we develop faster workflows for program development?<br>A: Yes.<br>Q: Why haven&#8217;t we done that?<br>A: Uh, because we&#8217;ve always done it the old-fashioned way.<br>Q: Are we in the weeds?<br>A: Yes.</p><h1>Other Issues</h1><p>Other issues, not discussed here, include&#8230;</p><h2>Topology Blindness</h2><p>Reasoning about a component without regard for what it&#8217;s wired into.</p><h2>Single, Strict Routing Policy</h2><p>Our use of functions in software implies the use of a single, strict routing policy.</p><p>When a function CALLs another function, there is a requirement that the callee returns - routes - a value back to the caller.</p><p>The callee is strongly discouraged from having &#8220;side effects&#8221; such as sending values, messages and events to other receivers.</p><h1>Further Reading</h1><p><a href="/__u/programmingsimplicity.substack.com/p/call-return-spaghetti?r=1egdky">CALL RETURN Spaghetti</a></p><p><a href="/__u/programmingsimplicity.substack.com/p/capt-grace-hopper-on-future-possibilities?r=1egdky">Capt. Grace Hopper on Future Possibilities: Data, Hardware, Software, and People, 1982</a></p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/five-whys-for-software-component/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/five-whys-for-software-component/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/five-whys-for-software-component?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/five-whys-for-software-component?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[The Parts Based Programming Kernel]]></title><description><![CDATA[July 1, 2026]]></description><link>https://programmingsimplicity.substack.com/p/the-parts-based-programming-kernel</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/the-parts-based-programming-kernel</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Thu, 02 Jul 2026 08:50:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zBaQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every system has a kernel &#8212; the irreducible core that makes everything else possible. For operating systems, it&#8217;s the code that loads programs, manages memory, and controls the CPU. For Parts Based Programming (PBP), the kernel is simpler: two things.</p><ol><li><p>A template registry.</p></li><li><p>Coroutining.</p></li></ol><p>That&#8217;s it. Let me explain what that means and why it matters.</p><div><hr></div><h2>A Simulation of Isolation</h2><p>The PBP kernel runs on a single development computer, but what it simulates is a set of fully isolated, asynchronous components &#8212; each with its own private state, communicating only by passing messages.</p><p>This is a deliberate design choice, not a limitation. The shared-memory model that underlies conventional operating systems works fine on a single machine, but it breaks down badly when you try to scale across geography. You can&#8217;t share memory between machines in Tokyo and Toronto. You can pass messages. If you write your software from the start using PBP&#8217;s isolated-component model, it scales to distributed systems naturally &#8212; because the architecture never assumed shared memory in the first place.</p><div><hr></div><h2>What the Kernel Does</h2><p>When you draw a diagram in PBP, that diagram <em>becomes</em> a template. Boxes become parts. Connections become message routes. The visual is the program.</p><p>A single drawio file can contain many drawings, each on a separate editor tab. Each drawing is a Container part. Any part on a drawing that doesn&#8217;t correspond to another drawing is assumed to be a Leaf part &#8212; an atomic component that does actual work without containing other parts. Containers are converted by <code>das2json</code> into machine-readable JSON that lists their children and the routing between them. Leaf parts are simply assumed to exist &#8212; assumed to be imported by the main program (e.g. <code>main.py</code>when Python is the host language).</p><p>When a PBP system starts up, it does three things in sequence:</p><p><strong>First, it loads all the templates.</strong> Container parts are loaded from those JSON files. Container parts are automatically registered when their JSON is read. Leaf parts must be declared in code using <code>mkTemplate(...)</code> and explicitly registered with<code>register_component(...)</code>. All Leaf parts must be registered before the system can run.</p><p><strong>Second, it instantiates.</strong> Starting from the top-most Container, the runtime recursively creates unique instances of every part, all the way down through the hierarchy to the leaves.</p><p><strong>Third, it runs.</strong> The top-most Container walks its children. Each Container processes one input message-event (mevent) at a time, ticking each child in a loop until that child has no more work to do. Containers can hold Containers, so this walk is recursive. When you hit a Leaf, the recursion stops &#8212; Leaves don&#8217;t contain anything; they just act.</p><p>This is a clean, explicit, traceable execution model. No surprises.</p><div><hr></div><h2>Sound Familiar? It Should.</h2><p>This is almost exactly what an operating system does &#8212; and coroutining is what OSes do <em>under the hood</em>.</p><p>An OS loads a program: reads the object file (<code>.obj</code>, <code>.o</code>, or whatever), fixes up addresses, tweaks the MPU, then hands control to the code. That&#8217;s the registry and instantiation steps. Then the OS scheduler takes over &#8212; and the scheduler is, at its core, a coroutine manager.</p><p>The scheduler keeps a list of ready threads and algorithmically picks one to run. It then does something remarkable: it saves the entire state of the currently running thread &#8212; registers, stack pointer, program counter &#8212; into a privileged block of OS memory, loads the saved state of the chosen thread, sets a hardware timer, and <em>yields</em> to it. From that thread&#8217;s point of view, it simply resumed. When the timer fires, an OS interrupt handler forces the thread to yield back to the scheduler, and the cycle repeats.</p><p>Each thread looks like a plain function (or a chain of functions), but it is actually a state machine whose state is being saved and restored by the scheduler on every context switch. The OS is doing coroutining, just wrapped in layers of hardware privilege management, timer interrupts, and memory protection machinery.</p><p>PBP makes the coroutining explicit and visible, without the machinery.</p><div><hr></div><h2>The 20th Century Tax</h2><p>Operating systems got this complicated to solve a specific 1960s problem: CPUs were expensive. One CPU, many users. You had to time-share.</p><p>Time-sharing is where the complexity explosion happened. If you have 10 apps and 90 OS threads running, each app gets roughly 1/100th of a CPU &#8212; give or take, modulo complicated priority management, scheduling queues, and preemption logic. The software architect doesn&#8217;t get to control any of it. Start a new app or thread and it silently steals cycles from everything already running.</p><p>This also gave us &#8220;thread safety&#8221; &#8212; an entire category of bugs that exists solely because multiple threads share memory on a single CPU. Mutexes, semaphores, lock-free data structures, memory barriers. Enormous bodies of engineering work devoted to managing a problem manufactured by 1960s economics. Race conditions are particularly nasty because they aren&#8217;t just hard to reproduce &#8212; they&#8217;re hard to <em>reason about</em>. The program&#8217;s behavior depends on timing relationships that aren&#8217;t visible in the code.</p><p>The cleaner model: a zillion totally isolated CPUs, each with its own private memory, each running exactly one thread, communicating only by passing messages. No scheduling. No shared memory. No thread safety. No shared-memory race conditions &#8212; and when ordering matters, it&#8217;s visible in the diagram, not buried in hardware timing. The complexity evaporates &#8212; not because of clever engineering, but because the source of the complexity was never necessary in the first place.</p><p>CPUs used to cost as much as a house. So we built six decades of software around the assumption that we&#8217;d only ever have one.</p><div><hr></div><h2>What PBP Is About</h2><p>That assumption no longer holds.</p><p>CPUs are cheap. The economics that forced the shared-memory, time-sliced model onto us have reversed. And yet we keep writing software as if we&#8217;re still rationing a single VAX.</p><p>PBP is not about managing cores or squeezing performance out of on-chip cache coherency hardware. It&#8217;s a way to think about multi-processing using the simplest possible model: multiple full-blown, totally isolated CPUs with private memory, passing messages between them. On a development machine, the PBP kernel simulates this with coroutining. In production, you can deploy the same architecture across genuinely separate machines, because the model never assumed anything else.</p><p>The kernel is simple because the model is simple. A registry, and coroutining. That&#8217;s all you need to build things that reflect how you actually think about them &#8212; rather than how a 1960s time-sharing system happened to organize them.</p><p>We didn&#8217;t have to make software this complicated. We can stop.</p><div><hr></div><h2>Examples</h2><h3>Simplest Hello World That Guarantees Mevent Order</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!zBaQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 424w, /__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 848w, /__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 1272w, /__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!zBaQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png" width="1456" height="670" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:670,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 424w, /__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 848w, /__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 1272w, /__u/substackcdn.com/image/fetch/$s_!zBaQ!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2a71a112-7387-4a6a-8772-902d9fe8d00c_1773x816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Test Jig</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Y-8w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 424w, /__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 848w, /__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Y-8w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png" width="1456" height="422" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:422,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 424w, /__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 848w, /__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Y-8w!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7f9cde3-3508-40bb-bf3e-daf594e0ac70_2619x759.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Kernel Code Generator</h3><p>The PBP kernel is generated from a layered diagram containing some 40 parts. This is but one of the layers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!mOsY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 424w, /__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 848w, /__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 1272w, /__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!mOsY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png" width="1456" height="1029" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1029,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 424w, /__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 848w, /__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 1272w, /__u/substackcdn.com/image/fetch/$s_!mOsY!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9507fcb-f293-42fd-a5de-5b1202efc5ff_1962x1386.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>Raw Notes</h2><p>The above was cowritten with Claude. My initial concise notes are below:</p><p><a href="https://github.com/guitarvydas/napkin-notes/blob/main/2026-07-01/1.%20PBP%20Kernel.md">initial notes</a><br><a href="https://github.com/guitarvydas/napkin-notes/blob/main/2026-07-01/3.%20Notes%20re.%20PBP%20Kernel.md">comments regarding first draft</a></p><div><hr></div><h2>Further</h2><p><a href="https://www.youtube.com/watch?v=IFcIptdG2sY&amp;list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards Parts Based Programming</a><br><a href="https://www.youtube.com/watch?v=EFTzFA82YRc&amp;list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP cookbook playlist</a><br><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYhpvWSvJNJdrsZE8lNHza7">Decision Tree Diagram Transmogrifier</a><br><a href="https://www.youtube.com/watch?v=ecJGkrpUhQQ&amp;list=PLHh2_dCKBPjZEvCymkt1ZVualP7gt3e1O&amp;index=17">State Machine Diagram Tool</a></p><p><a href="https://github.com/guitarvydas/fdd-llm">FDD LLM - 5 Whys Tool - code repository</a><br><a href="https://github.com/guitarvydas/sm-pbp">State Machine Tool - code repository</a><br><a href="https://github.com/guitarvydas/dtree">Decision Tree Tool - code repository</a><br><a href="https://github.com/guitarvydas/pbp">PBP all tools (PBP, T2T, das2json)</a></p><p><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cows-of-programming">The Spherical Cows of Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-wrong-spherical-cow-first-principles?r=1egdky">The Wrong Spherical Cow - First Principles of Parts Based Programming</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-spherical-cow-we-forgot-we-were?r=1egdky">The Case For Composable Notations (1 / 5) - The Spherical Cow We Forgot We Were Riding</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations?r=1egdky">The Case For Composable Notations (2 / 5) - The Restrictions That Came With The Cow</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-e6c?r=1egdky">The Case For Composable Notations (3 / 5) - State Isn&#8217;t The Enemy</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-2bd?r=1egdky">The Case For Composable Notations (4 / 5) - Ease of Expression Is the Whole Point</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-f31?r=1egdky">The Case For Composable Notations (5 / 5) - UNIX Already Showed Us the Way</a><br><a href="/__u/programmingsimplicity.substack.com/p/the-case-for-composable-notations-0d3?r=1egdky">The Case For Composable Notations (6 / 5) - WIP - Notations in Progress</a></p><h2>See Also</h2><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/the-parts-based-programming-kernel/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/the-parts-based-programming-kernel/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/the-parts-based-programming-kernel?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/the-parts-based-programming-kernel?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Separating Architecture From Implementation]]></title><description><![CDATA[2026-06-27]]></description><link>https://programmingsimplicity.substack.com/p/separating-architecture-from-implementation</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/separating-architecture-from-implementation</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Fri, 26 Jun 2026 12:52:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>With our current programming languages it is difficult to separate architecture from implementation.</p><p>The reason for this is just a minor detail: functions are implemented on hardware using the CALL/RETURN instruction.</p><p>The implementation is that the CALLer suspends (blocks) until the callee returns something. This minor detail winds deep dependencies throughout code and makes it difficult to reason about what is going on.</p><p>The best way to break the dependency is to separate - control-flow wise - the caller from the callee, i.e. by using pure message sending (instead of impure message passing, as is implemented by CALL/RETURN and calling conventions). I built this into Parts Based Programming (PBP) through instinct.</p><p>Hardware ICs work this way, too. If actions need to be synchronized, the are explicitly, externally synchronized by the architect, not vagaries of the hardware such as CALL/RETURN (and cache coherency).</p><h1>Further Reading / Viewing</h1><ul><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP basics (playlist)</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP Cookbook (playlist)</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards PBP (playlist)</a></p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/building-software-using-black-boxes?r=1egdky">Building Software Using Black Boxes</a></p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/pbp-black-box-abstraction-port-fan?r=1egdky">PBP Black Box Abstraction, Ports, Fan-out, Fan-in</a></p></li><li><p><a href="https://youtu.be/EFTzFA82YRc?t=330">how to install PBP</a></p></li><li><p><a href="https://youtu.be/EFTzFA82YRc">Hello World and simple parallelism in PBP</a></p></li></ul><p>See also, the essays, blogs and videos listed below</p><h1>See Also</h1><p><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/separating-architecture-from-implementation/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/separating-architecture-from-implementation/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/separating-architecture-from-implementation?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/separating-architecture-from-implementation?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Concurrency (Part 2 of 2)]]></title><description><![CDATA[2026-06-24]]></description><link>https://programmingsimplicity.substack.com/p/concurrency-part-2-of-2</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/concurrency-part-2-of-2</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 24 Jun 2026 13:56:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#8220;Concurrency&#8221; is a concept tuned for allowing multiple functions to operate independently in the synchronous, sequential paradigm. It essentially uses a &#8220;trick&#8221; to allow this to happen - it assumes that the multiple functions are internally synchronized and it makes them run in a sequential manner.</p><p>This &#8220;trick&#8221; is useful for allowing us to think in terms of computation, but it doesn&#8217;t address asynchronous systems. Hence, it only addresses about 5% of reality (this number is pulled out of thin air and is not measured, yet, I base it on the fact that cosmology is based on the functional paradigm which pushes aside 95% of the problem that can&#8217;t be addressed in functional form, and calls it &#8220;dark matter&#8221;)</p><ul><li><p>only simulates parallelism, is not full parallelism</p></li><li><p>teaching this has obscured the fact that concurrency is not true parallelism - people think that they are getting parallelism when using &#8220;thread libraries&#8221;, but they are only getting time-slicing, i.e. multiple functions running on a single computer in a synchronous - not asynchronous - manner.</p></li><li><p>micro-managed sharing of memory at the cell level instead of message-passing between isolated components</p></li><li><p>upper-level, explicit message-passing vs. lower-level, implicit memory sharing</p></li><li><p>the simplest, most efficient system would be a computer that is running exactly one program and not time-sharing the same computer with other programs</p><ul><li><p>this would remove the need for a lot of internal complexity, i.e. &#8220;thread safety&#8221;, since the single program does not share memory with any other program, hence, the compiler and the programming language could be massively simplified</p></li></ul></li><li><p>If we imagine multiple such devices running single programs, but not sharing memory, then the best way for them to communicate and synchronize would be to pass message packets to one another</p><ul><li><p>This is what PBP does - it creates &#8220;parts&#8221; that are self-contained and do not share memory with other parts, it uses <code>send(...)</code> to explicitly send message packets (&#8220;mevents&#8221;) between parts.</p></li><li><p>You are forced to write code that contains explicit message passing, instead of writing code that relies on implicit memory sharing. This maps to asynchronous reality better. # See Also</p></li></ul></li></ul><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/concurrency-part-2-of-2/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/concurrency-part-2-of-2/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/concurrency-part-2-of-2?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/concurrency-part-2-of-2?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Concurrency (Part 1 of 2)]]></title><description><![CDATA[2026-06-24]]></description><link>https://programmingsimplicity.substack.com/p/concurrency-part-1-of-2</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/concurrency-part-1-of-2</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 24 Jun 2026 13:55:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!t07n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Simplified sketches that show the difference between concurrency and pure message passing.</p><h2>Computer With Concurrency</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!t07n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 424w, /__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 848w, /__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 1272w, /__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!t07n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png" width="1456" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 424w, /__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 848w, /__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 1272w, /__u/substackcdn.com/image/fetch/$s_!t07n!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b68861-c97c-44d7-9d21-8c2d0108a28e_1653x873.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A simplified sketch. Note that functions (A-I) might be one function or a tightly coupled thread of functions calling functions (which is really just one big function).</p><p>Not shown: all sorts of complicated extra code that belongs to the dispatcher and operating system.</p><p>Threads run more slowly than they could due to time-slicing and due to operating system overhead.</p><p>This only <em>simulates</em> parallelism using a mechanism that is unrealistic for geographically distributed systems, i.e. memory sharing. In addition, the simulation assumes that the processes are automagically synchronized (via memory sharing and cache coherency and extra hardware).</p><p>Each program (functions A-I) is actually a state machine. Programmers do not get to easily control and architect this behaviour. Context switching is performed by algorithms buried in the operating systems.</p><h2>System With Pure Message Passing</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!ya6x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 424w, /__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 848w, /__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 1272w, /__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_webp, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!ya6x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png" width="1456" height="914" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:914,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_424, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 424w, /__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_848, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 848w, /__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_1272, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 1272w, /__u/substackcdn.com/image/fetch/$s_!ya6x!, /__u/programmingsimplicity.substack.com/w_1456, /__u/programmingsimplicity.substack.com/c_limit, /__u/programmingsimplicity.substack.com/f_auto, /__u/programmingsimplicity.substack.com/q_auto:good, /__u/programmingsimplicity.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8d4c956-5d84-4f16-ac35-16a7ed5e15b7_1773x1113.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Not shown: code that polls (or reacts to) incoming messages on input ports.</p><p>This can be simulated on a single development system by ensuring that programs cannot share memory.</p><p>Each program gets almost 100% of each separate CPU, hence, runs more quickly than on time-shared machines. # See Also</p><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/concurrency-part-1-of-2/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/concurrency-part-1-of-2/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/concurrency-part-1-of-2?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/concurrency-part-1-of-2?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Repeating Architectural Patterns]]></title><description><![CDATA[2026-06-24]]></description><link>https://programmingsimplicity.substack.com/p/repeating-architectural-patterns</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/repeating-architectural-patterns</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 24 Jun 2026 13:53:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As we build a PBP version that mimics the original <a href="https://www.reddit.com/r/EngineeringPorn/comments/ul49zt/the_original_pong_video_game_had_no_code_and_was/">Atari Pong schematic</a>, I doubt that we will actually see strictly repeating high-level patterns emerge. I think that the strictly repeating patterns are embodied in the ICs used in the original circuit. Combinations of ICs on the schematic are used to create architectural chunks that don&#8217;t repeat verbatim.</p><p>The design of ICs is about as far as we can take the idea of strict, repeatable patterns. The design of the Pong schematic uses low-level repeatable patterns to build up higher-level chunks of architecture.</p><p>PBP is an attempt to allow expressing such chunks in a readable manner. We should be able to reuse low-level parts to build up customizable medium-level parts that are used to build up specific parts for a specific project.</p><p>Seasoned &#8220;architects&#8221; may recognize such high-level patterns and reuse them as customizable ideas that can be used (in a modified way) in other architectures.</p><p>We already see this kind of thing happening in electronics and other fields of engineering, e.g. civil engineering and bridge design - not all bridges are designed the same way, but sometimes general architectural features are reused.</p><p>When I showed the Pong schematic to someone versed in electronics design, they &#8220;immediately&#8221; saw architectural patterns in the design, but with tweaks. For example, a comment was that BCD score was being rasterized for display on a then-standard cathode ray tube (CRT). The person saw that some low-level ICs were used in an idiomatic manner.</p><p>I guess one might say that PBP is a way to build up custom Designs using very low level patterns, while leaving the high-level Design readable. Currently, electronics schematics are filled with implementation details that obfuscate the design to anyone but seasoned architected.</p><p>Likewise with the way we write code. The code consists of a bunch of details that don&#8217;t tend to reveal the over-lying Design, unless the programmer(s) was careful to use common idioms and unless the reader is a seasoned programmer who rapidly recognizes the use of such idioms.</p><p>The colourized version of the Pong schematic was probably done by a seasoned electronics person. The person recognized areas within the circuit that were aimed at solving specific sub-problems, then grouped such areas together by colouring them. People who aren&#8217;t versed in reading schematics can understand the colourized groups without needing to understand the actual details of the electronics inside each group.</p><h2>Resources</h2><h3>Articles</h3><ul><li><p><a href="/__u/programmingsimplicity.substack.com/p/building-software-using-black-boxes?r=1egdky">Building Software Using Black Boxes</a></p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/pbp-black-box-abstraction-port-fan?r=1egdky">PBP Black Box Abstraction, Ports, Fan-out, Fan-in</a></p></li></ul><h3>Videos</h3><ul><li><p><a href="https://youtu.be/EFTzFA82YRc?t=330">how to install PBP</a></p></li><li><p><a href="https://youtu.be/EFTzFA82YRc">Hello World and simple parallelism in PBP</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjY0_tTpPa-bRFMLHY0jc3DV">building a dsl (playlist)</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP basics (playlist)</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjbBN2R8xwBiS4nHlo5iQjqS">PBP Cookbook (playlist)</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYBmubkBfn0LSbDMRKsr9Ui">Towards PBP (playlist)</a></p></li><li><p><a href="https://www.youtube.com/playlist?list=PLHh2_dCKBPjYEGrLE2IJAXp5V8eHBwzu4">SCNs (playlist)</a></p></li></ul><h3>Examples</h3><ul><li><p><a href="/__u/programmingsimplicity.substack.com/p/pbp-kernel-portability?r=1egdky">PBP Kernel Portability</a></p></li><li><p><a href="https://github.com/guitarvydas/larson">Larson scanner written in PBP</a></p></li><li><p><a href="https://github.com/guitarvydas/pbp-pong/tree/atari">Pong in PBP (very WIP)</a></p></li><li><p><a href="https://github.com/guitarvydas/ordering">Reasoning About Ordering</a></p></li><li><p><a href="/__u/programmingsimplicity.substack.com/p/2024-06-26-exploring-technique-and">Exploring Techniques and Notations for Augmenting DX (Demo for FoP)</a></p></li><li><p><a href="https://github.com/guitarvydas/ason">ASON sample tokenizer</a></p></li><li><p><a href="https://github.com/guitarvydas/eh">early code repo for &#279; (eh) ancestor of PBP (contains basics for PBP/0D reasoning)</a></p></li><li><p><a href="https://github.com/guitarvydas/thinkingProlog">thinking Prolog: small sample of reasoning in Prolog</a></p></li><li><p><a href="https://github.com/guitarvydas/cl-holm-prolog">Nils Holm&#8217;s Prolog in Scheme code ported to Common Lisp</a></p></li><li><p><a href="https://github.com/guitarvydas/verbatim">sample of creating &#8220;verbatims&#8221; in little language</a><br></p><ul><li><p>verbatims enable staged computation</p></li><li><p>if a pass converts code to final code, it wraps the generated code in a &#8220;verbatim&#8221; and subsequent passes just ignore it and don&#8217;t try to parse it</p></li></ul></li><li><p><a href="https://github.com/guitarvydas/applysyntactic">example of using &#8220;applySyntactic&lt;&#8230;&gt;&#8221; in Ohm</a></p></li><li><p><a href="https://github.com/guitarvydas/20220604md2brace">using OhmJS to convert markdown to structured (bracketed) form</a></p></li><li><p><a href="https://github.com/guitarvydas/behavior_tree_to_cpp">example of converting textual behaviour trees to JSON then to C++</a></p></li><li><p><a href="https://computingsimplicity.neocities.org/blogs/OhmInSmallSteps.pdf">Ohm In Small Steps (diary of converting some Scheme code to Javascript)</a></p></li><li><p><a href="https://research.cs.queensu.ca/home/cordy/pub/downloads/ssl/">PT Pascal and S/SL</a></p></li><li><p><a href="https://guitarvydas.github.io/2020/12/09/CALL-RETURN-Spaghetti.html">Call Return Spaghetti (essay)</a></p></li></ul><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/repeating-architectural-patterns/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/repeating-architectural-patterns/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/repeating-architectural-patterns?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/repeating-architectural-patterns?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[AI Is No Code]]></title><description><![CDATA[2026-06-24]]></description><link>https://programmingsimplicity.substack.com/p/ai-is-no-code</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/ai-is-no-code</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Wed, 24 Jun 2026 12:37:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>AI is No Code for one specific architectural pattern. The one I call &#8220;function-based&#8221;, which is synchronous and sequential.</p><p>You <em>can</em> build other architectural patterns on top of that one architectural pattern, but the substrate function-based pattern restricts your architectural thinking (&#8220;Design&#8221;). For example, you cannot build Forth on top of that substrate. Forth doesn&#8217;t use the function-based &#8220;calling convention&#8221;. The best you can do is to build a fake Forth that adheres to a prematurely-supplied calling convention. Nor, can you build something that is asynchronous and fully parallel on top of that substrate, since the substrate has already eliminated asynchrony from any design you put on top of it. The best you can do is to define synchronous &#8220;reactors&#8221; and then plumb them together by hand in a manner analogous to writing assembler.</p><p>I&#8217;ve built many Designs using a different substrate architectural pattern - asynchronous, electronic IC based. From that experience, I conclude that the function-based pattern is too restrictive and bloatful and that we need to break free of it. AI won&#8217;t help with that.</p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/ai-is-no-code/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/ai-is-no-code/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/ai-is-no-code?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/ai-is-no-code?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Anti Assimilation]]></title><description><![CDATA[2026-06-19]]></description><link>https://programmingsimplicity.substack.com/p/anti-assimilation</link><guid isPermaLink="false">https://programmingsimplicity.substack.com/p/anti-assimilation</guid><dc:creator><![CDATA[Paul Tarvydas]]></dc:creator><pubDate>Fri, 19 Jun 2026 11:39:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!eSyZ!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d69eba9-d5d3-4387-a046-9b881b00bd45_131x131.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>Anti Assimilation</h1><p>2026-06-19</p><p>The way we build software - time-shared and centralized - is no longer appropriate for the problem domains of the 21st century, regardless of how convenient the synchronous, sequential, centralized paradigm seems.</p><p>Any code sitting atop Linux (or other even more bloated operating systems) has a base tax of about 30,000,000 lines of code on top of CPU ICs that use many more transistors than what was needed to build Sketchpad, Visicalc, Turbo Pascal, Unix V1 (UNIX was originally written in assembler, not K&amp;R C), etc. We can do a <em>lot</em> better.</p><p>Continuing to build software the same way over and over again, expecting different results is a death march based on unwillingness to accurately assess the cost of doing so and based on the belief that there is only one purpose for &#8220;computers&#8221; (a better name might be RM - Reprogrammable Machines).</p><p>Pure functional programming - modern Sector Lisp - costs about 354 lines of assembler. Most other programming languages pay a huge tax for stretching and generalizing the functional programming model.</p><p>We need to think outside of the box of the synchronous, sequential, centralized model. Machine code and ICs can support many more kinds of models than just functional programming (K&amp;R C may have been a convenient abstraction, but, subsequently, C has been distorted into a functional programming language (albeit flawed) replete with function-based calling conventions).</p><p>Progress should result in <em>less</em> code. I don&#8217;t believe that this is happening.</p><p>Our current programming model makes us believe that issues - e.g. assignment, synchronous concurrency, asynchronous parallelism, thread safety, control flow - falling outside of the functional, synchronous, sequential model can be ignored or simply assimilated. Yet, <a href="https://guitarvydas.github.io/2023/11/27/Statecharts-Papers-We-Love-Video.html">Harel</a> came up with a better notation for one of those issues some 40 years ago (Statecharts for reactive control flow). I think that we should be using models for programming that allow us to compose solutions using many paradigms, each with laser-focused languages to support them - specialization instead of generalization and the kitchen sink approach. Decentralization instead of centralization and assimilation. Eliminating problems instead of laboriously assimilating solutions to them.</p><p>Switching to a decentralized model could eliminate the issue of thread safety. Simply eliminating thread safety concerns would noticeably reduce the size and complexity of programming languages. Since the main role of operating systems is to act as scaffolding to support the functional model, can something be done about that issue?</p><p>Everything we&#8217;ve accomplished in the past 50 years fits inside just one of the bubbles on my diagram labelled &#8220;app&#8221; in a previous <a href="/__u/programmingsimplicity.substack.com/p/the-hardware-changed-the-software?r=1egdky">article</a>. We haven&#8217;t really addressed the rest of the stuff, other than by applying notation worship to assimilate each new gotcha, in a whack-a-mole manner, into the ball of stuff that we already have. <a href="/__u/programmingsimplicity.substack.com/p/capt-grace-hopper-on-future-possibilities?r=1egdky">Grace Hopper</a> warned against this approach.</p><p>Functions and math-like notation (mangled by 500 year-old Gutenberg technology) aren&#8217;t the only way to program the things we call &#8220;computers&#8221;.</p><p>It is entirely reasonable to specialize and drill down onto a thin slice of programming. But, it must be remembered that this is not programming, it is just a thin slice of programming. Looking at all problems through a single lens has a cost.</p><h1>See Also</h1><p><em>Email</em>: <a href="mailto:ptcomputingsimplicity@gmail.com">ptcomputingsimplicity@gmail.com</a><br><em>Substack</em>: <a href="/__u/paultarvydas.substack.com/">paultarvydas.s. bstack.com</a><br><em>Videos</em>: <a href="https://www.youtube.com/@programmingsimplicity2980">https://www. youtube.com/@programmingsimplicity2980</a><br><em>Discord</em>: <a href="https://discord.gg/65YZUh6Jpq">https://discord.gg/65YZUh6J. q</a><br><em>Leanpub</em>: <a href="https://leanpub.com/u/paul-tarvydas">https:. /leanpub.com/u/paul-tarvydas</a><br><em>Twitter</em>: @paul_tarvydas<br><em>Bluesky:</em> @paultarvydas.bsky.social<br><em>Mastodon:</em> @paultarvydas<br><em>(earlier) Blog:</em> <a href="http://guitarvydas.github.io/">guitarvydas.github.io</a><br><em>References:</em> <a href="https://guitarvydas.github.io/2024/01/06/References.html">https://guitarvydas.github.io/2024/01/06/References.html</a></p><p><em>Paid subscriptions are a voluntary way to support this work.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/anti-assimilation/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/anti-assimilation/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/p/anti-assimilation?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/p/anti-assimilation?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://programmingsimplicity.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/programmingsimplicity.substack.com/subscribe"><span>Subscribe now</span></a></p>]]></content:encoded></item></channel></rss>