this post was submitted on 07 Jul 2025
1413 points (99.1% liked)

Microblog Memes

8446 readers
2531 users here now

A place to share screenshots of Microblog posts, whether from Mastodon, tumblr, ~~Twitter~~ X, KBin, Threads or elsewhere.

Created as an evolution of White People Twitter and other tweet-capture subreddits.

Rules:

  1. Please put at least one word relevant to the post in the post title.
  2. Be nice.
  3. No advertising, brand promotion or guerilla marketing.
  4. Posters are encouraged to link to the toot or tweet etc in the description of posts.

Related communities:

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Zagorath@aussie.zone 14 points 1 day ago (4 children)

Except that they're almost certainly just using int, which is almost certainly at least 32 bits.

256 is chosen because the people writing the code are programmers. And just like regular people like multiples of 10, programmers like powers of 2. They feel like nice round numbers.

[–] verstra@programming.dev 46 points 1 day ago (2 children)

Well, no. They are not certainly using int, they might be using a more efficient data type.

This might be for legacy reasons or it might be intentional because it might actually matter a lot. If I make up an example, chat_participant_id is definitely stored with each message and probably also in some index, so you can search the messages. Multiply this over all chats on WhatsApp, even the ones with only two people in, and the difference between u8 and u16 might matter a lot.

But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.

[–] MyBrainHurts@lemmy.ca 39 points 1 day ago (2 children)

But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.

Shots fired.

[–] jaybone@lemmy.zip 4 points 1 day ago

All these tough guys think you can’t bit shift in Java, never worked on a project with more than two people. Many such cases.

[–] ByteJunk@lemmy.world 0 points 1 day ago

Fair point, but still better than wasting a nuclear power plant worth of electricity to solve math homework with an LLM

[–] Lodespawn@aussie.zone 24 points 1 day ago

It'll have to do with packet headers, 8 bits is a lot for an instant message packet header.

[–] ViatorOmnium@piefed.social 10 points 1 day ago

For high volume wire formats using uint8 instead of uint32 can make a huge difference when considering the big picture. Not everyone is working on bootcamp level software.

[–] jaybone@lemmy.zip 5 points 1 day ago

It’s not that they “like it”. It’s ultimately a hardware limitation. Of course we can have 64 bit integers, or however many bits. It’s an appealing optimization.