From ceb497ac96f7c0411426789450a62d32d62c7f44 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Thu, 4 Jun 2026 20:41:34 -0400 Subject: [PATCH] =?UTF-8?q?examples/cuda-fanout:=20README=20=E2=80=94=20as?= =?UTF-8?q?m=20tier=20primitives=20landed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reflects commit 4f03c48: spawn-process-stdio + flush-port now work on asm tier. Updates the per-tier matrix accordingly. --- examples/cuda-fanout/README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/examples/cuda-fanout/README.md b/examples/cuda-fanout/README.md index bc6dc42..64a6393 100644 --- a/examples/cuda-fanout/README.md +++ b/examples/cuda-fanout/README.md @@ -107,12 +107,21 @@ Python's default stdout buffering, which masks the "ready" / appear live. (Adding an explicit `flush-port` after the listening print would fix this in the Scheme without needing `-u`.) -## Asm tier — client-only support +## Asm tier — `spawn-process-stdio` + `flush-port` now landed -The asm tier is **CLIENT-only**: it can call `(bend …)` and reach a -worker hosted on Python/C tier, but cannot host workers itself -because `spawn-process-stdio` would require asm-tier syscalls -(`fork+pipe+execve+dup2`) not yet wired. +The asm tier got both primitives in commit `4f03c48`: + +```scheme +λ> (display (spawn-process-stdio "/bin/echo" (quote ("hi")))) +(# . #) +λ> (flush-port (car (spawn-process-stdio "/bin/true" (quote ())))) +;; (returns void) +``` + +Implementation: hand-written `pipe2 + fork + dup2 + execve` syscall +sequence (~200 LoC asm). `flush-port` is a no-op on asm tier because +ports are raw fds with no userspace buffering. See the commit message +for the stack-layout & critical `%r15`-is-the-heap-pointer note. What works on asm today: