How to port an image library
A custom swarm translated stb_image from C to Jai using DeepSeek Flash, with Claude Code preparing and merging work. Compilation repairs, paired agent review, tests and fuzzing followed.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
Plan a port of [C library] to [target language]. Create translation rules, split related functions into manageable chunks, translate and merge them, then distribute compiler errors for repair. Review semantic equivalence, run [test suite], and fuzz the result before declaring completion.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source poster / publisher
- vblanco
- Original account
- Read the source ↗
- Published
- Source link checked
- Reported result
- The author published a Jai port of stb_image after compilation repairs, paired agent review, passing tests and fuzzing that uncovered additional bugs.
- Human involvement
- The author built and iterated the orchestration, ran review and testing stages, and reported further fuzzing after green tests.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Prepare translation rules, project documentation and shared context.
- Split the C library into chunks using Claude.
- Translate the chunks with DeepSeek agents and merge with Claude Code.
The author ported stb_image from C to Jai using a custom scheduling system, Claude Code and DeepSeek Flash agents. They first used Claude Code and similar tools to prepare translation rules, project documentation and shared context. Claude then divided the roughly 7,000-line library into chunks of about 500 lines, grouping functions and structures.
DeepSeek agents translated those chunks. A single Claude Code session merged the results, resolving problems such as duplicated definitions. The next stage compiled the project, parsed compiler errors and distributed them among multiple repair agents.
Compilation did not finish the work. The author assigned two agents to inspect each structure or function, then iterated on the existing tests. Independent format areas, such as PNG and JPEG, could be repaired concurrently. After the tests were fully green, a fuzzing swarm found additional obscure port bugs and, according to the author, a couple of errors in the original library. The result was published as a Jai image-loading library. The author reports about three dollars in DeepSeek token costs, including experiments.
Who it's for: Developers prepared to build project-specific orchestration for a language port.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Hacker News · vblanco
Frequently asked questions
Why did the author use an agent to merge translations?
The author says translated chunks sometimes duplicated definitions, so a Claude Code session handled merging rather than relying on a fixed script.
What happened after compilation and tests passed?
The author ran a fuzzing swarm, which reportedly found obscure bugs in the port and a couple of errors in the original library.
More details
Remaining steps
- Compile and distribute compiler errors among repair agents.
- Review functions with paired agents and iterate on tests.
- Run a fuzzing swarm after the tests pass.
About this account
Custom orchestration assigned translation, repair, review and fuzzing tasks to agents; Claude Code merged translated chunks.
Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=48597197. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: vblanco on Hacker News
Source published
Added to Agents In Use
Source checked
Tools and topics
DeepSeek Flash · Claude Code · Custom swarm scheduler · Jai compiler · Test suite
Language porting · Agent swarms · Jai · Fuzzing
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.