Learnt today that x86 has UD2, a deliberately invalid opcode for testing. It's a big instruction set.
miniblog.
Related Posts
Counter-intuitively, if you're writing a parser for a programming language, you need it to be a total function. As soon as you build IDE tooling, you need ASTs from invalid or incomplete input.
The parser should return (Ast, List<Error>) rather than Result<Ast, Error>.
I'm impressed by how many options I'm offered in Common Lisp (in this case sbcl on Sly) for a simple error like an invalid variable name!
TIL that C++03 considered a file without a trailing newline to be undefined behaviour! https://stackoverflow.com/a/72377
This was fixed in C++11, but the problem was that #include was a textual operation that could produce invalid syntax if no newline was present.
