<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://blog.softwarewrighter.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://blog.softwarewrighter.com/" rel="alternate" type="text/html" /><updated>2026-11-06T07:56:05-08:00</updated><id>https://blog.softwarewrighter.com/feed.xml</id><title type="html">Software Wrighter Lab Blog</title><subtitle>AI coding agents, systems programming, and practical machine learning</subtitle><author><name>Software Wrighter</name></author><entry><title type="html">Why I Use #8: fd, ripgrep, skim, dua and bat — Rust at the Prompt</title><link href="https://blog.softwarewrighter.com/2026/11/04/why-i-use-rust-cli-tools/" rel="alternate" type="text/html" title="Why I Use #8: fd, ripgrep, skim, dua and bat — Rust at the Prompt" /><published>2026-11-04T00:15:00-08:00</published><updated>2026-11-04T00:15:00-08:00</updated><id>https://blog.softwarewrighter.com/2026/11/04/why-i-use-rust-cli-tools</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/04/why-i-use-rust-cli-tools/"><![CDATA[<!-- DRAFT (2026-10-30), Mike: split from #7 (iTerm2, tmux, mosh) as he suggested: "Rust-based (fd, rg, dua) as a follow-on".
     skim added at Mike's request (2026-10-30: "there is a rust version of fzf (fuzzy find) add that"): skim, command sk, repo
     skim-rs/skim (gh api 2026-10-30; lotabout/skim redirects there). Mike (2026-10-30): he uses skim on some Arch systems, and fzf on
     Arch too; "I used to use fzf, but since I like Rust, I switched to sk". Both installed on this Mac with Homebrew on 2026-10-30: sk 5.9.0, fzf 0.74.5. fzf itself is Go, so skim is not a GNU replacement like the other three.
     bat and "Together" added at Mike's request (2026-10-30: "show these examples in the post, i.e., how to combine these, also
     bat vs cat?"). bat is NOT installed on this Mac (Homebrew bat 0.26.1, github.com/sharkdp/bat, same author as fd); its
     behavior is from its docs. Combined examples were run on this Mac (2026-10-30) with sk --filter standing in for the
     interactive picker, except the two that need bat or a live terminal: the bat preview (taken from sk --help's own example)
     and live grep (sk -i -c, skim's README). Measured: fd '^target$' finds 0 under ~/github/hardwarewrighter (gitignored);
     with -I it finds hex1000/target (268.64 MB) and X_eTaL-fpga/target (1.11 GB), 1.38 GB total, per dua.
     "(and similar)": candidate list below, from what is installed, for Mike to trim. Facts from published posts: TBT #6
     (pjmai-rs: "too much time using cd, du, fd, and ls commands to find and navigate"); #1 (Rust); #5 (GNU findutils, grep,
     coreutils' du). Checked on this Mac (2026-10-30): fd 10.4.2 and dua 2.34.0 from cargo (~/.cargo/bin); ripgrep 15.2.0 from
     Homebrew, first on PATH, with a second rg in ~/.cargo/bin; just 1.58.0 from Homebrew. Not found in that 2026-10-30 check: eza, bat, zoxide, fzf,
     dust, hyperfine, tokei, starship, delta, skim (sk); Mike has since shown bat and sk in use (2026-11-04). Defaults described (gitignore, hidden files, dua i) are each project's documented
     behavior, not measurements; no speed claims without a measurement; "faster for me" is Mike's own (2026-10-30), about him at the CLI, not a benchmark. Lead image: Mike's dua screenshot (2026-11-02), tab bar cropped, no-invert. -->

<p><img src="/assets/images/posts/dua-disk-usage.webp" class="post-marker no-invert" alt="dua's interactive view of a home directory, folders sorted by size with percentage bars" style="width: 205px;" /></p>

<p>The <a href="/2026/11/03/why-i-use-iterm2-tmux-autossh/">prior post</a> was about getting to a prompt and keeping it. This one is about five commands I type at it, all written in Rust, and how they combine. Three of them, fd, ripgrep and dua, take the place of GNU tools from <a href="/2026/11/01/why-i-use-gnu-tools/">#5</a> at my command line, and each is better at the job I actually have, which is usually searching a source tree. The other two work alongside them: skim, a fuzzy finder in the style of fzf, and bat, which takes the place of cat.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>fd</strong></td>
        <td><a href="https://github.com/sharkdp/fd">github.com/sharkdp/fd</a></td>
      </tr>
      <tr>
        <td><strong>ripgrep</strong></td>
        <td><a href="https://github.com/BurntSushi/ripgrep">github.com/BurntSushi/ripgrep</a></td>
      </tr>
      <tr>
        <td><strong>skim</strong></td>
        <td><a href="https://github.com/skim-rs/skim">github.com/skim-rs/skim</a></td>
      </tr>
      <tr>
        <td><strong>dua</strong></td>
        <td><a href="https://github.com/Byron/dua-cli">github.com/Byron/dua-cli</a></td>
      </tr>
      <tr>
        <td><strong>bat</strong></td>
        <td><a href="https://github.com/sharkdp/bat">github.com/sharkdp/bat</a></td>
      </tr>
      <tr>
        <td><strong>Why Rust</strong></td>
        <td><a href="/2026/10/28/why-i-use-rust/">Why I Use #1: Rust</a></td>
      </tr>
      <tr>
        <td><strong>The GNU originals</strong></td>
        <td><a href="/2026/11/01/why-i-use-gnu-tools/">Why I Use #5: GNU Tools</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#why-i-use">Why I Use: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="not-instead-of-gnu-beside-it">Not instead of GNU, beside it</h2>

<p>I still install GNU’s find, grep and du, and scripts still use them, because they are everywhere and their options are a standard. I do not require the AI coding agents that write scripts for me to use the Rust alternatives. At the command line, though, I prefer the Rust commands, because they are faster for me. Their defaults are chosen for someone searching code, so the common case needs no options at all.</p>

<h2 id="fd-find-the-way-i-mean-it">fd: find, the way I mean it</h2>

<p><a href="https://github.com/sharkdp/fd">fd</a> finds files by name. Where <code class="language-plaintext highlighter-rouge">find . -name '*.rs'</code> needs a path, a test and quoting, <code class="language-plaintext highlighter-rouge">fd -e rs</code> does the same search. By default it skips hidden files and anything listed in <code class="language-plaintext highlighter-rouge">.gitignore</code>, so a search of a Rust project does not wade through <code class="language-plaintext highlighter-rouge">target/</code>, and it searches by regular expression with colored output.</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fd -e rs              # every Rust source file in this project
fd Cargo.toml         # every crate
fd -e md -x wc -w     # word count of every Markdown file, in parallel
</code></pre></div></div>

<p>fd was one of the commands I was typing too often when I wrote <a href="/2026/03/05/tbt-pjmai-rs-project-manager/">pjmai-rs</a>: with 200 repositories spread differently across each machine, I was spending too much time with <code class="language-plaintext highlighter-rouge">cd</code>, <code class="language-plaintext highlighter-rouge">du</code>, <code class="language-plaintext highlighter-rouge">fd</code> and <code class="language-plaintext highlighter-rouge">ls</code> just to find where a project was.</p>

<p>My most frequent use of fd is just <code class="language-plaintext highlighter-rouge">fd</code>, with no arguments, in place of <code class="language-plaintext highlighter-rouge">du -a</code>: it lists every file under the current directory, and it has the advantage of skipping what <code class="language-plaintext highlighter-rouge">.gitignore</code> already says to ignore.</p>

<h2 id="ripgrep-grep-for-source-trees">ripgrep: grep for source trees</h2>

<p><a href="https://github.com/BurntSushi/ripgrep">ripgrep</a>, <code class="language-plaintext highlighter-rouge">rg</code>, searches file contents. It is recursive by default and, like fd, skips hidden files, binary files and whatever <code class="language-plaintext highlighter-rouge">.gitignore</code> excludes, so <code class="language-plaintext highlighter-rouge">rg pattern</code> in a project searches the project and not its build output.</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rg 'fn main'          # every main in the project
rg -t rust unsafe     # only in Rust files
rg -l TODO            # just the names of files with a TODO
</code></pre></div></div>

<p>My usual search is in Rust files only:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rg <span class="nt">-t</span> rust Hello                                    <span class="c"># rg</span>
find <span class="nb">.</span> <span class="nt">-name</span> <span class="s2">"*.rs"</span> <span class="nt">-exec</span> <span class="nb">grep </span>Hello <span class="o">{}</span> <span class="se">\;</span> <span class="nt">-print</span>   <span class="c"># the same search without it</span>
</code></pre></div></div>

<p>The rg line is shorter, and it does more. It skips whatever <code class="language-plaintext highlighter-rouge">.gitignore</code> excludes, so a match in a copy under <code class="language-plaintext highlighter-rouge">target/</code> does not show up, and it prints the file name and line number with each match. The <code class="language-plaintext highlighter-rouge">find</code> line searches the ignored files too. It runs one grep per file, and the <code class="language-plaintext highlighter-rouge">-print</code> at the end names a file only after its matching lines, because <code class="language-plaintext highlighter-rouge">-exec</code> counts as true only when grep found something.</p>

<h2 id="skim-pick-one-as-you-type">skim: pick one as you type</h2>

<p><a href="https://github.com/skim-rs/skim">skim</a>, whose command is <code class="language-plaintext highlighter-rouge">sk</code>, is a fuzzy finder: give it a list of lines, type a few letters in any order, and it narrows the list as you type until the one you want is at the top. It is a Rust implementation in the style of fzf, which is written in Go. I found fzf useful, but after using fd and rg, both in <a href="/2026/10/28/why-i-use-rust/">Rust</a>, I looked for a Rust alternative to fzf, partly to support the Rust community, and switched to skim. It does not replace find or xargs; it sits between them. fd or find produces the list, skim picks from it, and xargs or any other command acts on the pick:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fd -e rs | sk              # pick a Rust file by a few letters of its name
rg -l TODO | sk            # pick one of the files with a TODO
fd -e rs | sk -m | xargs wc -l   # line counts for just the files I mark
</code></pre></div></div>

<p>Fuzzy matching is also how <a href="/2026/03/07/pjmai-rs-navigation-history-and-fuzzy-completion/">pjmai-rs completes project names</a>: type part of a name and the closest match wins.</p>

<p>I run skim with a preview:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sk <span class="nt">--preview</span> <span class="s2">"bat --color=always --style=numbers --line-range=:500 {}"</span>
</code></pre></div></div>

<p>skim lists the files under the current directory, and as I move through them, the preview pane shows the one under the cursor. <code class="language-plaintext highlighter-rouge">{}</code> is that file. The preview is bat, below: <code class="language-plaintext highlighter-rouge">--color=always</code> keeps the syntax highlighting even though bat is writing to skim rather than a terminal, <code class="language-plaintext highlighter-rouge">--style=numbers</code> keeps the line numbers and drops the rest of its decoration, and <code class="language-plaintext highlighter-rouge">--line-range=:500</code> stops after the first 500 lines so a large file does not slow the preview down.</p>

<h2 id="dua-where-did-the-disk-go">dua: where did the disk go?</h2>

<p><a href="https://github.com/Byron/dua-cli">dua</a>, for disk usage analyzer, does more than du. It answers what <code class="language-plaintext highlighter-rouge">du</code> does, sorted so the biggest offenders are obvious, and its interactive mode, <code class="language-plaintext highlighter-rouge">dua i</code>, lets me browse the tree by size, mark what to delete, and delete it, without composing an <code class="language-plaintext highlighter-rouge">rm</code> by hand.</p>

<p>Before dua, I found large files with <code class="language-plaintext highlighter-rouge">du -ah</code>, grep for the sizes in megabytes or gigabytes, and sort, something like:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">du</span> <span class="nt">-ah</span> | <span class="nb">grep</span> <span class="nt">-E</span> <span class="s1">'^ *[0-9.]+[MG]'</span> | <span class="nb">sort</span> <span class="nt">-h</span>
</code></pre></div></div>

<p>I also used desktop apps bought from the Mac App Store, and they were clunky and very slow. dua is very fast, and ergonomic.</p>

<p>I use it to find space I can free. Mainly that is any Rust <code class="language-plaintext highlighter-rouge">target/</code> directory, since a build recreates it easily; sometimes it is cache directories, sometimes downloads, and sometimes large data files from old projects.</p>

<h2 id="bat-cat-for-reading">bat: cat, for reading</h2>

<p><code class="language-plaintext highlighter-rouge">cat</code> concatenates files; most of the time I use it to read one. <a href="https://github.com/sharkdp/bat">bat</a>, from the author of fd, is built for reading: syntax highlighting, line numbers, markers in the margin for lines changed since the last git commit, and a pager for anything longer than the screen. When its output goes to a pipe or a file instead of a terminal, it drops all of that and behaves like plain <code class="language-plaintext highlighter-rouge">cat</code>, so it is safe in the middle of a pipeline.</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bat src/main.rs           # highlighted, numbered, paged
bat -r 40:60 src/main.rs  # just lines 40 to 60
bat -A README.md          # show tabs, line endings and other invisible characters
</code></pre></div></div>

<p>That last one is the check <a href="/2026/10/31/why-i-use-my-tools/">markdown-checker</a> automates: characters you cannot see that stop a README rendering.</p>

<p>One place I use bat is as skim’s preview, above. I also use it on its own, here on my Mac:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>% bat hello_rust/src/main.rs
─────┬────────────────────────────────────────────────
     │ File: hello_rust/src/main.rs
─────┼────────────────────────────────────────────────
   1 │ fn main() {
   2 │     println!("Hello, world!");
   3 │ }
</code></pre></div></div>

<p>In the terminal the code is syntax highlighted too.</p>

<h2 class="pos-center" id="together">Together</h2>

<p>Each of these does one job, and their output is plain lines, so they pipe into each other: fd and ripgrep produce lists, skim picks from a list, bat shows what is picked, and xargs or any other command acts on it.</p>

<p>Pick a file by a few letters of its name, then open it:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$EDITOR "$(fd -e rs | sk)"
</code></pre></div></div>

<p>Search with ripgrep, choose among the matches, and preview each one in bat with the matching line highlighted. This one is straight from skim’s own help:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rg --line-number TODO |
  sk --delimiter : \
     --preview 'bat --style=numbers --color=always --highlight-line {2} {1}' \
     --preview-window +{2}-/2
</code></pre></div></div>

<p>Live grep: skim reruns ripgrep with whatever has been typed so far, on every keystroke:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sk --ansi -i -c 'rg --color=always --line-number "{}"'
</code></pre></div></div>

<p>Mark several, then act on all of them:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rg -l TODO | sk -m | xargs wc -l
</code></pre></div></div>

<p>And where the disk went. Every Rust project leaves a <code class="language-plaintext highlighter-rouge">target/</code> directory of build output, and because <code class="language-plaintext highlighter-rouge">target/</code> is in <code class="language-plaintext highlighter-rouge">.gitignore</code>, fd skips it by default. <code class="language-plaintext highlighter-rouge">-I</code> turns that off, and dua sizes what it finds:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fd -t d -I '^target$' ~/github | xargs dua
</code></pre></div></div>

<p>Without <code class="language-plaintext highlighter-rouge">-I</code>, under one directory of my repositories, that found nothing. With it, it found two <code class="language-plaintext highlighter-rouge">target/</code> directories holding 1.38 GB.</p>

<h2 id="how-i-install-them">How I install them</h2>

<p>I sometimes use Homebrew to install utilities, but if I know a utility is written in Rust, I often install it with <code class="language-plaintext highlighter-rouge">cargo install</code> instead. On Arch I use pacman, yay for packages from the AUR, or cargo.</p>

<p>On the Mac, fd and dua came from <code class="language-plaintext highlighter-rouge">cargo install</code>, and ripgrep from Homebrew (with a second copy in <code class="language-plaintext highlighter-rouge">~/.cargo/bin</code> behind it on the PATH). skim and fzf are on the Arch machines, and on the Mac from Homebrew (<code class="language-plaintext highlighter-rouge">brew install sk fzf</code>).</p>

<h2 id="and-two-more">And two more</h2>

<ul>
  <li><strong>just</strong>, a command runner: a <code class="language-plaintext highlighter-rouge">justfile</code> of named recipes instead of a Makefile’s build rules. I use it in most new projects, such as my X_eTaL repositories.</li>
  <li>For <code class="language-plaintext highlighter-rouge">cd</code>, not zoxide but my own <a href="/2026/03/07/pjmai-rs-navigation-history-and-fuzzy-completion/">pjmai-rs</a>: <code class="language-plaintext highlighter-rouge">chpj</code> to jump to a project, and <code class="language-plaintext highlighter-rouge">pspj</code> and <code class="language-plaintext highlighter-rouge">popj</code> to push and pop, alongside plain <code class="language-plaintext highlighter-rouge">cd</code>.</li>
</ul>

<p>Each of these started as a command I was tired of typing the long way: <code class="language-plaintext highlighter-rouge">find</code> with its quoting, <code class="language-plaintext highlighter-rouge">grep -r</code> through build output, <code class="language-plaintext highlighter-rouge">du</code> piped through grep and sort. The Rust versions are what I reach for now, and installing them with cargo is one more reason I keep <a href="/2026/10/28/why-i-use-rust/">Rust</a> on every machine.</p>]]></content><author><name>Software Wrighter</name></author><category term="tools" /><category term="terminals" /><category term="why-i-use" /><category term="rust" /><category term="cli" /><category term="fd" /><category term="ripgrep" /><category term="rg" /><category term="skim" /><category term="fzf" /><category term="fuzzy-finder" /><category term="dua" /><category term="bat" /><category term="find" /><category term="grep" /><category term="du" /><category term="cat" /><category term="gitignore" /><category term="pipelines" /><summary type="html"><![CDATA[The prior post was about getting to a prompt and keeping it. This one is about five commands I type at it, all written in Rust, and how they combine. Three of them, fd, ripgrep and dua, take the place of GNU tools from #5 at my command line, and each is better at the job I actually have, which is usually searching a source tree. The other two work alongside them: skim, a fuzzy finder in the style of fzf, and bat, which takes the place of cat.]]></summary></entry><entry><title type="html">Worth Reading #1: The People Who Write Software — Weinberg and Brooks</title><link href="https://blog.softwarewrighter.com/2026/11/04/worth-reading-psychology-mythical-man-month/" rel="alternate" type="text/html" title="Worth Reading #1: The People Who Write Software — Weinberg and Brooks" /><published>2026-11-04T00:15:00-08:00</published><updated>2026-11-04T00:15:00-08:00</updated><id>https://blog.softwarewrighter.com/2026/11/04/worth-reading-psychology-mythical-man-month</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/04/worth-reading-psychology-mythical-man-month/"><![CDATA[<!-- DRAFT (2026-11-02), Mike: "start a new blog post for thursday 11/5, influential books", then "maybe a new series, worth reading".
     Split into posts of 2 to 4 books, about 3 on average, one a week; more books coming (Mike, 2026-11-02). Added the same day at
     Mike's request: Loosely Coupled (Doug Kaye, RDS Press, 2003), The Timeless Way of Building (Alexander, 1979), Gödel, Escher, Bach
     (Hofstadter, 1979); SICP (Abelson and Sussman, 1985), 2026-11-03, when the languages post split into logic (GEB, Mockingbird) and building languages (Loeliger, SICP, AMOP); Your Code as a Crime Scene (Tornhill, 2015) and Design Patterns for Object-Oriented Software Development (Pree, 1995), both 2026-11-03, when #3 split into the pattern books and the coupling books; The Art of the Metaobject Protocol (Kiczales, des Rivières, Bobrow, 1991), added to the languages post 2026-11-03; Alexander's two books split from Design Patterns and Loosely Coupled. Within each post the books are in order
     of first publication until Mike reorders them by when he read them. What each book taught him is Mike: TODO; do not add reasons
     he has not given. Links point only to published posts that already cite the book or its subject. Lead image: Mike's block-psych-myth (Downloads, 2026-11-03), no-invert. -->

<p><img src="/assets/images/posts/block-psych-myth.webp" class="post-marker no-invert" alt="A glowing book cover: a brain, half folds and half circuitry, ringed by mythical creatures, a phoenix, a dragon, a unicorn, a fairy and a griffin" style="width: 205px;" /></p>

<p>This series is a way to acknowledge, and share, what I have read that influenced my approach to software development, and much of that goes beyond coding. I have read many, many books on every aspect of software development; the ones in this series are the ones that stood out and stayed with me. A lot of their ideas are timeless, not tied to a particular fad or fashion in software development.</p>

<p>This first post is about two books on the people who write software.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Book</th>
        <th>Author(s), year</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>The Psychology of Computer Programming</strong></td>
        <td>Gerald M. Weinberg, 1971</td>
      </tr>
      <tr>
        <td><strong>The Mythical Man-Month</strong></td>
        <td>Frederick P. Brooks Jr., 1975</td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#worth-reading">Worth Reading: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="the-psychology-of-computer-programming">The Psychology of Computer Programming</h2>

<figure class="zoomable" style="float: left; width: 100px; margin: 0.3em 1.2em 0.4em 0;">
<img src="/assets/images/posts/cover-psychology-of-computer-programming.webp" class="no-invert" alt="The cover of The Psychology of Computer Programming by Gerald M. Weinberg, red with a printed-circuit pattern, Computer Science Series" />
</figure>

<p>Gerald M. Weinberg (1971; a silver anniversary edition followed in 1998, but I read the original). Programming as human behavior: programmers working alone and in teams, and egoless programming. All eight of its main ideas stayed with me. In each box, Weinberg’s idea is on top and what it meant for me is below:</p>

<div class="grid-4">
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">1</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">Egoless programming</div>
<p style="margin: 0 0 0.5em;">Detach from your code, and invite others to find its bugs; the code gets better faster.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>At IBM, on a team developing parts of MVS/XA, we embraced it. We had many code reviews a day, with stakeholders from many departments, and the code was discussed in detail.</p><p style="margin-bottom: 0;">As a developer, I was expected to take the feedback as valuable and educational, not as personal criticism.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">2</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">Programming is social</div>
<p style="margin: 0 0 0.5em;">Most programs are written by groups; how a team works matters as much as any one person's skill.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>That was a new idea to me. I had thought writing software was all about telling the hardware what to do.</p><p style="margin-bottom: 0;">Code is read, maintained, debugged, extended and replaced, by many people, possibly including me, later. It should be written for that wider audience, not just to produce running code.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">3</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">Read programs</div>
<p style="margin: 0 0 0.5em;">Read other people's programs the way writers read literature, to learn style and to find problems.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p style="margin-bottom: 0;">For me it was a daily occurrence, at code reviews of other people's code. Later, open source opened up tons of code to read.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">4</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">You cannot fully test your own program</div>
<p style="margin: 0 0 0.5em;">We do not see the errors in work we have just made, so someone else should review and test it.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>Writing PL/S for MVS, we stepped through every branch both ways, tracked in yellow highlighter on printed assembler listings, delivered by cart after every compile.</p><p style="margin-bottom: 0;">A function tester once accused me of skipping that, when the console showed <code>SEXTENDED TORAGE</code>. My highlighted listing showed exactly where I had stepped through it, oblivious to the insert going in at the wrong offset. I was not the best tester of my own code.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">5</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">A program has to work first</div>
<p style="margin: 0 0 0.5em;">If a program does not have to work, it can meet any other requirement. Fast with the wrong map gets you somewhere sooner, but not where you meant to go.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>Releases I worked on went in that order: version 1 "light the lights", an MVP before the name; version 2 "fix the bugs, add the missing features"; version 3 "make it fast", and "make it better", such as usability, often an afterthought.</p><p style="margin-bottom: 0;">My new projects go the same way: it works, then features, then faster and easier to use.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">6</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">The environment shapes the work</div>
<p style="margin: 0 0 0.5em;">Remove the vending machine where programmers gathered, and you lose the hall talk that solved problems.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p style="margin-bottom: 0;">Most of my working environments encouraged hall talk, and many problems were solved informally: at a whiteboard, over coffee, or at lunch.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">7</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">People are the hard part</div>
<p style="margin: 0 0 0.5em;">Ability varies widely between programmers, and aptitude tests predict little.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>The hardest part of software development is dealing with people. When I get pushback, I think of "dogs bark at what they don't understand", and the onus is on me to explain it better.</p><p style="margin-bottom: 0;">As an architect, and in technology transfer, I had to tell different audiences different things, for different concerns. It was not straightforward.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">8</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">Languages are for people</div>
<p style="margin: 0 0 0.5em;">Judge a language feature by how people read and write it, not only by what the machine needs.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>Now they are for agents too, human and AI. Lisp, Scheme and Clojure were adopted less than I hoped; many could not get past the parentheses. I have my own likes and dislikes, and no language suits everyone.</p><p style="margin-bottom: 0;">Like the personal computer, I think the personal programming language is coming. I have created several, among them <a href="/2026/10/07/array-languages-xetal/">X_eTaL</a>, <a href="/2026/09/16/ai-tools-coding-agent-in-mlpl/">sw-MLPL</a> and <a href="/2026/10/30/why-i-use-asm-c-plsw/">PL/SW</a>.</p></div>
</div>
</div>

<h2 id="the-mythical-man-month">The Mythical Man-Month</h2>

<p>Frederick P. Brooks Jr. (1975; the 1995 anniversary edition adds <em>No Silver Bullet</em>). Brooks managed the development of IBM’s OS/360, the ancestor of the MVS I later worked on, and the book is what he learned from it. Five of its ideas affected me most; again, Brooks’s idea is on top and what it meant for me is below:</p>

<div class="grid-4">
<div style="grid-column: 1 / -1; border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<figure class="zoomable" style="float: right; width: 92px; margin: 0 0 0.3em 1em;">
<img src="/assets/images/posts/cover-mythical-man-month.webp" class="no-invert" alt="The cover of The Mythical Man-Month: Essays on Software Engineering by Frederick P. Brooks, Jr., tan, with an engraving of mammoths and sloths sinking into a tar pit" />
</figure>
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">1</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">The mythical man-month</div>
<p style="margin: 0 0 0.5em;">People and months are not interchangeable. In Brooks's words, "The bearing of a child takes nine months, no matter how many women are assigned."</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p style="margin-bottom: 0;">Nine women cannot have a baby in one month, but more than nine, overlapping, can produce babies on a monthly cadence. I have many, many projects, and I cannot finish each one as quickly as I would like, but I can show progress across the board by overlapping the work in parallel, which <a href="/2026/11/02/why-i-use-coding-agents/">multiple AI coding agents</a> make possible.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">2</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">Plan to throw one away</div>
<p style="margin: 0 0 0.5em;">The first system built is a pilot, and you will throw it away anyway; the only question is whether you plan to.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>I do plan to throw away early prototypes, though a new language is more often the next step than a replacement. <a href="/2026/10/07/array-languages-xetal/">X_eTaL</a> is the next step after <a href="/2026/09/16/ai-tools-coding-agent-in-mlpl/">sw-MLPL</a>, and sw-MLPL was one too: I worked on ideas before it, like <a href="/2026/04/26/saw-tuplet-smalltalk-forth-from-forth/">Tuplet</a>, and many of my <a href="/2026/04/05/saw-saga-archiving-mlpl-plsw-cor24-compilers/">COR24 languages</a> informed its development.</p><p style="margin-bottom: 0;"><a href="/2026/10/30/why-i-use-asm-c-plsw/">PL/SW</a> was implemented in C, will soon be in <a href="/2026/11/01/dogfooding-hlasm-plsw/">HLASM</a>, and eventually in PL/SW itself.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">3</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">The second-system effect</div>
<p style="margin: 0 0 0.5em;">A designer's second system is the most dangerous one: every feature held back from the first goes into it.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p style="margin-bottom: 0;">I have to resist the temptation to rewrite complex systems, because a rewrite loses the benefit of many fixes.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">4</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">The surgical team</div>
<p style="margin: 0 0 0.5em;">Organize a team around one chief programmer, with others in support roles, rather than many equals working on the same code.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p>It has been a holy grail. At IBM Research I was the lead developer on a team, writing 90% of the code.</p><p style="margin-bottom: 0;">Lately, with my <a href="/2026/11/02/why-i-use-coding-agents/">teams of AI coding agents</a>, I am the chief programmer again, but at a higher level, writing less code than I have in the past.</p></div>
</div>
<div style="border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6em 0.8em; font-size: 0.88em;">
<div style="font-size: 2.4em; font-weight: 700; line-height: 1; color: var(--link-color);">5</div>
<div style="font-weight: 700; margin: 0.3em 0 0.2em;">No silver bullet</div>
<p style="margin: 0 0 0.5em;">Essential complexity belongs to the problem itself; accidental complexity comes from the tools and environment. No technique removes the essential part by an order of magnitude.</p>
<div style="border-top: 1px solid var(--border-color); padding-top: 0.5em;"><p style="margin-bottom: 0;">That distinction has been a driving concern for me when I design tools, languages and operating systems. <a href="/2026/04/27/sw-checklist-ratchet-ai-coding-agents/">sw-checklist</a> leans on it too.</p></div>
</div>
</div>

<h2 id="closing">Closing</h2>

<p>These early readings influenced my choices for decades, and they are still relevant today, even as some of their ideas evolve: the chief programmer now leads a team of AI agents, and languages are written for agents as well as people.</p>]]></content><author><name>Software Wrighter</name></author><category term="books" /><category term="programming-history" /><category term="worth-reading" /><category term="books" /><category term="weinberg" /><category term="psychology-of-computer-programming" /><category term="egoless-programming" /><category term="fred-brooks" /><category term="mythical-man-month" /><category term="brooks-law" /><category term="no-silver-bullet" /><summary type="html"><![CDATA[This series is a way to acknowledge, and share, what I have read that influenced my approach to software development, and much of that goes beyond coding. I have read many, many books on every aspect of software development; the ones in this series are the ones that stood out and stayed with me. A lot of their ideas are timeless, not tied to a particular fad or fashion in software development. This first post is about two books on the people who write software.]]></summary></entry><entry><title type="html">Why I Use #7: iTerm2, autossh, tmux and Chrome Remote Desktop — From the MacBook to the Machines</title><link href="https://blog.softwarewrighter.com/2026/11/03/why-i-use-iterm2-tmux-autossh/" rel="alternate" type="text/html" title="Why I Use #7: iTerm2, autossh, tmux and Chrome Remote Desktop — From the MacBook to the Machines" /><published>2026-11-03T00:15:00-08:00</published><updated>2026-11-03T00:15:00-08:00</updated><id>https://blog.softwarewrighter.com/2026/11/03/why-i-use-iterm2-tmux-autossh</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/03/why-i-use-iterm2-tmux-autossh/"><![CDATA[<!-- DRAFT (2026-10-30), Mike: "next draft in why i use series: iTerm2, tmux, mosh, fd, rg, dua, (and similar). Might split
     this into Rust-based (fd, rg, dua) as a follow-on." Split as suggested: fd, rg and dua are #8 (why-i-use-rust-cli-tools).
     Facts from published posts: TBT #13 (terminals timeline: xterm/VT100 1991-2010, sh/ksh/bash 1991-, "ssh, mosh, tmux"
     2005- as one row, Emacs shell 2015-; "mosh into an Arch box, tmux, a shell inside Emacs"); AI Tools #4 (mosh from the
     MacBook to an Arch Linux server, an unprivileged user, tmux windows for the agent, a shell, an Emacs shell; mosh "survives
     network hiccups better than plain ssh"); AI Tools #5 (Lucy, the local AI cluster); Saw #7 (mosh for roaming, sleep/wake and
     dropped Wi-Fi; tmux so agent sessions survive disconnects and re-attach from any client; multi-day runs).
     Checked on this Mac (2026-10-30): iTerm2 3.7.4, tmux 3.6b and mosh 1.4.0 (both Homebrew). 2026-11-02, Mike: mosh proved unreliable and lately refuses to connect from his Mac; local and cloud LLMs suggested many diagnostics and wrong causes and never got it working reliably; he switched to autossh (1.4g, Homebrew). No ServerAliveInterval in ~/.ssh/config. No ~/.tmux.conf.
     iTerm2 is NOT on the TBT #13 timeline: its start year is Mike: TODO. Tool behavior described is each project's documented
     behavior, not a measurement. Lead image: Mike's block-four-panes.jpg (Dropbox), no-invert. "Mike: TODO" marks his own reasons. -->

<p><img src="/assets/images/posts/block-four-panes.webp" class="post-marker no-invert" alt="A block print of a monitor split into four terminal panes, with racks and cables behind it" style="width: 205px;" /></p>

<p>The <a href="/2026/11/02/why-i-use-coding-agents/">prior post</a> in this series was about coding agents. This one is about what they run inside: the terminal stack between my MacBook and the Arch Linux workstations and rack servers where the agents work. Three terminal tools, each covering a different way a session can die, and one remote desktop for when a terminal is not enough.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>iTerm2</strong></td>
        <td><a href="https://iterm2.com/">iterm2.com</a></td>
      </tr>
      <tr>
        <td><strong>autossh</strong></td>
        <td><a href="https://www.harding.motd.ca/autossh/">harding.motd.ca/autossh</a></td>
      </tr>
      <tr>
        <td><strong>tmux</strong></td>
        <td><a href="https://github.com/tmux/tmux">github.com/tmux/tmux</a></td>
      </tr>
      <tr>
        <td><strong>Chrome Remote Desktop</strong></td>
        <td><a href="https://remotedesktop.google.com/">remotedesktop.google.com</a></td>
      </tr>
      <tr>
        <td><strong>How the agents use it</strong></td>
        <td><a href="/2026/05/16/pi-minimal-agent/">AI Tools #4</a>, <a href="/2026/04/19/saw-prolog-many-agents-self-hosting-mlpl/">Saw #7</a></td>
      </tr>
      <tr>
        <td><strong>The longer timeline</strong></td>
        <td><a href="/2026/10/01/tbt-timelines-of-tools/">TBT #13: Many Decades of Learning the Next Thing</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#why-i-use">Why I Use: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="still-pretending-to-be-a-vt100">Still pretending to be a VT100</h2>

<p><a href="/2026/10/01/tbt-timelines-of-tools/">My timeline of tools</a> starts its terminals row with an IBM 2741, a typewriter, and runs through the 3270 and the VT100. Everything I use today is still pretending to be the last of those. What has changed is what sits around the terminal: the connection is now something that should come back after a closed laptop lid, and the session is something that should survive the connection.</p>

<h2 id="the-setup">The setup</h2>

<p>From the MacBook, I connect with autossh to an Arch Linux machine, log in as an unprivileged user (one per agent), and run tmux. One tmux window runs the agent; another is a shell prompt, or sometimes an Emacs shell (<a href="/2026/05/16/pi-minimal-agent/">AI Tools #4</a>). The same arrangement runs every agent, so what changes between them is the agent and not the setup.</p>

<h2 id="iterm2-the-mac-end">iTerm2: the Mac end</h2>

<figure class="zoomable outdent-right" style="width: 160px;">
<img src="/assets/images/posts/iterm2-badge-claude-status.webp" class="no-invert" alt="Part of an iTerm2 window: a row of tabs, each with a Claude Code status (idle, working, waiting) under its title; the large faint badge 'blog' behind the text of the current session; and a Session Status panel listing Claude sessions, one waiting for permission to run a command" />
<figcaption style="font-size: 0.85em;">Badge, Claude status.</figcaption>
</figure>

<p>iTerm2 is the terminal I choose to use on my Macs.</p>

<p>Mainly I use it for its watermark, which iTerm2 calls a badge: large, faint text in the corner of each session that shows what that tab is working on. With an agent in every tab, a glance tells me which is which.</p>

<p>Lately there is a second reason: iTerm2 3.7 added a <a href="https://iterm2.com/claude-code-integration.html">Claude Code integration</a>, which shows the status of every Claude session (working, waiting or idle) on its tab.</p>

<h2 id="autossh-a-connection-that-comes-back">autossh: a connection that comes back</h2>

<p>ssh is a TCP connection: close the laptop, change Wi-Fi, or let the network drop for long enough, and it is gone. <a href="https://www.harding.motd.ca/autossh/">autossh</a> starts ssh, watches it, and starts it again when it exits or stops passing traffic. It is still plain ssh, with the same keys, config and port forwards, so there is nothing new on the server.</p>

<p>A reconnect is not seamless: the old connection is gone and a new one takes its place. That is fine, because the work was never in the connection. It is in tmux.</p>

<p>I connect with a shell alias. This one is for large12:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">alias </span><span class="nv">mlarge12</span><span class="o">=</span><span class="s1">'autossh -M 0 -t large12 "tmux attach-session || tmux new-session"'</span>
</code></pre></div></div>

<ul>
  <li><code class="language-plaintext highlighter-rouge">-M 0</code> turns off autossh’s own monitoring port, so it restarts ssh whenever ssh exits.</li>
  <li><code class="language-plaintext highlighter-rouge">-t</code> gives the remote command a terminal, which tmux needs.</li>
  <li><code class="language-plaintext highlighter-rouge">tmux attach-session || tmux new-session</code> re-attaches to the session that is already running, or starts one if there is none.</li>
</ul>

<p>So one command takes me from the Mac straight back into whatever was running, and a reconnect lands in the same place.</p>

<p>I used <a href="https://mosh.org/">mosh</a>, the mobile shell, before it. mosh keeps a session alive across sleep and changes of network instead of reconnecting, which is the better idea on paper. In practice it proved unreliable for me, and lately it refuses to connect from my Mac at all. Local and cloud LLMs suggested plenty of diagnostics and proposed causes that turned out to be wrong, and none of them got mosh working reliably. autossh is less clever, and it works for me, so far.</p>

<h2 id="tmux-a-session-that-survives-the-connection">tmux: a session that survives the connection</h2>

<figure class="zoomable outdent-left" style="width: 380px;">
<img src="/assets/images/posts/tmux-codex-large12.webp" class="no-invert" alt="A wide strip of an iTerm2 window: Codex waiting for its next request inside tmux on large12, with tmux's green status line (session main, windows 0:codex and 1:bash, mike@large12 and the working directory) along the bottom, and iTerm2's Session Status panel at the right" />
<figcaption style="font-size: 0.85em;">Codex and bash, two windows in one tmux session on large12. Click to enlarge.</figcaption>
</figure>

<p>autossh brings the connection back; tmux keeps the work alive while it is gone. Sessions live on the server, so a reboot of the MacBook, a new client, or a different machine can re-attach to the same running agent. That is what made <a href="/2026/04/19/saw-prolog-many-agents-self-hosting-mlpl/">multi-day agent runs</a> on the Arch host practical: the agent keeps working whether or not anything is connected to it, and it can be inspected from wherever I am.</p>

<p>I use tmux with a config of my own, and typically with two windows: one running a coding agent, the other a shell.</p>

<p>I connect this way to many different users on the target machines, not just my main one. Those other Linux logins have reduced privileges: they cannot change anything on GitHub, cannot push, and cannot edit each other’s cloned repositories. Each agent works in its own login, and the worst it can do stays there.</p>

<h2 id="before-tmux">Before tmux</h2>

<p>Before tmux, Emacs did most of this for me. Its windows split one frame into panes, and a long-running Emacs held my buffers and shells while I came and went: <code class="language-plaintext highlighter-rouge">emacsclient</code> connected to that running Emacs instead of starting a new one, and <a href="https://www.gnu.org/software/tramp/">TRAMP</a> let it edit files and run shells on remote machines. I sometimes used GNU screen.</p>

<h2 id="chrome-remote-desktop-more-than-a-terminal">Chrome Remote Desktop: more than a terminal</h2>

<figure class="zoomable" style="float: left; width: 150px; margin: 0.3em 1.2em 0.4em 0;">
<img src="/assets/images/posts/crd-remote-devices.webp" class="no-invert" alt="Chrome Remote Desktop's Remote Access page listing remote devices: large12, manager and mighty online, apiary and beast48 offline" />
<figcaption style="font-size: 0.85em;">Remote devices.</figcaption>
</figure>

<p>Some work needs the remote machine’s screen, not just its prompt. For that I use <a href="https://remotedesktop.google.com/">Chrome Remote Desktop</a> to reach the desktops of the Arch Linux workstations and rack servers from my MacBook.</p>

<p>It lets me do more than the CLI can. I can preview graphics on the machine that made them, and browse local servers in the remote desktop’s own browser, where a server listening only on that machine is just a local URL.</p>

<figure class="zoomable" style="float: right; width: 80px; margin: 0.2em 0 0.4em 1.2em;">
<img src="/assets/images/posts/logo-xfce-3d.webp" class="no-invert" alt="A 3D Xfce logo: a black mouse leaping over a gray X, above the word XFCE in blue letters" />
</figure>

<p>The desktop on the other end is <a href="https://xfce.org/">Xfce</a>, a lightweight one, which I chose for its simplicity and responsiveness, and because it uses fewer resources than a heavier desktop would.</p>

<h2 id="three-ways-to-lose-a-session">Three ways to lose a session</h2>

<p>The terminal is still pretending to be a VT100. What has changed is everything around it: a Mac that tells me which agent needs me, a connection that comes back on its own, sessions that never noticed it was gone, and a whole desktop when a prompt is not enough. A future post in this series is about what I type at that prompt: fd, ripgrep, skim, dua and bat.</p>]]></content><author><name>Software Wrighter</name></author><category term="tools" /><category term="terminals" /><category term="why-i-use" /><category term="iterm2" /><category term="autossh" /><category term="tmux" /><category term="ssh" /><category term="mosh" /><category term="chrome-remote-desktop" /><category term="remote-desktop" /><category term="xfce" /><category term="terminals" /><category term="macos" /><category term="arch-linux" /><category term="ai-agents" /><category term="remote-development" /><summary type="html"><![CDATA[The prior post in this series was about coding agents. This one is about what they run inside: the terminal stack between my MacBook and the Arch Linux workstations and rack servers where the agents work. Three terminal tools, each covering a different way a session can die, and one remote desktop for when a terminal is not enough.]]></summary></entry><entry><title type="html">Why I Use #6: Coding Agents, and the Models Around Them</title><link href="https://blog.softwarewrighter.com/2026/11/02/why-i-use-coding-agents/" rel="alternate" type="text/html" title="Why I Use #6: Coding Agents, and the Models Around Them" /><published>2026-11-02T00:15:00-08:00</published><updated>2026-11-02T00:15:00-08:00</updated><id>https://blog.softwarewrighter.com/2026/11/02/why-i-use-coding-agents</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/02/why-i-use-coding-agents/"><![CDATA[<!-- DRAFT (2026-10-30), Mike: #6 on coding agents for 11/02, split from #5 (GNU tools): Claude, Codex, Gemini (now Antigravity),
     and opencode (Z.ai, GLM-5.x). Facts from published posts: TBT #13's AI timeline (Claude 2024-, Claude Code 2025-, Codex /
     Gemini / opencode 2026); AI Tools #4 (the same workflow for Claude Code, Codex, Gemini and opencode with the Z.ai dev plan and
     GLM-5); Saw #6 (All Together Now coordinating Claude Code and opencode/GLM-5 agents); AI Tools #6 (opencode driven against
     local models); AI Tools #8 (opencode + GLM-4.7 in February; Claude Code + Claude Opus 5.5 in October; the domain-expert skill,
     a Gemini skill Mike converted); Saw #16 (Claude in the cloud on several repos).
     Rust puzzle: Mike (2026-10-30): a private Rust puzzle he uses to evaluate open-weight models; Antigravity solved it where many
     open models cannot. Not published: do not describe or link it.
     Gemini/Antigravity: Mike's note (2026-10-30), CHECKED against the gemini-cli GitHub announcement (discussion #28017) and the
     Flutter docs' Antigravity CLI page, 2026-10-30. Corrections to the note: the June 18, 2026 shutdown was for individual
     accounts (Google AI Pro, Ultra, free tier); Gemini Code Assist enterprise licenses and API-key use were not affected. agy is
     the command; global config stays under ~/.gemini/ (project config under .agents/); the installer copies Gemini CLI skills, MCP
     servers, agents and GEMINI.md files over. Not verified, so not in the text: "Antigravity 2.0", "closed source, written in Go".
     Mike's reasons filled 2026-11-02 from his message (ChatGPT web for research/architecture/planning; Claude Code for most implementation;
     Codex for non-coding: blogging, flashing microcontrollers, lab equipment over USB (he wrote "SICP?": SCPI assumed), embedded;
     opencode + GLM-5.x for junior coding, web sites, GitHub commit/PR tracking, some vibe-maintenance; no local models in production;
     planned local agent team; Local GPU section (Mike, 2026-11-02): tasks and models as he listed; TRELLIS (Microsoft caps), Whisper, SpeechT5, Stable
     Diffusion, VibeVoice, MuseTalk checked on GitHub / Hugging Face; image-to-video: Wan 2.x (Mike; project spells it Wan, e.g. Wan2.2). NightCafe section per Mike 2026-11-02 (Nano
     Banana 2.1, consistent characters, community and custom templates); no claim about which blog images came from it. Local agent stack (Mike, 2026-11-02): OpenCode, Pi, his own agents in elisp and Rust; Ollama, llama.cpp, vLLM, FreeToken, Strata.
     emacs-agent (elisp + Rust backend) and emacs-ai-api (LiteLLM gateway, gptel) per Mike 2026-11-02; mlplcode is sw-MLPL; X_eTaL "soon, if not already". FreeToken, Strata, Avalon named by Mike; checked 2026-11-02 by web search, spellings as written). Mike: FreeToken and Strata are NVIDIA-side optimizations, not needed
     on Apple unified memory; Strata so far is an experiment on an Arch system.. Lead image: Mike's block-terminal-ai.jpg (Dropbox), block print of terminals reading codex, opencode,
     claude and agy (fixed 2026-10-30; first version read agv), green text, no-invert. -->

<p><img src="/assets/images/posts/block-terminal-ai.webp" class="post-marker no-invert" alt="" style="width: 205px;" /></p>

<p>The <a href="/2026/11/01/why-i-use-gnu-tools/">prior post</a> in this series was about GNU’s tools, which I have used for decades. This one is about the newest row on <a href="/2026/10/01/tbt-timelines-of-tools/">my timeline of tools</a>, and the fastest-moving: coding agents. Claude Code since 2025, and this year Codex, Gemini and OpenCode beside it, with Gemini CLI’s replacement, Antigravity, now getting another try.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>Claude Code</strong></td>
        <td><a href="https://claude.com/claude-code">claude.com/claude-code</a></td>
      </tr>
      <tr>
        <td><strong>Codex</strong></td>
        <td><a href="https://openai.com/codex/">OpenAI Codex</a></td>
      </tr>
      <tr>
        <td><strong>Antigravity</strong></td>
        <td><a href="https://antigravity.google/">antigravity.google</a>; the <a href="https://github.com/google-gemini/gemini-cli/discussions/28017">Gemini CLI shutdown notice</a></td>
      </tr>
      <tr>
        <td><strong>OpenCode</strong></td>
        <td><a href="https://opencode.ai">OpenCode.ai</a>; models from <a href="https://z.ai">Z.ai</a></td>
      </tr>
      <tr>
        <td><strong>Earlier posts</strong></td>
        <td><a href="/series/#ai-tools">AI Tools: every post</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#why-i-use">Why I Use: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="one-workflow-several-agents">One workflow, several agents</h2>

<p>I run every agent the same way: the same machine, the same project, the same shell and tmux session. What changes between them is the agent and not the setup (<a href="/2026/05/16/pi-minimal-agent/">AI Tools #4</a>), which makes them easier to compare and lets several work at once.</p>

<p><a href="/2026/04/12/saw-agent-coordination-fuzzit-vendoring/">All Together Now</a> coordinated Claude Code and OpenCode agents in one web UI. The agents now work on Arch Linux machines, one user per agent.</p>

<h2 id="claude-code">Claude Code</h2>

<p>Claude Code is the one I have used longest, since 2025, and the one I use most.</p>

<p>It restarted the stuck sound-effects project in <a href="/2026/10/29/ai-tools-domain-expert-skill/">AI Tools #8</a>, where February’s attempt with another agent had stalled. Claude in the cloud worked on several repositories at once to move <a href="/2026/10/25/saw-reva-fork-cosy/">the Reva and CoSy forks</a> over one weekend.</p>

<p>Two things matter most in how I use it now: skills, sets of instructions an agent loads for one kind of task, and agents running in the cloud in parallel.</p>

<p>I use Claude Code to implement most of my software projects.</p>

<h2 id="codex">Codex</h2>

<div class="aside-box outdent-right wide">

  <p><strong>What is SCPI?</strong> Standard Commands for Programmable Instruments, a text command language for test and measurement equipment, defined in 1990 on top of the IEEE 488.2 standard. Power supplies, function generators, oscilloscopes and multimeters from most vendors accept it, over USB, Ethernet, GPIB or a serial port. Commands are short words in a tree, each instrument adds its own branches, and a question mark turns a command into a query.</p>

</div>

<p>OpenAI’s coding agent, the command-line side of ChatGPT. I use Codex for work that is not mainly coding. Blogging is one, sometimes split between Claude and Codex. Hardware is another: flashing microcontrollers, developing embedded software, and talking to lab equipment over USB with SCPI commands. Codex sets up the bench from a script:</p>

<ul>
  <li><strong>power supply:</strong> voltage, current limit and output, such as <code class="language-plaintext highlighter-rouge">VOLT 3.3</code>, <code class="language-plaintext highlighter-rouge">CURR 0.5</code>, <code class="language-plaintext highlighter-rouge">OUTP ON</code></li>
  <li><strong>function generator:</strong> waveform, frequency and amplitude, such as <code class="language-plaintext highlighter-rouge">FUNC SQU</code>, <code class="language-plaintext highlighter-rouge">FREQ 1000</code>, <code class="language-plaintext highlighter-rouge">VOLT 2</code></li>
  <li><strong>oscilloscope:</strong> time base, channel scale and trigger level, such as <code class="language-plaintext highlighter-rouge">:TIM:SCAL 0.001</code>, <code class="language-plaintext highlighter-rouge">:CHAN1:SCAL 1</code>, <code class="language-plaintext highlighter-rouge">:TRIG:EDGE:LEV 1.5</code></li>
  <li><strong>multimeter:</strong> a reading, such as <code class="language-plaintext highlighter-rouge">MEAS:VOLT:DC?</code></li>
</ul>

<p>Those are typical forms; each instrument’s exact commands are in its programming manual, and <code class="language-plaintext highlighter-rouge">*IDN?</code> asks any of them which instrument it is.</p>

<h2 id="gemini-now-antigravity">Gemini, now Antigravity</h2>

<p>I have used the Gemini CLI in the past, but preferred the other CLIs over it. Now Google has replaced it with Antigravity, and I am trying it again.</p>

<p>It has already passed one test that matters to me. I keep a Rust puzzle, which I have not published, that I use to evaluate open-weight models, and Antigravity solved it where many open models cannot.</p>

<p>On June 18, 2026 the Gemini CLI <a href="https://github.com/google-gemini/gemini-cli/discussions/28017">stopped serving requests</a> for individual accounts (Google AI Pro, Google AI Ultra and the free tier), with the Antigravity CLI as its replacement. Enterprise Gemini Code Assist licenses and API-key use were not affected.</p>

<p>What that means in practice:</p>

<ul>
  <li><strong>The command is <code class="language-plaintext highlighter-rouge">agy</code>,</strong> not <code class="language-plaintext highlighter-rouge">gemini</code>. Scripts and CI jobs that call <code class="language-plaintext highlighter-rouge">gemini</code> need changing.</li>
  <li><strong>The configuration mostly carried over.</strong> Antigravity’s installer finds the Gemini CLI directory and copies its skills, MCP servers, agents and <code class="language-plaintext highlighter-rouge">GEMINI.md</code> files across, and its global configuration still lives under <code class="language-plaintext highlighter-rouge">~/.gemini/</code>; per-project configuration moves to an <code class="language-plaintext highlighter-rouge">.agents/</code> directory.</li>
  <li><strong>It is an agent, not a wrapper.</strong> The new CLI shares its agent harness with Google’s Antigravity desktop platform and runs multi-step work, tests and skills in the shell.</li>
</ul>

<p>The models underneath are still Gemini.</p>

<h2 id="opencode-with-zais-glm">OpenCode, with Z.ai’s GLM</h2>

<p><a href="https://opencode.ai">OpenCode</a> is the open one: an agent that can drive many models. I use it with <a href="https://z.ai">Z.ai</a>’s GLM models on its developer plan.</p>

<p>It wrote the first attempt at the sound-effects project with GLM-4.7 in February, and it ran beside Claude Code under All Together Now with GLM-5. Because it can point at any model, it is the harness I used to test <a href="/2026/09/09/ai-tools-local-llm-loop-model-evaluation/">local models in a plan, execute and review loop</a>. It is also the architectural reference for <a href="/2026/09/16/ai-tools-coding-agent-in-mlpl/">the coding agent I wrote in MLPL</a>.</p>

<p>Today I use OpenCode with Z.ai’s GLM-5.x models for junior coding tasks, for updating web sites, for keeping track of GitHub commits and pull requests, and sometimes for <a href="/2026/04/29/personal-software-vibe-maintenance/">vibe-maintenance</a>.</p>

<h2 id="what-my-local-gpus-do-now">What my local GPUs do now</h2>

<p>Local models do plenty of other work for me, just not coding yet. I download open-weight models from <a href="https://huggingface.co">Hugging Face</a> and run each on whichever of my GPUs has enough VRAM for it:</p>

<table>
  <thead>
    <tr>
      <th>Task</th>
      <th>Model</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Text to image</td>
      <td><a href="https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0">Stable Diffusion</a> (Stability AI)</td>
    </tr>
    <tr>
      <td>Image to 3D model</td>
      <td><a href="https://github.com/microsoft/TRELLIS">TRELLIS</a> (Microsoft)</td>
    </tr>
    <tr>
      <td>Speech to text</td>
      <td><a href="https://github.com/openai/whisper">Whisper</a> (OpenAI)</td>
    </tr>
    <tr>
      <td>Text to speech</td>
      <td><a href="https://github.com/microsoft/SpeechT5">SpeechT5</a> and <a href="https://github.com/microsoft/VibeVoice">VibeVoice</a> (Microsoft)</td>
    </tr>
    <tr>
      <td>Voice cloning</td>
      <td>VibeVoice, from a short voice sample</td>
    </tr>
    <tr>
      <td>Lip-syncing a face to speech</td>
      <td><a href="https://github.com/TMElyralab/MuseTalk">MuseTalk</a> (Tencent Music’s Lyra Lab)</td>
    </tr>
    <tr>
      <td>Image to video</td>
      <td><a href="https://github.com/Wan-Video/Wan2.2">Wan 2.x</a> (Alibaba)</td>
    </tr>
  </tbody>
</table>

<h2 id="nightcafe-in-the-cloud">NightCafe, in the cloud</h2>

<p>For images and video I also use <a href="https://creator.nightcafe.studio/explore">NightCafe</a>, a site that hosts many, many image and video models in the cloud. I use it for text to image, image editing and image to video, and Nano Banana 2.1 most of all.</p>

<p>Two of its features matter to me: consistent characters, which keep the same character across many images, and templates, both the community’s and custom ones of my own.</p>

<h2 id="local-coding-agents">Local coding agents</h2>

<p>I do run coding agents against local models. The agents are:</p>

<ul>
  <li><strong>OpenCode</strong> and <a href="/2026/05/16/pi-minimal-agent/">Pi</a></li>
  <li><strong><a href="https://github.com/softwarewrighter/emacs-agent">emacs-agent</a></strong>, my agent inside Emacs, which keeps every conversation as an Org transcript; it is written in Emacs Lisp, with a Rust back end in progress</li>
  <li><strong><a href="/2026/09/16/ai-tools-coding-agent-in-mlpl/">mlplcode</a></strong>, written in sw-MLPL with Rust underneath, with X_eTaL likely next</li>
</ul>

<p><a href="https://github.com/softwarewrighter/emacs-ai-api">emacs-ai-api</a> gives Emacs one gateway to cloud and local models alike. The agents reach the models through Ollama, llama.cpp, vLLM, FreeToken and Strata, and <a href="/2026/09/09/ai-tools-local-llm-loop-model-evaluation/">AI Tools #6</a> measured some of them.</p>

<p>Even so, I still do not rely on local models to produce code or documentation.</p>

<p>But I am still planning a local team of AI coding agents running on distributed local CPUs, and it is closer than it was. Recent work such as <a href="https://arxiv.org/abs/2608.16157">FreeToken</a>, <a href="https://github.com/Niko1221/Strata">Strata</a> and <a href="https://github.com/freriadoc/Avalon">Avalon</a> lets decent coding models, built on mixture-of-experts and speculative decoding, run on the smaller GPUs I have.</p>

<p>FreeToken and Strata are optimizations for NVIDIA GPUs, where a card’s VRAM is separate from system memory and the model has to be split between them; a Mac’s unified memory does not need them.</p>

<p>The problem they solve is bandwidth. A GPU reads its own VRAM fast, but everything that does not fit there lives in system RAM, on the far side of a PCIe bus that is much slower than either memory.</p>

<p>Most of my workstations and rack servers are PCIe 3: HPE ProLiant Gen8, Gen9 and Gen10 servers, Dell Precision T7910 workstations and a Lenovo ThinkStation P520. PCIe 3 gives a card about 16 GB/s with sixteen lanes, or half that with eight. Two of the servers have 640 GB of RAM each, room for a large model’s cold experts: a 2U Gen8 with four Xeons, and a 1U Gen10 Plus with one. The Gen10 Plus is the newest, and the one that is PCIe 4, which doubles that. Approximate peak figures:</p>

<table>
  <thead>
    <tr>
      <th>Path</th>
      <th>Bandwidth</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>PCIe 3.0, x16 (most of my machines) / x8</td>
      <td>about 16 / 8 GB/s</td>
    </tr>
    <tr>
      <td>PCIe 4.0 / 5.0, x16</td>
      <td>about 32 / 64 GB/s</td>
    </tr>
    <tr>
      <td>System RAM, DDR3, four channels (Gen8)</td>
      <td>about 40 to 50 GB/s per socket</td>
    </tr>
    <tr>
      <td>System RAM, DDR4, four or six channels (T7910, P520, Gen9, Gen10)</td>
      <td>about 70 to 130 GB/s per socket</td>
    </tr>
    <tr>
      <td>Apple M3 Pro unified memory, LPDDR5</td>
      <td>about 150 GB/s</td>
    </tr>
    <tr>
      <td>Tesla P4 / A2 VRAM</td>
      <td>about 190 / 200 GB/s</td>
    </tr>
    <tr>
      <td>System RAM, DDR4-3200, eight channels (Gen10 Plus)</td>
      <td>about 200 GB/s</td>
    </tr>
    <tr>
      <td>GTX 1660 Super VRAM</td>
      <td>about 340 GB/s</td>
    </tr>
    <tr>
      <td>Apple M1 Max unified memory, LPDDR5</td>
      <td>about 400 GB/s</td>
    </tr>
    <tr>
      <td>RTX 5060 Ti VRAM</td>
      <td>about 450 GB/s</td>
    </tr>
    <tr>
      <td>RTX 4070 VRAM</td>
      <td>about 500 GB/s</td>
    </tr>
    <tr>
      <td>RTX 3090 VRAM</td>
      <td>about 940 GB/s</td>
    </tr>
  </tbody>
</table>

<section class="stagger">

  <p>Two things stand out.</p>

  <p><strong>Newer is not faster.</strong> The 3090, from 2020, has nearly twice the memory bandwidth of the 4070 and twice that of the 5060 Ti. The 5060 Ti’s eight PCIe 5 lanes also drop to about 8 GB/s in a PCIe 3 slot.</p>

  <p><strong>The bus is the bottleneck.</strong> If a token needs 3 GB of weights that are not in VRAM, copying them over PCIe 3 takes about 190 ms, a ceiling of about five tokens a second. The 3090 reads the same 3 GB from its own VRAM in about 3 ms.</p>

  <p>That is what FreeToken and Strata work around. A mixture-of-experts model touches only a few of its experts per token, so they keep the most-used experts resident in VRAM and leave the rest in system RAM. The CPU computes those where they sit, reading them at RAM speed instead of copying them across the bus.</p>

  <p>On unified memory, the CPU and GPU share one pool, and there is nothing to copy. But Apple Silicon has its own bandwidth tiers. I ran out of room on my M3 Pro with 18 GB, where macOS lets the GPU use only about two thirds of memory, when I went looking for a bigger model.</p>

  <p>Researching it, I found that the M3 Pro reads its memory at about 150 GB/s, less than the M2 Pro before it. The older M1 Max reads at about 400 GB/s and comes with up to 64 GB.</p>

  <p>Refurbished, the two cost about the same, as of this fall: around $1,200 to $1,400 for a 14-inch M3 Pro with 18 GB, and around $1,350 to $1,400 for an M1 Max with 64 GB.</p>

  <p>I ended up with the M1 Max. Its 64 GB seems big enough to run decent coding models that did not fit on my 16 GB or 24 GB NVIDIA cards.</p>

  <p>My Strata work so far is an experiment on an Arch Linux machine. I expect to use the local team for toy projects first, and then perhaps for daily development.</p>

</section>

<h2 id="how-i-choose">How I choose</h2>

<p>I have no measurements to justify these choices. They are what I have settled into:</p>

<table>
  <thead>
    <tr>
      <th>For</th>
      <th>I use</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Research, architecture, high-level planning</td>
      <td>ChatGPT, on the web</td>
    </tr>
    <tr>
      <td>Implementing most software projects</td>
      <td>Claude Code</td>
    </tr>
    <tr>
      <td>Non-coding work, blogging (shared with Claude), hardware and embedded work</td>
      <td>Codex</td>
    </tr>
    <tr>
      <td>Junior coding tasks, web site updates, GitHub commit and pull-request tracking, some maintenance</td>
      <td>OpenCode with GLM-5.x</td>
    </tr>
    <tr>
      <td>Trying again, after it passed my Rust puzzle</td>
      <td>Antigravity</td>
    </tr>
  </tbody>
</table>

<p>The goal for the local team is that it gets better. I want the local agents to learn from feedback nightly, by fine-tuning on the day’s work, toward a self-improving virtual development team. Someday that learning may move from nightly postmortems to continuous learning, the subject of my <a href="/series/#towards-continuous-llm-learning">Towards Continuous LLM Learning</a> series.</p>]]></content><author><name>Software Wrighter</name></author><category term="tools" /><category term="ai-agents" /><category term="why-i-use" /><category term="ai-agents" /><category term="coding-agents" /><category term="claude-code" /><category term="codex" /><category term="gemini" /><category term="antigravity" /><category term="agy" /><category term="opencode" /><category term="z-ai" /><category term="glm" /><category term="skills" /><summary type="html"><![CDATA[The prior post in this series was about GNU’s tools, which I have used for decades. This one is about the newest row on my timeline of tools, and the fastest-moving: coding agents. Claude Code since 2025, and this year Codex, Gemini and OpenCode beside it, with Gemini CLI’s replacement, Antigravity, now getting another try.]]></summary></entry><entry><title type="html">Dogfooding #2: A Chain of Tools, Each Testing the One Below</title><link href="https://blog.softwarewrighter.com/2026/11/01/dogfooding-hlasm-plsw/" rel="alternate" type="text/html" title="Dogfooding #2: A Chain of Tools, Each Testing the One Below" /><published>2026-11-01T00:15:00-07:00</published><updated>2026-11-01T00:15:00-07:00</updated><id>https://blog.softwarewrighter.com/2026/11/01/dogfooding-hlasm-plsw</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/01/dogfooding-hlasm-plsw/"><![CDATA[<!-- DRAFT (2026-10-31), Mike: Dogfooding #2, planned 11/01. His framing: PL/SW previously dogfooded his C, which dogfooded the simpler
     assembler; PL/SW will dogfood HLASM; HLASM now dogfoods the simpler assembler, and he plans for HLASM and PL/SW each to dogfood
     themselves; SWTOS dogfoods the simple assembler and some PL/SW, and he hopes to make it the ultimate test of the refactored
     HLASM and PL/SW instead of cor24-asm.
     Facts: sw-cor24-hlasm branch feat/tinyc-macro-ports (9acb665, 2026-10-30): saga tinyc-macro-ports, step 1
     structured-jmp-relaxation done (de3315a; docs/structured-jump-relaxation.md), step 2 limits audit current, then e2e harness,
     tiny-C survey and macro catalog, macro library, demo ports, showcase; docs/bootstrap.md (hlasm0 -> hlasm1); README (written in
     COR24 assembly, output plain .s over UART). sw-cor24-plsw dev f6d2d64: docs/migrate-from-c-to-hlasm.md (plan, 2026-10-30, no
     migration work started; phases 0-5). sw-tos justfile (cor24-asm, plsw.lgo pipeline). Both repos' default branch is dev.
     Lead image: Mike's block-puppy-dogfood.jpg (Dropbox), NightCafe credit bar cropped off the bottom;
     monochrome block print, no-invert. Moved to 11/01 (Mike, 2026-10-31). Gutter beside "Where it
     is headed": Mike's screenshot (Dropbox Screenshots, 2026-11-01 9.45.53 AM), the word HLASM in IBM-logo-style stripes, trimmed;
     now a montage with logo-pl-sw.png and logo-sw-tos.jpg (Dropbox) on white. Gutter beside "The tiny-C demos
     go first": Mike's logo-c-3d.jpg (Dropbox), 140px, no-invert. -->

<p><img src="/assets/images/posts/block-puppy-dogfood.webp" class="post-marker no-invert" alt="" style="width: 205px;" /></p>

<p><a href="/2026/04/27/embedded-pascal-pcode-yagni-bump-to-reclaim/">The first Dogfooding post</a> was about one tool finding the limits of another: a Pascal VM’s allocator, outgrown by an OCaml written in Pascal. This one is about a whole chain of them. On COR24, each of my tools is tested by the one built on top of it, and I am rebuilding the chain so that, in the end, the top two test themselves.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>HLASM</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-hlasm">sw-cor24-hlasm</a>, its <a href="https://github.com/sw-embed/sw-cor24-hlasm/blob/dev/docs/bootstrap.md">bootstrap plan</a></td>
      </tr>
      <tr>
        <td><strong>PL/SW</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-plsw">sw-cor24-plsw</a>, its <a href="https://github.com/sw-embed/sw-cor24-plsw/blob/dev/docs/migrate-from-c-to-hlasm.md">C to HLASM plan</a></td>
      </tr>
      <tr>
        <td><strong>tiny C</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-x-tinyc">sw-cor24-x-tinyc</a> (<code class="language-plaintext highlighter-rouge">tc24r</code>)</td>
      </tr>
      <tr>
        <td><strong>The assembler</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-x-assembler">sw-cor24-x-assembler</a> (<code class="language-plaintext highlighter-rouge">cor24-asm</code>)</td>
      </tr>
      <tr>
        <td><strong>SWTOS</strong></td>
        <td><a href="https://github.com/sw-embed/sw-tos">sw-tos</a></td>
      </tr>
      <tr>
        <td><strong>Background</strong></td>
        <td><a href="/2026/10/30/why-i-use-asm-c-plsw/">Why I Use #3: Assembler, C and PL/SW</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#dogfooding">Dogfooding: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="the-chain-as-it-stands">The chain as it stands</h2>

<p><a href="/2026/10/30/why-i-use-asm-c-plsw/">Why I Use #3</a> described the three languages I write COR24 code in. Built one on another, they test each other:</p>

<ul>
  <li><strong>The simple assembler</strong>, <code class="language-plaintext highlighter-rouge">cor24-asm</code>, turns COR24 assembly text into bytes. Everything above it depends on it.</li>
  <li><strong>My C compiler</strong>, <code class="language-plaintext highlighter-rouge">tc24r</code>, emits assembly for <code class="language-plaintext highlighter-rouge">cor24-asm</code>, so every C program it compiles dogfoods the assembler.</li>
  <li><strong>The PL/SW compiler</strong> is written in C. Compiling it with <code class="language-plaintext highlighter-rouge">tc24r</code> dogfooded the C compiler, a real program of thousands of lines rather than a demo.</li>
  <li><strong>SWTOS</strong>, my microkernel, is written in assembler and some PL/SW, so it dogfoods the assembler and part of PL/SW.</li>
</ul>

<p>That chain has a host-side compiler in the middle: <code class="language-plaintext highlighter-rouge">tc24r</code> runs on the host, not on COR24.</p>

<h2 id="moving-plsw-onto-hlasm">Moving PL/SW onto HLASM</h2>

<p>HLASM is my macro assembler for COR24, inspired by IBM’s High Level Assembler: structured <code class="language-plaintext highlighter-rouge">IF</code>, <code class="language-plaintext highlighter-rouge">DO</code> and <code class="language-plaintext highlighter-rouge">SELECT</code>, macros with parameters, conditional assembly. It is written in COR24 assembly, runs on COR24, and writes plain assembly text for <code class="language-plaintext highlighter-rouge">cor24-asm</code>. So today HLASM dogfoods the simple assembler.</p>

<p>The <a href="https://github.com/sw-embed/sw-cor24-plsw/blob/dev/docs/migrate-from-c-to-hlasm.md">plan for PL/SW</a>, written this week, is to port its compiler from C to HLASM:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hlasm.s (hand-written COR24 assembly)
   -&gt; assembles PL/SW written in HLASM
      -&gt; compiles PL/SW written in PL/SW
         -&gt; compiles itself
</code></pre></div></div>

<p>That takes the host C compiler out of the chain: every stage after <code class="language-plaintext highlighter-rouge">hlasm.s</code> is built on COR24. The port is mechanical, each C function becoming one HLASM routine with the same calling convention, so it can be checked against <code class="language-plaintext highlighter-rouge">tc24r</code>’s output a function at a time. And PL/SW, a real compiler, becomes the program that dogfoods HLASM.</p>

<h2 class="pos-left" id="the-tiny-c-demos-go-first">The tiny-C demos go first</h2>

<figure class="outdent-right" style="width: 140px;">
<img src="/assets/images/posts/logo-c-3d.webp" class="no-invert" alt="A white letter C on a blue hexagon" />
</figure>

<p>Before porting a compiler, the method has to work on something smaller. HLASM’s current saga ports the tiny-C demos, the example programs that ship with <code class="language-plaintext highlighter-rouge">tc24r</code>, from C to HLASM, building a shared library of macros (routine entry and exit, calls, UART output, data) as it goes. Its steps: make structured control flow assemble, audit HLASM’s limits, add an end-to-end harness that runs HLASM, assembles its output and runs the result, survey the demos for recurring idioms, build the macro library, port the demos, and show C, <code class="language-plaintext highlighter-rouge">tc24r</code>’s assembly and HLASM side by side.</p>

<h2 id="what-dogfooding-found-on-day-one">What dogfooding found on day one</h2>

<p>The first step had to fix something that had been wrong all along. HLASM lowered its structured <code class="language-plaintext highlighter-rouge">IF</code>, <code class="language-plaintext highlighter-rouge">DO</code> and <code class="language-plaintext highlighter-rouge">SELECT</code> into jumps written <code class="language-plaintext highlighter-rouge">jmp &lt;label&gt;</code>. But COR24’s <code class="language-plaintext highlighter-rouge">jmp</code> takes only a register, <code class="language-plaintext highlighter-rouge">jmp (r0)</code>, and <code class="language-plaintext highlighter-rouge">cor24-asm</code> rejects <code class="language-plaintext highlighter-rouge">jmp &lt;label&gt;</code>, as it always had. HLASM’s regression tests compared the assembly text it wrote and never assembled it, so nothing noticed. Nine demos used the broken form.</p>

<p>It took a program that had to run, not just print, to find it. HLASM now sizes each jump in a first pass and emits a short <code class="language-plaintext highlighter-rouge">bra</code> when the target is in range, or saves a register around a long <code class="language-plaintext highlighter-rouge">la</code>/<code class="language-plaintext highlighter-rouge">jmp</code> when it is not (<a href="https://github.com/sw-embed/sw-cor24-hlasm/blob/dev/docs/structured-jump-relaxation.md">the design</a>). That is the whole argument for dogfooding in one bug: a test that checks the text a tool writes is not the same as a test that runs what it wrote.</p>

<h2 class="pos-right" id="where-it-is-headed">Where it is headed</h2>

<figure class="outdent-left" style="width: 260px;">
<img src="/assets/images/posts/hlasm-plsw-swtos-logos.webp" class="no-invert" alt="Three logos: the word HLASM in blue horizontal stripes; the PL/SW shield, PL in orange and SW in light blue; and the SWTOS badge, a chip reading Software Wrighter Tiny O/S" />
</figure>

<p>Two loops close at the top of the chain:</p>

<ul>
  <li><strong>HLASM in HLASM.</strong> The <a href="https://github.com/sw-embed/sw-cor24-hlasm/blob/dev/docs/bootstrap.md">bootstrap plan</a> starts small: the hand-written <code class="language-plaintext highlighter-rouge">hlasm.s</code> assembles a reduced HLASM written in the subset it already supports, and the full one grows from there. Then HLASM dogfoods itself.</li>
  <li><strong>PL/SW in PL/SW.</strong> Once PL/SW is written in HLASM, the next stage is a PL/SW compiler written in PL/SW, compiling itself.</li>
</ul>

<p>And SWTOS, which today dogfoods the simple assembler and some PL/SW, is the test I want for both: an operating system built with the refactored HLASM and PL/SW, in place of <code class="language-plaintext highlighter-rouge">cor24-asm</code>. A microkernel that boots and runs is a harder test than any demo.</p>]]></content><author><name>Software Wrighter</name></author><category term="embedded" /><category term="programming-languages" /><category term="compilers" /><category term="dogfooding" /><category term="dogfooding" /><category term="cor24" /><category term="hlasm" /><category term="pl-sw" /><category term="tinyc" /><category term="assembler" /><category term="macro-assembler" /><category term="bootstrapping" /><category term="self-hosting" /><category term="swtos" /><category term="reg-rs" /><category term="agentrail" /><summary type="html"><![CDATA[The first Dogfooding post was about one tool finding the limits of another: a Pascal VM’s allocator, outgrown by an OCaml written in Pascal. This one is about a whole chain of them. On COR24, each of my tools is tested by the one built on top of it, and I am rebuilding the chain so that, in the end, the top two test themselves.]]></summary></entry><entry><title type="html">Saw #17: A Sharper sed, and X_eTaL in Blender for a Computer Museum</title><link href="https://blog.softwarewrighter.com/2026/11/01/saw-sed-rs-xtl-blender/" rel="alternate" type="text/html" title="Saw #17: A Sharper sed, and X_eTaL in Blender for a Computer Museum" /><published>2026-11-01T00:15:00-07:00</published><updated>2026-11-01T00:15:00-07:00</updated><id>https://blog.softwarewrighter.com/2026/11/01/saw-sed-rs-xtl-blender</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/01/saw-sed-rs-xtl-blender/"><![CDATA[<!-- DRAFT (2026-11-01), Mike: a short Saw post: "a sed saw and a xtl-blender saw". sed-rs (sw-cli-tools/sed-rs; main f52ba15,
     0.2.0 on 2026-10-25; uncommitted Cargo changes locally) and reva-fork docs/sed-rs-asks.md (2026-11-01: 1 -i[SUFFIX], 2 address
     ranges and first-match-only, 3 literal patterns -F, 4 --strict, 5 --diff). Mike: "I'm not implementing all of the asks, but
     some of them". Resolved 2026-11-01 from sed-rs docs/reva-fork-response.md
     (uncommitted, in testing; not linked until pushed): all five in 0.3.0, negotiated as written; --expect=N added. 3D: lucy-3D (25U rack; three views per Mike 2026-11-01: empty, early (3 servers), later (more); README 8400cd0 shows all three renders; gutter image is images/lucy-early.png from it; 2026-10-31 to
     11-01), s1130-3D (IBM 1131 CPU desk console; X_eTaL + Blender, named parts, .glb/.blend/.obj; switches, hatch), s5100-3D (IBM
     5100; WIP), console-3D (f828773 README renders; gutter image images/ibm5471-render.png; fb79c47: IBM 1053, 2741, 5471 on shared Selectric helpers; TRS-80 to be added, per Mike). Mike's plan: four APLs in sw-apl, '68 APL\1130 (IBM's first APL for sale) with a 1053 console, a 2741 console for the ca. '70 APL\360 demo (a later release, not the first; Mike corrected '68 on 2026-11-01),
     a 5100 for the '75 5100 demo, and a TRS-80 / IBM 5471 for a future APL-80 demo. Date: today is Sunday 11/01; -0800 since
     12:00 is after the 2 a.m. change (the publish script restamps 00:15 with the right offset). Lead image: Mike's
     block-3d-chainsaw.jpg (Dropbox), paper made transparent, inverts
     in dark mode (Mike asked, 2026-11-01). -->

<p><img src="/assets/images/posts/block-3d-chainsaw.webp" class="post-marker" alt="" style="width: 205px;" /></p>

<p>Two saws this week, one small and one large. The small one is sed-rs, my portable <code class="language-plaintext highlighter-rouge">sed</code> in Rust, which got a list of requests from being used in earnest. The large one is 3D: modeling real machines with X_eTaL and Blender, to get good enough at it for a museum.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>sed-rs</strong></td>
        <td><a href="https://github.com/sw-cli-tools/sed-rs">sw-cli-tools/sed-rs</a>; the <a href="https://github.com/softwarewrighter/reva-fork/blob/dev/docs/sed-rs-asks.md">asks from reva-fork</a></td>
      </tr>
      <tr>
        <td><strong>IBM 1130</strong></td>
        <td><a href="https://github.com/softwarewrighter/s1130-3D">s1130-3D</a></td>
      </tr>
      <tr>
        <td><strong>IBM 5100</strong></td>
        <td><a href="https://github.com/softwarewrighter/s5100-3D">s5100-3D</a></td>
      </tr>
      <tr>
        <td><strong>The consoles</strong></td>
        <td><a href="https://github.com/softwarewrighter/console-3D">console-3D</a> (1053, 2741, 5471)</td>
      </tr>
      <tr>
        <td><strong>Lucy’s rack</strong></td>
        <td><a href="https://github.com/softwarewrighter/lucy-3D">lucy-3D</a></td>
      </tr>
      <tr>
        <td><strong>The pipeline</strong></td>
        <td><a href="https://github.com/softwarewrighter/X_eTaL-extensions">X_eTaL-extensions</a> (the Blender extension)</td>
      </tr>
      <tr>
        <td><strong>For</strong></td>
        <td><a href="/2026/09/12/software-wrighter-research-campus/">the research campus</a>, <a href="https://github.com/sw-vibe-coding/sw-apl">sw-apl</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#sharpen-the-saw-sundays">Sharpen the Saw: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="the-sed-rs-saw">The sed-rs saw</h2>

<p>I wrote <a href="https://github.com/sw-cli-tools/sed-rs">sed-rs</a> because the Mac’s BSD <code class="language-plaintext highlighter-rouge">sed</code> and GNU <code class="language-plaintext highlighter-rouge">sed</code> on Linux do not agree, and I wanted one that behaves the same on both. Using it to edit reva-fork’s files produced a <a href="https://github.com/softwarewrighter/reva-fork/blob/dev/docs/sed-rs-asks.md">list of asks</a>, each with the case that hit it:</p>

<ol>
  <li><strong>In-place editing with a backup</strong> (<code class="language-plaintext highlighter-rouge">-i.orig</code>), written atomically, and leaving every file untouched if the script fails. A rejected script once truncated <code class="language-plaintext highlighter-rouge">CHANGES.md</code> through a shell redirect, and the empty file was committed.</li>
  <li><strong>Address ranges and “first match only”</strong> (<code class="language-plaintext highlighter-rouge">10,20</code>, <code class="language-plaintext highlighter-rouge">/start/,/end/</code>, <code class="language-plaintext highlighter-rouge">0,/re/</code>).</li>
  <li><strong>Literal patterns</strong> (<code class="language-plaintext highlighter-rouge">-F</code>), for edits full of <code class="language-plaintext highlighter-rouge">( ) [ ] . * +</code>, which in Forth, Rust and Markdown is most of them.</li>
  <li><strong><code class="language-plaintext highlighter-rouge">--strict</code></strong>, so an edit that matched nothing fails instead of looking like success.</li>
  <li><strong><code class="language-plaintext highlighter-rouge">--diff</code></strong>, to show what changed without a separate <code class="language-plaintext highlighter-rouge">diff</code>.</li>
</ol>

<div class="aside-box" style="float: left; width: 36%; margin: 0.3em 1.8em 1.2em 0;">

  <p><strong>Why Sharpen the Saw?</strong> — Stephen Covey’s <em><a href="https://en.wikipedia.org/wiki/The_7_Habits_of_Highly_Effective_People">The 7 Habits of Highly Effective People</a></em> (1989) ends with Habit 7, “Sharpen the Saw”: a woodcutter too busy sawing to stop and sharpen the blade works harder and cuts less. The first six habits are about doing the work; the seventh is about renewing what does it. This series tracks the weekly investment in my tools themselves, so the work done with them goes faster.</p>

</div>

<p>All five made it into sed-rs 0.3.0, now in testing, but not all as asked. Some were negotiated:</p>

<ul>
  <li><strong><code class="language-plaintext highlighter-rouge">s//…/</code> does not reuse the last pattern,</strong> as GNU’s does; it keeps its old meaning, so ask 2’s example repeats the pattern instead.</li>
  <li><strong>Literal mode is not quite “nothing is special”.</strong> <code class="language-plaintext highlighter-rouge">\n</code>, <code class="language-plaintext highlighter-rouge">\t</code>, <code class="language-plaintext highlighter-rouge">\\</code> and an escaped delimiter still work, because inserting lines needs <code class="language-plaintext highlighter-rouge">\n</code>. And <code class="language-plaintext highlighter-rouge">-F</code> makes only the substitutions literal, not the addresses.</li>
  <li><strong>No default warning</strong> for an edit that matched nothing, only <code class="language-plaintext highlighter-rouge">--strict</code>. Filters that normalize test output often contain substitutions that do not match, and a warning would flood them.</li>
  <li><strong>One addition:</strong> <code class="language-plaintext highlighter-rouge">--expect=N</code>, which fails unless exactly N replacements were made, so a pattern that is too broad is caught as well as one that matches nothing.</li>
</ul>

<p>Whatever the flags, a failed script or check now leaves every file untouched. Existing users are protected: 68 recorded invocations from the previous version replay unchanged, apart from two intended changes, and 4,000 generated cases check the new code against a frozen copy of the old.</p>

<h2 id="the-blender-saw">The Blender saw</h2>

<figure class="zoomable" style="float: right; clear: right; width: 40%; margin: 0.2em 0 0.6em 1.5em;">
<img src="/assets/images/posts/lucy-early-rack.webp" class="no-invert" alt="A render of the Lucy rack in its early layout: a black open-frame 25U rack with a 1U server and a 2U server at the top and a blue 4U storage chassis at the bottom, on a gray floor" />
<figcaption style="font-size: 0.85em;">Lucy's rack, early: three servers, rendered by Blender from X_eTaL. Click to enlarge.</figcaption>
</figure>

<p>The other saw is 3D modeling with X_eTaL and its Blender extension. X_eTaL builds the model as code, the extension hands it to Blender, and Blender writes <code class="language-plaintext highlighter-rouge">.blend</code>, <code class="language-plaintext highlighter-rouge">.glb</code> and <code class="language-plaintext highlighter-rouge">.obj</code> files with named parts, so a switch or a door can be found and moved in an interactive scene. Four projects are teaching me where the pipeline is weak:</p>

<ul>
  <li><strong><a href="https://github.com/softwarewrighter/s1130-3D">An IBM 1130</a>,</strong> the 1131 CPU desk console, with its data switches, buttons, panels and a hatch that opens.</li>
  <li><strong><a href="https://github.com/softwarewrighter/s5100-3D">An IBM 5100</a>,</strong> the portable from the mid-1970s, built up in measured, reference-checked steps.</li>
  <li><strong><a href="https://github.com/softwarewrighter/console-3D">The consoles</a>:</strong> the IBM 1053 console of the 1130 and 1800, the IBM 2741 APL terminal, and the IBM 5471, the printer-keyboard of the System/3. All three are built on the Selectric typing mechanism, so they share their construction helpers. A TRS-80 is to be added.</li>
  <li><strong><a href="https://github.com/softwarewrighter/lucy-3D">Lucy’s rack</a>,</strong> a 25U server rack modeled from photos of <a href="/2026/02/28/lucy-20-percent-ai-cluster-upgrade/">my home AI cluster</a>, in three views: empty, early (three servers) and later (more servers). It does not yet model the rail slides the servers ride on.</li>
</ul>

<p>The goal is higher-fidelity models for two places. The first is the virtual Computer History Museum on <a href="/2026/09/12/software-wrighter-research-campus/">my research campus</a>. The second is <a href="https://github.com/sw-vibe-coding/sw-apl">sw-apl</a>, where I plan to show four APLs, each with the machine it ran on, which is where the console models come in:</p>

<table>
  <thead>
    <tr>
      <th>APL</th>
      <th>Era</th>
      <th>Console</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>APL\1130</td>
      <td>1968, IBM’s first APL for sale</td>
      <td>IBM 1130 with a 1053 printer console</td>
    </tr>
    <tr>
      <td>APL\360</td>
      <td>ca. 1970, a later release with added features</td>
      <td>an IBM 2741 terminal</td>
    </tr>
    <tr>
      <td>IBM 5100 APL</td>
      <td>1975</td>
      <td>the IBM 5100 itself</td>
    </tr>
    <tr>
      <td>APL-80</td>
      <td>future demo</td>
      <td>a TRS-80, and an IBM 5471</td>
    </tr>
  </tbody>
</table>

<figure class="zoomable" style="width: 260px; margin: 1em 0;">
<img src="/assets/images/posts/ibm5471-render.webp" class="no-invert" alt="A Blender render of the IBM 5471 printer-keyboard: a white Selectric-style typewriter console with a gray keyboard, a type ball under a clear paper guard, and an IBM badge" />
<figcaption style="font-size: 0.85em;">The IBM 5471, from console-3D. Click to enlarge.</figcaption>
</figure>]]></content><author><name>Software Wrighter</name></author><category term="tools" /><category term="3d" /><category term="sharpen-the-saw" /><category term="sed-rs" /><category term="rust" /><category term="cli" /><category term="x-etal" /><category term="xetal" /><category term="blender" /><category term="3d-models" /><category term="ibm-1130" /><category term="ibm-5100" /><category term="apl" /><category term="sw-apl" /><category term="retrocomputing" /><summary type="html"><![CDATA[Two saws this week, one small and one large. The small one is sed-rs, my portable sed in Rust, which got a list of requests from being used in earnest. The large one is 3D: modeling real machines with X_eTaL and Blender, to get good enough at it for a museum.]]></summary></entry><entry><title type="html">Why I Use #5: GNU Tools, From Emacs to Arch Linux</title><link href="https://blog.softwarewrighter.com/2026/11/01/why-i-use-gnu-tools/" rel="alternate" type="text/html" title="Why I Use #5: GNU Tools, From Emacs to Arch Linux" /><published>2026-11-01T00:15:00-07:00</published><updated>2026-11-01T00:15:00-07:00</updated><id>https://blog.softwarewrighter.com/2026/11/01/why-i-use-gnu-tools</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/11/01/why-i-use-gnu-tools/"><![CDATA[<!-- DRAFT (2026-10-30), Mike: split from coding agents ("Why I Use ... GNU tools like Emacs (and go into the brew install to get
     coreutils on Mac, and other ways I use GNU, like Arch Linux, and other tools under a GNU license"). Coding agents (Claude,
     Codex, Gemini/Antigravity, opencode with Z.ai GLM-5.x) move to the #6 draft. Mike: gcc and the build tools on Arch.
     Facts: TBT #13 timelines (Emacs 1989-, vi 1991-, Emacs as IDE 1998-2003, Emacs shell 2015-); Saw #4 (Emacs packages for
     pjmai-rs, reg-rs); Saw #8 (Emacs glyph entry); AL #19 (X_eTaL's Emacs mode, Org Babel); TBT #1 (GNU APL); Saw #7 and AI Tools
     #4 (agents on Arch Linux, reached with mosh). Checked on this Mac (2026-10-30): Homebrew has coreutils 9.12, gcc, gnu-apl,
     m4, libtool, readline, ncurses; Emacs.app is GNU Emacs 30.2. "Mike: TODO" marks his own reasons.
     bash section moved here from #7 at Mike's request (2026-10-30: "a discussion of bash and history goes somewhere, but note
     that I use zsh on Mac"; "isn't bash gnu? seems to fit better there than tmux"). Checked on this Mac (2026-10-30): login
     shell /bin/zsh, zsh 5.9; /bin/bash is 3.2.57; no Homebrew bash; ~/.zshrc sets no HIST* options, so /etc/zshrc's
     HISTSIZE=2000 / SAVEHIST=1000 apply (~/.zsh_history: 1054 lines, at the cap). Mike (2026-10-31): "I use bash on Arch. default size, no
     sharing. mac history is fine as is." Mike (2026-10-31): "cut the history elaboration. maybe say I generally use default settings?" Cut, along
     with the forward links to #7 and #8, which would 404 until those publish. No claim about why Apple switched, only the facts (3.2 is the last GPLv2 bash).
     The GNU list section is a candidate list for Mike to trim. Gutter beside "GNU commands on the Mac": Mike's logo-homebrew.jpg (Dropbox), no-invert. Gutter beside "bash, and zsh on the Mac": Mike's
     logo-golden-apple.jpg (Dropbox), 145px, no-invert. Gutter beside "GNU languages": Mike's
     logo-modern-apl.jpg (Dropbox), 130px, no-invert. Gutter beside "Not every GNU tool":
     Mike's logo-robot-arm.jpg (Dropbox), no-invert. Lead image: Mike's block-gnu.jpg (Dropbox), white background
     made transparent, color, no-invert. -->

<p><img src="/assets/images/posts/block-gnu.webp" class="post-marker no-invert" alt="" style="width: 230px;" /></p>

<p>The <a href="/2026/10/31/why-i-use-my-tools/">prior post</a> in this series was about tools I wrote. This one is about tools I did not write but have built a working life around: GNU’s. Emacs most of all, and with it the GNU commands I install on the Mac, the GNU toolchain on the Arch Linux machines where my agents work, and GNU APL.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>GNU</strong></td>
        <td><a href="https://www.gnu.org/">gnu.org</a></td>
      </tr>
      <tr>
        <td><strong>Emacs</strong></td>
        <td><a href="https://www.gnu.org/software/emacs/">gnu.org/software/emacs</a></td>
      </tr>
      <tr>
        <td><strong>coreutils</strong></td>
        <td><a href="https://www.gnu.org/software/coreutils/">gnu.org/software/coreutils</a></td>
      </tr>
      <tr>
        <td><strong>Arch Linux</strong></td>
        <td><a href="https://archlinux.org">archlinux.org</a></td>
      </tr>
      <tr>
        <td><strong>GNU APL</strong></td>
        <td><a href="https://www.gnu.org/software/apl/">gnu.org/software/apl</a></td>
      </tr>
      <tr>
        <td><strong>The longer timeline</strong></td>
        <td><a href="/2026/10/01/tbt-timelines-of-tools/">TBT #13: Many Decades of Learning the Next Thing</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#why-i-use">Why I Use: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="emacs-since-1989">Emacs, since 1989</h2>

<p>Emacs is one of the few bars on <a href="/2026/10/01/tbt-timelines-of-tools/">my career timeline</a> that never ends: I have used it since 1989, vi since 1991 beside it, and for a few years around 2000 Emacs was my IDE as well as my editor. Since 2015 I have also used it as a shell, and since 2025 as an AI client.</p>

<p>I still prefer it for literate programming. Org mode and its Babel, which runs code blocks in many languages inside one document, suit me better than other notebooks such as Jupyter’s. In the same spirit, I am porting Reva’s notebooks, which ran on 32-bit Windows, to the Rust-based reva-fork, so they run on Arch Linux, in Chrome and on the Mac.</p>

<h2 id="emacs-as-the-place-my-tools-plug-in">Emacs as the place my tools plug in</h2>

<p>Emacs is where my own command-line tools meet. <a href="/2026/03/29/saw-pjmai-reg-emacs-all-together-now/">pjmai-rs and reg-rs both have Emacs packages</a>, so switching projects and running regression tests happen in the editor as well as the terminal. X_eTaL has an Emacs mode that highlights and draws its notation, with Org Babel support so X_eTaL runs inside literate documents (<a href="/2026/10/27/array-languages-xetal-tooling/">Array Languages #19</a>). And when my languages need glyphs, for APL, Tuplet and X_eTaL, Emacs has its own input methods for them: TeX-style and Agda-style mappings and a custom Quail input method (<a href="/2026/04/26/saw-tuplet-smalltalk-forth-from-forth/">Saw #8</a>).</p>

<h2 class="pos-left" id="gnu-commands-on-the-mac">GNU commands on the Mac</h2>

<figure class="outdent-right" style="width: 215px;">
<img src="/assets/images/posts/logo-homebrew.webp" class="no-invert" alt="A frosted beer mug with HOMEBREW in metal letters across it and a silver apple on the foam" />
</figure>

<p>macOS ships BSD versions of the basic commands, which differ from GNU’s in their options and their output. So on the Mac I install GNU’s with Homebrew:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>brew install coreutils
</code></pre></div></div>

<p>Homebrew installs them with a <code class="language-plaintext highlighter-rouge">g</code> prefix (<code class="language-plaintext highlighter-rouge">gls</code>, <code class="language-plaintext highlighter-rouge">gdate</code>, <code class="language-plaintext highlighter-rouge">gsed</code> for its separate <code class="language-plaintext highlighter-rouge">gnu-sed</code>) so they do not replace the system’s, and scripts and habits from Linux then work the same on both.</p>

<h2 id="arch-linux-and-the-gnu-toolchain">Arch Linux and the GNU toolchain</h2>

<p>My agents now work on <a href="https://archlinux.org">Arch Linux</a> machines, one user per agent, reached from the MacBook with mosh and tmux (<a href="/2026/04/19/saw-prolog-many-agents-self-hosting-mlpl/">Saw #7</a>, <a href="/2026/05/16/pi-minimal-agent/">AI Tools #4</a>). There the GNU toolchain is the ordinary one: gcc and the rest of Arch’s <code class="language-plaintext highlighter-rouge">base-devel</code> group for building, with GNU’s userland, coreutils, bash and glibc, underneath. Arch itself is not all GNU, though. A Linux distribution is many projects under many licenses: the Linux kernel under GPLv2, GNU’s tools under the GPL and LGPL, and plenty of packages under BSD, MIT, Apache and other permissive licenses. Arch records each package’s license in the package itself (<code class="language-plaintext highlighter-rouge">pacman -Qi</code> shows it).</p>

<h2 class="pos-right" id="bash-and-zsh-on-the-mac">bash, and zsh on the Mac</h2>

<figure class="outdent-left" style="width: 145px;">
<img src="/assets/images/posts/logo-golden-apple.webp" class="no-invert" alt="A polished silver apple glowing against a golden background" />
</figure>

<p>bash is GNU’s shell, the Bourne Again SHell. With sh and ksh before it, it has been on <a href="/2026/10/01/tbt-timelines-of-tools/">my timeline</a> since 1991, and it is the shell on the Arch machines. On the Mac I use zsh, which is not GNU. It has been the macOS default since Catalina in 2019, and the bash Apple still ships is version 3.2, from 2007: the last release under GPLv2. Later versions moved to GPLv3, and Apple’s copy stayed where it was. Homebrew has a current one (<code class="language-plaintext highlighter-rouge">brew install bash</code>) for scripts that need it.</p>

<p>For both shells, and history in particular, I generally use the default settings.</p>

<h2 class="pos-left" id="gnu-languages">GNU languages</h2>

<figure class="outdent-right" style="width: 130px;">
<img src="/assets/images/posts/logo-modern-apl.webp" class="no-invert" alt="A round neon badge with two dots over a tilde, like a face, in rainbow rings on a dark background" />
</figure>

<p>When I recreated <a href="/2026/01/29/tbt-apl-horse-race/">my first program</a>, a 1972 horse race in APL, it was GNU APL that recreated it. GNU’s other languages are just as much a part of my toolbox: C and C++ through gcc and g++, Scheme through Guile, Prolog through GNU Prolog, numerical work in GNU Octave, text processing in gawk, and Common Lisp in GNU CLISP. For future embedded language projects I may use more of them as references, among them g77 for Fortran 77, GNU Pascal (gpc), and MIT/GNU Scheme.</p>

<h2 class="pos-center" id="other-gnu-tools-i-use">Other GNU tools I use</h2>

<ul>
  <li><strong>Shell and text:</strong> sed, grep, findutils (<code class="language-plaintext highlighter-rouge">find</code>, <code class="language-plaintext highlighter-rouge">xargs</code>), diffutils (<code class="language-plaintext highlighter-rouge">diff</code>, <code class="language-plaintext highlighter-rouge">cmp</code>), patch, tar, gzip, less, readline (the line editing in many REPLs)</li>
  <li><strong>Building:</strong> make, gcc and g++, binutils (<code class="language-plaintext highlighter-rouge">ld</code>, <code class="language-plaintext highlighter-rouge">as</code>, <code class="language-plaintext highlighter-rouge">objdump</code>), gdb, autoconf, automake, libtool, m4, bison, texinfo</li>
  <li><strong>Libraries:</strong> glibc, ncurses</li>
  <li><strong>Everything else:</strong> wget, GNU parallel, and GNU screen, which I used before switching to tmux</li>
  <li><strong>Licenses:</strong> the GPL itself, from the other side: my reva-fork keeps copyleft code out, so it can be used commercially</li>
</ul>

<h2 class="pos-right" id="not-every-gnu-tool">Not every GNU tool</h2>

<figure class="outdent-left" style="width: 170px;">
<video src="/assets/videos/robot-arm-flexing.mp4" poster="/assets/images/posts/robot-arm-flexing-poster.webp" autoplay="" muted="" loop="" playsinline="" preload="auto" aria-label="A stylized robotic arm in silver and glowing blue flexing its elbow, on a dark navy background" style="width: 100%; height: auto; display: block;"></video>
</figure>

<p>I do not like every tool on that list. I have been burned by Makefiles, where a recipe line must start with a tab and spaces that look the same break the build, so I prefer many of the newer build tools, lately <a href="https://github.com/casey/just">just</a>, a command runner written in Rust. And I have had portability problems between the Mac’s BSD <code class="language-plaintext highlighter-rouge">sed</code> and GNU <code class="language-plaintext highlighter-rouge">sed</code> on Linux, so I wrote <a href="https://github.com/sw-cli-tools/sed-rs">sed-rs</a> to behave the same on both.</p>

<p>GNU’s commands are also my test bench. When I build a new programming language, I often test it by writing simple versions of GNU command-line tools in it, such as <code class="language-plaintext highlighter-rouge">cat</code>, <code class="language-plaintext highlighter-rouge">head</code>, <code class="language-plaintext highlighter-rouge">tail</code> and <code class="language-plaintext highlighter-rouge">wc</code>.</p>]]></content><author><name>Software Wrighter</name></author><category term="tools" /><category term="editors" /><category term="why-i-use" /><category term="gnu" /><category term="emacs" /><category term="elisp" /><category term="coreutils" /><category term="homebrew" /><category term="arch-linux" /><category term="bash" /><category term="zsh" /><category term="gcc" /><category term="gnu-apl" /><category term="org-mode" /><category term="free-software" /><summary type="html"><![CDATA[The prior post in this series was about tools I wrote. This one is about tools I did not write but have built a working life around: GNU’s. Emacs most of all, and with it the GNU commands I install on the Mac, the GNU toolchain on the Arch Linux machines where my agents work, and GNU APL.]]></summary></entry><entry><title type="html">Why I Use #4: My Own Tools, From Finding a Project to Shipping Its README</title><link href="https://blog.softwarewrighter.com/2026/10/31/why-i-use-my-tools/" rel="alternate" type="text/html" title="Why I Use #4: My Own Tools, From Finding a Project to Shipping Its README" /><published>2026-10-31T00:15:00-07:00</published><updated>2026-10-31T00:15:00-07:00</updated><id>https://blog.softwarewrighter.com/2026/10/31/why-i-use-my-tools</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/10/31/why-i-use-my-tools/"><![CDATA[<!-- DRAFT (2026-10-30), Mike: Why I Use #4, planned 10/31: his own tools at different levels, in this order: pjmai-rs
     (find where each project sits on each development system; scpj adds new repos, lspj lists, chpj switches), agentrail (plan,
     track and document sagas/steps; parallel development, reprioritization, detours), reg-rs (confidence when changing,
     refactoring, fixing, adding features), sw-checklist (reins in bad practice; a forcing function for readable, maintainable,
     extensible, modular, loosely coupled code), and markdown-checker (the main README.md has no characters that keep GitHub from
     rendering it). Facts from each repo's README (gh api, 2026-10-30). The pjmai-rs demo video belongs to earlier posts: linked
     through them, not embedded (no reused media). Lead image: Mike's block-project-checking.jpg (Dropbox), monochrome block print (signal, track switch,
     magnifying glass, meter, checklist), no-invert. Gutter: Mike's block-magnifier.jpg, blue background made
     transparent; the lens was the same blue, so it is a light/dark pair (black lines / white lines). Gutter beside reg-rs: Mike's
     block-halloween.jpg (Dropbox; replaced block-jack-o-lantern), color, no-invert, caption "Regressions are scary" (Mike). Links box: the bottom-right cobweb from Mike's block-cobwebs.jpg (Dropbox), cut
     diagonally, paper made transparent, laid over the box's bottom-right corner (no pointer events). -->

<p><img src="/assets/images/posts/block-project-checking.webp" class="post-marker no-invert" alt="" style="width: 205px;" /></p>

<p>The first three posts in this series were about languages. This one is about tools I wrote for myself, and I use them at different levels of the same working day: where is the project, what is the next step, did I break anything, is the code still well built, and will its README display. Each is a small command-line program written in Rust.</p>

<!--more-->

<div class="resource-box" style="position: relative;">

  <p><img src="/assets/images/posts/cobweb-corner.webp" alt="" aria-hidden="true" class="no-invert" style="position: absolute; right: 0; bottom: 0; width: 38%; max-width: 170px; pointer-events: none; margin: 0; border: none; box-shadow: none; background: none;" /></p>

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>pjmai-rs</strong></td>
        <td><a href="https://github.com/sw-cli-tools/pjmai-rs">sw-cli-tools/pjmai-rs</a>; <a href="/2026/03/05/tbt-pjmai-rs-project-manager/">TBT #6</a>, <a href="/2026/03/07/pjmai-rs-navigation-history-and-fuzzy-completion/">history and fuzzy completion</a></td>
      </tr>
      <tr>
        <td><strong>agentrail</strong></td>
        <td><a href="https://github.com/sw-vibe-coding/agentrail-rs">sw-vibe-coding/agentrail-rs</a>; <a href="/2026/04/23/ai-tools-agentrail-rs-mid-saga-flexibility/">AI Tools #2</a>, <a href="/2026/10/18/saw-agentrail-correcting-the-record/">Saw #15</a></td>
      </tr>
      <tr>
        <td><strong>reg-rs</strong></td>
        <td><a href="https://github.com/sw-cli-tools/reg-rs">sw-cli-tools/reg-rs</a>; <a href="/2026/03/19/tbt-reg-rs-regression-testing/">TBT #7</a></td>
      </tr>
      <tr>
        <td><strong>sw-checklist</strong></td>
        <td><a href="https://github.com/softwarewrighter/sw-checklist">softwarewrighter/sw-checklist</a>; <a href="/2026/04/27/sw-checklist-ratchet-ai-coding-agents/">AI Tools #3</a></td>
      </tr>
      <tr>
        <td><strong>markdown-checker</strong></td>
        <td><a href="https://github.com/softwarewrighter/markdown-checker">softwarewrighter/markdown-checker</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#why-i-use">Why I Use: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 class="spider" id="pjmai-rs-where-is-the-project">pjmai-rs: where is the project?</h2>

<p>I develop on several machines, and each has its own set of repositories in its own places. <a href="https://github.com/sw-cli-tools/pjmai-rs">pjmai-rs</a> keeps a registry of them and hooks into the shell, so I can find where any project sits on the machine I am on and go there:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>scpj              # scan for git repositories and add the new ones
lspj              # list every project on this system
chpj myproject    # switch to one
</code></pre></div></div>

<p>It also keeps a navigation history (<code class="language-plaintext highlighter-rouge">hypj</code>) and completes project names fuzzily. <a href="/2026/03/05/tbt-pjmai-rs-project-manager/">TBT #6</a> tells where the idea came from.</p>

<h2 class="witch-hat" id="agentrail-what-is-the-next-step">agentrail: what is the next step?</h2>

<p>Once I am in a project, <a href="https://github.com/sw-vibe-coding/agentrail-rs">agentrail</a> holds the plan. Work is a <em>saga</em> of numbered steps, committed with the code, so the plan, its progress and the record of what each step did live in the repository rather than in a chat that a new context will not remember. It was built to keep AI agents on track across fresh contexts, and it does the same for me.</p>

<p>Plans change, so it has to handle more than a straight line: inserting and reordering steps, reopening one, and taking a detour without losing the thread (<a href="/2026/04/23/ai-tools-agentrail-rs-mid-saga-flexibility/">AI Tools #2</a>), and, now that several agents often work the same family of repositories at once, recording work done in parallel or somewhere else (<a href="/2026/10/18/saw-agentrail-correcting-the-record/">Saw #15</a>).</p>

<h2 class="pos-left pumpkin" id="reg-rs-did-i-break-anything">reg-rs: did I break anything?</h2>

<figure class="zoomable outdent-right" style="width: 200px;">
<img src="/assets/images/posts/block-halloween.webp" class="no-invert" alt="A block print of a black cat, fur on end and eyes wide, startled by a grinning jack-o'-lantern in a witch's hat, a spider hanging from a web above them" />
<figcaption style="font-size: 0.85em;">Regressions are scary.</figcaption>
</figure>

<p><a href="https://github.com/sw-cli-tools/reg-rs">reg-rs</a> creates, discovers, runs and reports on regression tests: run a command, keep its output as the golden result, and fail when the output changes. That is what lets me change code with confidence, whether a refactoring, a fix or a new feature. For the compilers, interpreters and emulators I build, the output is the specification, and a golden test notices what no unit test thought to ask. It has run under most of what this blog has shown lately, from X_eTaL’s hundreds of goldens to the Forth kernel that rebuilds itself. <a href="/2026/03/19/tbt-reg-rs-regression-testing/">TBT #7</a> traces it from C++ to Java to Rust.</p>

<h2 class="bat" id="sw-checklist-is-it-still-well-built">sw-checklist: is it still well built?</h2>

<p><a href="https://github.com/softwarewrighter/sw-checklist">sw-checklist</a> reins in bad practice. It checks a project against my standards, including size limits that warn first and then fail:</p>

<table>
  <thead>
    <tr>
      <th>Measure</th>
      <th style="text-align: right">Warns over</th>
      <th style="text-align: right">Fails over</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Lines in a function</td>
      <td style="text-align: right">25</td>
      <td style="text-align: right">50</td>
    </tr>
    <tr>
      <td>Lines in a file</td>
      <td style="text-align: right">350</td>
      <td style="text-align: right">500</td>
    </tr>
    <tr>
      <td>Functions in a module</td>
      <td style="text-align: right">4</td>
      <td style="text-align: right">7</td>
    </tr>
    <tr>
      <td>Modules in a crate</td>
      <td style="text-align: right">4</td>
      <td style="text-align: right">7</td>
    </tr>
    <tr>
      <td>Crates in a project</td>
      <td style="text-align: right">4</td>
      <td style="text-align: right">7</td>
    </tr>
  </tbody>
</table>

<p>The limits are a forcing function. Code that stays under them tends to be readable, maintainable, extensible, modular and loosely coupled, because the only way to grow is to split things along their seams. <a href="/2026/04/27/sw-checklist-ratchet-ai-coding-agents/">AI Tools #3</a> covers how it works as a ratchet on AI coding agents, which otherwise grow functions and files without limit.</p>

<h2 class="pos-right ghost" id="markdown-checker-will-the-readme-display">markdown-checker: will the README display?</h2>

<figure class="outdent-left" style="width: 90px;">
<img src="/assets/images/posts/block-magnifier-light.webp" class="theme-light-only" alt="A block-print magnifying glass" />
<img src="/assets/images/posts/block-magnifier-dark.webp" class="theme-dark-only" alt="A block-print magnifying glass" />
</figure>

<p>The smallest of them. <a href="https://github.com/softwarewrighter/markdown-checker">markdown-checker</a> makes sure a project’s main README.md contains only plain, printable characters, so that nothing in it keeps GitHub from rendering the page as intended. The usual offenders are the tree-drawing symbols people paste in to show a directory layout; <code class="language-plaintext highlighter-rouge">markdown-checker --fix</code> replaces them with ASCII equivalents.</p>

<h2 class="pos-left black-cat" id="five-levels-one-day">Five levels, one day</h2>

<p>Read in order, they follow a working session: find the project, pick up the plan, change the code without breaking it, keep the code in shape, and publish a README that displays.</p>]]></content><author><name>Software Wrighter</name></author><category term="tools" /><category term="process" /><category term="why-i-use" /><category term="pjmai-rs" /><category term="agentrail" /><category term="reg-rs" /><category term="sw-checklist" /><category term="markdown-checker" /><category term="rust" /><category term="cli" /><category term="regression-testing" /><category term="code-metrics" /><category term="ai-agents" /><category term="workflow" /><summary type="html"><![CDATA[The first three posts in this series were about languages. This one is about tools I wrote for myself, and I use them at different levels of the same working day: where is the project, what is the next step, did I break anything, is the code still well built, and will its README display. Each is a small command-line program written in Rust.]]></summary></entry><entry><title type="html">Why I Use #3: Assembler, C and PL/SW, for a Machine Rust Can’t Target</title><link href="https://blog.softwarewrighter.com/2026/10/30/why-i-use-asm-c-plsw/" rel="alternate" type="text/html" title="Why I Use #3: Assembler, C and PL/SW, for a Machine Rust Can’t Target" /><published>2026-10-30T00:15:00-07:00</published><updated>2026-10-30T00:15:00-07:00</updated><id>https://blog.softwarewrighter.com/2026/10/30/why-i-use-asm-c-plsw</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/10/30/why-i-use-asm-c-plsw/"><![CDATA[<!-- DRAFT (2026-10-28), Mike: Why I Use #3, planned 10/30: "Assembler, C, PL/SW - these are low-level languages I use to
     develop operating system and programming language code on embedded processors. These are written in Rust, but they in turn
     generate assembler for a target machine, especially one not yet supported by Rust."
     Mike (2026-10-30): correct it: cor24-asm and tc24r are Rust; the PL/SW compiler is C (src/main.c), built with tc24r, run on
     COR24. Aside per Mike: longer-term goal, port PL/SW from tiny C to his future HLASM (sw-cor24-hlasm: "HLASM for COR24 in assembler").
     Facts from the READMEs: sw-cor24-x-assembler 362000b, sw-cor24-x-tinyc 96090c8, sw-cor24-plsw 05748d0, sw-tos; code samples
     verbatim from tests/programs/count_down.s, demos/led.c, examples/system.msw and examples/macro.plsw.
     Lead image: Mike's block-asm-c-plsw.png (Dropbox, third version 17:27; real COR24 count_down loop, C, and loop.plsw's MAIN),
     no-invert. Gutter: sw-cor24-plsw images/sw-pl-badge2.png (93b488d), no-invert. Links #1 (published) and #2 (planned 10/29; publish #2 first). -->

<p><img src="/assets/images/posts/block-asm-c-plsw.webp" class="post-marker no-invert" alt="" style="width: 300px;" /></p>

<p><a href="/2026/10/28/why-i-use-rust/">Rust</a> is what I build tools in, and <a href="/2026/10/29/why-i-use-apl-lisp-forth/">APL, Lisp and Forth</a> are what I demo ideas in. This post is about a third group: the low-level languages I use to write operating-system and programming-language code for small embedded processors. They are assembler, C and PL/SW, and the reason I need them is a processor Rust cannot target.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>The processor</strong></td>
        <td><a href="https://makerlisp.com">COR24, by MakerLisp</a>; <a href="/2026/03/22/cor24-rs-assembly-emulator/">Embedded #2: COR24-RS</a></td>
      </tr>
      <tr>
        <td><strong>Assembler</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-x-assembler">sw-cor24-x-assembler</a> (<code class="language-plaintext highlighter-rouge">cor24-asm</code>, Rust)</td>
      </tr>
      <tr>
        <td><strong>C</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-x-tinyc">sw-cor24-x-tinyc</a> (<code class="language-plaintext highlighter-rouge">tc24r</code>, Rust)</td>
      </tr>
      <tr>
        <td><strong>PL/SW</strong></td>
        <td><a href="https://github.com/sw-embed/sw-cor24-plsw">sw-cor24-plsw</a> (compiler in C); <a href="https://github.com/sw-embed/sw-cor24-plsw/blob/dev/docs/pl-s-history.md">PL/S, its history</a></td>
      </tr>
      <tr>
        <td><strong>Written in PL/SW</strong></td>
        <td><a href="https://github.com/sw-embed/sw-tos">SWTOS</a>, <a href="https://swtos.softwarewrighter.com/">live</a>; <a href="/2026/09/11/made-visible-swtos/">Made Visible #1</a></td>
      </tr>
      <tr>
        <td><strong>Rust on COR24, the hard way</strong></td>
        <td><a href="/2026/03/13/rabbit-hole-rust-to-unsupported-isa/">Rabbit-hole #1</a></td>
      </tr>
      <tr>
        <td><strong>Try them</strong></td>
        <td><a href="https://sw-embed.github.io/web-sw-cor24-demos/">COR24 demo hub</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#why-i-use">Why I Use: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="a-machine-rust-does-not-support">A machine Rust does not support</h2>

<p>COR24 is a 24-bit RISC soft CPU designed by <a href="https://makerlisp.com">MakerLisp</a>: a processor defined in an FPGA, here on the COR24-TB board with 1 MB of SRAM. Rust’s compiler has no COR24 target. <a href="/2026/03/13/rabbit-hole-rust-to-unsupported-isa/">Rabbit-hole #1</a> got Rust code onto COR24 anyway, by compiling for a 16-bit target Rust does support and translating the result, but that is an experiment, not a way to write an operating system.</p>

<p>So for COR24 I write in assembler, C and PL/SW. The assembler and the C compiler are written in Rust; PL/SW’s compiler is written in C and built with that C compiler. Each of them ends in the same place: COR24 assembler text, which the assembler turns into the bytes the CPU runs.</p>

<h2 id="assembler">Assembler</h2>

<p>At the bottom is assembler, where every instruction is written by hand. A countdown that prints 5, 4, 3, 2, 1 to the UART, from the assembler’s own test programs:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>        la      r2,-65280   ; 0xFF0100 UART data
        lc      r0,5        ; counter = 5
_loop:  mov     r1,r0
        add     r1,48       ; + '0'
        sb      r1,0(r2)    ; send to UART
        add     r0,-1       ; r0 -= 1
        ceq     r0,z
        brf     _loop       ; if r0 != 0, loop
</code></pre></div></div>

<p><a href="https://github.com/sw-embed/sw-cor24-x-assembler"><code class="language-plaintext highlighter-rouge">cor24-asm</code></a>, written in Rust, assembles <code class="language-plaintext highlighter-rouge">.s</code> files into loadable images, raw bytes and listings. It began as the byte-for-byte reference for a self-hosted COR24 assembler, as24, that runs on COR24 itself.</p>

<h2 class="pos-center" id="c">C</h2>

<p>C is the portable layer above it. <a href="https://github.com/sw-embed/sw-cor24-x-tinyc"><code class="language-plaintext highlighter-rouge">tc24r</code></a> is a C compiler for COR24 written in Rust, after the design of chibicc: a recursive-descent parser that emits assembly directly. It handles 24-bit <code class="language-plaintext highlighter-rouge">int</code>, <code class="language-plaintext highlighter-rouge">char</code>, pointers, arrays, structs, unions, function pointers and the usual control flow, and its 61 demos all pass. A C program reaches the hardware the way C always has, through a pointer to a memory-mapped register:</p>

<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Turn on LED D2 (active-low: write 0 to bit 0)</span>
<span class="kt">void</span> <span class="nf">led_on</span><span class="p">()</span> <span class="p">{</span>
    <span class="o">*</span><span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="p">)</span><span class="mh">0xFF0000</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<h2 class="pos-right" id="plsw">PL/SW</h2>

<figure class="zoomable outdent-left" style="width: 140px;">
<img src="/assets/images/posts/plsw-badge.webp" class="no-invert" alt="The PL/SW badge: the letters PL in orange and SW in light blue on a dark shield with green and gold stripes" />
</figure>

<p>PL/SW is the one I designed. <a href="/2026/10/28/why-i-use-rust/">The first post in this series</a> started with IBM’s PL/S (<a href="https://github.com/sw-embed/sw-cor24-plsw/blob/dev/docs/pl-s-history.md">its history</a>) and its macros that ran during compilation to write the code to be compiled. PL/SW, the Programming Language for Software Wrighter, is a freestanding systems language for COR24, inspired by PL/S, that carries that idea on. A macro declares what it takes and generates code, here three instructions of COR24 assembler:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/* ?LED_SET(VAL(n)) -- write a byte to LED MMIO register */
MACRODEF LED_SET;
    REQUIRED VAL(expr);
    GEN DO;
        'la      r2,16711680';
        'lc      r0,{VAL}';
        'sb      r0,0(r2)';
    END;
END;
</code></pre></div></div>

<p>and a program calls it like a statement of the language:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>MAIN: PROC;
    CALL UART_PUTS(ADDR(MSG));
    ?LED_SET VAL(0);
END;
</code></pre></div></div>

<p>PL/SW also has BASED record templates for laying records over memory, controlled inline assembly, and conditional compilation, and it writes human-readable assembler with each source line as a comment. Its compiler is itself written in C, compiled by <code class="language-plaintext highlighter-rouge">tc24r</code>, and runs on COR24, fed its source over the UART; its linker tools are Rust.</p>

<h2 class="pos-center" id="what-they-are-for">What they are for</h2>

<p>The <a href="https://github.com/sw-embed/sw-tos">SWTOS</a> microkernel is the test of all three. It is a clean-room microkernel inspired by MINIX’s message passing, written in PL/SW and assembler, and it runs on the COR24-TB board and in an emulator in <a href="https://swtos.softwarewrighter.com/">your browser</a>. <a href="/2026/09/11/made-visible-swtos/">Made Visible #1</a> drew its storage. And the COR24 Forth kernel began as hand-written assembler before most of it moved into Forth (<a href="/2026/04/20/embedded-forth-self-hosting-spectrum/">Embedded #3</a>).</p>

<div class="aside-box">

  <p><strong>Where PL/SW is headed.</strong> Today PL/SW’s compiler is C, built with my COR24 C compiler. My longer-term goal is to port it to my future HLASM for COR24, <a href="https://github.com/sw-embed/sw-cor24-hlasm">sw-cor24-hlasm</a>, a high-level assembler with macros, written in COR24 assembler.</p>

</div>

<p>Rust writes the first tools, and C, compiled by one of them, writes PL/SW’s. Assembler, C and PL/SW are what those tools turn into a running machine.</p>]]></content><author><name>Software Wrighter</name></author><category term="languages" /><category term="embedded" /><category term="why-i-use" /><category term="assembler" /><category term="c" /><category term="pl-sw" /><category term="pl-s" /><category term="cor24" /><category term="fpga" /><category term="soft-cpu" /><category term="compilers" /><category term="macros" /><category term="operating-systems" /><category term="embedded" /><category term="rust" /><summary type="html"><![CDATA[Rust is what I build tools in, and APL, Lisp and Forth are what I demo ideas in. This post is about a third group: the low-level languages I use to write operating-system and programming-language code for small embedded processors. They are assembler, C and PL/SW, and the reason I need them is a processor Rust cannot target.]]></summary></entry><entry><title type="html">AI Tools #8: A Domain-Expert Skill Restarts a Stuck Project</title><link href="https://blog.softwarewrighter.com/2026/10/29/ai-tools-domain-expert-skill/" rel="alternate" type="text/html" title="AI Tools #8: A Domain-Expert Skill Restarts a Stuck Project" /><published>2026-10-29T00:15:00-07:00</published><updated>2026-10-29T00:15:00-07:00</updated><id>https://blog.softwarewrighter.com/2026/10/29/ai-tools-domain-expert-skill</id><content type="html" xml:base="https://blog.softwarewrighter.com/2026/10/29/ai-tools-domain-expert-skill/"><![CDATA[<!-- DRAFT (2026-10-29), Mike: the point is the domain-expert skill, which restarted a project he considered stuck since
     February. Mike did not write the skill; it was sent to him as a suggested Gemini skill, and he converted it into a Claude Code skill
     (sender not named).
     Sources: text-to-sfx-gen at 3942d66 (README, docs/blog-outline.md, docs/phases.md, docs/domain-expertise.md = the
     briefing, .claude/skills/domain-expert/SKILL.md, git log: Phase 1 2026-02-10/11 with opencode + GLM-4.7; Phase 2
     committed 2026-10-29 with Claude Code + Claude Opus 5.5). Images from the repo's images/. The briefing follows the
     skill's template but lives at docs/domain-expertise.md, not docs/briefings/. Lead image: Mike's block-hinge-math.jpg (text-to-sfx-gen images/, 2026-10-29), monochrome block print, no-invert. -->

<p><img src="/assets/images/posts/block-hinge-math.webp" class="post-marker no-invert" alt="" style="width: 205px;" /></p>

<p>In February I had an AI agent write sound effects as code: no audio model at run time, just math, so every sound it makes is mine to license. Simple sounds worked. The door creak sounded like wind, and the hinge didn’t sound like a hinge. I put the project down. This month someone sent me a skill to try, called domain-expert. It was written for Gemini; I converted it into a Claude Code skill, and it got the project moving again. I did not write the skill itself; this post is about what it does and what it did here.</p>

<!--more-->

<div class="resource-box">

  <table>
    <thead>
      <tr>
        <th>Resource</th>
        <th>Link</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><strong>The project</strong></td>
        <td><a href="https://github.com/softwarewrighter/text-to-sfx-gen">text-to-sfx-gen</a></td>
      </tr>
      <tr>
        <td><strong>Live demo</strong></td>
        <td><a href="https://softwarewrighter.github.io/text-to-sfx-gen/">softwarewrighter.github.io/text-to-sfx-gen</a></td>
      </tr>
      <tr>
        <td><strong>The skill</strong></td>
        <td><a href="https://github.com/softwarewrighter/text-to-sfx-gen/blob/main/.claude/skills/domain-expert/SKILL.md">.claude/skills/domain-expert/SKILL.md</a></td>
      </tr>
      <tr>
        <td><strong>The briefing</strong></td>
        <td><a href="https://github.com/softwarewrighter/text-to-sfx-gen/blob/main/docs/domain-expertise.md">docs/domain-expertise.md</a></td>
      </tr>
      <tr>
        <td><strong>Status and what remains</strong></td>
        <td><a href="https://github.com/softwarewrighter/text-to-sfx-gen/blob/main/docs/phases.md">docs/phases.md</a></td>
      </tr>
      <tr>
        <td><strong>The series</strong></td>
        <td><a href="/series/#ai-tools">AI Tools: every post</a></td>
      </tr>
      <tr>
        <td><strong>Comments</strong></td>
        <td><a href="https://discord.com/invite/Ctzk5uHggZ">Discord</a></td>
      </tr>
    </tbody>
  </table>

</div>

<h2 id="stuck-since-february">Stuck since February</h2>

<figure class="zoomable" style="float: right; clear: right; width: 45%; margin: 0.2em 0 0.6em 1.5em;">
<img src="/assets/images/posts/sfx-screenshot.webp" class="no-invert" alt="The February demo page, Procedural Sound Effects, MIT-licensed, no AI models: its first card is Wind Whistling, originally intended as a door creak, with a note that the generated file sounds like wind whistling; below it an explosion and a flying saucer" />
<figcaption style="font-size: 0.85em;">February's demo page: the door creak, renamed Wind Whistling. Click to enlarge.</figcaption>
</figure>

<p>The idea is simple. An AI agent researches how a sound is made and writes code that synthesizes it from oscillators, noise, filters and physical models. Nothing runs a model when the sound is generated, so there is no GPU, no weights and no license question: the output is MIT, unlike the “open” text-to-audio models released for non-commercial use only.</p>

<p>The first attempt, in February with opencode and GLM-4.7, produced ten Python generators, an interactive trainer and a demo page. Impacts, clicks, a flying saucer and the sirens worked. The two door sounds did not, and when I came back to the repo it was in worse shape than I remembered: the WAV files had never been committed, one generator crashed when run, and none of the random ones was seeded.</p>

<h2 id="the-skill">The skill</h2>

<p>The skill’s job is to stop exactly that. Its description names the failure it prevents, “fluent shallow competence”: output that reads as expert and is technically wrong. It fires before the work, on tripwires such as a field with its own terms of art, or catching yourself “reaching for an analogy from an adjacent domain to cover a knowledge gap”. Then it makes the agent:</p>

<ul>
  <li><strong>Collect four things</strong> the skill calls V-C-P-F: the field’s <strong>vocabulary</strong>, its <strong>canon</strong> of primary sources, the <strong>pitfalls</strong> practitioners warn newcomers about, and the <strong>frontier</strong>, what changed recently.</li>
  <li><strong>Search in three passes:</strong> conceptual searches to learn the field’s words, exact-term searches for its canonical documents, then the primary literature itself, the papers and code, read firsthand. A claim that rests on one blog stays provisional.</li>
  <li><strong>Pass a gate</strong> before it is done, citing evidence for each test, including a transfer test: another agent could do the task from the briefing alone.</li>
  <li><strong>Write it down</strong> as a dated, sourced briefing in the repo, with its confidence and its limits stated, so the research is not redone next time.</li>
</ul>

<h2 id="what-the-briefing-found">What the briefing found</h2>

<p><a href="https://github.com/softwarewrighter/text-to-sfx-gen/blob/main/docs/domain-expertise.md">The briefing</a>, 490 lines, read its sources in full: Akay’s tutorial on friction acoustics in JASA (2002), the elasto-plastic friction model of Avanzini, Serafin and Rocchesso (DAFx-02), and the creaking-door patch in Farnell’s <em>Designing Sound</em>. The physics in brief: a hinge squeaks through stick-slip. The pin sticks in the bore, force builds, it slips, and the cycle repeats. When the slips lock to a resonance of the metal, their repetition rate is the pitch you hear; when they don’t, you hear separate creak clicks.</p>

<p>Its pitfalls section then named what the February generator did wrong, by name. It treated a squeak as “noise bursts plus a sine”, when the pitch comes from the slips themselves, not from a tone added on top. And it slipped 3 to 12 times a second, which is the rate of a creak or ratchet, not a squeak. The research also wrote down where it stopped: its parameter values were “reasoned starting points”, not measured from recordings, and its claims were checked with a toy simulation, not against real hinges.</p>

<h2 id="the-document-it-left-behind">The document it left behind</h2>

<p>After applying the skill, I had Claude write the research up, and the briefing is worth reading on its own. It follows the skill’s template, vocabulary, canon, pitfalls, frontier and open gaps, and then goes past it into what the work needed:</p>

<ul>
  <li><strong>The model, precisely:</strong> the elasto-plastic friction equations from the DAFx-02 paper, how they couple to the resonant modes of the metal, and Farnell’s cheaper phenomenological recipe as an alternative for creaks.</li>
  <li><strong>A sanity simulation, run during the research:</strong> a toy friction model driving one 600 Hz mode, swept over load and sliding speed. It squeals only inside a narrow window of speed, which is the physics saying why a hinge squeaks some of the time, not all of it.</li>
  <li><strong>A plan an agent can act on:</strong> how a user’s or an LLM’s settings map onto the physical ones, a pipeline of exciter, interaction and resonator stages an LLM could author, experiments with pass criteria, and a file-by-file plan for this repo.</li>
  <li><strong>The frontier:</strong> recent work on LLM-driven procedural audio, among it CTAG (ICML 2024), SonicRAG (2025) and the Faust project’s guide for LLMs, each summarized with what it found and where it fell short.</li>
  <li><strong>Its own limits, named:</strong> the papers it could not read (one behind IEEE, one returning a 403), the measurements no paper provided, and an “expert-enough” gate that cites, section by section, the evidence for each of the skill’s four tests.</li>
</ul>

<p>That last part is what I value most in it. A briefing that says what it does not know told me, before any code, where the next problem would be.</p>

<h2 class="pos-left" id="hinge-lab-physically-right-perceptually-wrong">Hinge Lab: physically right, perceptually wrong</h2>

<figure class="zoomable outdent-right">
<img src="/assets/images/posts/sfx-hinge-lab-ui.webp" class="no-invert" alt="Hinge Lab's window: sliders for the squeak's parameters, among them duration, swing time, peak speed, load, lubrication, rust, Stribeck speed, contact stiffness and hinge frequency; a waveform of the rendered squeak; its pitch over time, around 700 to 900 Hz; and the pin's sliding speed rising and falling through the squeak window" />
<figcaption style="font-size: 0.85em;">Hinge Lab: the friction model with sliders, re-rendering in about a tenth of a second. Click to enlarge.</figcaption>
</figure>

<p>Built on the briefing, <a href="https://github.com/softwarewrighter/text-to-sfx-gen/blob/main/hinge-lab/README.md">Hinge Lab</a> simulates that friction in Rust, with sliders that re-render the sound in about 0.1 s and a command line that writes a WAV and a JSON sidecar. The same parameters and seed give a bit-identical WAV, so “it sounds wrong” becomes a diff rather than a memory.</p>

<p>It was physically right about <em>when</em> a hinge squeaks, and still sounded wrong: one smooth, slowly gliding tone with few overtones. The briefing had predicted its own ceiling. The model needed something the literature could not give it.</p>

<h2 class="pos-right" id="measuring-real-squeaks">Measuring real squeaks</h2>

<figure class="zoomable outdent-left">
<img src="/assets/images/posts/sfx-analysis-stepped.webp" class="no-invert" alt="Analysis of a stepped squeak: the reference squeak's spectrogram with its tracked pitch, holding steady and then jumping at two points; below it the resynthesis rebuilt from the measurements, with the same steps and bright harmonics; and its loudness and roughness over the second it lasts" />
<figcaption style="font-size: 0.85em;">A real squeak (top), measured, and rebuilt from the measurements (middle): steady pitches with sudden jumps. Click to enlarge.</figcaption>
</figure>

<p>So the next step was measurement. An analysis tool found 23 squeaks in a reference video and tracked each one’s pitch and roughness. Real squeaks turned out to be sequences of parts: steady pitches with sudden jumps, glides, and clean stretches that break into clicks, all driven by sharp slip pulses that make them bright. Five kinds emerged, from stepped and gliding squeaks to creaks and low groans. Rebuilding each squeak that way, from the measurements, reproduces those features, and those rebuilds are the second-attempt sounds on the <a href="https://softwarewrighter.github.io/text-to-sfx-gen/">demo page</a>.</p>

<p>The reference audio itself is not published anywhere, since its provenance is unclear. It stays in a folder git ignores; the site shows only spectrograms and measurements, with links to the video’s timestamps, and the build refuses to run if a reference clip turns up in its output.</p>

<h2 class="pos-left" id="what-the-skill-did-and-did-not-do">What the skill did, and did not do</h2>

<figure class="zoomable outdent-right">
<img src="/assets/images/posts/sfx-demo-page.webp" class="no-invert" alt="Today's demo page, Text-to-SFX: procedural sound effects. Section 1, the first attempt from February, lists ten sounds with players, among them a door creak that sounds like wind and a hinge creak that is not convincing. Section 2, the second attempt, the squeaky hinge from October, groups the rebuilt squeaks by kind, stepped and gliding, each with a link to its analysis" />
<figcaption style="font-size: 0.85em;">Today's demo page: the first attempt, then the second. Click to enlarge.</figcaption>
</figure>

<p>The skill did not make the hinge sound right. What it did for a stuck project was different: it replaced my vague “it doesn’t sound like a hinge” with a sourced account of how a hinge makes sound, named the old code’s mistakes against that account, and said plainly where its own knowledge ran out. That is what made the next two steps obvious, a model built on the physics and then measurements to find what the model lacked. And because the briefing is a file in the repo, dated, the next agent to work on this starts from it instead of from nothing.</p>

<p>What is next, from the project’s own list: rebuild Hinge Lab around the sequence-of-parts structure, so an analyzed squeak can be loaded and edited; fit its parameters to a measured squeak; let an LLM write new ones from a text description; and try the same friction exciter on chalk, sneakers, a wineglass and brakes.</p>]]></content><author><name>Software Wrighter</name></author><category term="ai-tools" /><category term="audio" /><category term="ai-tools" /><category term="claude-code" /><category term="skills" /><category term="agent-skills" /><category term="research" /><category term="procedural-audio" /><category term="sound-effects" /><category term="friction" /><category term="stick-slip" /><category term="rust" /><category term="egui" /><category term="reproducibility" /><summary type="html"><![CDATA[In February I had an AI agent write sound effects as code: no audio model at run time, just math, so every sound it makes is mine to license. Simple sounds worked. The door creak sounded like wind, and the hinge didn’t sound like a hinge. I put the project down. This month someone sent me a skill to try, called domain-expert. It was written for Gemini; I converted it into a Claude Code skill, and it got the project moving again. I did not write the skill itself; this post is about what it does and what it did here.]]></summary></entry></feed>