Move old research code to a safer language with agents
From Google, the company behind Gemini. According to Google, an agent in Antigravity moved the core of a 174,774 line Fortran and C ocean model to Rust in 59 minutes. It first recorded the original's output across 100 random runs, then planned all 264 files and rewrote the code. It found six old bugs, and the new code ran 1.88 times faster using about half the memory. The figures are Google's own.
Done with Valgfri agentModerate
What was done
From Google, the company behind Gemini. According to Google, an agent in Antigravity moved the core of a 174,774 line Fortran and C ocean model to Rust in 59 minutes. It first recorded the original's output across 100 random runs, then planned all 264 files and rewrote the code. It found six old bugs, and the new code ran 1.88 times faster using about half the memory. The figures are Google's own.
How to do it
- Paste the prompt into the tool, and replace the text in brackets with your own.
- Read the answer through. Do not send, delete or publish anything until you have seen it yourself.
- Check the original before you trust a figure, a name or a date.
Try it with Valgfri agent
Here is [codebase] written in [old language]. Build and run the original first, and keep the results from [number] runs as the reference. Then plan the whole rewrite to [new language] and show me the plan before you write new code. Note any bugs you find in the original, but do not fix them without telling me. You are done when the new code gives the same answers as the reference in every run and the tests pass.
Replace text in brackets with your own.
Google (the company behind Gemini) ·