News for hackers. Stuff that matters.
Re:Automating AI Away by kaashif on Tuesday July 07, 2026 @06:40PM (#48825004)
No, they are talking about refactoring, not adding new functionality to code.

So it would be something like:

Rewrite this Python code to use match/case instead of if/elif/else chains, write a script using the ast module to rewrite the code, do not edit it yourself, also write some tests with clear inputs and outputs I can inspect.

Or something.

Re:Automating AI Away by xenophonf on Wednesday July 08, 2026 @10:05AM (#48832160)
> Rewrite this Python code to use match/case instead of if/elif/else chains

Is this a real example of something people use AI to do? If so, I don't understand why that's difficult, because prompting the AI to do stuff with ASTs etc. seems a bit over the top.

Re:Automating AI Away by kaashif on Wednesday July 08, 2026 @10:14AM (#48832267)
Why?

Are people actually using AI to do programmatic refactors over million line codebases directly? That is far more insane.

Using AI to write ruff rules or clang-tidy rules with fixes is literally the same thing and obviously best practice over running AI in a pre-commit hook to do those checks and refactors...