A kilobyte is 1024B, except when it's 1000B. A word is 32-bits on a 32-bit arch, except x86. I thought programmers eschewed ambiguity!
miniblog.
Related Posts
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position.
Parsing shell scripts is hard. Here's a fun ambiguity:
We think of assemblers as being a simple mapping of mnemonics to opcodes, but there is ambiguity sometimes: