logoalt Hacker News

01092026last Friday at 8:40 PM2 repliesview on HN

"The 'bit-level magic' here is misleading. They're using integer representations and calling them bits. A true bit-level approach would encode positions as pure binary streams. For example, their promotion string '00000034' is 8 bytes (64 bits), not the claimed 9 bits. Has anyone implemented this with actual bitwise operations instead of integer packing?

TLDR: You stupi...lovely folks, need learn what a bit is. What is a byte, and why integers are NOT BITS.

And no one called this post out from years ago? Crazy.

Someone ask, and I will show you how to do it in 24 BYTES IN BINARY ENCODING FOR REAL - no fake "integers are bits". And can we use compression techniques? We can get this to 10-12 bytes maybe.

So it beats the fake "26 bytes" and my version is actually real binary bits.

Ask.


Replies

vntoklast Friday at 9:22 PM

Your mental model is wrong. Read the post again, slowly, and it will probably make more sense to you. Here are the relevant bits

> This gives us the string `00000034` to uniquely represent this specific set of promotions, without information loss.

> How many possible strings are there? Generating this by brute force, we end up with 495 distinct strings

> This can be stored in 9 bits for each side

Hint: 2^9 is 512 and 512 > 495

show 1 reply