orlp
21 hours ago
> The most novel aspect of OoT bitsets is that the first 4 bits in the 16-bit coordinate IDs index which bit is set. For example, 0xA5 shows that the 5th bit is set in the 10th word of the array of 16-bit integers. This only works in the 16-bit representation! 32 bit words would need 5 bits to index the bit, which wouldn't map cleanly to a nibble for debugging.
There is nothing novel about this really. It's neat that it works with hexadecimal printing to directly read off the sub-limb index but honestly who cares about that.
Outside of that observation there's no advantage to 16-bit limbs and this is just a bog-standard bitset where the first k bits indicate the position within the 2^k bit limb, and the remaining bits give you the limb index.
jb55
21 hours ago
updated for the hacker news crowd
https://github.com/jb55/oot_bitset#:~:text=Hacker%20news%20f...
TimorousBestie
18 hours ago
For what it’s worth, I found it interesting. I like your verve.
lpribis
20 hours ago
Haha, good to take the classic HN condescension on the chin ;)
orlp
17 hours ago
My comment was worded a bit too harshly, sorry about that, I certainly wouldn't have worded that way in a personal message.
As I mentioned the hexadecimal printing coincidence is a neat fact, I was just excited when clicking the link to find a novel bitset idea. In my disappointment to find the standard bitset (albeit with 16-bit limbs) I reacted a bit too harshly. And as per https://xkcd.com/1053/, just because something isn't new to me doesn't mean it's not new to anyone.