← Back to context

Comment by tda

9 days ago

I ported a decades-old piece of scientific software (Delft3D — Deltares' Fortran hydrodynamics engine) to run natively on Apple Silicon. From my phone, mostly, because I could (and because AI could). Runs pretty decently on a Mac Studio M3 now.

It was officially Intel-compiler + Windows/Linux only; the port gets it building with gfortran on macOS/arm64, PETSc+MPI solver and all. Fable and GPT-5.6 chewed through the compiler warnings, dependency hell, and portability bugs largely on their own. 30 or so bugs uncovered and fixed along the way, several of them real and platform-independent.

I'm not a C or Fortran dev. Mostly I argued with the agents about benchmarking methodology and told them to re-measure when the numbers looked off. The rest was up to them. Still amazed about this AI thing going on

https://github.com/tdamsma/Delft3D

what's your workflow for doing the port?

  • I installed Claude Code on the Mac Studio, and gave it access over ssh to a Linux box. I instructed Claude to first compile on Linux, create reference artefacts, and only then start the work on mac. And then to make sure the Linux version still would compile with the changes made to the compiler toolchain, the Mac specific instructions etc.

    I told Fable to make a nice plan, and fan out work to opus and sonnet agents. I then enabled remote connections and checked every few hours from my phone and nudged it in the right directions where needed. Have some push back once in a while. And once done I asked it to make a nice commit history and remove all the dead ends.