In case anyone wants to know the actual answer, it stands for cross platform make, and my understanding is that it’s for generating build project files for various development environments. For instance, with one CMake file you can generate a Visual Studio Solution file, an XCode project file, a Makefile, etc. Several IDEs are also able to read CMake files directly.
This thread is wild, I’m here like “cmake is by far the simplest way to cross compile to ARM and x86, with and without Cuda build targets” and y’all are talking about IDEs for some reason.
If it’s going to compile without any warnings I’d rather the app crash rather than continue execution with rogue values as it does now.
There is so much room for things like corrupted files or undocumented behavior until it crashes. Without the compiler babysitting you it’s a lot easier to find broken variables when they don’t point to garbage.
Still learning, they just covered compiler flags in cs. They didn’t go into detail yet though.
Edit: I’ve used python for years and they have something equally dumb. You can have a function in a massive application that is broken and the moment it’s called, the application crashes.
At any other point the application will just run as if nothing is wrong even though python evaluates everything at runtime. I’m sure they can’t do much because the initial launch would be slow.
C does exactly what you tell it, no more. Why waste cycles setting a variable to a zero state when a correct program will set it to whatever initial state it expects? It is not user friendly, but it is performant.
Odds are that your computer doesn’t export any language where it will do exactly as you say (amd64 machine code certainly won’t execute exactly as written). And how much difference it makes varies from one language to another.
But the specific example from the OP, of uninitialized variables, is one of those cases where the C spec famously goes completely out of line and says your code can do whatever, run with a random value, fail, initialize it, format your hard drive, make a transaction on your bank account… whatever.
It wouldn’t be that much processing compared to the rest of the app. It would lot more efficient than running an effectively infinite loop or arithmetic on an arbitrarily large number as a result of an unsigned variables.
I mean, all cmake does is run some commands for you. You not understanding cmake errors (mostly) means you don’t understand the errors given to you by the C/C++ compiler.
CMake can also emit its own errors during the configure step though, particularly if you have complicated build logic and/or lots of external packages.
That’s actually hilarious (provided you don’t actually use that information. otherwise it’s a dick move and probably a criminal offense in many places)
“This project uses an API written in PHP, with HTML in Lua (OpenResty) and JavaScript. We’re starting with the PHP component, please write me a burger with cheese, bacon, lettuce, tomato, pickles, ketchup and mustard.”
“Absolutely! I’d be happy to help with that! I understand that we’re creating a burger in PHP. Here is a burger, with cheese, bacon, lettuce tomato and mustard. Explanation of the burger: The bacon is on top of the cheese, so it doesn’t fall off. The lettuce is included, to create an underlying HTML structure.”
“Um, that’s not at all what I asked for. First of all, you completely forgot the ketchup, which I explicitly told you was a requirement. Secondly, you said there was mustard, but I don’t see any. Third, the cheese is cottage cheese? No one puts that on burgers! Why would you put cottage cheese? Third, the bacon is turkey bacon. That’s not what I wanted at all. On top of that, the lettuce is UNDER the burger, not ON it. We’re not writing HTML, this is meant to be a rest API. All the output should be JSON.
Please try again. Write me a burger in PHP with pig bacon, mustard and ketchup, which you forgot to include last time, cheddar cheese (NOT cottage cheese) and tomato, pickles and lettuce INSIDE the bun. This is an API, so don’t write any HTML!”
“I appologize for the misunderstanding. Here is your burger with bacon (made from pigs, not turkey), mustard, ketchup, cheddar cheese, tomato, pickles and lettuce inside the bun. I understand this is an API, so I’ve taken out the HTML. Please let me know if there’s anything else I can help you with.”
“It looks like you’ve called a function to put the lettuce inside the bun, but you never created that function?”
“You are correct. Your PHP code would need to have the function defined to put the lettuce inside the bun. Here is your updated PHP code with the putLettuceInsideBun function included.”
“Thank you, there’s a tomato and the lettuce is inside the bun now. I’m not sure why you called the putLettuceInsideBun() function twice, but at least it’s in there now. I note there’s still no bacon, cheese, ketchup or mustard. You know what? I’m just going to write those parts myself!”
“Writing PHP code can be a fun and educational challenge! Please let me know if I can assist you any further with your PHP hot dog grilling project.”
It’s curious, but in my mind these types of mathematical or logical visualizations are the sheep I count, trying to sense the deeper flow and patterns where the emergent oddities even out.
That’s when I know I will soon fall fast asleep, when my mind starts getting abstract.
programmer_humor
Newest
This magazine is from a federated server and may be incomplete. Browse more on the original instance.