News for hackers. Stuff that matters.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by coliveira on Sunday July 09, 2023 @09:06AM (#36654160)
I believe that with the arrival of ChatGPT and similar tools, writing code in C will become as easy as in any other language. The AI tools know how to generate good C code, and C is fast by itself. I believe we'll see a lot more code written in C now that we have new tools to analyze C code.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by skitter on Sunday July 09, 2023 @09:54AM (#36654453)
> The AI tools know how to generate good C code

Are you sure about that? ChatGPT doesn't understand C. It wouldn't even have enough context to reason about UB even if it understood UB.

Re:“C is quirky, flawed, and an enormous success” – Dennis R... by jen20 on Sunday July 09, 2023 @09:58AM (#36654490)
> writing code in C will become as easy as in any other language.

I look forward to a raft of CVEs over the next decade where ChatGPT is a root cause...

Re:“C is quirky, flawed, and an enormous success” – Dennis R... by flohofwoe on Sunday July 09, 2023 @10:11AM (#36654577)
Oh jeez, please don't bring AI into the discussion. AI tools will just repeat all the bad StackOverflow advice and hilariously terrible trial-and-error C code from student assignments.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by zer8k on Sunday July 09, 2023 @11:22AM (#36655211)
I have grown somewhat tired of these ChatGPT responses. It's a tool...not a panacea. C is a fantastic, albeit somewhat complicated, language. The problem is a C programmer knows the quirks and ChatGPT will dump you some code that could have undefined behavior depending on the compiler. Will ChatGPT always use restrict correctly (for example)?
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by coliveira on Sunday July 09, 2023 @01:30PM (#36656596)
Why not? You seem to underestimate the ability of AI tools to understand code. Undefined behavior is something that a good AI tool may avoid without major problems.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by zer8k on Sunday July 09, 2023 @04:13PM (#36658410)
The issue to me is not the generation of code. It's that the person using it is inexperienced with the given language. We will never be able to place 100% faith in AI. At least in my lifetime. Given that, I think it's a relative danger that is washed away in all the hype. A junior dev copy-pasting code from chatgpt. I couldn't imagine a more dangerous combination.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by coliveira on Sunday July 09, 2023 @07:27PM (#36660156)
Junior dev copy-pasting from stack overflow: this is already happening! Whatever bad thing AI tools can do, this is already reality all over the world.
Re:“C is quirky, flawed, and an enormous success” – Dennis R... by zer8k on Monday July 10, 2023 @02:28PM (#36670853)
That's not even close to the same thing. Stack overflow posters don't hallucinate solutions, and in all but the most obscure questions, the selected answer will have been reviewed dozens of times over.

With ChatGPT you get exactly what it gives you which must be trusted as a source of truth. That's bad.