News for hackers. Stuff that matters.
Re:Magic Numbers by thayne on Wednesday April 24, 2024 @10:47PM (#40152785)
At least there was a technical reason, even if it no longer makes sense. The ATM[1] protocol has a packet size of 48 bytes. Why? Because the US wanted 64 and france wanted 32. So a compromise was made that pleased no one and the standard used the average of the two, which of course isn't a power of 2.

[1]: https://en.m.wikipedia.org/wiki/Asynchronous_Transfer_Mode

Re:Magic Numbers by cquintana92 on Thursday April 25, 2024 @12:21AM (#40153383)
48 bytes which doesn't include the header, which was decided to be 5 bytes because it was "around 10% of the body", making it... 53.
Re:Magic Numbers by TeMPOraL on Thursday April 25, 2024 @07:59AM (#40156384)
I'd loved to be in the room when those decisions were made. I can almost imagine some arbiter hearing the arguments from both sides, and then, to the horror of everyone, deciding that if they can't agree on a common value, they'll have to meet half-way.

OTOH, skimming the Wikipedia article, it seems to me that overhead in that system was proportional to message length, so perhaps length of 53 bytes was still meaningfully better than 64 bytes.

Re:Magic Numbers by masfuerte on Thursday April 25, 2024 @08:14AM (#40156548)
It's an old story. One side should have renounced their claim rather than live with the abomination, and then the arbiter could have chosen their proposal as the one true packet size. The arbiter's wisdom would have been celebrated for millennia.
Re:Magic Numbers by netmare on Thursday April 25, 2024 @03:38AM (#40154603)
That's like a programming language with 0.5-based array indexing.
Re:Magic Numbers by n4r9 on Thursday April 25, 2024 @03:52AM (#40154682)
It's the classic "off by half" index bug.
Re:Magic Numbers by BizarroLand on Friday April 26, 2024 @02:28PM (#40172584)
Doing the mental math is a lot harder, too. Any halfway decent computer nerd knows on some level that 2^10=1024, but 1/2^10=0.0009765625.

Doesn't quite lock into the memory banks so easily.

Re:Magic Numbers by brookst on Thursday April 25, 2024 @07:44AM (#40156247)
No fence post problems if you just put each post in the middle of each span!
Re:Magic Numbers by MawKKe on Friday April 26, 2024 @05:59AM (#40167532)