I guess there’s not enough water to use a float unless you’re in a bathtub.
Int and bool walk into a bar
Submitted 8 months ago by alphacyberranger@lemmy.world to programmer_humor@programming.dev
https://lemmy.world/pictrs/image/44fe9396-b4ef-469a-a0b2-c0f6cd750020.png
Comments
zqwzzle@lemmy.ca 8 months ago
scarrtt@lemm.ee 8 months ago
I travel a lot and I swear I’ve never seen the same shower design twice. There’s so many different freakin’ ways to deliver a stream of water to your head and they nearly all require some level of finessing. I’m assuming it all stems from an old court case about patents but fuck that judge
thehatfox@lemmy.world 8 months ago
It seems that hotels somehow always install the most obscure and convoluted shower designs. I’ve never had too much trouble with showers in people’s homes, but every time I shower in a hotel room I feel like I’m trying to operate an oddly temperamental steam engine.
jetsetdorito@lemm.ee 8 months ago
How using someone else’s shower works:
int temperature = rand()
TheTrueLinuxDev@programming.dev 8 months ago
How it really works:
mpf_t temperature.
If confused...
It’s arbitrary sized floating precision number provided in LibGMP and you can find more information about mpf_t here.
BorgDrone@lemmy.one 8 months ago
Thermostatic shower mixers are not a thing where you live?
NikkiNikkiNikki@kbin.social 8 months ago
Not common in the US I believe, or at least I haven't heard or seen one of them.
You just gotta "guess" what's correct and then feel the water coming out
mercano@lemmy.world 8 months ago
In the house I grew up in, you’d also have to hope no one flushed the downstairs toilet. If so, the cold water pressure would suddenly drop, leaving a lot more hot water coming out of the shower head.
BorgDrone@lemmy.one 8 months ago
Weird, they are super common here in the Netherlands. Not expensive either. You just set it to a temperature and it’ll keep it constant.
iminahurry@discuss.tchncs.de 8 months ago
Instructions
while temperature < comfortable_temperature: temperature += 1
Interpretation
while temperature < freezing: on toggle(temperature += boiling)
JazzAlien@lemm.ee 8 months ago
Temperature would never be false so this is pretty stupid
sour@kbin.social 8 months ago
shower only has 2 temperatures
mojo@lemm.ee 8 months ago
Shouldn’t it be a float that goes between 0 and 1 instead of an int. I’m this situation they’d be the same thing, considering 1 would be max lol.
MaggiWuerze@feddit.de 8 months ago
So you only shower with 1° cold water? Or could the int maybe represent something like 40°C?
sup4rawr@lemmynsfw.com 8 months ago
but degrees aren’t integers, you can definitely also shower at 40,5°C
mojo@lemm.ee 8 months ago
The temperature handle is either off or maxed out in this scenario. Not the temperature.