6
u/AaTube Mar 23 '24
Note that this is the wrong subreddit
1
16
u/wind_dude Mar 23 '24
Whatās next 512 or will they jump to 1024 next?
7
u/Sploffo Mar 23 '24
Probably 65535 as using 5 or 6 bits to represent a number is pretty unusual (and sounds like a pain in the ass with very few to no upsides)
16
u/Theolaa Mar 23 '24
Did anyone consider that they did that tagline on purpose to drive this kind of engagement?
3
1
0
u/AutoModerator Mar 23 '24
This post was automatically removed due to receiving 5 or more reports. Please contact the moderation team if you believe this action was in error.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-13
Mar 23 '24
256 is a wrong "specific" number tho. 0-255 is the ubyte limit. We all write 256 because its a number of variants byte can have, which is wrong to have as a limit of something.
23
Mar 23 '24
No, if you have the 0th person be in the group, you should be able to have 0-255 people making the total number 256.
3
-32
u/mistrzegiptu Mar 23 '24
Actually it's kinda weird since 8 bit variable has range from 0 to 255
50
u/ShadauxCat Mar 23 '24
Which is 256 total values.
-26
u/mistrzegiptu Mar 23 '24
Sure, if you treat 0 as 1, but what about empty group then? Also it could lead to some overflows
6
u/PrinceEntree8 Mar 23 '24
Since a the creator doesnāt count I suppose they have 256 members actually.
Once there was the counter and if you are the creator and admin of a group without anyone it showed āmembers 0/255ā.
I think that a group with 0 members (including no creator) is set to ānullā indicating that the group has been closed since no one would be able to join anymore.
1
u/mistrzegiptu Mar 23 '24
That makes more sense, but 256 members + admin overflows 8 bit unsigned variable, so I still think there is no point setting limit to 256
17
u/x1rom Mar 23 '24
Are empty groups even possible?
1
u/mistrzegiptu Mar 23 '24
If everyone leaves group chat I think it's still stored in your history, so technically it's possible
4
u/All_Up_Ons Mar 23 '24
It's 256 total values regardless. 00000000 through 11111111. It doesn't matter how you think about it. An 8-bit integer has 256 possible values.
1
u/ShadauxCat Mar 23 '24
Who says the number is being used as a counter? It could be indexes into an array. It could be IDs for the users within the group. A flat "number of users in chat" is not architecturally that useful.
0
u/scorpi1998 Mar 23 '24
I don't see why this is getting disliked. A 1-bit number also has two possible values, but can only track up to 1 person.
5
u/Trade_econ_ho Mar 23 '24
How do you have a group chat consisting of 0 people
1
u/Sereczeq Mar 23 '24
Going with this logic, you also cannot have a group of:
1 person, since that's chat with yourself not a group
2 people, since that's just normal chat
So actually with this logic, the group would start at 3 ppl, so value 0 would be 3 ppl and value 255 would be 258 ppl.
Doesn't make sense.
You should never have 0 mean anything else than 0
2
u/Trade_econ_ho Mar 23 '24
A chat with yourself is a group of size 1.
1
u/Sereczeq Mar 24 '24
No it's not. Groups have plenty of features that normal chats don't have and vice versa. Group is a completely separate functionality to a chat
-1
u/scorpi1998 Mar 23 '24
Would you really write software relying on the number of people in a group to never ever be 0?
3
u/Trade_econ_ho Mar 23 '24
Yes. If the number of people is 0 then the chat doesnāt exist
2
u/scorpi1998 Mar 23 '24
Yes? Can you ensure me that Whatsapp deletes a group as soon as there are no members left? Do you work there?
1
2
u/HyScript7 Mar 23 '24 edited Mar 23 '24
Yes, because if there is no one in a group, no one can add anyone, cause no one is in the group, so yes, I am pretty confident having a group of size 0 is impossible, and if it's possible, utterly useless, cause then we can just delete it to save space. I mean they're basically inaccessible messages at that point.
Edit: Also storing group chat members in an array of size 256 or as an integer is very stupid, so the limit was probably chosen at random by someone who likes numbers that are a power of 2 or maybe it's some limitation in their tech stack or something. Any sensible person would use an N:N relation in a relational table database to describe memberships of group chats, which by default does not enforce any limits. Maybe the query to retrieve how many people are in a group chat is stored in an 8 bit unsigned number, and they wanted to avoid either wasting some of those bits or allocating more than 8 bits for the member count? I'm probably overthinking now, so I'll hope someone else figures that out.
5
u/FunnyForWrongReason Mar 23 '24
Arrays start at index zero. The size limit is basically a limit on the size of a char array. Index 0-255 or 256 total value of 256 total characters.
-12
0
47
Mar 23 '24
[removed] ā view removed comment
19
u/joshuakb2 Mar 23 '24
They already do! "Any sufficiently advanced technology is indistinguishable from magic"
6
u/All_Up_Ons Mar 23 '24
They already do in a lot of cases. Anyone younger than a zoomer was born with an iphone in their hands.
296
u/CleverDad Mar 23 '24 edited Mar 23 '24
Two immediate thoughts on this:
If you don't recognize the significance of 28 in a software context you have totally outed youself as clueless (OP's point), but also
It's pretty weird to let any aspect of modern software be limited by the range of an unsigned byte. I mean, who even uses those anymore?