Re:A function to sleep a 1000 years: explained
by iforgotmypass on Saturday December 14, 2019 @02:12PM
(#21791449)
I guess I am the only one missing the point (disliking this as a code golf challenge) and cringing that the solution does not sleep for a precise 1000 years and overthinking that various other rules are not being taken into account (e.g. leap years, extra seconds per year, etc.).
[ Parent
| on HN ]
Re:A function to sleep a 1000 years: explained
by mjevans on Saturday December 14, 2019 @02:39PM
(#21791651)
Given the context of 'code golf' I don't mind the submitted solution being 'close enough', it even seems like the programmer in question was precise in their wording (if they were quoted properly).
Overall the thought of a pinned register being software updated once every 7 seconds for near a thousand years is the worst part.
I stand corrected; I'm so used to seeing these unrolled (which hopefully the hypothetical compiler's done) that I didn't consider the stack implications; that's the most cringy part.