
Linus Torvalds 正拥抱 AI 编写 Linux 内核代码,这让一些人大为光火。他有话要对他们说。我也有话要说。
Linus Torvalds is embracing AI to write Linux kernel code, and some people are having fits. He has a message for them. So do I. Roy Schestowitz, editor of Tux Machines, summed up his reaction to the news as "Linus Torvalds Turns to Slop."
Tux Machines 编辑 Roy Schestowitz 将他对该消息的反应概括为“Linus Torvalds Turns to Slop(投向垃圾堆)”。在播客《Pivot to AI》中,主播 David Gerard 表示赞同:“Linux 内核全面拥抱 AI 垃圾代码。”与此同时,在 Tom's Hardware 评论区,评论者“LordVile”写道:“这是他 AI 主子[Linux 基金会]的宣传噱头,毕竟是他们发工资。”随后该评论者称,这也是“他对 AI 立场反复无常的同一原因”。
In the podcast Pivot to AI, podcaster David Gerard agreed: "Linux kernel goes full AI slop code." Meanwhile, in the Tom's Hardware comments section, commenter "LordVile" wrote: "This is a publicity stunt from his AI overlords [The Linux Foundation] who pay his wage." They followed this by saying this is the "same reason he's flipped-flopped on AI."
我认识 Linus 几十年了,我不认为他使用 AI 证明他突然放弃了自己的标准。更荒谬的是,认为他会代表 Linux 基金会或任何其他人,去做任何他不想对 Linux 做的事。
I've known Linus for a few decades, and I don't take his use of AI as evidence that he's suddenly abandoned his standards. And the very idea that he'd do anything he didn't want to do with Linux on behalf of the Linux Foundation, or anyone else, is ludicrous.
我理解这种怀疑。对 AI 保持警惕是有理由的。我写过许多此类理由。例如 AI 模型崩溃,当 AI 引擎从其他 AI 模型学习、与真相的联系逐渐松动时就会发生。这是一个非常真实的问题。顺便说一句,LLM 最初寻找答案的“原料”也并非来自非常可靠的来源。即使 AI 获得了良好的数据——编程领域就是如此——其所有者也很少关注保护开源代码的版权和许可证,AI 正是从这些代码中学到了编程技巧。
I get it, though. There are reasons to be suspicious of AI. I've written about many of them. For instance, AI model collapse, which happens when AI engines learn from other AI models and their ties to the truth fray. It's a very real problem. Not, mind you, that LLMs find the grist for their answer mills from very reliable sources in the first place. Even when AI gets good data, as it does in programming, its owners pay little to no attention to the copyrights and licenses protecting the open source code it picked up its coding tricks from.
至于为运行所用的信息付费,别做梦了!大型 AI 公司向作家、艺术家等为使用其作品付费,这一想法对他们来说简直是异端邪说。
As for paying for the information it runs on, please! The very idea that Big AI must pay writers, artists, you name it, for using their work is anathema to them.
话虽如此,就编程而言,大势已去。无论批评者是否喜欢,AI 正成为编程工具箱的一部分。为什么?因为虽然你仍无法靠“氛围编程”交付生产级软件,但当像 Torvalds 这样懂行的人使用 AI 时,它非常有用。凡是否认这一点的人,都在重蹈卢德派的覆辙。
All that said, when it comes to programming, the ship has sailed. AI is becoming part of the programming toolkit, whether its critics like it or not. Why? Because while you still can't vibe code your way into delivering production-quality software, when someone who knows what they're doing, like Torvalds, uses AI, it can be very useful. Anyone who says otherwise is just making the same mistake the Luddites did.
你们中的一些人可能会问:那是谁?他们是19世纪初抗议威胁其工资和生计的变革而破坏机器的纺织工人。你们可能已经注意到,虽然人们仍然手工织布,但工业生产已经实现了机械化。同样的事情现在正在AI和编程领域发生。我认为我们已经完成了这个过程的一半左右,到2030年左右,手工编程的人会像今天手工织布的人一样罕见。
Who now, some of you may ask? They were textile workers who attacked machinery in the early 19th century in protest against changes threatening their wages and livelihoods. You may have noticed that while people still weave cloth by hand, industrial production is mechanized. The same is happening now with AI and programming. I think we're about halfway through the process, and by 2030 or so, people programming by "hand" will be about as common as weavers doing it by hand are today.
简而言之,接受现实吧。我也不喜欢这样。我以写作为生,我的生意也在受到冲击。至少在编程领域,优质的工作依然算数,无论它是如何完成的。但在写作领域,真正的AI垃圾内容正日益成为常态,而非例外。
In short, get over it. I don't love it, either. I write for a living, and my business is being crunched too. At least in programming, quality work still counts, no matter how it's done. With writing, though, true AI slop is increasingly the rule, not the exception.
回到Linux:在前几周于布拉格举行的Linux内核维护者峰会上,Linux内核开发者Sasha Levin宣布,维护者们决定“弃用Assisted-by标签”。这意味着你们在提交代码时不再需要说明是否使用了AI。但这并不意味着你们可以提交垃圾代码。那样的代码通不过审核。正如Torvalds前几天在给我的一条留言中所说:“我认为整个‘不要用AI写提交信息’之类的论点……也许初衷是好的,但我认为它完全是误入歧途。我真的认为我们希望有能力的人把AI当作工具来用。”有能力是这里的关键词。
Back to Linux: at the Linux Kernel Maintainers Summit in Prague the other week, Sasha Levin, a Linux kernel developer, announced that the maintainers had decided to "deprecate the Assisted-by Tag." That means you no longer need to say if you used AI in your code submissions. That doesn't mean you can turn in slop, though. That code won't pass muster. As Torvalds told me in a note the other day: "I think the whole 'don't use AI for commit messages' kind of argument … Maybe it's well-intentioned, but I think it's entirely misguided. I really think we want competent people to use AI as a tool." Competent is the key word there.
Torvalds还写道:“‘无知者使用AI’的问题是另一回事。我确实认为我们要阻止这种情况。不是阻止那些使用AI且真心想学习、真心想成为内核社区有用成员的人——而是阻止那些随手提交补丁的人,阻止那些只是想感觉一下自己提交了补丁、从未真正想成为更有建设性的人的人。我们都从无知开始,但有些人会花费时间和精力成长为更有建设性的人。”说得太对了。
Torvalds also wrote: "The 'clueless people using AI' problem is different. I do think we want to discourage that. Not discourage the people who use AI and truly want to learn and truly want to become useful members of the kernel community – but discourage the drive-by patches, and discourage people who just want to feel like they sent a patch and never really wanted to become anything more.
正如Torvalds在开源峰会欧洲站上所说:“我认为[氛围编程]是寻找编程乐趣的一种绝妙方式。”
We all start clueless, but some people spend the time and effort to become something more." Exactly so.
这让你感觉自己在做一些有意义的事情。它让新程序员能够做那些否则会非常困难的事情。他补充道:“我喜欢把 AI 视为编程的‘入门毒品’这一概念。” 此外,AI 已经证明在改进 Linux 代码方面非常有用。长期的 Linux 内核维护者格雷格·克罗哈特曼(Greg Kroah-Hartman)去年三月告诉我:“几个月前,我们收到的是所谓的‘AI 垃圾’,即明显错误或质量低下的 AI 生成安全报告。”
As Torvalds said at Open Source Summit Europe: "I think [vibe-coding is] a wonderful way to find joy in programming. It makes you feel like you're doing something relevant. It allows you, as a new programmer, to do things that you would otherwise have a really hard time with." He added: "I love the concept of AI as a gateway drug" to programming. Besides, AI has already proven very useful for improving Linux code. As long-term Linux kernel maintainer Greg Kroah-Hartman told me back in March: "Months ago, we were getting what we called 'AI slop,' AI-generated security reports that were obviously wrong or low quality."
但随后,“一个月前发生了一些事情,世界变了。现在我们有真正的报告了。” 他继续说:“不仅仅是 Linux,所有开源项目都有用 AI 制作的真实报告,而且它们很好,也是真实的。” 诚然,维护者们现在被大量优质的错误报告淹没,但正如克罗哈特曼在布拉格讨论时提到的,AI 错误查找器最终可能会耗尽容易发现的问题,从而减轻维护者的压力。
But then, "something happened a month ago, and the world switched. Now we have real reports." It's not just Linux, he continued. "All open source projects have real reports that are made with AI, but they're good, and they're real." True, the maintainers are getting buried in good bug reports now, but as Kroah-Hartman and discussed in Prague, AI bug finders might eventually exhaust the readily discoverable problems, easing the pressure on maintainers.
另一个 AI 的胜利是,你可以使用 AI 更轻松地将 Windows 驱动程序反编译为 Linux 驱动程序。红帽软件工程总监克里斯蒂安·F·K·沙勒(Christian F.K. Schaller)在为幻灯片扫描仪开发 Linux 驱动程序时创建了 hw-harness。这个开源项目提供“用于弄清楚一块硬件如何工作,以便你能为其编写 Linux 驱动程序的工具”。
Another AI win is that you can use AI to reverse-engineer Windows drivers for Linux more easily. Christian F.K. Schaller, Red Hat's director of software engineering, created hw-harness while working on a Linux driver for a slide scanner. This open source project provides "tooling for working out how a piece of hardware behaves so that you can write a Linux driver for it."
通过自动化一些弄清楚仅二进制驱动程序如何与硬件交互的极其缓慢、乏味的方法,沙勒让从 Windows 驱动程序构建 Linux 驱动程序变得容易得多。我知道,因为我自己在 2000 年代中期就做过这件事,而那些手动方法至今仍是人们使用的方法。这可能很大程度上解决 Linux 桌面的一个持续性烦恼:糟糕或完全缺失的硬件驱动程序。
By automating some seriously slow, tedious ways of figuring out what a binary-only driver was doing with the hardware, Schaller has made building Linux drivers from Windows drivers much easier. I know, because I did this myself back in the mid-2000s, and those manual methods are still what people use today. This could go a long way toward fixing one of those lingering annoyances of the Linux desktop: poor or entirely missing hardware drivers.
与此同时,托瓦尔兹对我说:“好吧,公平地说,我们确实有个‘AI问题’。或者更确切地说,我们有两个独立的AI问题:我们有一个庞大的代码库,AI能在其中发现真正的漏洞,这给已经相当超负荷的维护者增加了大量工作。然后还有人利用AI生成补丁,却并不真正理解相关代码。”他继续说:“但我认为这些并非AI本身的问题,而是AI暴露出来的问题。这两个问题都非常真实,我理解人们可能会因此真的不喜欢——甚至憎恨——AI,但我认为根本问题并非AI本身。”而是人们滥用AI。在正确的人手中,正如顶尖的Linux程序员向我们展示的那样,AI可以很有用。®
In the meantime, Torvalds told me: "Well, in all fairness, we do clearly have an 'AI problem.' Or rather, we have two independent AI problems: we have a large codebase that AI finds real bugs in, and that adds a lot of work on already fairly overworked maintainers. And then we have people who use AI to generate patches without actually understanding the code in question." He continued: "But I'd argue that these aren't problems with AI itself; they are just problems that are exposed by AI. They are very much both very real problems, and I understand that people can really come to dislike – and even hate – AI due to them, but I do think the underlying issue isn't AI itself." It's how people misuse AI. In the right hands, as the top Linux programmers are showing us, AI can be useful. ®