Open and answer this issue on GitHub.
performance, blocked · opened 2026-11-15 · updated 2026-11-16 · 5 comments
Part of #1611 (Benchmarks Game programs in benches/game/), which holds the method, the harness and the rules for findings.
What it measures. Float arithmetic per pixel with an early exit, eight pixels packed into one byte, and a binary PBM image written to standard output: float loops, bit operations on u8, and byte output.
To build
benches/game/mandelbrot/, as a Nikaia programmer writes it first; a second version written for speed only if it differs. If the fastest Rust entry uses explicit SIMD and Nikaia has no form for it, that is a finding to sort by CLAUDE.md (A missing form stops the work), and the table gets a second Rust row: the fastest entry without explicit SIMD.callgrind_annotate, filed as an issue.Done when benches/game/game.sh prints mandelbrot’s rows next to the Rust entry with the same output, and each loss names its issue.
Brief queued: issue-1616
agent: builder model: opus max_turns: 200 budget_usd: 30 issues: 1616, 1611 effort: medium —
Your work order is issue #1616, inlined below with its comments. There is no
brief written around it: plan your own steps from its To build list, build
them in order, commit after each finished step, and end when its Done when
holds (or at the limits of builder.md, reporting what is left). The
facts in your prompt are Core of docs/builder-facts.md; more on a topic:
nikaia run scripts/syntax.nika -- KEYWORD, a probe: nikaia run scripts/probe.nika -- SNIPPET.
Measure the issue against docs/issues.md while you work: what it lacked,
what was wrong in it. That answer goes into the report’s Issue: field.
A finding, a changed plan or a finished item also goes into the issue as a
comment (gh api repos/Nikaia-Foundation/Nikaia/issues/1616/comments -F body=@file,
ending with the Claude Code footer), rule I13.
develop in the main checkout; other agents’ uncommitted files are not yours: never touch or stage them.target/fast/nikaia run scripts/commit.nika -- REPORT (it adds exactly the report’s Files:); the driver pushes.cargo build --profile fast -p nikaia, lower-std and its fixpoint when a tools/*.nika changed, cargo fmt, cargo clippy --all-targets -- -D warnings, nikaia run scripts/pre-push.nika, the tests the issue names and the ones your change touches.CHANGELOG.md, badges and NK codes are the supervisor’s. New tests in Nikaia only: a Rust test file an older issue names is built as a tests/compiler/tests/ program, no Deviation: and no Issue: point (I9, #1671).Body:. Found: is only for what lies outside the area, cannot be fixed this run or needs a decision; the driver files it as an issue.std or the toolchain lacks stops the work, unless an ADR or Part I-III refuses it (name it): Result: blocked, Found: the gap with a probe, Needs: supervisor decision.NIKAIA_CACHE_LIMIT=2G; at the end delete your own clone’s target/ and target/release/nikaia-scratch.Result: partial with what you ruled out, the probe, and the suspected file and function.{REPORT})Fields: Result, Files, Commit, Body (optional), Fixes, Pushed, Tests, Gate, Deviation, Found, Needs, Changelog, Issue, Owner (a question for the owner), Comment (#N <text>, what to say on another issue; the driver posts it, one line each), Friction, Disk freed, and last Attribution: with your commit trailer lines below it.
Result:, Gate: (green or red <check>), Deviation:, Found: and the other fields with nothing to say hold the bare word: done, none. Anything after it reads as content.Result: done only when the issue’s Done when holds; partial with the items left otherwise.Deviation: only for an item of the issue built otherwise than written, or not built. Found: only for a defect outside your area, or one this run cannot fix: one defect per Found: line, with its probe and the output it gives, only the shapes that fail today, and the suspected file and function or cause unknown (#1695); a by-design behaviour is none (#1677). A correct program your own change refuses (a fail-closed check’s false refusal) is no Deviation: but one Found: line per shape, with its probe (#1680). Everything else goes into Body:; how you verified goes into Tests:.Issue: by docs/issues.md, How a run judges its issue: complete, or broke I<n>: ..., rules-gap: ..., wrong I<n>: ..., joined with ;; a point your own commit built gets (built) after its kind (rules-gap (built): ...), and the driver does not file it.done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).benches/game/game.nika (built with n-body, #1612); add this program to it. #1611’s text (method, table, rules for findings) is inlined above.std::simd float lanes are decided (ADR-377 D9) and built by #1806.Generated by Claude Code
Run: issue-1616, Result: blocked
Tokens: input 60, cache read 1804933, cache write 64939, output 10124 Cost: 1.12 USD, time 2 min 16 s, turns 30
Result: blocked
Files: none
Commit: none
Body: Stopped before the first edit. Mandelbrot’s output is a binary PBM image (the “P4\nN N\n” header, then N*N/8 packed bytes, most of them not UTF-8), and Nikaia has no way to write bytes to standard output: ADR-019 D6 keeps output to print/println and says “Binary output is the open half, not decided here”; no later ADR or Part I-III section decides it (searched docs/specification for binary output, Bytes on stdout, io::write). Writing through fs::open(“/dev/stdout”) would route around the gap, so nothing was built. The fastest Rust entry is Rust #4 (0.95 s, https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/mandelbrot-rust-4.html): F64x8 as a plain [f64; 8] array with operator impls, autovectorised, no explicit SIMD, rayon over rows, 49 iterations with a divergence check every 4 and only while the previous byte was 0; so the Nikaia “for speed” row can use simd::Fixed[f64, 8] and no second Rust row is needed. Once the decision is built, the run is: benches/game/mandelbrot/main.nika (per pixel, 50 iterations, break at |z|²>4, 8 bits packed into a u8), speed.nika (8 lanes), rust-4.rs copied with header, a Game entry in game.nika (rayon, RAYON_NUM_THREADS=1 row), outputs compared with cmp.
Pushed: none
Tests: none run beyond probes on the before binary (target/fast/nikaia at HEAD 8d2e6a88, copied to the scratchpad); nothing committed.
Gate: green
Deviation: none
Found: Nikaia has no form to write bytes to standard output (no decision yet: ADR-019 D6 “Binary output is the open half, not decided here”); probe fn main() throws {\n\tlet mut v: Vec[u8] = []\n\tv.push(200 as u8)\n\tv.push(10 as u8)\n\tlet b = Bytes(v)\n\tprint(b)\n} run with nikaia run a.nika gives NK1343 internal error (rustc: nikaia_std::bytes::Bytes doesn’t implement std::fmt::Display); expected: the two bytes 0310 012 on stdout through whatever form is decided (print/print of Bytes, or an io::write); blocks benches/game mandelbrot (#1616) and later reverse-complement’s and fasta’s byte output (#1611); std has the Rust pieces already (fs.rs FilePath print writes raw bytes with std::io::stdout().lock().write_all).
Found: the checker accepts print(Bytes(v)), println(Bytes(v)) and print(f"{Bytes(v)}") and rustc then refuses the lowered code: NK1343 “Internal compiler error”, note “nikaia_std::bytes::Bytes doesn’t implement std::fmt::Display” (probe fn main() throws {\n\tlet mut v: Vec[u8] = []\n\tv.push(200 as u8)\n\tprint(f"P4\n{v.len()}\n")\n\tprintln(Bytes(v))\n}, nikaia run b.nika, binary at HEAD 8d2e6a88); expected either the bytes (if the binary-output decision makes print take Bytes) or a checker refusal with an NK code naming the type, never NK1343 (its own help says the checker should not have accepted it); no decision yet, since which of the two depends on the decision above; suspected site: the print argument check in the checker’s prelude call typing (cause not traced).
Needs: supervisor decision: how a program writes bytes to standard output (ADR-019 D6’s open half), e.g. print/println taking Bytes, or a std::io write of Bytes; then #1616 can be built.
Changelog: none
Issue: rules-gap: #1616 and #1611 name “byte output” as what mandelbrot measures but neither checked that Nikaia can write bytes to stdout (ADR-019 D6 leaves it undecided); a pre-flight probe in the issue would have filed the decision first (I-rule on probes before ready)
Owner: none
Comment: #1611 mandelbrot (#1616) is blocked: binary PBM output needs bytes on standard output, which ADR-019 D6 leaves undecided; reverse-complement and fasta will meet the same gap. Fastest Rust entry is Rust #4, no explicit SIMD.
Friction: none
Disk freed: none (target/nikaia-project-tests 843M, / 17G free; no cache entries created)
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDukWgopUzVU2M1TjK7
io.rs and fs.rs, ran three print(Bytes) probes and searched the ADRs before ADR-019 D6 settled it. Two early turns went to cd $S with S unset, and one to a bare nikaia that isn’t on PATH.fs::Path::print is the only raw stdout write, and it is internal); that Bytes(v) takes a Vec[u8] and has no push; which Rust mandelbrot entry is fastest (Rust #4, no explicit SIMD).print(Bytes) probes (needed), the ADR grep (needed), and fetching the Rust entries (useful for the next run). Reading game.nika and spectral-norm’s main.nika in full was wasted once the run was blocked.develop before it is marked ready would have caught this as a decision first, without a builder run.rules-gap: it names “byte output” but no probe that Nikaia can do it; no rule asks for a probe of each capability an issue’s program needs.rules-gap: #1611 lists fasta and reverse-complement too, and both need the same undecided form; nothing records that dependency.| Fact: Core | Nikaia cannot write bytes to stdout (ADR-019 D6 leaves it undecided), and print(Bytes) passes the checker but fails as NK1343; a program with binary output is blocked until it is decided. |
| Fact: Core | nikaia is not on PATH here; call target/fast/nikaia run scripts/syntax.nika and the other scripts by that path. |
| Fact: Core | cd into the scratchpad resets the shell to the repo; write absolute scratchpad paths in every command. |
Generated by Claude Code
Driver: not queued, this issue waits for #1611, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code
From the report of the run of issue-1859 (#1859):
Unblocked: print(b) of Bytes now writes the bytes unchanged (#1859), so mandelbrot can write its PBM image.
Generated by Claude Code
From the report of the run of issue-1856 (#1856):
waits for the decision on bytes to standard output (#1854); add Needs #1854 so the driver holds it until that is built.
Generated by Claude Code