Live data from Hacker News

Chess.com stopped working on 32bit iPads because 2^31 games have been played

chess.com

41–50 of 338 posts

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#41

It's fascinating... the Y2K problem never came to fruition because - arguably - of the immense effort put in behind the scenes by people who understood what might have happened if they hadn't. The end result has been that the entire class of problems is overlooked, because people see it as having been a fuss over nothing. I sometimes think it would've been better if a few things had visibly failed in January 2000.

> I sometimes think it would've been better if a few things had visibly failed in January 2000. Having to spend billions of dollars on programmers' goofy means of saving a few bytes of memory is a pretty visible failure.

How many bytes of memory were saved? 32-bits multiplied by potentially trillions of time, considering storage was not dirt cheap as it is now...

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#43
post #31
post #7

Earlier quoted context omitted.

This has nothing to do with CPU architecture.

"The reason that some iOS devices are unable to connect to live chess games is because of a limit in 32bit devices which cannot handle gameIDs above 2,147,483,647."

That is a combination of code and architecture, not architecture alone.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#45
post #6

were they ever expecting negative number of games? why signed integer?

It's very reasonable. This way they overflow into invalid values instead of zero.

Assuming you're working in a language that defines signed integer overflow. Depending on the language, you can result in undefined behavior, instead. For that reason, I'd go with an unsigned counter, with the first million IDs being invalid or reserved for future use. That way, you get well-defined overflow into an invalid region.

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#46

It's fascinating... the Y2K problem never came to fruition because - arguably - of the immense effort put in behind the scenes by people who understood what might have happened if they hadn't. The end result has been that the entire class of problems is overlooked, because people see it as having been a fuss over nothing. I sometimes think it would've been better if a few things had visibly failed in January 2000.

Similar to how much effort goes into dealing with things like dangerous strains of bird flu, only to have people complain about how much money was spent on "nothing" when an outbreak doesn't occur.

This is a whole class of problem - I wonder if there's a name for it. More examples include: talking about welfare being unnecessary because no one is starving. Or people on medications stopping because they feel better (while still on them).

Re: Chess.com stopped working on 32bit iPads because 2^31 games have been played

#50
So they probably just need to use longs instead of ints. But I'm curious, if you were really stuck with a 32-bit limit on data types, what's your preferred workaround? I'm thinking I'd add another field that represents a partition. Are there other "tricks"?
Post reply on HN