Now that the dust has settled, can we finally agree that this book is a meme? It's hopelessly outdated and was meant for experienced programmers in 70s/80s who already knew languages like Fortran. It also recommends using libraries that are no longer considered safe.
>CWe Zig now.
>>100198678>It also recommends using libraries that are no longer considered safe.What are you even talking about lmao. The only library it even mentions is the C standard library.
>>100198782As much as people will call you a zigger for this you're right. Can't wait for 1.0
>>100198860I meant to say functions. And I was talking about scanf more specifically.
>I was filtered by the bookftfyWe all know C Programming; A Modern Approach is the superior book anyways.
>>100198927Knife-licking based.
>>100198678kys
>>100198678>Now that the dust has settled, can we-*kicks up dust*ooh, what are you going to do now, big boy? gonna cry? gonna shit yourself? yeah you're going to shit yourself, aren't ya? hahaha little faggot op
>>100198678It is still relevant because the language hasn't changed and you benefit from learning how to efficiently work with procedures and pointers.
>>100198782>No memory safety, just don't corrupt memory, bro>No automatic RAII, just manually defer it, bro>No borrow checker, just don't forget to defer it, bro>No generics, just coomptime it, bro>No specification, just trust us, bro.>ZigWhy do language designers keep doing this?
>>100198891Why isn't that safe?
>>100199080There is no such thing as a memory unsafe language only shitty programmers.
>>100199132https://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html
>>100199156>There is no such thing as a memo... SEGMENTATION FAULT
>>100198678dunno, it's still the best book about a programming language
>>100198678It's a fun book
>>100198678oh man i still have it around, used it a long time to learn C. As I remember it was a fantastic book!
>>100199234Skill issue
>>100199319can confirm
>>100198678I know Python, Java and worked professionally with Javascript and this book still filtered me.Thankfully I got a bunch of other resources to learn C.
>>100198678What are some good books then?
>>100199444Yeah I too wanna see faggot op's idea of a good book.
>>100199444>>100199507and this is the part where op mysteriously disappears and never replies to his thread ever again
>>100199080Because explicit languages with manual memory management and no hidden control flow have their place.I fucking love zig as someone who works with microprocessors.
>>100199444>>100199507>>100199717Behold
All programming books are memes.
>>100199234the segmentation fault is a memory safety feature, imagine if segmentation faults weren't a thing, retarded nigger
>>100199772the original bourne shell caught sigsegv and expanded its memory arena in the handlerand look where we are nowI hate modern software
>>100199808you get killed if you trespass, I'm not sure how this can cause any complaints, same happens in real life
>>100199764This. Real programmers learn a new language by brute forcing commands/syntax until we find something that works.
>>100199886https://learnxinyminutes.com/ exists for syntax, language references like https://en.cppreference.com/w/ (includes C and C++ and you can download whole thing to read it offline) exist too.>but what about programming patternsevery problem requires a different solution.
>>100199886Stop spilling the greatest programming secret of all time, it's pearls to the swine.
>>100198678I fell for the meme, and the book took away my enthusiasm for learning C. I picked up another book recently, and I've been having much more fun with it -- it's called Modern C for Absolute Beginners, if anyone's interested. Recently got its 2nd edition.
>>100199984you haven't learned anything, just keep reading meme books to continue avoiding to actually learn anything
>>100199995Okay, what do you actually suggest then, smart anon? I'm interested in the low-level stuff.
>>100200009Have you considered actually programming? Kind of similar to how when you need logs to be split, you go ahead and split them with an axe instead of reading about it. But of course you zoomers would need to watch a youtube video to know how to do that.
>>100200040>youtubeNo thanks, I know enough to seek out books rather than YouTube. But fair enough, I guess I need to come up with a personal project and stick to it.
>>100200065>I have no problems to solve on my computergo outside nigger
>>100200103The problems I do solve for myself, I can do in Python. But Python is not very interesting to me, which is why I'm here. No need to be a jerk about it, I'm not aiming for "average zoomer" tier, I want to do more.
Im in the same boat want to learn c but cant come up with projects
>>100200161so rewrite some of them in C, surely you have some that would be more efficient if they weren't in pyshit?
>>100199923Problem with this is that you need some sort of language to begin with so you can learn concepts and paradigms i.e. higher order functions or how inheritance works (prototypal vs class based)
>>100200205you will learn about them when you need them
>>100199047kek
>it's *current year*>the trannies are still seething a about CIf you manage to make something better, maybe people will start using it, too bad that there has only been demands to transition to other gender or other retarded noise like c++ or rust.
>>100200402>too low IQ to comprehend why C++ is superior>noisescientific papers also probably look like noise to you
>>100198678I have never read a programming book (the standard is not a book) and I never will. Complete meme
anon wtf. this book was always real. looks like you havent read it yet. i fucking love the c programming language. i was working on c++ code the other day and got told off for doing things the c way, and now my code is more bloated. like fuck idk. we can zig if you want to or whatever. i own this book irl and it is precious to me
>>100201000>retard who read K&R can't programimagine my shock
>>100199080>just don't corrupt memory, bro>just manually defer it, bro>just don't forget to defer it, bro>just coomptime it, bro>just trust us, bro.This but unironically.
>>100199156Actually it's the reverse: there is no such thing as a memory safe language. Fucking baby programmers and senile old presidents can't get this through their dumb thick skulls.- The CPU is not memory safe.- The ISA is not memory safe.- Any language that claims memory safety is an abstraction.- Abstractions have bugs and fail.
>>100199047Lol
>>100198678you should be doing everything that is considered unsafe. Personally I have grown a sixth sense for these things, I can spot bullshit just like that
>ctrl-f language spec promotes undefined behavior
>>100199047got me good anon
>>100199156Imagine how retarded you'd have to be to think the rate of memory related fuckups is equal for all languages.Both can not help the situation.
>>100199234Segfaults are one of the easiest things to fix. Crashings is always better than not crashing while in development.
>>100200419>C++ superiorKek
>>100201000Checked. Relatable. C with classes and its consequences has been a disaster for the human race.
>>100206435yes
>>100206483Destroying the memory modelName manglingCrashing before mainPretense of 'encapsulation' while every IDE autogens setters... Cpp is shit, OOP is shit.. if sun did t spend 500M on the 90s to modularize your job, in order to pack it up and ship it out to india, you wouldnt be arguing for this garbage.
>>100206537soul.
>>100200419Many scientific papers are indeed just noise.
>>100206537>oop is shit and it's sun's faultDone correctly OOP is awesome and a natural outgrowth of good code organization practices in languages up until that point. The problem with OOP is that properly modeling problems...breaking them down into reusable and extensible classes...requires a minimum IQ. Absent that min IQ you get>over engineered academic enterprise object labyrinth>useless objects that have to be rewritten over and over and/or bypassed in non-OOP waysOh, and Sun did not create it nor is Sun the reason for its widespread adoption. It took over as a paradigm during the 80s, before JavaSir.
>>100198678>SafeGo get fucked by the janny tranny.You gigantic faggot.
>>100206616Not really, there was smalltalk which did OOP based off messaging, then C with classes which did gay shit. Became bigger and became Cpp with classes/inheritance/encapsulation and the NEW OOP. The sun made java, tries to sell it as an already existing 'curly braces language' like Cpp, and spent 500M in advertising over that decade to get it in industry. No other programing language/paradigm has had a budget at all, or one close to rivaling the institutional adoption of OOP. The managerial reason for this is to export/import modular units of labor... And ofc non of that is 'messaging' based OOP like small talk invisioned. Compare the usage of C vs C with classes over the 80s please, include smalltalk with C with classes for proportionality.
>>100206693>Not really, there was smalltalk which did OOP based off messagingSo low iq coders attempted a skill they suck at, aka class modeling and organization, and weren't good at it. Thanks for proving his point.
>>100198678I'm not good in reading books in general but I appreciate its no-bs approach. Works as a reference manual too, as intended. I like to pull it from my bookshelf to check a detail about a standard library function. And when you read technical books written in the 1970s, of course you have to take into account the half a century that has passed since the book was written.
>>100198678Kernighan recently started to contribute to Awk again. Nigga has 90+ years or something. Had to do it through email first because he doesn't know git.
>>100206693>Not really,Yes, really. By the time JavaSir was released pretty much all desktop application development was in an OOP language. C++ swept both Mac OS and Windows development, as well as development on the various UNIX workstations. All EE courses taught OOP. And every competing language was either OOP from the start or added OOP to try and stay alive. The precursor to our phones, Newton MessagePad, was fully OOP. The web was just getting started as a simple hyperlinked page system. And to the degree that it offered any interactivity at all, it was done through CGI calls into server applications that were...OOP.>The sun made java...and spent 500M in advertising over that decade to get it in industry.Sun tried to make Java a write once/run any where solution for everything: desktop, server back end, and web apps before web apps were a thing. It failed miserably on two of those fronts for shit performance and shit GUIs. Certainly Sun pitched it as OOP because nothing was going to be adopted without that, OOP had already taken over. But that wasn't the selling point. Sun was hoping to monopolize all development with their new baby, and the hook was "write once.">No other programing language/paradigm has had a budget at all, or one close to rivaling the institutional adoption of OOP. I'm an old fag. I was a kid/young adult into computing across this time frame. OOP won before Java appeared. I lived it.>The managerial reason for this is to export/import modular units of labor...That would have happened without OOP. Again, OOP was an extension of how programs were being designed before OOP took over. Look at the classic Mac OS Toolbox or Win32. They're not OOP because they were created at the tail end of procedural dominance. But they sure as hell are organized as if they were OOP.>muh pure academic smalltalkI like the idea of messaging OOP. Obj C (NeXTstep) used this. But you don't need it to be OOP.
>>100198678>meant for experienced programmers in 70s/80sthe standards are much higher now unless you have a meme jobaccess to unlimited information + millions more programmers to compete withalso i learned C from my dads copy of this book when i was 13
>>100207217I learned c from the public library. not hard. just took a minute to learn about pointers, but I realized now that the books suck at explaining pointers in general. They overcomplicated it, which is why people like myself had trouble getting them for a bit.
>>100207614>not hardcorrect, C is good because its easy
>>100198678C is trans (not type safe) and will 42% itself soon.
>>100208428c++ isnt hard either. the only annoying thing is the fucking syntax and obsession with :: and brackets. Shit becomes nearly annoying to read. I can get stuck on a line of code for a couple minutes trying to discern what the fuck it's trying to do syntax with some fucking template and other bloat keywords like noexcept and shit.
>>100208467the strength of C is you can read a short document (e.g. Gnu C manual) and no syntax will surprise youas for C++, just use// best practice, shut up#include <bits/stdc++.h>using namespace std;typedef long long llVerification not required.
// best practice, shut up#include <bits/stdc++.h>using namespace std;typedef long long ll
>>100208624#include <bits/stdc++.h>Huh?
#include <bits/stdc++.h>
>>100208639includes everything you need (gnu feature only), e.g.#include <bits/stdc++.h>using namespace std;int main() { vector<int> v = {1, 3, 6, 5}; sort(v.begin(), v.end());}
#include <bits/stdc++.h>using namespace std;int main() { vector<int> v = {1, 3, 6, 5}; sort(v.begin(), v.end());}
>>100208659oh yeah. I love the fuck out of vector. I honestly dont go too deep into the deep stuff in c++. And I never thought you really need it. The most complicated stuff you need to know is memory management, Raii, and move mechanics. Literally the only "difficult" things.
>>100208673i only use C++ for competitive programming because it has every data structure you needits very quick to write too (if you know what you're doing)i really do love C though, C++ is just a convenience thing
>>100199157this didn't at all show how it's unsafe, if anything it has shown how safe it is. you dumb moron.
>>100206375Segfaults are almost never easy to fix. Quite often they are caused by heap corruption, which is a nightmare to locate.
>>100208777Technically, memory allocation and pool memory management processes fixes this, but no one thinks its worth the time to write one for c++ programs unless it's absolutely crucial. Perhaps in a safety process like aerospace. Im always curious how they test and deal with exceptions in a system that can lead to life or death. I should go study up on it.
>>100208812make a post if you find something cool
>>100208812Aerospace has their standards for c like MISRA standard
>>100199047lmao that'll teach him
>>100208812https://sdtimes.com/nasas-10-rules-developing-safety-critical-code/I'm sure there's more and different interesting shit for other systems (i.e. aircraft). Although apparently Boeing has zero standards for commercial flight control systems now.
>>100198782>>100199080I can't wait for Zig 1.0 just to see Ziggers and Rustrannies fight.
>>100198678It's a great book. Being based on C89 make it somehow """outdated""" but anything else other than the difference between C89 and C99, the book is still great, and have a lot of wisdom in it, you speak about a book written by elitist programmers who know how to do shit, I can't think of something better. If you want something basic, read the docs (learn-c.org). Books are for wisdom and information exchange, not to learn technical skills, you do that by reading the docs, and practicing.