Paint.NET Gets a From-Scratch Direct2D Rewrite for WINE — Almost Entirely “Vibe-Crafted” by Claude
Translated by a model; the original is in Russian.
Rick Brewster, the creator of the Paint.NET image editor, has shared an unusual solution to a long-standing problem: his program will finally be able to run properly under WINE. The main obstacle had always been the Direct2D graphics interface — a layer that, according to the developer, WINE is unlikely to ever bring up to a state suitable for Paint.NET. Disabling Direct2D within the program itself isn't an option either.
The fix turned out to be a radical one: Paint.NET now ships its own from-scratch implementation of Direct2D, produced through reverse engineering. It lives in the PaintDotNet.Windows.Direct2D1.Managed.dll library and is enabled with the /wine flag. No Microsoft source code was used in the process — only a “clean-room” reproduction of the behavior.
A 180,000-Line “Trust Me Bro”
The most curious part is the authorship. The entire library, Brewster admits, was written not by him but by the Claude neural network, “without which this would NEVER have happened.” The developer flatly calls the result “vibe coded”: the code is for the most part not really reviewed, written in a take-my-word-for-it style. Reviewing 180,000 lines by hand is simply beyond him — for comparison, all the rest of Paint.NET, which he has been working on for more than twenty years, comes to around 700,000 lines.
Brewster doesn't hide the fact that working with the AI was uneven. At times Claude delivered results “with the fury of ten freshly unleashed Einstein-level geniuses coding for ten,” and at other times — quite the opposite. The neural network had to be watched like a child: for a while, for instance, it simply forgot about reference counting for COM objects, failing to call the equivalent of AddRef() (for anyone familiar with resource management on Windows, that's a telltale, leak-prone blunder). A couple of times the developer had to, in his words, “slap its hands” for blatantly poor architectural decisions.
At the same time, Brewster was not stingy with praise: he was impressed by the model's persistent and at times inventive reverse-engineering work — Claude managed to derive all the formulas needed to implement Direct2D's built-in effects library.
The story, spotted by Simon Willison, is a vivid illustration of the current state of “vibe coding”: even an experienced developer is willing to include in a product a huge, unvetted, yet working slab of code, honestly warning users about its origin.
Source: Simon Willison
Comments
Sign in, to comment.