Hahahahahahaha. Indeed!
@leoncowle good grief - even if they don't know *why* it's significant you'd expect someone writing about computery topics to at least have a feel that the number is special and ask a colleague if it's meaningful, even if just because it comes up so often.
@kimvanwyk @leoncowle Oh, I remember this. They "fixed" it after people complained, and somehow made it about ten^H^H^Height times worse: https://www.independent.co.uk/tech/whatsapp-group-chats-bigger-maximum-size-256-people-users-a6856491.html
WhatsApp increases group chat size limit to 256 people | The Independent

Bigger groups are now available to all WhatsApp users on iOS and Android

The Independent
@confluency @kimvanwyk Oh. My. Gawd!!! You're not kidding. Mwahahahahahaha!

@leoncowle @confluency @kimvanwyk

I like that they speak of variations.

Shouldn't WhatsApp have picked 255?

Doesn't the question why they picked 256 number make you even more worried if you you understand the significance 😳?

@realn2s The *indices* may go from 0 to 255, but it's still 256 *integers* in total (in this case representing people).
@confluency
Yes, that's my point.
This would mean that the maximum group size is 255 (assuming you need to represent an empty group as well).
WhatsApp increasing the group size to 256 requires 9 bits (and then they could have gone for 511 😜)
@realn2s @confluency We just don’t know where this number comes from. It could also be an id of a specific current member in a group. For example I would assume the encryption stuff to have something like that.

@waldi @realn2s Yes; if this is an actual hard size limit on the database field, it could be an index field rather than a size field.

But I doubt that it's anything like that, and think it's most likely that it's a soft limit, everything is stored in normal integer types which are *much* larger, and they picked 256 (and subsequently 512 and 1024) because they're nice round numbers!

I've picked powers of two all the time for this reason even though there was no underlying data type limit.

@confluency @realn2s Sorry, but they would not have chosen this limit, if it would not be the highest they can possible go without serious redesign.

If it would be a limit in their data store, they would have changed this limit.

So it must be somewhere else, aka in the client communication. And now you need to update all millions of millions of clients, keep it compatible and working. And if it is in the crypto, all user keys depend on it, so rekeying all users as well.

@waldi @realn2s @confluency

I assume it is not actually about the chat itself, but about the double ratchet group key management. It organizes keys in a binary tree, and adding or removing users involves rolling over a key on each level of the tree. 256 means the tree has 9 levels. So, the "oddly specific" number here is 9, and that in turn probably is "just one more than before".

@realn2s @confluency I think the point is, that every group has *slots* for 256 users, so IDs 0 to 255. There is no single integer `size`, which needs 9 bits to hold the value 256. Analog you don't need to represent an empty group, as this doesn't exist.
So 256 makes sense for User 0 to User 255 :)
@realn2s @confluency My guess, knowing nothing about WhatsApp, is that every chat has an "originator" user_id, so they added a byte for additional users, letting a group chat contain 1 + up to 255 users.

@max @confluency
I'm pretty sure the 255 had no technical meaning but it's rather an "insider" (nerd) joke.

And possible technical meaning would really worry me.

To state it more clearly:
Do not use a byte to represent a number
(If you don't have a real good reason for it (like hw), and you should really know what you are doing!!!)

@realn2s @confluency

I suppose that makes sense if you can be in a whatsapp group with no participants 🤔

@sibrosan @confluency
I was surprised. But it seems possible

(Steps to reproduce: creat a WhatsApp group with another member, remove them and exit the group yourself)