- Joined
- Oct 2, 2023
9 times out of 10 an else if is unnecessary and indicative of logic that could be condensed into something cleaner. Might be an unpopular opinion.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dunno why retards keep fiddling with how bolt action, lever action and pump action guns work in games. The only compromise i can live with is maybe pressing one button to re-chamber (the shooting button) and/or having to press reload for every cartridge inserted into the magazine. Having one button for everything related to reloading is dumb and stupid for a keybaord and mouse game. If you still want to do it then make it a VR game you massive fucking gorilla nigger retard (and you will still fuck it up because you have no idea how to optimize your game).The game is anal and fiddly when requiring 5 keys pressed in a specific order to reload and chamber a round for a pump-action shotgun.
It's actually extremely obvious - the first version of IEEE754 was ratified in 1985, more than a decade and a half after C entered common usage. The C standard does not assume that float and double conform to IEEE754 because so much of the existing C code at the time when C was standardized in 1989 was written before IEEE754 was widely implemented. The C standard instead leaves details about how the floating point types work up to the implementation.Only true C whales will know this one offhand (I didn't) - this is actually a NaN check, since by the IEEE754 rules, NaNs are the only values where x == x is false. (Why isn't this the wayisnan
is implemented in standard libs then?)
All the hallmarks of cursed C-code - returning a value smaller in size than a register via pointer indirection, errno that doesn't tell you anything, and way too many fucking underscoresFirst function in a spec for "managed strings":
View attachment 7355080
... I cannot stop laughing when I see:All the hallmarks of cursed C-code - returning a value smaller in size than a register via pointer indirection, errno that doesn't tell you anything, and way too many fucking underscores
if (str)
It's a managed strings library so it handles allocation of memory for the strings behind the scenes apart from things like *alloc. So a pointer to a managed string might not actually be null valued and it might actually be in use by the managed strings library but there's no actual string allocated by the library at that pointer currently and is therefore 'null.'So this string library actually has its own internal representation of "strings that are null", separate from the string pointer itself being null?![]()
if i understand that right the runtime constraint violation handler whatever thing is essentially a handler for potential undefined behavior and you shouldn't encounter it unless things get fucky, right? so i could give that a pass.but it's a managed str, and well then one day the function just won't return - and it'll be end of program for you. It's happened to real people, it will happen again, all bets are off in managed string territory.
I know... it's just... I can't be going back to the coal mines, not this soon!The whole on-the-fly width conversion (in everyone's favorite locale, "I Dunno Whatever") seems a little squirrelly to me too. Particularly since it, too, can fail.
valgrind --run-libc-freeres=no <bin>
probably because they touched unholy nigger demons in the old color management code when updating gimp's internal color space logic and somebody had to make one of those good-enough-for-now temporary quick hacksWhy did the dev team break it?
def saar(bobs, and_, vagene):
try:
# ............
try:
# ........
except Exception:
print("An error occurred")
return None
# .........
except Exception:
print("An error occurred")
return None
11/10 he needlessly duplicates a bunch of shit, uses a catch-all exception handler, reports absolutely nothing about the exception other than "an error happened while doing the needful good sar", he (presumably?) prints it to stdout instead of stderr, and to cap it all off he proceeds to return nullPajeet contractor, wrote a django app for something, every function was structured like this
Python:def saar(bobs, and_, vagene): try: # ............ try: # ........ except Exception: print("An error occurred") return None # ......... except Exception: print("An error occurred") return None
he found a way that worked for one of the functions he wrote once, and since he doesn't understand anything about what things do or what they are supposed to prevent, by god he's going to cargo cult it into every single thing he ever writesI've seen multiple levels of try-catch blocks sort of accrete over time, which is bad enough, but writing it that way from the start is some next-level jeetery.
For some reason I can actually hear the Indian national anthem playing right now.he found a way that worked for one of the functions he wrote once, and since he doesn't understand anything about what things do or what they are supposed to prevent, by god he's going to cargo cult it into every single thing he ever writes