On portable shell scripts for system programming

Programming, for all ages and all languages.
Post Reply
User avatar
bowdrill
Posts: 5
Joined: Tue Jul 01, 2025 12:32 pm

On portable shell scripts for system programming

Post by bowdrill »

EDIT Sep 18 19:37 UTC: brevity, subject change, mention video demo.

I wrote Arcane, a portable shell environment akin to an interpreted flat assembler g with its own typesetter. This result uses no more than the common behaviors of built-in utilities found in ash, bash, dash, ksh, ksh93, yash, and zsh. I exclude mksh for performance reasons.

No compilers, no assemblers, no external "build system." Everything hinges on the oldest POSIX XCU volume I can support. That needs to be enough to generate a FAT32 volume containing a UEFI+IA-64 application and its manual. That application need not be an OS, hence me posting in this forum.

Why care this much?

Portable shell code is painful for this line of work, so I made it tolerable. You benefit from fewer licenses to practice system dev concepts on a whim, without needing to install anything. Just grab the shell you happen to trust on the system you happen to have, along with any specs needed for a target environment. Then use Arcane to support a one-liner like

Code: Select all

% \sh mkimg | \dd bs=4K of="${of?}" # of=/dev/... 
If you care about reducing commercial invasion of residential life, then you might be interested to know that Arcane ships in a specially-crafted book. The book documents and contains the cheating quine that produced it, for double-sided printing on about 250 leaves of A5 paper. Typing the quine in an air-gapped system is enough to reproduce the results.


Where's the code?

In private storage. My name is all over the work, and I don't want any of the goods in view of LLMs. Normally I'd lead with the code, but I'm working on a video demo instead. I ask you DM me to negotiate mutual authentication and exchange public keys. We'll sign a bill of materials and a license, then I'll distribute Arcane to you privately. Depending on the terms, the license might be free. For those able and willing to pay, I'll work towards adding support for your device to the extent that I can. Depending on community interest, I may offer machine-specific scripts to supplement the wiki.
Post Reply