Live data from Hacker News

Ask HN: Learn C in 2023?

news.ycombinator.com

191–200 of 220 posts

Re: Ask HN: Learn C in 2023?

#191
post #68

If you're fluent in Rust, you will have no problem learning C considered as a language. If C has any faults it is that it is too simple. Rust even sensitizes you nicely to the worst pokey bits of C, so you won't be wandering blind through the landscape of memory safety like most people learning C. I don't think you'd need books or anything, just grab some tutorials online and start banging away. It's not a hard langu…

There wasn’t historically a C “platform” in the sense you describe it here due to C’s age. Rust built itself around a single “platform“ because Rust was built in the 21st century. (Python and Ruby didn’t have “platforms” either, but they had uncommonly useful standard libraries.)

[dead]

Re: Ask HN: Learn C in 2023?

#192
post #156

Earlier quoted context omitted.

Man, that is one complex, interconnected and interesting System! I would love to work on something like that even if it is just maintaining a legacy product. Seriously, let me know (contact in my profile). On similar lines, I have been thinking of using Erlang/Elixir for distributed programming over the Web (even in the browser if possible) and dropping down to C/C++ and J programming languages as required on individ…

If you like such systems, backend systems in investment banks is where its at. Most of my experience was at Goldman, but similar systems exist in Morgan, Deutsche, Citi, UBS, Bloomberg or old PE firms. Look for C programmer careers in trade publications like efinancialcareers.com, or work with Huxley, Selby Jennings etc. Combination of C/C++ and certification in Q/kdb - will keep you employed pretty much into your 60…

Thanks for the pointers, appreciate it very much.

Re: Ask HN: Learn C in 2023?

#194

Earlier quoted context omitted.

Any recommendations on static analyzers, unit tests, coverage for c? Can clang tidy give hints about modern c they way it does about modern c++?

Don't bother with this stuff (or with "modern C") if you're just beginning to learn the language. You don't need it for small programs. No one is going to yell at you if your first effort isn't perfect. And no one is going to yell at you if you read the "wrong" book, or try things out in the "wrong" order. Pick any learning resource and get started now. You'll probably get distracted and move on to something else. Co…

I’m not sure, it does help to even just know about whether your program is faulty, and C doesn’t like telling it you, or in unintuitive ways only.

Re: Ask HN: Learn C in 2023?

#196

Earlier quoted context omitted.

#c on libera is a genuinely helpful place full of neckbeards.

Sorry if this is silly question but what is libera?

A sibling comment already mentioned what it is so I'll not repeat that. Just some additional context if you're somewhat familiar with IRC. It's the spiritual successor of Freenode after it was taken over by a member of that community.

Re: Ask HN: Learn C in 2023?

#198

Earlier quoted context omitted.

It's much too awkward IMHO, C99 and onward almost feels like a whole new language (mainly because of struct literal and designated init support).

Not being forced to declare symbols in the beginning of the scope is the real game changer I say. K&R or C89 without e.g. GNU extensions is really annoying to use.

Idk about that. I think it's code with everything declared at the beginning of the scope is easier to read and understand. Every time I see code written in this style (Git, Linux) it's easier to build a mental model of what is happening.

Re: Ask HN: Learn C in 2023?

#199

Earlier quoted context omitted.

> There is no meaningful sense in which either Rust or Go’s reference compilers is “proprietary.” Nobody is talking about the compilers. This, right here — the fact that you are conflating a language and one implementation — is the whole point and is indicative of the tight control the respective organizations keep over their languages. The direction of the languages is entirely up to their private owners, and that e…

This is not a definition of "proprietary" used anywhere in the open source community. Private direction (which Rust notably does not have) does not somehow erase the fact that both are permissively licensed and have open codebases that you can use and contribute to to your heart's content. I don't even know what you're referring to with IP law. The projects' names and logos?

> I don't even know what you're referring to with IP law. The projects' names and logos?

I think it's the fact that if you took the Rust codebase and forked[1] it to accept new keywords, the resulting language that it accepts is most definitely not Rust.

If you did the same to a C compiler[2], the resulting compiler would still be called a C compiler by everyone.

[1] Assuming that the license allows it.

[2] One who's licence allowed this.

Re: Ask HN: Learn C in 2023?

#200

Earlier quoted context omitted.

Meh. People love to hate on C but the invariants you have to keep track of are relatively simple (things like 0 Some languages like Rust and Haskell do a little better by having the compiler keep track of most of them (if you use it right) but the consequence of misunderstanding them here is accidentally coding yourself into a corner which is extremely unpleasant. There are other things people like to talk about like…

> the invariants you have to keep track of are relatively simple (things like 0 If maintaining these invariants were so simple, why would the smartest people in the industry have so much trouble doing so? Humans cannot consistently write correct C, not even the ones who believe they can. We have decades of evidence. > Most languages replace these with multi-dimensional string based hashmaps that have much more comple…

> Humans cannot consistently write correct C,

So? Humans cannot consistently write correct code in any language.

> When you get an array bound wrong in C, you open the door for a nefarious actor to gain control over everything that your program can access.

What's really interesting to me is how Heartbleed (the largest example of getting an array bound wrong) was orders of magnitude less expensive to fix than Log4j, and yet it was Log4j that resulted in gauranteed RCE, not Heartbleed.

> C apologists are like apologists for asbestos and lead paint.

Let's not go spilling hyperbole all down our shirt.

I get the feeling that a lot of people comparing C to things that kill have never worked in life-critical situations, the systems of which ran C for decades and decades, and never appeared to have lost very many lives in the process.

Military, munitions, healthcare machines ... I can't remember any of them losing lives because of a misfeature in the C programming language, and yet there you are, proudly proclaiming to the word that C is like Asbestos, which has taken peoples lives.

Get a grip.

Post reply on HN