The last two issues were about emulated machines. This one has two real ones. On Wednesday a 12-inch PowerBook G4 booted Modus over the network from a Pi, reached a Lisp listener on its own screen, and served SSH. All week a ThinkPad T420 went from colour bars drawn through its own video BIOS to a desk on UEFI at the panel’s native resolution, with 3D. Around them, one file learned to run on Windows, Linux and macOS, the browser build learned WebAssembly, and an Apple TV joined the list. At 737 commits, this is the busiest week the archive has counted.
The PowerPC port began on the 23rd in emulation: QEMU’s mac99, with Open
Firmware loading Modus from an HFS disk and no Mac OS. Two days later came the commit titled
first real-hardware boot: a 12-inch PowerBook G4, a 7447A with 256 MB, netbooted
from a Pi over TFTP to glass.wm with a Lisp listener.
The first attempt from DVD reached the desk and died in BIGNUM-ASH on an
overwritten object. Apple’s Open Firmware leaves its devices running: the USB
controller was still writing its status block every millisecond into memory at the top of
RAM, which on a 256 MB machine is where Modus keeps its heap. The fix is the call Linux
makes for the same reason, telling the firmware to quiesce before Modus takes the MMU. Hours
later, a driver for the PowerBook’s Ethernet chip brought up the same SSH server the PC
images run, big-endian, beside the desk.
The ThinkPad T420 is the other real machine, and its week reads in order. On the 21st,
bare i386 gained PM_BIOS, a way to call any BIOS interrupt from Lisp. The
author’s photograph that morning shows colour bars on the laptop’s own panel: the
real Intel video BIOS answered, EDID reported 1366×768, and vbe-init set a
mode. Then came a desk, a driver for the laptop’s Intel Ethernet PHY, a log written to
its disk, and a profile that cut the desk’s start from 34 seconds to 5.7. Then the move
to x86-64 on UEFI: the desk on UEFI’s framebuffer, the panel’s native resolution,
and by the 26th, 3D, video and the whole screen. kiln’s test rig drives it with a Pi Zero
posing as its USB keyboard and mouse.
Bare x86-64 grew up alongside: a working runtime JIT, a clock, a big heap with a stack guard, and saved cores that boot from the EFI system partition.
modus.com is an Actually Portable Executable in Cosmopolitan’s fat
form. Windows runs it as a program. A Unix shell runs the same bytes as a script, which picks
the Linux or the macOS image out of the file by uname, caches it, and runs it.
With all three inside, compressed, it was 49.3 MB. Underneath it, Windows became a host:
a PE32+ writer in the builder, a Windows CLI, and W32-CALL, any Windows function
from Lisp. dist published binaries every day from the 23rd. On the 28th, after this span,
modus.com was withdrawn from the releases in favour of a zip.
The other ends moved too. The phone’s host now runs on an Apple TV, with the remote driving the desk as a keyboard. The browser build gained a WebAssembly translator: hot functions go from Modus bytecode to Wasm modules, with calls staying inside Wasm. Its first cut sent every call through JavaScript and was three to five times slower than the JavaScript translator it replaced. On Sunday the author listed what runs: linux, windows, mac, ios, watchos, android; bare 386, bare x64, bare aarch64, bare 68k (no gui); supported but less tested: ppc, riscv, arm32.
On Modus, threads share no state: a thread’s objects live in its own region, and the runtime refuses a store that would let another thread reach one. bobbin, new this week, carved out of cl-transport with its history, brings that model to every Lisp, with actors, channels and an owner loop, and messages that are always copied. On SBCL they are copied too, so a sharing bug shows up where it is easy to debug. The libraries took it up at once. cl-deposits runs every node on one owner thread, cl-consensus’s network pump became bobbin’s owner loop, and cl-tor gave its directory one owner, then hosted onion services and checked its client against the live Tor network. cl-consensus now accepts a Bitcoin peer over its own onion service.
Two more libraries were carved out the same way. comb is shuttle’s regex engine, graded against test262, now with cl-ppcre’s API beside its ECMAScript one. Its working name was two-problems. cl-smb, an SMB 2 and 3 client, was written from Microsoft’s published specifications. And glass deleted its McCLIM desktop: 18,513 lines in one commit, leaving its own window manager, glass.wm, as the desktop.