From f4233ba11d1edf80c68bdb92ebff4891deffd629 Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Mon, 28 Sep 2026 22:58:37 +0300 Subject: [PATCH] ludic.base: sb_stdout - a StrBuf's bytes to standard output with no string made (a per-frame log line the fence would otherwise see kept) Co-Authored-By: Claude Opus 5.5 --- packages/ludic.base/text_buf.ludic | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/ludic.base/text_buf.ludic b/packages/ludic.base/text_buf.ludic index aed4a398..b59078b8 100644 --- a/packages/ludic.base/text_buf.ludic +++ b/packages/ludic.base/text_buf.ludic @@ -64,3 +64,10 @@ export function sb_pat(sb: StrBuf, pat: string, a: string, b: string, c: string, } } } + +# the buffer's bytes to standard output as they are (no string made, no newline added): a line a +# frame's code writes without the fence seeing a text kept +export function sb_stdout(sb: StrBuf) -> void { + if sb.n <= 0 { return } + unsafe { file_write(file_stdout(), data_of(sb.b), sb.n) } +}