News for hackers. Stuff that matters.
Re:Using Claude Code to modernize a forgotten Linux kernel d... by scotty79 on Monday September 08, 2025 @06:27AM (#45166596)
> I have to do it manually every time.

You can tell it to move it and they'll move it and use this shared code from now on.

Re:Using Claude Code to modernize a forgotten Linux kernel d... by codedokode on Monday September 08, 2025 @09:24AM (#45167962)
Sometimes it seems like explaining what I want could take more time than actually editing the code.

For example, imagine if you test a vector-like collection. In every test case dumb LLM creates vector manually and makes inserts/deletes. It could be replaced by adding a helper function that accepts a sequence of operations and returns the processed vector. Furthermore, once you have that function, you can merge multiple tests with parametrization, by having a test function accept a sequence of operation and expected result:

    parametrize('actions, result', (
        # Test that remove removes items from vector
        ([Ins(1, 2, 3, 4), Remove(4)], [1, 2, 3]),
        ...
    )
But it takes time to write this explanation, and dumb LLM might not merge all tests from the first time.
Re:Using Claude Code to modernize a forgotten Linux kernel d... by scotty79 on Monday September 08, 2025 @10:31AM (#45168804)
Try something like:

"Don't create vector manually inline in every test case, make a helper function for that."

and see what agent does. It might do something smart. It might do something a bit dumb but by understanding why exactly it's dumb, you can communicate what correction is needed pretty smoothly.