Comment by blackqueeriroh

2 days ago

Lmao bro compilers aren’t deterministic either

could you expand on this a little? As far as I know it's a bug in rustc gcc and llvm if the outputs are not deterministic

  • I was having dinner with a friend yesterday who told me that lock free data structures aren’t lock free since they lock on the hardware level. He also had a thing to say about compilers in C++.

    He said something like: it’s crazy that you have the C++ standard but then also how a compiler implements that standard. And then it still matters how that compiler is implemented on a particular architecture! It’s always different and the annoying thing is that this is permutative. This is why we use X86-64 Intel CPUs at <name company> and <name compiler> (I forgot the name). That simplifies it but you still need to know 3 things. He also was frustrated how lock free data structures and memory reordering are 2 completely different concepts in practice but not in C++ but I didn’t fully follow him. I wrote 100 hours in C++ so I was already happy I understood everything else.

    But based on his rant I can sort of see why compilers feel not deterministic.

  • Don't bother. They're going to claim that cosmic radiation can alter bits so compiler determinism is comparable to LLM. I'd rather AI evangelists claim determinism is not required to build decent software than perform the mental gymnastics required to make these comments.