Sounds familiar? This is how I historically have been running benchmarks and other experiments requiring a repeated sequence of commands — type them manually once, then rely on shell history (and maybe some terminal splits) for reproduction. These past few years I’ve arrived at a much better workflow pattern — make.ts. I was forced to adapt it once I started working with multiprocess applications, where manually entering commands is borderline infeasible. In retrospect, I should have adapted the workflow years earlier. Use a consistent filename for the script. I use make.ts, and so there’s a make.ts in the root of most projects I work on. Correspondingly, I have make.ts line in project’s .git/info/exclude — the .gitignore file which is not shared. The fixed name reduces fixed costs — whenever I need complex interactivity I don’t need to come up with a name for a new file, I open my pre-existing make.ts, wipe whatever was there and start hacking. Similarly, I have ./make.ts in my shell history, so fish autosuggestions work for me. At one point, I had a VS Code task to run make.ts, though I now use terminal editor. Start the script with hash bang, #!/usr/bin/env -S deno run --allow-all in my case, and chmod a+x make.ts the file, to make it easy to run. Write the script in a language that: you are comfortable with, doesn’t require huge setup, makes it easy to spawn subprocesses, has good support for concurrency. For me, that is TypeScript. Modern JavaScript is sufficiently ergonomic, and structural, gradual typing is a sweet spot that gives you reasonable code completion, but still allows brute-forcing any problem by throwing enough stringly dicts at it. JavaScript’s tagged template syntax is brilliant for scripting use-cases: function $(literal, ...interpolated) { console.log({ literal, interpolated }); } const dir = "hello, world"; $`ls ${dir}`; prints { literal: [ "ls ", "" ], interpolated: [ "hello, world" ] } What happens here is that $ gets a list of literal stri...
First seen: 2026-01-28 08:08
Last seen: 2026-01-28 11:26