Live data from Hacker News

I hate compilers

xeiaso.net

161–170 of 182 posts

Re: I hate compilers

#162
post #115

> There are a shocking number of ways to accidentally create nondeterministic output when doing C/C++ development. One of the easiest is to use the builtin __DATE__ and __TIME__ macros to stamp a build with the time the compiler was executed at: Am I missing something here? Yes, if you use a feature that intentionally inserts the build time and date into the code, the every build is going to be different. That's the…

"One of the easiest" It's meant to be a trivial counterexample. Like saying "-1" to the claim "there's no number smaller than 0" to someone who's not familiar with math, the author is saying "build-dependent macros" to the claim "compilers are deterministic" to someone who might not be familiar with compilers.

A trivial counterexample to what? The antecedent of "one of the easiest" was "ways to accidentally create nondeterministic output." One even the most charitable reading I can muster that still seems to me to presume some pretty abject stupidity.

Re: I hate compilers

#163

Earlier quoted context omitted.

No it's not dumb, but I don't get how it manages to be so light still. Like I visit an Anubis-guarded site and barely have to wait. Scrapers really see that little CPU usage or wall time and back off? Or maybe that's just cause I'm not visiting sites that are under attack.

It chooses the challenge weight based on signals. If your phone looks like a phone from a residential IP you get a simple challenge. If you then spam requests you might get another, harder, hallenge appear. If you have a data center IP and look like bot traffic you get a hard challenge out the gate. AFAIU after looking at their docs several months ago.

Ah, knowing the type of IP is really advantageous by itself

Re: I hate compilers

#165

[flagged]

Could you please stop posting unsubstantive comments and flamebait? You've unfortunately been doing it repeatedly. It's not what this site is for, and destroys what it is for.

If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.

Re: I hate compilers

#166
post #162

Earlier quoted context omitted.

"One of the easiest" It's meant to be a trivial counterexample. Like saying "-1" to the claim "there's no number smaller than 0" to someone who's not familiar with math, the author is saying "build-dependent macros" to the claim "compilers are deterministic" to someone who might not be familiar with compilers.

A trivial counterexample to what? The antecedent of "one of the easiest" was "ways to accidentally create nondeterministic output." One even the most charitable reading I can muster that still seems to me to presume some pretty abject stupidity.

A trivial counter example to the intuition one might have that compilers likely produce deterministic output. It’s directly responsive to the exchange between Aoi and Numa above, wherein Aoi expresses exactly that intuition. Of course, those are characters playing out a question less familiar readers might ask. Presumably the intent is to make this content accessible to a wider audience, using an obvious example to introduce the concept without requiring much background knowledge.

Re: I hate compilers

#167

Earlier quoted context omitted.

I don’t get how people believe there’s a PoW function that both: 1. Allows access in reasonable time/battery use to me on my phone 2. Poses any meaningful challenge to the most compute-resourced organizations on the planet I wonder how many cumulative hours of human life have been wasted waiting on Anubis.

> I wonder how many cumulative hours of human life have been wasted waiting on Anubis. "How dare that mugging victim fight back". The choice is not between Anubis and no Anubis, the choice is between Anubis and my website going offline because I can't afford the $400/month that AI scrapers would cost me (yes, I checked, and yes, that's the real figure) if Anubis wasn't in front.

Smarter people have put unique captchas (in form of domain-specific questions) on their websites for long time.

Re: I hate compilers

#168

Earlier quoted context omitted.

Unless you use a flake or the project has a flake.nix

There is nothing in Nix that magically makes concurrent builds with completion-order-dependent outputs come out deterministic.

I never tackled the reproducible builds topic but this is also something I had in mind while having a thought about it. Building object files for translation units, apart from macros introducing variance, should be reproducible no matter how high the number of compile jobs is running. So, isn't this largely a linking stage problem?

Re: I hate compilers

#169
post #115

> There are a shocking number of ways to accidentally create nondeterministic output when doing C/C++ development. One of the easiest is to use the builtin __DATE__ and __TIME__ macros to stamp a build with the time the compiler was executed at: Am I missing something here? Yes, if you use a feature that intentionally inserts the build time and date into the code, the every build is going to be different. That's the…

Usually, the person making the decision to add this is not in the same company or even the same time–space continuum as the victim of it.

In a parallel non–Euclidean dimension, perpetrators go the other way and have their victims build with -j1 reproducible builds.

Re: I hate compilers

#170
I hate compilers too, just because in theory they are the simplest type of program: transform one file into another. How is not be reproducible? You need to make an effort! Yet the author of this post has trouble getting a reproducible build. To me it sums up the utter insanity our industry is engaged in.
Post reply on HN