Live data from Hacker News

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

dmitrybrant.com

151–160 of 343 posts

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

#151

Is Claude code better than ChatGPT?

I have been testing both Claude code and Codex CLI for the past few weeks and I found codex output to be better than claude.

I like how Claude code is more advanced in terms of CLI functionality but I prefer Codex output (with model high)

If you do not want to pay for both, then you can pick anyone and go with it. I don't think the difference is huge.

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

#152
LLMs are also good for writing quick experiments and benchmarks to satisfy someone's curiosity. For example, once I was wondering, how much time does it take to migrate a cache line between cores when several processes access the same variable - and after I wrote a detailed benchmark algorithm, LLM generated the code instantly. Note that I described the algorithm completely and what it did is just translated it into the code. Obviously I could write the code myself, but I might need to lookup a function (how does one measure elapsed time?), I might make mistakes in C, etc. Another time a made a benchmark to compare linear vs tree search for finding a value in a small array.

It's very useful when you get the answer in several minutes rather than half a hour.

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

#153
post #141

I've used Claude Code in the past month to do development on CoMaps [1] using the 20 USD/month plan. I've been able to do things that I would not have the competence for otherwise, as I do not have a formal software engineering background and my main expertise is writing python data processing scripts. E.g., yesterday I fixed a bug [2] by having Claude compare the CarPlay and iOS search implementations. It did at fir…

Thanks for your contributions to Comaps. As the main developer of cartes.app, I'm happy to see libre traction in the world of maps.

Hope to make the bridge soon with i18n of cartes.app.

I also use LLMs to work on it. Mistral, mostly.

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

#154

LLMs are also good for writing quick experiments and benchmarks to satisfy someone's curiosity. For example, once I was wondering, how much time does it take to migrate a cache line between cores when several processes access the same variable - and after I wrote a detailed benchmark algorithm, LLM generated the code instantly. Note that I described the algorithm completely and what it did is just translated it into…

Also I wanted to add that LLMs (at least free ones) are pretty dumb sometimes and do not notice obvious thing. For example, when writing tests they generate lot of duplicated code and do not move it into a helper function, or do not combine tests using parametrization. I have to do it manually every time.

Maybe it is because they generate the code in one pass and cannot return back and fix the issues. LLM makers, you should allow LLMs to review and edit the generated code.

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

#156
post #18
post #16

No tests whatsoever. This isn't getting close to being merged into mainline and it will stay out-of-tree for a long time. That's even before taking on the brutal linux kernel mailing lists for code review explaining what that C code does which could be riddled with bugs that Claude generated. No thanks and no deal.

[flagged]

This is an unnecessary snipe at AI, whereas the more interesting part is that someone is doing the work of ensuring older hardware remains functional.

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

#157

LLMs are also good for writing quick experiments and benchmarks to satisfy someone's curiosity. For example, once I was wondering, how much time does it take to migrate a cache line between cores when several processes access the same variable - and after I wrote a detailed benchmark algorithm, LLM generated the code instantly. Note that I described the algorithm completely and what it did is just translated it into…

Also I wanted to add that LLMs (at least free ones) are pretty dumb sometimes and do not notice obvious thing. For example, when writing tests they generate lot of duplicated code and do not move it into a helper function, or do not combine tests using parametrization. I have to do it manually every time. Maybe it is because they generate the code in one pass and cannot return back and fix the issues. LLM makers, you…

  Also I wanted to add that LLMs (at least free ones) are pretty dumb sometimes and do not notice obvious thing. For example, when writing tests they generate lot of duplicated code and do not move it into a helper function, or do not combine tests using parametrization. I have to do it manually every time.
Do you prompt it to reduce duplicated code?

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

#158
post #82

Earlier quoted context omitted.

[flagged]

> "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. These ethics are definitely derived from a profit motive, however petty it may be.

You're assuming "respect" means "payment" but it could be as simple as "recognition."

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

#159

Earlier quoted context omitted.

> 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…

[flagged]

Conversely, if the only motivation is profit, that's no ethics at all.

(and of course without non-profit motivations, none of the open source ecosystem would exist!)

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

#160
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…

Setting aside the categories of art and literature, training LLMs on FOSS software seems aligned with the spirit, if not the letter, of the licenses.

It does nothing to fix the issues of unpaid FOSS labor, though, but that was a problem well before the recent rise of LLMs.

Post reply on HN