Hacker News new | ask | show | jobs
by jansommer 883 days ago
ChatGPT has been a blessing for learning C. How do you calculate the conjugate for a complex double when the compiler doesn't support complex numbers? ChatGPT will give you the correct answer together with math examples. One example out of many. Then I verify the result by looking at other people's code - and now I know what to look for.

I wouldn't use Copilot. I've noticed how it distracts people in screen recordings. They pause to see if what is proposed makes sense, and it usually doesn't. Distractions are the last thing I need.

2 comments

> ChatGPT will give you the correct answer together with math examples.

Actually, back in the days, google would have given you a tutorial with the correct answer together with examples too. You don't need LLMs for this, just honest search. But honest search is gone.

I wonder how long till ChatGPT gets entshitified too...

Yes, Google isn't so good nowadays, or my problems have become sufficiently advanced to not be a quick search away.

What might save us from ChatGPT enshittification are the freely available LLM's. Probably won't be long before we can have a code companion running locally. It's probably already here

> my problems have become sufficiently advanced

In my experience if you search for an advanced topic it's likely to drown you in beginner's tutorials for anything even remotely related.

My pet peeve is i do embedded linux on custom hardware, and every time i need to check something i'll be up to my neck on tutorials telling me how to enable, say, spi on a raspberry pi in user space. Even if I was explicitly searching for a totally different SoC and a recent reference for the kernel functions :)

Can't use any of that, because they all use complex.h (not supported by my compiler) and I have an interleaved array of complex numbers where 0 = real, 1 = imag, 2 = real, 3 = imag etc.

Dear ProbablyRealPersonGPT, please provide the necessary code in C with a short explanation

It must be old or weird, then. I thought older versions of MSVC were the only C compilers in real use that didn't support it?
That's another thing I like about ChatGPT. It doesnt judge my compiler ;)

... Which is Tiny C Compiler

Yes. They already got the answer, thanks. Pointing out links after the fact is laughable.

Some of you are set in this idea that an LLM can possibly not be even slightly helpful that you have to trudge through pages of documentation just to look for one slight thing that it'd have told you right away _if_ you wanted it to.

Hacker News is a strange place.