News for hackers. Stuff that matters.
Re:What Makes the Zig Programming Language Unique? by tialaramex on Wednesday October 05, 2022 @11:59PM (#33104234)
> the exact same code could operate on the ~28kb of state needed for 64x64.

64x64 seems to need 64 bits for values, ie 8 bytes before we consider the known case, but there are 4096 cells. So that's surely 32kB of state immediately ?

It seems to me that if we don't care to distinguish whether we "know" a value for which there is only one possibility, we can save encoding this, so the 9x9 board only needs 9 bits per cell, the 64x64 board only needs 64-bits.

In this case we can answer "known?" as is_power_of_two() and we can find the known value using e.g. trailing_zeros() which is cute.

Re:What Makes the Zig Programming Language Unique? by alpaca128 on Thursday October 06, 2022 @03:36AM (#33105543)
I might be wrong but I think you do need to know which values were predetermined so the algorithm won't touch those cells while backtracking.