r/C_Programming • u/xerrs_ • Jun 26 '26
Discussion AI literally does not know anything.
I have been working on my project cherries(.)works Pulse (https://github.com/cherries-works/pulse), and I needed to know how to fork processes and share memory in between them. On my last post a very nice Reddit fellow told me to not learn C with AI, and I mean, I kinda did not, though I sometimes lost it, and asked it for help.
But now I understand everything.
Reading through stackoverflow, and reading the official documentation on shm_open taught me a lot. Not gonna lie, my attention span is a bit fried, so big text is a big no for me, but ChatGPT explained things quickly, but wrong... Most vibe-coders who are located at JS or other minor languages such as Python dont really get the effect of how annoying it is to fix a segfault in C. Its just a segfault, or a bus error (happened a lot since using shm).
I cant count how many times I asked ChatGPT to EXPLAIN what the error was, but its response was always the same; <insert code that does not work>.
Linux Manual is really a different kind of work, reading through it, reading the code and understanding the bits really shifted my mind in using AI. Dont use it, the manual really is Human intelligence at its peak, Pulse would not be at version 0.1.1 without the Manual, AI does not know anything about coding.
•
u/AutoModerator Jun 26 '26
Hi /u/xerrs_,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
u/gudetube Jun 28 '26
My experience is that the AI is better for more experienced engineers. But hey, I'm just trying to last another 5 years ¯_(ツ)_/¯
63
u/mjmvideos Jun 27 '26
You’re right. It doesn’t know anything. But it’s pretty good at producing sequences of words.
19
u/Key_River7180 Jun 27 '26
I've used LLM, sometimes, and yeah it is almost always like that :)
16
u/SmokeMuch7356 Jun 27 '26
Yeah. Too many people think ChatGPT is some kind of database or knowledge repository, and it's not - it analyzes input and generates output based on statistical relationships between words and phrases in its training set, but it doesn't understand anything.
It doesn't help that it was trained on some pretty crap code - there's a lot of garbage on Github and various tutorial sites.
The goal of LLMs is to produce output that looks like it could have come from a human being; whether that output is meaningful, or correct, is a separate problem, and one LLMs currently aren't equipped to solve.
It's why I see vibe coding as such a plague. You're not saving any time or effort if you have to constantly ride herd on your agents.
2
u/ksceriath Jun 29 '26
I'm just wondering.. if you have the relevant docs, did you try giving those to the LLM and then how was the experience?
2
u/lost_and_clown Jun 30 '26
The free models suck ass. There's a reason why I'm forced to use AI-gen at work though, and I reiterate FORCED. It massively boosts productivity if you use it right, tell it exactly what to do, have it fetch a list for you from the internet, etc. You absolutely MUST NOT let AI think. It can't think.
3
u/CyanLullaby Jun 28 '26 edited Jun 28 '26
I disagree here. AI isn’t the issue, you’re just using it incorrectly and using the wrong LLM.
Try using Claude. I recently got done with a massive AES-XTS decryption breakthrough for a niche sector of the tech space, and It was instrumental in helping me understand C++ and optimise/create scripts in python.
ALL my research was typed up, prototyped in stages AND written down on paper. I just put it into Claude as part of the ‘test my theory’ process, alongside asking for more info about what certain functions do, etc.
I’m going to use this in my own program soonish. My motivation was loss of validation proofs due to filesystem corruption so I skipped verification alltogether. :3
1
u/CarlRJ Jun 28 '26 edited Jun 28 '26
There's a famous quote (whose authors' name escapes me at the moment) that says:
"For every problem, there is a solution that is simple, elegant, and wrong."
AI has been proving just how true this is for the past few years - offering lots of people answer-shaped objects that are simple and elegant, and wrong. And it's like a pathological liar - it will explain its answer with great confidence, assuring you with its tone that it's authoritative, where a human might say, "well, I think it works like this but I'm a little fuzzy on the XYZ part."
It gives the appearance of someone smart, but deep down, it's just really really elaborate pattern matching, able to pull up an answer-shaped response, but it doesn't know if it's accurate or not.
1
u/EnoughSound7188 Jun 28 '26
Just asking from learning perspective, besides the manual, what books or resources did you use to learn C and how it interacts with Linux before you get comfortable with manual?
(most books I found are either explaining only C syntax or just explain on Linux..so it's hard to connect the gap as I don't know what to read from which parts in one then to which parts in another in other to make the program I wanted)
1
u/LegitimatePants Jun 29 '26
It's the Internet in a blender guessing the next word. If what you are doing has been done (and written about) 1000 times before then the guess will be pretty good
1
u/IllWeather6426 Jun 29 '26
Anyone have gpt and gemini both not be able to diagnose brackets issues for C code, allegedly because of formatting
1
u/theancientfool Jul 02 '26
Stop calling it AI, its literally just an LLM.
1
u/Whole-Low-2995 Jul 03 '26
Whether to use AI or not is a choice. AI is just a tool, and it's not about knowing code but rather a generative assistant. As such, it fleshes out details depending on how detailed they are. On the other hand, these days, the anti-AI camp has become more aggressive, and there's a feeling that it's becoming overly strict in its use. Blind vibes and blind rejection are just trends...
1
u/Jaded-Plant-4652 Jun 27 '26
Fron where i am we have a saying "fire is a good servant - a bad master".
you need to be it's senior.
Personally i am allowing only 1 line suggestion at a time. I am using the chat only for question about the codebase
-6
u/Afraid-Locksmith6566 Jun 27 '26
what is to know? how does one know something?
0
u/[deleted] Jun 27 '26
[deleted] — view deleted comment
-10
u/[deleted] Jun 27 '26 edited Jun 27 '26
[removed] — view removed comment