News for hackers. Stuff that matters.
Re:2048 with only 64 bits of state by bvanderveen on Sunday June 22, 2025 @09:05PM (#44351619)
Like others I found the concise implementation to be impressive! I have noticed a bug though. Using the "drive into the corner" strategy (I keep the high tile in the bottom left) sometimes the top left tile randomly gets a smaller value (e.g., goes from 16 -> 4) when I slide to the left.
Re:2048 with only 64 bits of state by chadrs on Monday June 23, 2025 @12:43AM (#44352510)
Yeah, the first few times I thought maybe I was just imagining it; but I went from STATE=7280398215952, tried to merge my 64s into the left corner and instead ended up in STATE=7280398025476; my 64s have become 4s.

Can't reproduce it exactly as it happened, but if I run `STATE=7280398215952 bash 2048.bash` and press a 8 times, the 128 always becomes a 2.

Re:2048 with only 64 bits of state by shawabawa3 on Monday June 23, 2025 @06:09AM (#44354065)
Doesn't happen for me, i wonder if it's only on certain architectures or certain versions of bash or something
Re:2048 with only 64 bits of state by TMWNN on Tuesday June 24, 2025 @03:44AM (#44363778)
I saw it happen on bash 3.2.25.
Re:2048 with only 64 bits of state by izabera on Monday June 23, 2025 @09:38AM (#44355701)
thanks, i fixed it. it was only happening on bash 3.2 and i don't use a mac so i didn't see it. https://github.com/izabera/bitwise-challenge-2048/commit/73f...