Why the complicated if statements to check the sign? Just let the number overflow. Would be functionaly the same, and result in much prettier code.
Why the complicated if statements to check the sign? Just let the number overflow. Would be functionaly the same, and result in much prettier code.
Might be a sound and temperature insulation solution. Although, if so, I recommend adding some insulation material inbetween the layers.
But how does the Rust compiler do that? What does it actually check? Could I write a compiler in C that does this check on a piece of Rust code?
C is so simplictic, that if I can write a piece of functionality in C, I must understand its inner workings fully. Not just how to use the feature, but how the feature works under the hood.
It is often pointless to actually implement the feature in C, since the feature already has a good implementation (see the Rust compiler for the memory safety). But understanding these features, and being able to mentally think about what it takes in C to implement them, is still helpfull for gaining an understanding of the feature.
I mean, at the end of the day, if you really understand your language of choice, you know that it is jusf a bunch of fancy libraries and compiler tricks of top of C. So in my mind, I’m a fully evolved programmer in a language, when I could write anything I can write in that language in C instead.
I have this experience with a certain type of pedestrian traffic light “button”.
I quote button, because nothing physically moves when you press it. I’m not sure if it registers pressure or heat, but you don’t even feel anything move when you press it.
Usually when you press the button, a red text lights up on the button, telling you to wait. This text gives you feedback that the button registered your press, and the traffic light will schedule a green light for you.
However, sometimes you didn’t press hard enough, and the text doesn’t light up. Simple solution: press harder.
But there is a scenario where it doesn’t matter how hard you press, the button won’t light up. You keep staring at it, while slamming the damn thing with the fury of a Hulk wealding Mjolnir. Still, nothing lights up. The reason: the light instantly went green, so it never needed to light up the text telling you to wait. And all that time slamming your fist on the button, could have been spend crossing the intersection. Instead you have been standing there, looking like a drunk person having a fistfight with an inanimate object.
Sleepy cats can be quite derpy. I once had an unannounced visitor come in via the catflap. The catflap was there from the previous homeowner. What neither I nor this cat knew, was that the catflap was set to entry-only mode. Poor guy got locked up in my kitchen overnight.
So when I strolled into my kitchen in the morning we looked at eachother, both with the question in our eyes: who the hell are you? So I offered my finger for sniffing, and when approved I slowly petted the sleepyhead. But when I turned around for 5 second to grab my phone, his brain woke up, and suddenly he remembered the trouble he was in, and pannicked. I was suddenly super scary. It took some convincing that the kitchen door was opened to outside, that I wasn’t going to harm him, and that he was free to leave.
You married a small child that is now grown up?
Considering std::cout should only directly be used when you are too lazy to place breakpoints, I totally get the decision to auto-flush.
I remember a javascript library where the was a function that returned, according to the documentation, “a color”. Did it return an object with 3 fields? Were those fields RGB or some other color scheme? Is it a string encoding a color? What format is that string? None of these questions could be answered without just running the code, and analyzing the object you got back.
It’s gonna get scrambled/minified before it is shipped to the user anyway.
Do you mean that programming languages are hard to read/write, or that the languages themselves are poorly designed?
In the former case, I invite you to read machine code. Not assembly, but straight machine code. Just zeros and ones as far as the editor can see. Any popular language is better than that.
In the latter case, I invite you to look at the design of an arbitrary natural language. Weird grammer rules, regional differences, loan words that don’t fit in, etc. No programmming language is worse than that. Although I would argue that Javascript has all of those problems too in some degree.
Simple solution: only allow lower case characters in file names.
I ain’t complaining though.
Of myself of the now dead purpetrator?
And they both claim they did not yet have any treats today.
The puzzling part is fun, because you are constantly learning new ways to use your body. See how to balance, how to move around, etc. I have found that dancing gives a similar learning challenge. Especially the more free-form dances like salsa and bachata. It’s fun learning new moves every week during the lesson, and then try to see if you can put them to practise during a party.
And don’t worry about beeing to stiff. If you can balance around boulders, you can get your body to move around for dancing too. Just takes some practise. I currently do both, and feel like I lack dexterity more for the climbing than for the dancing.
And unlike most of the hand-friendly options mentioned already, you do have to use your hands and arms a lot. Just not in a way that puts any stress on them.
Maybe recently. But I doubt they are responsible for the rampant inflation, since that also hit the cat treats price.
Point 1 has to be chosen when the cat is young. Forcing an outside cat to suddenly only be inside often doesn’t work.
I adopted a 7-year-old cat from the shelter, and after a week of having to be inside all the time, he got more and more frustrated. After a week and a half, he escaped during the night. In the morning, while I was panicking, he came strolling in as if nothing was wrong.
Since he apparently comes back, I allowed him outside from then on. Since that moment, his behaviour inside has improved a lot. No more random play attacks on my ankles and hands, and generally much calmer.
He has also come back home with mice several times. He always eats them. So I think he is very used to living outside. Maybe been a stray, or a farm cat.
Forcing him to be inside would feel cruel.
The worst thing is: you can’t even put an int in a json file. Only doubles. For most people that is fine, since a double can function as a 32 bit int. But not when you are using 64 bit identifiers or timestamps.
Kitty is just following instructions by bathing Amster.