From 6e5eb777ca5cdd878d8888278998d3fd4539a0b1 Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Wed, 14 Oct 2026 09:06:30 +0330 Subject: fix: emit rt.put_c from the brainfuck translator the translator writes zc source that is compiled again by evals, so the generated call has to carry the namespace the runtime now requires. a bare put_c failed with "put_c is used but never defined"; rt.put_c runs and prints hello world. reconstructed after this edit was lost to a stash rewrite during the history purge; verified against the reported failure and success, not by a rebuild, since the bootstrap cannot currently produce an interpreter. --- examples/bf.zc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/bf.zc b/examples/bf.zc index 71cf40d..3971cbc 100644 --- a/examples/bf.zc +++ b/examples/bf.zc @@ -27,7 +27,7 @@ fn translate(s) { i = i + k; continue; case '[': emit("while (t[p]) {\n"); depth++; case ']': emit("}\n"); depth--; - case '.': emit("put_c(t[p]);\n"); + case '.': emit("rt.put_c(t[p]);\n"); case ',': emit("t[p] = eof() ? 0 : get_c() & 255;\n"); } i++; -- cgit v1.2.3