Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is that 0x1_0000 a typo? Shouldn't it be 0x1_000 or 0x10_000 instead?


Note that it's not my code, nor am I familiar with it. I just had it lying around on my disk to try out Alacritty.

Here's the line in question: https://github.com/jwilm/alacritty/blob/master/alacritty_ter...

I agree 0x1_000 or 0x10_000 would make more sense, but it doesn't look like the actual value used is hugely significant.


It makes sense to group hexadecimal numbers by two (nibbles).

In this case 0x1_0000 is the least-significant bit of the third byte.

If that's a bit flag encoded in a 32bit value, I also like 0x0001_0000 for clarity.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: