Paint.NET 作者:用 Claude 逆向重写 Direct2D 以支持
Quoting Rick Brewster
这是一篇极具参考价值的一手工程复盘,详细展示了 AI Agent 在处理复杂底层 API 逆向时的实际表现、代码规模及人工干预的关键点,适合关注 AI 编程落地效果的开发者阅读。
Direct2D has always been the biggest hurdle for Paint.NET on WINE, and it's clear that it will never be completed enough for Paint.NET's use. And I can't just "disable" the use of Direct2D. So, instead, Paint.NET now has an internal, from-scratch, clean-room reverse-engineered rewrite of Direct2D that it uses on WINE (triggered by using /wine). It lives in PaintDotNet.Windows.Direct2D1.Managed.dll. This was written by our good friend Claude, without whom this would NOT have been possible and would NEVER have happened. [...]
Direct2D 一直是 Paint.NET 在 WINE 上运行的最大障碍,而且很明显,它永远无法完善到足以满足 Paint.NET 的使用需求。而我不能简单地“禁用” Direct2D 的使用。因此,Paint.NET 现在内置了一个从头开始、采用净室逆向工程方法重写的 Direct2D 实现,用于在 WINE 上运行(通过启用 /wine 参数触发)。该代码位于 PaintDotNet.Windows.Direct2D1.Managed.dll 中。这是由我们的好朋友 Claude 编写的,没有他,这一切都不可能发生,也永远不会成为现实。[...]
Most of this code is, as they say, "vibe coded." By that I mean that it has not been thoroughly reviewed, it's more "trust me bro" style. I cannot possibly review 180,000 lines of code, it's just way way way too much. For reference, the rest of Paint.NET is about 700,000 lines of code and I've been working on it for over 20 years. [...]
正如人们所说,这段代码的大部分是“氛围编码”(vibe coded)的。我的意思是,它并未经过彻底审查,更多是一种“相信我,兄弟”的风格。我根本不可能审查 18 万行代码,这实在太多了。作为参考,Paint.NET 其余部分的代码量约为 70 万行,而我已经为之工作了超过 20 年。[...]
At times, Claude was working with the fury of 10 freshly unshackled Einstein genius-level 10x coders. And other times ... well, not so much. I had to babysit Claude quite a bit to make sure it did resource management correctly (for awhile it just wasn't doing the COM equivalent of AddRef() for reference counted objects, oops). I had to slap it a few times when I found some really bad design or architecture decisions. And I was also impressed at some rather clever and tireless reverse engineering work it did to figure out all the formulas needed for implementing Direct2D's built-in effects library.
有时,Claude 的工作状态如同 10 位刚刚挣脱束缚的爱因斯坦般天才级别的 10 倍程序员那样充满激情。而另一些时候……嗯,就没那么多了。我必须对 Claude 进行不少监护,以确保它正确地进行资源管理(有一段时间它完全忽略了为引用计数对象执行 COM 中的 AddRef() 操作,哎呀)。当我发现一些非常糟糕的设计或架构决策时,我还不得不敲打它几次。同时,我也对它为了解决实现 Direct2D 内置效果库所需的所有公式而进行的相当巧妙且不知疲倦的逆向工程工作印象深刻。
— Rick Brewster, author of Paint.NET
—— Rick Brewster,Paint.NET 的作者
Tags: reverse-engineering, coding-agents, claude, generative-ai, ai, llms, dotnet, linux, vibe-coding
标签:逆向工程、编码代理、Claude、生成式 AI、AI、大语言模型、.NET、Linux、氛围编码
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力