Live data from Hacker News

Using Claude Code to modernize a 25-year-old kernel driver

dmitrybrant.com

61–70 of 343 posts

Re: Using Claude Code to modernize a 25-year-old kernel driver

#61
post #25
post #23

Earlier quoted context omitted.

The authors using it. You're implying software created solely to fulfill one persons desires is a bad thing.

[flagged]

This isn't really hype, since in this case it actually built something. They're talking about reasonable uses of "AI", which this is one example of.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#62
post #24
post #3

A good case study. I have found these two to be good categories of win: > Use these tools as a massive force multiplier of your own skills. Claude definitely makes me more productive in frameworks I know well, where I can scan and pattern-match quickly on the boilerplate parts. > Use these tools for rapid onboarding onto new frameworks. I’m also more productive here, this is an enabler to explore new areas, and is al…

> Use these tools as a massive force multiplier of your own skills. I've felt this learning just this week - it's taken me having to create a small project with 10 clear repetitions, messily made from AI input. But then the magic is making 'consolidation' tasks where you can just guide it into unifying markup, styles/JS, whatever you may have on your hands. I think it was less obvious to me in my day job because in a…

In times of Rust and Typescript (just examples) coding standards are explicit. It‘s not optional anymore. All my vibe coding projects are using CI with tests including style and type checks. The agent makes mistakes but it sees the failing tests and fixes it. If you vibe code like we did Perl and PHP in 1999 you‘re gonna have a bad time.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#63
> Be as specific as possible, making sure to use the domain-specific keywords for the task.

If you don't have the technical understanding of a language or framework, there is going to be a lot of ambiguity in your prompts.

This specificity gap leads the LLM to fill in those gaps for you, which may not be what you intended. And that's usually where bugs hide.

I think this is the flip side to being a "force multiplier"

Re: Using Claude Code to modernize a 25-year-old kernel driver

#64
post #56

I was banned from an OpenSource project [1] recently because I suggested a bug fix. Their „code of conduct“ not only prevents PRs but also comments on issues with information that was retrieved by any AI tool or resource. Thinking about asking Claude to reimplement it from scratch in Rust… [1] https://codeberg.org/superseriousbusiness/gotosocial/src/bra...

/ Suddenly i saw this: //Update regarding corporate sponsors: we are open to sponsorship arrangements with organizations that align with our values; see the conditions below.// They should know that beggars cant be choosers.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#65

When I read an article like this it makes me think about how the demand for work to be done was nowhere close to being fully supplied by the pre-LLM status quo.

It's never about lack of work but lack of people who have the prerequisite expertise to do it. If you don't have experience w/ kernel development then no amount of prompting will get you the type of results that the author was able to achieve. More specifically, in theory it should be possible to take all the old drivers & "modernize" them to carry them forward into each new version of the kernel but the problem is t…

There is usually a specification for how hardware works. But:

1. The original hardware spec is usually proprietary, and

2. The spec is often what the hardware was supposed to do. But hardware prototype revisions are expensive. So at some point, the company accepts a bunch of hardware bugs, patches around them in software, ships the hardware, and reassigns the teams to a newer product. The hardware documentation won't always be updated.

This is obviously an awful process, but I've seen and heard of versions of it for over 20 years. The underlying factors driving this can be fixed, if you really want to, but it will make your product totally uncompetitive.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#66
post #60

Something not yet mentioned by other commenters is the "giant caveat": As a giant caveat, I should note that I have a small bit of prior experience working with kernel modules, and a good amount of experience with C in general, so I don’t want to overstate Claude’s success in this scenario. As in, it wasn’t literally three prompts to get Claude to poop out a working kernel module, but rather several back-and-forth co…

Gatekeeping is toxic. I love agents explaining me projects I don‘t know. Recently I cloned sources of Firefox and asked qwen-code (tool not significant) about the AI features of Firefox and how it‘s implemented. Learning has become awesome.

> Gatekeeping is toxic.

Learning what must be done to implement a device driver in order for it to operate properly is not "gatekeeping." It is a prerequisite.

> I love agents explaining me projects I don‘t know.

Awesome. This is one way to learn about implementations and I applaud you for benefiting from same.

> Recently I cloned sources of Firefox and asked qwen-code (tool not significant) about the AI features of Firefox and how it‘s implemented. Learning has become awesome.

Again, this is not the same as implementing an OS device driver. Even though one could justify saying Firefox is way more complicated than a Linux device driver (and I would agree), the fact is that a defective device driver can lock-up the machine[0], corrupt internal data structures resulting in arbitrary data corruption, and/or cause damage to peripheral devices.

0 - https://en.wikipedia.org/wiki/Kernel_panic

Re: Using Claude Code to modernize a 25-year-old kernel driver

#67
post #30
post #11

Earlier quoted context omitted.

This is a good takeaway. I use Claude Code as my main approach for making changes to a codebase, and I’ve been doing so every day for months. I have a solid system I follow through trial and error, and overall it’s been a massive boon to my productivity and willingness to attempt larger experiments. One thing I love doing is developing a strong underlying data structure, schema, and internal API, then essentially hav…

This is more of a reflection of how our profession has not meaningfully advanced. OP talks about boilerplate. You talk about grunt work. We now have AI to do these things for us. But why do such things need to exist in the first place? Why hasn't there been a minimal-boilerplate language and framework and programming environment? Why haven't we collectively emphasized the creation of new tools to reduce boilerplate a…

It used to be. When I learned to program for windows, I will basically learn Delphi or Visual basic at the time. Maybe some database like paradox. But I was reading a website that lists the skills needed to write backend ant it was like 30 different things to learn.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#68
post #56

I was banned from an OpenSource project [1] recently because I suggested a bug fix. Their „code of conduct“ not only prevents PRs but also comments on issues with information that was retrieved by any AI tool or resource. Thinking about asking Claude to reimplement it from scratch in Rust… [1] https://codeberg.org/superseriousbusiness/gotosocial/src/bra...

That must be so hard for you.

Re: Using Claude Code to modernize a 25-year-old kernel driver

#69
post #56

I was banned from an OpenSource project [1] recently because I suggested a bug fix. Their „code of conduct“ not only prevents PRs but also comments on issues with information that was retrieved by any AI tool or resource. Thinking about asking Claude to reimplement it from scratch in Rust… [1] https://codeberg.org/superseriousbusiness/gotosocial/src/bra...

> 2. We will not accept changes (code or otherwise) created with the aid of "AI" tooling. "AI" models are trained at the expense of underpaid workers filtering inputs of abhorrent content, and does not respect the owners of input content. Ethically, it sucks.

Do you disagree with some part of the statement regarding "AI" in their CoC? Do you think there's a fault in their logic, or do you yourself personally just not care about the ethics at play here?

I find it refreshing personally to see a project taking a clear stance. Kudos to them.

Recently enjoyed reading the Dynamicland project's opinion on the subject very much too[0], which I think is quite a bit deeper of an argument than the one above.

Ethics seems to be, unfortunately, quite low down on the list of considerations of many developers, if it factors in at all to their decisions.

[0] https://dynamicland.org/2024/FAQ/#What_is_Realtalks_relation...

Re: Using Claude Code to modernize a 25-year-old kernel driver

#70

> Be as specific as possible, making sure to use the domain-specific keywords for the task. If you don't have the technical understanding of a language or framework, there is going to be a lot of ambiguity in your prompts. This specificity gap leads the LLM to fill in those gaps for you, which may not be what you intended. And that's usually where bugs hide. I think this is the flip side to being a "force multiplier"

“I need a C class that has a constructor for a tuple”

I would hope Claude would be like “Hold on man…”

Post reply on HN