logoalt Hacker News

9rxtoday at 12:43 AM1 replyview on HN

> no one makes their compilers deterministic

Go (gc) was designed for reproducible builds by default, so clearly that's not true, but you are right that it isn't the norm.

Even the most widely recognized and used compilers, like gcc, clang, even rustc, are non-deterministic by default. Only if you work hard and control all the variables (e.g. -frandom-seed) can you make these compilers deterministic.

It's fascinating that anyone on HN thinks that compilers converge on always being deterministic or always being non-deterministic. I thought we were supposed to know things about computers around here?


Replies

troupotoday at 7:56 AM

> no one makes their compilers deterministic

I was typing too fast. "No one makes their compilers nondeterministic.

> Even the most widely recognized and used compilers, like gcc, clang, even rustc, are non-deterministic by default.

Wat?

In which world are these compilers producing non-deterministic output if you run them again and again?

> It's fascinating that anyone on HN thinks that compilers converge on always being deterministic

It's called reality that is also very trivially verified.

> I thought we were supposed to know things about computers around here?

That's what I thought, too.

show 1 reply