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 1 year 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 1 year ago
scarrtt@lemm.ee 1 year 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 1 year 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 1 year ago
How using someone else’s shower works:
int temperature = rand()
TheTrueLinuxDev@programming.dev 1 year 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 1 year ago
Thermostatic shower mixers are not a thing where you live?
NikkiNikkiNikki@kbin.social 1 year 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 1 year 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 1 year 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 1 year ago
Instructions
while temperature < comfortable_temperature: temperature += 1
Interpretation
while temperature < freezing: on toggle(temperature += boiling)
JazzAlien@lemm.ee 1 year ago
Temperature would never be false so this is pretty stupid
sour@kbin.social 1 year ago
shower only has 2 temperatures
mojo@lemm.ee 1 year 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 1 year ago
So you only shower with 1° cold water? Or could the int maybe represent something like 40°C?
sup4rawr@lemmynsfw.com 1 year ago
but degrees aren’t integers, you can definitely also shower at 40,5°C
mojo@lemm.ee 1 year ago
The temperature handle is either off or maxed out in this scenario. Not the temperature.