Linus Torvalds's first LLM-assisted patch series

109 pointsposted 5 hours ago
by janvdberg

101 Comments

tarkin2

5 hours ago

Didn't Linus say he stopped coding a while ago, or at least coding the kernel, and mainly reviews and manages the codebase now? Whether the code comes from a machine or a human, perhaps it matters little to how he's been working for a while.

It's interesting that although I guess he reviewed this LLM generated code, the human review found a race condition.

DiabloD3

5 hours ago

Yes.

He is now the leader of a cabal of maintainers, and the only coding he does now is minor fixups for branch merging.

I suspect he still codes his own pet projects in his off time though, that's how we got git after all.

projct

4 hours ago

we got git 21 years ago.

Procrastes

4 hours ago

git was good to get got. I hope something is annoying Linus as much these days as source control was then. I appreciate the way he solves problems.

none_to_remain

4 hours ago

I believe his last one was scuba diving software

braiamp

4 hours ago

He's doing music pedal thingies. The latest LTT video was when we all "noticed"

Insanity

3 hours ago

What do you mean "noticed"?

unwind

3 hours ago

Uh you're not mixing up Linuses, are you? Haven't watched anuthing from LTT in a while but it sounded suspicious. :)

vshade

3 hours ago

No, he was guest in one episode, when Linus Sebastian built a desktop for Linus Torvalds

dorianniemiec

4 hours ago

So what would many anti-AI people say, now that critical infrastructure (Linux, OpenSSL, systemd, MariaDB, and so on) is AI-assisted?

ASalazarMX

3 hours ago

You gotta understand that not all people fall neatly into the black/white sockets of culture wars, your life will be better after that.

Many of us don't criticize the use of AI, but the MISUSE/ABUSE of it. It's one perfectly valid use case to let it generate code, and do a manual code review to make sure all of it is solid. It's the lowest of the low as a developer to ask it for a complex program, do a superficial review, and ship it claiming you did it.

fasterik

3 hours ago

Judging by comments on HN over the past month, a lot of people do fall into black/white thinking about AI. I frequently see a kneejerk rejection of the idea that AI could be useful in any context ever. I also see the opposite extreme, refusing to acknowledge any downsides or limitations of AI. It's a case of vocal minorities drowning out the silent majority. I interpreted the parent as referring specifically to the highly vocal, highly online anti-AI crowd, and not just anybody who has targeted criticisms of AI.

rfgplk

2 hours ago

Yea, I'm a vocal proponent of AI-assisted development (or metaprogramming as I call it) and I genuinely sometimes feel like a member of a certain ethnicity in a certain country in the early 20th century. The amount of vitriol and hate you receive (especially on sites like reddit or X) can be frightening at times.

jraph

2 hours ago

Those of us against LLMs because we think they are a big societal / environmental concern have nothing more to say.

And no, those of us boycotting projects using LLMs don't have an immediate solution to everything under our feet, including our jobs, adopting LLMs.

What reply did you expect? That we apologize for being wrong and that we recognize that in hindsight, the AI boosters were right all along? We still don't want these polluting data centers next to our homes so they can feel more productive and play with their costly toy. Hell, even if they are useful / the productivity boost is real, actually we still don't want those shit datacenters, this wreckless scraping, the major economic crisis that the AI companies may cause through their wreckless behavior and more generally all the badness attached to LLMs.

wartywhoa23

4 hours ago

There were many civilizations in the past that eagerly dug their own graves, to great success.

fasterik

3 hours ago

It's not really clear what this response has to do with the parent comment, or even what point you're making. Are you saying that if we use AI in core infrastructure projects that it's going to cause the downfall of civilization?

amlib

3 hours ago

Clearly his analogy is about the usage of AI causing a downfall in the project itself. Maybe no one can understand the project anymore after thousands of AI commits. Maybe no one can contribute without having access to some fancy AI provider. Maybe the AI was using you, the developer, as a tool all along and the end game is for your project (and other FOSS projects) to be replicated under the tutelage of a few big corporations, making all FOSS projects irrelevant.

fasterik

3 hours ago

I don't think it's clear that it was an analogy at all. It sounded like a forecast of the collapse of civilization. Even if the claim is narrower, what you're saying is a prediction that can be tested against reality. It doesn't seem likely that a project like Linux, with strong leadership and expert eyes on every change, will fail because of a few AI commits. I suspect reality is a lot less catastrophic and a lot more mundane, and we see a small productivity increase while the project continues more or less as usual.

pezgordo

3 hours ago

Prob at a slower rate than the ones against innovation

RAWGOD

3 hours ago

Like which? Name some civilizations that eagerly dug their own graves

vinyl7

3 hours ago

Pretty much all of the no longer existing empires. Roman empire, perhaps.

articulatepang

37 minutes ago

If the United States or the Linux kernel project or frankly any other institution lasts as long as the Roman civilization, that would be a rare achievement indeed! In my opinion, its longevity is the single most striking fact about Rome.

In comparison the US is a baby, and the Linux kernel barely an embryo.

Depending on how you count, Rome lasted 1229 years (from founding to fall of the western empire) or 2206 years (from founding to the fall of the Byzantine empire, which was the eastern part).

Twelve hundred years! Two thousand years! I hope we dig our graves as slowly as the Romans did.

RAWGOD

3 hours ago

Roman empire was a state, not a civilization. Roman civilization very much exists to this day throughout the western world.

zaphirplane

an hour ago

By your novel definition, all civilisations have lasted ?

Civilizations have collapsed and mostly to reasons they could have avoided, not my area but sounds like a strange point to make a stand on

kilroy123

4 hours ago

I, too, have this question for the anti-AI people.

What is the game plan? Use an OS version older than 2023? Stop using tech?

ASalazarMX

3 hours ago

Adapt to the times, use AI as a tool, not as a colleague.

officeplant

an hour ago

>What is the game plan? Use an OS version older than 2023? Stop using tech?

A lot of us are discussing the best pre-slop kernels to use, and tech has ceased to be an exciting passion so yes to both.

sneezychl

4 hours ago

Some people have a hard time admitting a that a few GPUs can outperform them.

I was one of those people. Weren't we all?

blurbleblurble

4 hours ago

Outperform? Where would those GPUs have been without Linus' prompting? Driving a car consists of brutally simple movements critically orchestrated. This isn't a GPU outperforming Linus Torvalds, it's Linus Torvalds engaging with yet another higher cybernetic order.

sosborn

4 hours ago

I think a lot of people are stuck in 2023 when thinking about AI quality. It's gotten so much better that it's basically a totally different product now.

It isn't perfect, but it's certainly useful.

xtracto

3 hours ago

A couple of days ago we had these flow of Rust based "reimplementation" of Adobe and Microsoft applications. A lot of people couldn't get past the "yeah but it's full of bugs, it's just SlopWare" opinion.

These people couldn't see the forest. The writing is on the wall, that Slopware is the WORST it will ever be. 1 year ago that was unimaginable. Next year, the quality of the developed software will be way better.

Selling "code" or "apps" is dead. My wife works in Workday and I've told her to sell as much stock as she can, because there will be an "inflection point" where ALL software based companies will collapse. The same way as Silicon Graphics, Sun , DEC and similar companies collapsed (along with a bit of IBM and HP, who pivoted) with the rise of PC power. Salesforce, SAP, Workday and all smaller companies that sell generic software will fall down.

ciupicri

3 hours ago

How many people are using those AI slopware reimplementations? If only a few, I think the "traditional" companies will be safe for a while.

Why are you saying it will be way better when American companies asked their government to hit the breaks?

rfgplk

2 hours ago

Yep. The reality is that as a single developer I'm able to produce a) more code and b) at a higher quality in a year than all of _Google_ did in it's entire existence up until ~2023. One man shops are literally replacing full software suites that were maintained by _thousands_ of engineers, often the highest paid in the entire industry. I can't wait to see what the future holds.

AnimalMuppet

2 hours ago

Google's codebase as of ~2023 was, IIRC, ~10 billion lines of code, and fairly high quality. You're able to produce 10 billion lines in a year. At high quality.

Yeah, I don't believe you.

ethin

3 hours ago

I think the contributing factor is people who make software but have no idea what they're doing. They want to make photoshop, but they have no knowledge of photo manipulation or how photoshop works, or any software engineering/development practices. And then we wonder why slop still exists. I am of the opinion that it will always exist: people just have no idea what they want to make let alone how they want to work. "Reimplement photoshop" is a nice end-goal, but you have to actually know to a decent degree how photoshop actually works! Not to mention the reverse engineering knowledge you need

1jahF

4 hours ago

Certain people are easily outperformed.

jlawrence6809

3 hours ago

If Linus Torvalds is being outperformed what hope is there for the rest of us?

user

2 hours ago

[deleted]

weberer

4 hours ago

Its just inertia of people refusing to update their priors. Two years ago, most LLMs were producing absolute garbage. Even the 70b Llama 3 model would produce nonsense that wouldn't compile, make up completely imaginary API endpoints, and fail to write basic syntax. Then a year ago with Sonnet 4, we actually had something that actually worked, but needed a lot of hand holding for complex tasks. Today, they can be run with minimal supervision. By this time next year, we're going to see the hockey-stick part of the singularity really take off.

12947611

4 hours ago

They would say that it occurs at the behest of the Linux Foundation and get flagged.

user

2 hours ago

[deleted]

jmclnx

3 hours ago

Move to OpenBSD or even more not "AI", NetBSD :)

Tanjreeve

4 hours ago

“Anti-AI” is anyone who reads code nowadays apparently so it’s about as relevant as if an IDE was used to edit the source code.

janOla

4 hours ago

There's always GNU Hurd and Emacs...

nozzlegear

4 hours ago

First you'd have to define what an anti-AI person is. I'm quite bearish on AI, still use it myself, and I say "big whoop." Is this supposed to be some resounding, decisive shot in the pro-AI, anti-AI war?

customguy

4 hours ago

Fork all of them, work on those manually and compare in a few years. It'll be like mining Bitcoin before you know if it'll take off. If it doesn't, waste of time, if it does, they'll come begging asking you to make machine go again :P

hnedeotes

3 hours ago

Like linux is some bastion of security or something... I'm everyday more convinced that the reason why linux was let to dominate the server side with no contestation was so that the USA spy network could be done without compromising american companies. This is just the follow up of the same plan.

r_lee

an hour ago

what is this belief based on?

hnedeotes

an hour ago

Does it really matter? Normal observation. This post itself is already on the way to disappear... Farms bots everywhere, fake reviews, fake posts, fake experiences. David Lynch was probably right, white fences, smiley families, but underneath a stench...

niemandhier

3 hours ago

I looked at the diffs, they are moderately sized and well readable.

Nothing like the 2k loc people tend to commit with LLMs.

One can work with commits and MRs like that.

tombert

5 hours ago

I use AI like most software people do nowadays, but I have to admit that I'm a little surprised that Linus is onboard with it. He always felt like one of the last "old school" developers...he wouldn't even touch C++!

DiabloD3

5 hours ago

Linus's policy on patch acceptance covers the LLM problem: it must still be audited by a maintainer before acceptance (and thus, actually be decent code), but also, because of LLMs, be significantly produced by a human, as machine written code cannot be Copyrighted, thus, cannot be Open Source, and thus, cannot be in the kernel because it isn't open source.

Nobody is really against LLMs producing, for example, exploits for novel security bugs to assist security researchers in patching those bugs. The exploit itself does not need to be Copyrightable nor Open Source. Nor is anybody against LLMs accelerating debugging, and helping find the location and root cause of the bug; again, that is not producing the end product code, thus does not need to be Copyrightable nor Open Source.

throwaway7356

4 hours ago

> as machine written code cannot be Copyrighted, thus, cannot be Open Source, and thus, cannot be in the kernel because it isn't open source.

This is wrong.

> Nobody is really against LLMs producing [...]

This is also wrong. There are very vocal people against that.

> Nor is anybody against LLMs accelerating debugging [...]

And this too.

bee_rider

3 hours ago

>> as machine written code cannot be Copyrighted, thus, cannot be Open Source, and thus, cannot be in the kernel because it isn't open source.

> This is wrong.

Has this actually been litigated? It seems to one of those things where two camps think the answer is obvious, they’ve got it, but they disagree.

DiabloD3

2 hours ago

It has been litigated to death before the invention of LLMs. Also, the current opinion of the USCO, which is unlikely to change, is that humans must be the author of the Copyrighted work. The problem with the entire argument is both sides are trying to think like a programmer, not a laywer, but only lawyers should be trying to argue novel interpretations of the law.

I would love to see the opinion of a copyright lawyer that would be willing to bring an LLM output copyright case to the Supreme Court, their opinion must be absolutely wild.

This whole thing was most recently affirmed in the 9th Circuit case Naruto v. Slater, where a monkey used a photographer's camera to take a selfie, and the photographer claimed he owned the Copyright because it was his camera, and then attempted to extort the Wikimedia Foundation. Monkeys are clearly intelligent and actually alive (unlike LLMs) yet that still did not alter the opinion of the Judges based on the current interpretation of the Copyright Act (which clearly states only humans can hold Copyright) and all the decades of case law proceeding this case.

As for specifically GenAI, the case involving Théâtre D'opéra Spatial also moved in this exact direction: it is a Midjourney manufactured image that the prompt-giver attempted to Copyright, and the USCO rejected the application and the USCO Review Board also rejected it, however the prompt-giver has not elected to sue the USCO over this.

n4r9

3 hours ago

Who is against using LLMs to find root causes of bugs?

Cu3PO42

3 hours ago

Some people reject the use of generative AI outright. Some for moral reasons, often based on sourcing of training data, some due to environmental impact, some for concern of how society will change or even just their own job.

tosti

3 hours ago

RAM and GPU prices.

moffkalast

4 hours ago

> as machine written code cannot be Copyrighted, thus, cannot be Open Source

Including CC0 works as parts of works licensed in other ways is perfectly fine iirc? It's like WTFPL after all.

bbor

4 hours ago

> because of LLMs, be significantly produced by a human, as machine written code cannot be Copyrighted, thus, cannot be Open Source, and thus, cannot be in the kernel because it isn't open source.

...that's not how copyright works. You can't poison an open source project with code that's fully and unreservedly in the public domain, if that precedent stands for much longer and if that precedent is applied to software in a way that's even vaguely analagous to how it's applied to things that judges sorta kinda understand.

ciupicri

4 hours ago

If I'm not mistaking, you can put public domain or at least BSD/MIT code into the Linus kernel which is licensed under GPLv2. Other people are then free to use that specific code under that specific license instead of GPLv2.

Also, Linus Torvalds wrote long time ago (before v2.6.12) some simple assembly routines in linux/include/asm-i386/string.h [1] which are public domain:

    NO Copyright (C) 1991, 1992 Linus Torvalds,
    consider these trivial functions to be PD.
[1]: https://github.com/torvalds/linux/blob/v2.6.12/include/asm-i...

Aloisius

4 hours ago

It will poison it if you replace all of your code with public domain code.

A small patch here and there of uncopyrightable code doesn't really matter. Years of small patches, on the other hand, could end up replacing most or all the code.

If you have the policy that all contributions have to be significantly written by a human, and thus copyrightable, you don't have to worry about whether certain files or modules or the entire project are copyrightable in the future.

steveklabnik

4 hours ago

I recently attended an academic computer science conference. Several people I have looked up to my entire life were there, which also gives you an idea of their age (I am 40). They're all using AI. They are not mindless boosters about it, but clearly find it a useful tool in the toolbox.

AnotherGoodName

4 hours ago

On the flip side my nephews who don’t really code (i try to teach them but they are kids with everything that comes with that) go around stating things like ‘do you use ai lol!? It’s so bad!!’.

The ai discourse is reasonably fine on HN but as soon as you go outside of actual developer circles keep in mind that my young nephews and their ilk are posting memes and criticisms without real understanding. I hope they’ll catch on soon but for now be prepared to see a whole lot of ‘Linus using vibe code Linux going to crash lololol’ type of posts in the non-developer communities for a while.

steveklabnik

2 hours ago

I see a lot of non-technical people who both criticize "AI" and use AI heavily. Same sort of "without real understanding" you're talking about. I think software developers tend to expect a lot more consistency in people than they actually have. Software developers included, which is kind of ironic.

> be prepared to see a whole lot of ‘Linus using vibe code Linux going to crash lololol’ type of posts

I mean, we see a lot of this in the developer community as well, already.

gvfsa

4 hours ago

He didn't refuse to add C++ to the kernel because he is "old school". He had a list of valid criticisms. Your comment makes it sound like his refusal to use C++ was ideology-driven and not technically-sound, and that therefore he is vulnerable to making other not technically-sound decisions such as a complete refusal to use AI.

forty

4 hours ago

https://harmful.cat-v.org/software/c++/linus

> C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C.

This kind of technically-sound and valid criticism ? ;)

ciupicri

4 hours ago

This sounds like one:

    C++ leads to really really bad design choices. You invariably start using
    the "nice" library features of the language like STL and Boost and other 
    total and utter crap, that may "help" you program, but causes:
    
     - infinite amounts of pain when they don't work (and anybody who tells me 
       that STL and especially Boost are stable and portable is just so full 
       of BS that it's not even funny)
    
     - inefficient abstracted programming models where two years down the road 
       you notice that some abstraction wasn't very efficient, but now all 
       your code depends on all the nice object models around it, and you 
       cannot fix it without rewriting your app.

kllrnohj

3 hours ago

I don't see anything in those criticisms that are remotely unique to C++.

Linux also built up inefficient abstractions in C that are used simply because they are easy to use. Linked lists being a go-to default choice being an obvious example.

forty

4 hours ago

I want to keep this parallel between C++ and LLM and replace in this quote

> LLM is a horrible tool. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of not allowing LLM were to do nothing but keep the vibe programmers out, that in itself would be a huge reason not to use LLM

That actually sounds right ! ;)

furyofantares

4 hours ago

I would guess Linus has reviewed more code than anyone else in the world, so in that sense I'm not that surprised.

I also don't think the C++ thing was out of a stubbornness for the old way of doing things, but had concrete reasons to reject it. I guess it was a little of both maybe 20 years ago.

But there's Rust in the kernel now too.

p2detar

5 hours ago

Stephen Wolfram also looks favorable to using AI in programming and he has been programming a lot. I guess the context of how these tool are used is the important part here.

manbash

4 hours ago

> The code, the test programs, the review behind the list above and the first draft of this text were done with an LLM coding assistant (Claude Code) under my direction. The measurements were run on my machine.

(From the empty commit message put at the top of the draft LLM branch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...)

eikenberry

4 hours ago

While I'm not surprised by Linus using AI, I am a bit surprised Linus used Claude and not one of the open weights models. I know he's always been much more pragmatic than Richard but using a fully closed, proprietary system that is actively attempting to lock out the (more) open competition seems to go against his general history and preferences for free software.

ACS_Solver

3 hours ago

I am not surprised - the general pattern with Torvalds seems to be that he's maximally pragmatic. His problems with say Nvidia drivers aren't the fact that they're proprietary, it's that they are difficult to interface with the kernel. I have a strong impression that what matters to Linus is software that works well, so he cares a lot about the quality of the kernel and ideally wants other software to be similarly reliable.

If he judges that Claude does the best job, it'd be very much like him to use Claude. It would be unlike him to use an open program if he considers it inferior.

tonis2

3 hours ago

Because the code complexity/quality claude vs open-models can currently write is day and night. I like open-source too, but it's just not there yet.

mcbuilder

3 hours ago

At the same time I'd rather an experienced dev with an open weight model vs a junior dev with Claude. I assume the experienced dev has good domain knowledge and can prompt his way out of the "lower intelligence".

I'm fine with DS Flash V4.1 in code bases I have experience in, don't really notice a huge difference other than more steering is needed.

ramesh31

3 hours ago

Did you consider he would have thoroughly evaluated the top contenders objectively and gone with the one producing the best results? Honestly I wouldn't expect anything else.

mono442

4 hours ago

He could have at least written the commit messages himself. That llm yapping is annoying to read.

user

4 hours ago

[deleted]

vatsachak

5 hours ago

So many people's take away from this story is that Linus used Claude to improve the Kernel therefore anyone can.

atniomn

4 hours ago

Don't know why you're getting hammered here. There's a clear skill factor in piloting LLMs.

vatsachak

4 hours ago

Anything pro LLM but anti RSI gets hammered here lol. SPY is giving a little wake up call

BoggleOhYeah

3 hours ago

Given a lot of the starry-eyed reactions on HN, I’ve come to suspect that a lot of the devs here were/are primarily working on CRUD apps. That would also track with the amount of attention that Ruby articles get around here.

dualvariable

2 hours ago

Yeah, I get the feeling AI coding maximalists work in fairly narrow areas like that where they're just churning out endpoints in CRUD apps over and over.

I can see how you could use AI to design and implement some 100,000 line codebase, full of nothing but that, stamped out over and over in exactly the same pattern and never read a single line of the code.

rfgplk

2 hours ago

Linus (and any other human engineer that isn't a genuine super genius) cannot conceivably contribute anything to an LLM. It's the equivalent of a chess amateur spinning up the latest Stockfish on a beefy workstation and trying to find mistakes in it's reasoning.

> therefore anyone can

_Absolutely_ anyone can. If you want proof of this just download the latest kernel tree and ask Claude to write a new module for you (whether it's a driver, a new syscall, or anything really) and see how far you get. Within an hour (sometimes less) you'll have a perfectly working kernel component.

relativeadv

4 hours ago

When you do it, its slop. When I do it? Its craftsmanship.

teekert

3 hours ago

For some combinations of people this is indeed true imho.