Live data from Hacker News

Infinite loop in macOS Night Shift in the summer near the Arctic Circle

twitter.com

101–110 of 175 posts

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#101
post #89
post #26

Earlier quoted context omitted.

My favorite incorrect fact is that there are 24 timezones. In fact, the number of offsets from UTC fluctuates throughout the year (at least last I worked on scheduling in 2012. Back then it was either 39 or 40 depending on DST)

DST rules are just insane. I'm responsible for some code where I just drew the line and 40 some odd people in one of the Antarctic stations are just going to have to live with wrong time part of the year if they ever run my code. I'm not adding another code path and test case just because these people wanted their own special concept of time. I don't remember the pattern, but I think it was maybe a daylight savings t…

We have endless problems with DST as well. I can't wait for the EU directive that abolishes it. Russia dropped it years ago. We'll still have to support past times and other timezones though.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#102
post #85

Earlier quoted context omitted.

Speaking of within, I fibbed slightly about Arizona. https://en.wikipedia.org/wiki/Time_in_Arizona The Navajo Nation is within Arizona's boundaries, and it does observe DST. And the Hopi Reservation is within the Navajo Nation, and it does not observe DST. And since Arizona is surrounded by California, Nevada, Utah, New Mexico, and Mexico, all of which do observe DST, that means you have an island of no-DST (Hopi) in…

How did we screw up time zones so much?

We invented and then implemented time zones and then invented and then implemented daylight savings time; arbitrarily and with arbitrary laws and treaties.

There are days where I think I should go back to a mechanical watch and adjust the time each day at high noon. It won’t agree with anyone else’s time most of the time, but at least it will be correct.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#103
post #43

Earlier quoted context omitted.

It’s not an arbitrary planet from our perspective, which is the only one we even know to exist. We’ve needed to coordinate actions forever and the sun was the only reliable way to do that for a long time. Nothing arbitrary about where our time came from.

Sure, for now ; but I feel like it'd be aesthetically pleasing in some sense to try for something more objective—i.e. to predetermine the sort of timekeeping methods we would need upon establishing trade relations with a universe full of aliens, and then to use those methods in advance. Like a Society for Creative Anachronism meeting where the target period is forward in time rather than backward.

If we ever meet aliens that also happen to be advanced enough to trade with, we will have already solved this issue ourselves because we’re cruising around in the Enterprise and needed a new timekeeping system by that point, or the Enterprise came to us and they will have their own timekeeping system that we can adopt.

Before then? Eh. Objectivity is overrated and an imperfect time system is a nice reminder that life doesn’t revolve around us and what we want.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#104
post #7

Earlier quoted context omitted.

Right? I am reliably put into this weird emotional state of being simultaneously entertained and chagrined at the propensity for technologists (and I very much include myself in this criticism) to make these kinds of assumptions, and the edge-case bugs that fall out of them.

If we tried to get these thing 100% right we'd not have time for anything else. Punting is pragmatic.

You're absolutely right that "100% right" is an unreasonable standard. I submit that knowing that there are places on the planet where, at times, the sun doesn't set, however, is a reasonable thing to expect of someone who's made it far enough in life to be writing code (or testing it! How did this pass QA?) for Apple.

f.lux gets it right if I set my zip to Barrow, AK. Why can't Apple, with how many orders of magnitude more resources at their disposal — including knowledge?

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#105
post #55

Earlier quoted context omitted.

What's the difference between unexpected and undesired behavior and a bug?

Unexpected or undesired behaviours are relative to who's expectations and desires are being considered while bugs are (or at least should be) universally recognisable as bugs.

Would anyone consider that the corebrightnessd process at 117% cpu is expected/desired behaviour?

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#106
post #25

Am I the only person who is impressed with this person's debugging skill?

Not really. All he's shown is a behavior (high CPU) and is equating it with the latitude he's at. When he turns off Night Shift, the daemon process for the feature stops consuming as much CPU, from what I gathered. Nowhere does he provide evidence that there is an infinite loop calculating the sunrise/sunset. And I really don't want to be a stereotypical poster by simply degrading what he did, so I will give credit t…

As the OP, I'm giving this one an upvote. I am far from an engineer, so the most I can come up with a hypothesis. I need a real engineer to do the real debugging.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#107
post #23
post #4

'Falsehoods programmers believe about time: - Every day has a sunrise and a sunset'

Time is hard: https://zachholman.com/talk/utc-is-enough-for-everyone-right This is all because of the fact that we're trying to represent the time taken by the earth (an arbitrary planet that has no impact on the universe whatsoever) to revolve around the sun (an arbitrary star) in terms of the amount of time the earth takes to rotate around itself. These two obviously unrelated things are somehow merged into to crea…

I was hoping that he'd cover the different kinds of time, and where each kind is used in a program, but nobody seems to think about it:

* Absolute Time: A time value fixed to UTC.

* Fixed Time: A time value fixed to a specific time zone.

* Floating Time: A time value that is interpreted according to the time zone of the observer.

https://technicalsourcery.net/posts/time/

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#109
post #56

Deep in the twitter replies: > Now, is this a corner case, an edge case or a boundary case? And does the answer depend on whether you are a flat-earther or not? That was too funny.

Personally I believe that earth is flat disk carried by 4 elephants, which are standing on the back of a giant turtle

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#110
post #56

Deep in the twitter replies: > Now, is this a corner case, an edge case or a boundary case? And does the answer depend on whether you are a flat-earther or not? That was too funny.

Personally I believe that earth is flat disk carried by 4 elephants, which are standing on the back of a giant turtle

Sure, but that turtle is carried by four "elephants, which are standing on the back of a giant turtle". And that turtle ...
Post reply on HN