Email or username:

Password:

Forgot your password?
Top-level
GolfNovemberUniform

@nixCraft jokes aside that is indeed a perfect an almost perfect function for automation.

14 comments
RDogPinK

@GolfNovemberUniform @nixCraft donΒ΄t get it. wouldnΒ΄t a boolean be sufficient for this case?

GolfNovemberUniform

@RDogPinK @nixCraft I think so. I edited my comment. I don't like wasted memory.

DougMerritt (logπŸ˜… = πŸ’§logπŸ˜„)

@RDogPinK @GolfNovemberUniform @nixCraft
No; it never returns 0 / false, so it can't be just a boolean.

In type theory you could say that it's value is true or "bottom" if it is executed symbolically rather than physically.

Jan <3

@RDogPinK @GolfNovemberUniform @nixCraft I mean depending on if you’re writing old C. They didn’t have bools, just Ints. Bools were specified by the stdbool.h IIRC much later in time

EndlessMason

@RDogPinK
What if the computer is hibernating or thermal throttling or interrupted?

@GolfNovemberUniform @nixCraft

RDogPinK

@EndlessMason @GolfNovemberUniform @nixCraft yeah, but the function says "computer_on", not retrieve status ;)

EndlessMason

@RDogPinK
It already says "on-ness" is not boolean in the signature - I'm not a big "typed language" enjoyer, but afaik that means non-binary, baybeeeeeee

@GolfNovemberUniform @nixCraft

GolfNovemberUniform

@EndlessMason @RDogPinK @nixCraft A hybernated computer is not an operational computer. And what does thermal throttling have to do with it?

EndlessMason

@GolfNovemberUniform
If i have 4 cores and I turn off two the computer is half on.

If I have those same 4 cores but they're running at 50% of their usual clock speed to prevent over heating the computer is also half on.

@RDogPinK @nixCraft

EndlessMason

@GolfNovemberUniform
The underlying rule I'm using here is
"Half of the compute being available means the computer is half on".

Like one might expect from a water tap, or a dimmer lamp except with computers you know... The kind of thing one might represent in a int32?

@RDogPinK @nixCraft

wrosecrans

@RDogPinK @GolfNovemberUniform @nixCraft Consistency with other BeOS API's was probably more important than considering it strictly in isolation. It was a syscall, so using the standard "return an int" idiom probably made the most sense in context.

Go Up