Paint.NET 作者 Rick Brewster 谈用 Claude 重写 Direct2D 使软件可运行于 WINE

内容摘要
概述: Paint.NET的作者Rick Brewster在2026年9月2日的博客中谈到了Direct2D在WINE上运行的难题,并介绍了他们如何通过内部重写Direct2D来解决这个问题。他特别感谢了Claude的贡献,并描述了在开发过程中的挑战和成就。 要点: 1. Direct2D一直是Paint.NET在WINE上运行的难题,无法完全满足需求。 2. Paint.NET现在使用一个内部重写的Direct2D版本,由Claude编写。 3. 这个重写的Direct2D版本位于PaintDotNet.Windows.Direct2D1.Managed.dll中。 4. Claude在编写过程中展现了极高的编码能力,但同时也存在一些资源管理和设计上的问题。 5. Brewster对Claude的逆向工程工作印象深刻,特别是其在Direct2D内置效果库实现上的努力。
概述:
Paint.NET的作者Rick Brewster在2026年9月2日的博客中谈到了Direct2D在WINE上运行的难题,并介绍了他们如何通过内部重写Direct2D来解决这个问题。他特别感谢了Claude的贡献,并描述了在开发过程中的挑战和成就。

要点:
1. Direct2D一直是Paint.NET在WINE上运行的难题,无法完全满足需求。
2. Paint.NET现在使用一个内部重写的Direct2D版本,由Claude编写。
3. 这个重写的Direct2D版本位于PaintDotNet.Windows.Direct2D1.Managed.dll中。
4. Claude在编写过程中展现了极高的编码能力,但同时也存在一些资源管理和设计上的问题。
5. Brewster对Claude的逆向工程工作印象深刻,特别是其在Direct2D内置效果库实现上的努力。

Simon Willison’s Weblog

2nd September 2026

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. [...]

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. [...]

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.

Rick Brewster, author of Paint.NET

2nd September 2026

原始发布方:Simon Willison 博客

原文时间:2026-09-02 13:50:57 +08:00

阅读原文 · 数据来源:AIHOT

提示

本文用于信息整理与经验分享。第三方订阅、支付及账号服务可能调整,实际规则、价格和可用性请以下单页面及服务方最新说明为准。

咨询 GPT 充值咨询充值