Live data from Hacker News

AI assistance when contributing to the Linux kernel

github.com

421–430 of 464 posts

Re: AI assistance when contributing to the Linux kernel

#421
post #284
post #272

Earlier quoted context omitted.

Generating software still token costs, generating something like ms-word will still cost a significant amount, takes a lot of human effort to prompt and validate. Having a proven solution still has value.

You can already generate surprisingly complex software on an LLM on a raspberry pi now, including live voice assistance, all offline. Peoples hardware can self write software pretty readily now. The cost of tokens is a race to zero.

That is not what i'm seeing. I've been coding intensively with claude code for the last 3 months: 200k lines of go, 1200+ commits, mostly using opus. I don't think i could have done this with a local LLM. Maybe on a M5 pro?

Re: AI assistance when contributing to the Linux kernel

#422

Earlier quoted context omitted.

s/patent/copyright/ in my comment then. What part of a bog-standard HTTP API can be copyrighted? Parsing the POST request or processing it or shoving it to storage? I'm genuinely confused here and not just being an ass. There are unique algorithms for things like media compression etc, I understand copyrighting those. But for the vast majority of software, is there any realistic threat of hitting any copyrighted code…

Unlike patents, independent creation is a valid defense to copyright infringement. Copyright is the literal expression of the idea. The identifier names, how the functions are broken up, which libraries are used etc… Given more than a dozen lines or so, 2 people aren’t going to write the exact same code to solve the same problem. It might be equivalent code, but it’s not going to be the exact same. def copyright_warn…

But isn't it literally impossible to determine whether I copied those 5 lines or wrote them myself?

Especially in languages like Go where there's an Official Formatter that makes all code look identical as much as possible?

There are a multitude of reasons why I'm not a lawyer and vague crap like this is a big part :D

Re: AI assistance when contributing to the Linux kernel

#423

Earlier quoted context omitted.

Then we get to the Code of Theseus argument, if you take a piece of code and replace every piece of with code that looks the same, is it still the original code? Is an AI reimplementation a "clean room" implementation? What if the AI only generates pseudocode and a human implements the final code based on that? Etc etc ad infinitum. Lawyers will be having fun with this philosophical question for a good decade.

> Is an AI re-implementation a "clean room" implementation Certainly not if it had seen the code (incl. having been trained on it). The idea of clean room (dating back to IBM PC BIOS clones) is that ideas can't be copyright, but the expression of an idea (code) can be, so you have one person (or AI) write a spec of the thing you want to copy (expression -> idea) and then have another (in the "clean room") who has nev…

But isn't it similarly impossible to prove that the AI used an exact copy from a specific project that didn't have a permissive license?

I get it that lifting a full-ass function as-is from a project is bad, but if you construct a function that does the same thing by aggregating bits from different projects - what then?

There HAS to be moral and legal issues there, but what and where? Stealing other people's code is bad, but we do also have to admit that the vast majority of code in the world isn't doing anything groundbreaking that deserves a copyright.

Or is it illegal to write a Hello World application after the first ever in that language was written and published, doesn't the copyright for that code exist on the first creator - and everyone else is in breach of their copyright or has to prove they had no prior knowledge of the code? (You can replace "hello world" with any trivial piece of code everyone writes a zillion times routinely).

This whole thing is so wishy-washy and vague it's giving me migraines. I don't WANT to break any laws, but holy crap it's not easy to figure out where the actual limits are.

Re: AI assistance when contributing to the Linux kernel

#424

Earlier quoted context omitted.

If someone sent you some code and said “it’s all good bro, you can put it in the kernel with your name on it”, would you? If you don’t feel comfortable about where some code has come from, don’t sign your name. The fact LLMs exist and can generate code doesn’t change how you would behave and sign your name to guarantee something.

Are you being purposely obtuse?

Not at all.

Linus and the rules have always been very clear. If you don’t know where code came from, don’t submit it.

Re: AI assistance when contributing to the Linux kernel

#425
post #392

Earlier quoted context omitted.

> This does nothing to shield Linux from responsibility for infringing code. It’s no worse than non-AI assisted code. I could easily copy-paste proprietary code, sign my name that it’s not and that it complies with the GPL and submit it. At the end of the day, it just comes down to a lying human.

Yes but if you do that manually you are in bad faith, if you ask an AI to do it you have no idea if you are going to be liable of something or not.

> you have no idea if you are going to be liable of something or not

In life that is a very strong indicator you should not do

Re: AI assistance when contributing to the Linux kernel

#426

Earlier quoted context omitted.

But how do you know it's cut to spec if you don't measure it? Maybe someone bumped the fence aw while you were on a break, or the vibration of it caused the jig to get a bit out of alignment. The basic point is that whether a human or some kind of automated process, probabilistic or not, is producing something you still need to check the result. And for code specifically, we've had deterministic ways of doing that fo…

I guess that the point being made by GP is that most software are a high-dimensional model of a solution to some problem. With traditional coding, you gradually verify it while writing the code, going from simple to complex without loosing the plot. That's what Naur calls "The theory of programming", someone new to a project may take months until they internalize that knowledge (if they ever do). Most LLM practices t…

I kinda like the analogy of travelling here.

With normal artisanal coding you take your time getting from A to B and you might find out alternate routes while you slowly make your way to the destination. There's also a clear cost in backtracking and trying an alternate route - you already wrote the "wrong" code and now it's useless. But you also gained more knowledge and maybe in a future trip from A to C or C to D you know that a side route like that is a bad idea.

Also because it's you, a human with experience, you know not to walk down ravines or hit walls at full speed.

With LLMs there's very little cost in backtracking. You're pretty much sending robots from A to B and checking if any of them make it every now and then.

The robots will jump down ravines and take useless side routes because they lac the lived in experience "common sense" of a human.

BUT what makes the route easier for both are linters, tests and other syntactic checks. If you manage to do a full-on Elmo style tunnel from A to B, it's impossible to miss no matter what kind of single-digit IQ bot you send down the tube at breakneck speed. Or just adding a few "don't walk down here, stay on the road" signs on the way,

Coincidentally the same process also makes the same route easier for inexperienced humans.

tl;dr If you have good specs and tests and force the LLM to never stop until the result matches both, you'll get a lot better results. And even if you don't use an AI, the very same tooling will make it easier for humans to create good quality code.

Re: AI assistance when contributing to the Linux kernel

#427

> All contributions must comply with the kernel's licensing requirements: I just don't think that's realistically achievable. Unless the models themselves can introspect on the code and detect any potential license violations. If you get hit with a copyright violation in this scheme I'd be afraid that they're going to hammer you for negligence of this obvious issue.

Then don’t use AI to contribute.

Re: AI assistance when contributing to the Linux kernel

#428

Earlier quoted context omitted.

Not every change is good, and sometimes we realise too late

What is it that worries you about the change that is happening?

In particular that the most used LLMs are proprietary. This is in great opposition to the best software out there so far: tcp/ip, linux, git, emacs, postgres, and a long etc. We depend enormously on this tools and that’s fine because they are open source. But we are starting to depend enormously on proprietary LLMs and that sucks. I know we have open source LLMs but 99% of us are not using them; that’s reality.

Re: AI assistance when contributing to the Linux kernel

#429

Earlier quoted context omitted.

If consent to use of your code in AI training can be revoked at any time, that makes training impossible, since if anyone ever withdraws consent, it's not like you can just take out their work from your finished model.

Yup. Not my problem. You could even say it strongly would very strongly incentivize the LLM companies to be on their best behavior, otherwise people would start revoking consent en-masse and they'd have to keep training new models all the time. If you want something more realistic, there would probably be time limits how long they have to comply and how much they have to compensate the authors for the time it took th…

> Yup. Not my problem.

And that is why the entire industry is going to roll their eyes and ignore you.

No law is putting this genie back in the bottle, so all there is left to do is adapt and push for models with open training data like those by Ai2.

Re: AI assistance when contributing to the Linux kernel

#430

Earlier quoted context omitted.

I guess that the point being made by GP is that most software are a high-dimensional model of a solution to some problem. With traditional coding, you gradually verify it while writing the code, going from simple to complex without loosing the plot. That's what Naur calls "The theory of programming", someone new to a project may take months until they internalize that knowledge (if they ever do). Most LLM practices t…

I kinda like the analogy of travelling here. With normal artisanal coding you take your time getting from A to B and you might find out alternate routes while you slowly make your way to the destination. There's also a clear cost in backtracking and trying an alternate route - you already wrote the "wrong" code and now it's useless. But you also gained more knowledge and maybe in a future trip from A to C or C to D y…

That would be great if you were a research lab with unlimited funding. But most business needs to grapple with real user data. Data they've been hired to process or to provide an easier way to process. Trying stuff until something sticks is not a real solution.

Having tests and specs is no guarantee that something will works. The only truth is the code. One analogy that I always take is the linear equation y = ax + b. You cannot write tests that fully proves that this equation is implemented without replicating the formula in the tests. Instead you check for a finite set of tuples (x, y). Those will helps if you chose the wrong values of a or switch to the negative of b, but someone that knows the tests can come up with a switch case that returns the correct y for the x in the tests and garbage otherwise. That is why puzzle like leetcode don't show you the tests.

Post reply on HN