this post was submitted on 23 Jan 2024
25 points (100.0% liked)

programming

131 readers
12 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 8 months ago
MODERATORS
top 14 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 7 months ago

The correct answers are:

  1. implementation defined
  2. implementation defined
  3. implementation defined
  4. implementation defined
  5. undefined behaviour

Which is a lot more precise than "nasal demons", because at the end of the day, code gets compiled by a specific compiler toolchain for a specific platform and all these potentialities get collapsed.

[–] [email protected] 11 points 7 months ago

C is a portable language.

[–] [email protected] 10 points 7 months ago* (last edited 7 months ago)

Hell yeah I know C. Let's go.

First question. Oh easy. Lemme just lookup 'sizeof'....

[–] [email protected] 9 points 7 months ago

stdint.h users stay winning

[–] [email protected] 9 points 7 months ago
[–] [email protected] 9 points 7 months ago

100% correct! I’m going to start calling myself a guru and condescendingly refusing to answer anyone’s questions. Now where’s my tshirt with the picture of tux on it?

[–] [email protected] 8 points 7 months ago (2 children)

And this is why we use Rust! Though, C will always hold a special place in my heart and I still love it. Sure, it's dangerous and what not and it's easy to shoot yourself in the foot or whatever the new saying is these days, but there's something really fun about having almost zero guard rails and having the ability to just do anything.

[–] [email protected] 9 points 7 months ago* (last edited 7 months ago) (1 children)

And this is why we use Rust!

Question: How do you tell if someone programs in Rust?

Answer: Just wait, they'll eventually tell you in an unrelated conversation

[–] [email protected] 5 points 7 months ago (1 children)

there's something really fun about having almost zero guard rails and having the ability to just do anything.

imo this makes it such a useful tool for learning computer programming

[–] [email protected] 6 points 7 months ago

Agreed! C is the language I recommend to people if they want to learn how things work at a low level since you're basically one step above raw assembly. It was one of the first languages I learned and helped a lot with understanding things later on when working with other languages.

[–] [email protected] 7 points 7 months ago

Yeah I know my ABCs blob-no-thoughts

[–] [email protected] 2 points 7 months ago
[–] [email protected] 2 points 7 months ago