u/daikatana
-
13points
daikatana
daikatana
Can you successfully write C code? Can you avoid the common sources of undefined behavior? Can you track down, fix and understand the reason why bugs occurred?
daikatana
Does this guy do anything but complain?
daikatana
I wonder if a single molecule of the original grease is left?
daikatana
This breaks the only form of modular programming C offers. There is no more file scope, everything with file scope is scoped to the same file. This is a major problem for me and it's why I won't even consider unity builds.
daikatana
Everyone feels like this when they switch to a new language.
daikatana
On the one hand, Republican voters don't want the "elites" controlling everything. On the other hand, this.
daikatana
You could've told me that before I took a power washer to my breaker box. Pretty sparks, though.
daikatana
If you're not a citizen if you're born here then no one is a citizen. There are no citizens of this country. We're all aliens.
daikatana
Yeesh, I didn't know that about him, my brain just pulled a random person I used to watch on TV. Are there any public figures that aren't doing this shit?
daikatana
If it was at one point habitable and there was life there, sure. That's a big "if," but it's possible.
daikatana
Define "advanced."
Yes, it's possible there have been species on Earth before us that were more intelligent or more technologically advanced than we are now. We've basically gone from animals like all the others to a technologically advanced species in a few thousand years, and there's absolutely nothing stopping this from happening multiple times across multiple species on Earth. This is true on any planet with suitable life, not just Earth.
Is there any evidence this has happened? None. Not a shred.
daikatana
Is that what your dreams are like? Last night I had a dream that the frugal gourmet was in my house but I had to go to work so I needed him to leave, but I couldn't kick him out because I was continually looking for my shoes, or couldn't tie my shoes, or would then lose my shoes again, and you can't go to work without shoes, so I would keep looking for my shoes, but then I realize it's dark outside and I spent all day looking for my shoes and I completely missed work but for some reason I'm still looking for my shoes. I would rather dream about this cool tree.
daikatana
You can set a texture color mod, but this color is multiplied with the image color when rendered. If your image is black then this will never work, anything multiplied by black is black. Make the image white and you'll be able to change it to any color you want.
daikatana
Trump has been incoherent since 2016 at least, but no one seems to care. And by incoherent I mean really, really incoherent. Can't finish a sentence, rambles about things that are not real, offers zero understanding of any subject, etc. He makes no cogent arguments on any subject, not even ones you may disagree with, and honestly does not even seem to understand basic functions of government. But he gets a pass for some reason. Like... what? What is even happening?
daikatana
This is casting an integer value 0x009432 to a uint8_t pointer. This is necessary because C doesn't have pointer literals, you have to cast an integer value. Such things don't make sense in the strictest sense, conjuring up a pointer value like this is undefined behavior. However, most C compilers allow this, and this is common practice in embedded programming.
daikatana
That was honestly the best part of the book. That one tiny little part. It was tantalizing and I thought it was going to take a turn, but it didn't. Nope, it started and finished as a Lord of the Rings knockoff.
daikatana
They're somehow worse than the extremely cheesy early 90s reenactments in Rescue 911. I'm not even going to check, but I can safely say their theme song can't beat this, either.
daikatana
With GNU Make, you don't need to write all recipes individually but I'm not against to that.
But you should be, which is my point. If you have a rule like
foo.o: foo.c foo.h
...
but foo.c also includes bar.h then things are going to go sideways when you modify bar.h. Forgetting to add a dependency to a Makefile after adding an include directive is a very easy mistake to make. You will screw this up. There's a reason why people don't write Makefiles like this. Use GCC's auto dependency generation, don't make things hard on yourself.
daikatana
Apparently the hat was not backwards, it just isn't fitted and doesn't sit on his head right. Which means it's not his hat. It's a prop he used for his performative trip to the border.
daikatana
I got as far as the Makefile and... no, don't do that. Don't write a different rule for every single source file you have, manually adding all their dependencies. You will screw this up and builds will fail in spectacularly confusing ways, you will forget to add a header file to a dependency and one object file will have a different struct definition or something. Use the -M switches to generate dependencies automatically and have a single rule that builds a .o from a .c.
Don't use -O0, it's just not necessary. For debugging builds use -Og and for optimized builds use -O3. The -O0 option turns the optimizer off completely, and you almost never want this.
Hardcoding your paths is not a good idea, either. This makes it very difficult for anyone else to build your software, and this will be a problem assuming you're writing this expressly for other people to build.
You don't need to use $(shell find when GNU Make has $(wildcard. An over-reliance on shell commands will make the makefile less portable. Assuming GNU make is pretty safe, but assuming the find command does what you think it does is not (looking at you, Windows).
Why does the executable depend on src/catpong.c and all the objects? Surely the objects includes the object for that file, which depends on that source file. No, you filtered out that object, for some reason. You're then filtering header files out of the objects list and... what? This is baffling, this is just not good.
daikatana
Don't name your function close. This is a POSIX function for closing files, and this is almost certainly confusing the linker. I don't know why exactly it's crashing, but rename it to close_window or something and you should be fine.
To be fair, the compiler should probably warn against this, because it's a common error.
daikatana
You want memcmp.
daikatana
This is almost never the developer and usually the publisher. However, publishers get all mixed up. They buy each other out, often for the rights to a single game or franchise and the rest is shelved. Who even owns the rights to a game is often not known anymore, and the amount they'd spend researching that is more profit than the few hundred people who would want to buy the game will generate. It generally isn't in their interest to dredge up older games.
No one asked you, bud.