> 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.
I hate compilers
171–180 of 182 posts
Re: I hate compilers
#172Earlier 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 writing comments on creamsicle reddit. I disagree with a lot of the decisions around the design of Anubis... but resisting the current drive of the industry to ruin as much of the good faith resource donations from others is an admirable objective. The point isn't to increase the amount of work required to the point of exhaustion, it's to…
"The road to hell is paved with good intentions" is a phrase for a reason.
Besides, if the authors intentions were pure it wouldn't infest the sites using it with the authors sexual fetish by default.
> The point isn't to increase the amount of work required to the point of exhaustion, it's to require that scripts be able to offer the exact same feature set that browsers offer.
What browsers? Websites intentionally breaking anything non-mainstream is precisely the problem.
> But it doesn't come close to the frustration of waiting 10s for an SPA to load all of the routes it'll never use before the first redraw.
Many sites only need anti-bot malware because of inefficient design like that.
Re: I hate compilers
#173Earlier 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.
If you would go with that analogy this would be a case of the mugging victim stabbing random bystanders.
> 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.
Those aren't the only options and anyone who claims there is no other choice is either dishonest or incompetent.
Re: I hate compilers
#174Earlier quoted context omitted.
They have 2 options: - Put their ~1kb of text on a ~0kb website, make it cacheable, make hosting it free, make downloading and rendering it instantenous, make it accessible and let users read it comfortably - Set up a CAPTCHA and make the website inaccessible, spy on the users or give their history to trillion dollar ad companies, make them wait 10 secs to proceed. Guess which one HN front-page bloggers choose? I oft…
Anubis doesn't rely on spying on the user.
Re: I hate compilers
#175Earlier quoted context omitted.
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
#176Earlier quoted context omitted.
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?
I would assume that compilers these days are likely to have internal parallelism too.
Re: I hate compilers
#177> Clang relies on address layout for ordering things
Every such instance is a bug. I have fixed many issues in 2023. There is even an upstream build bot https://discourse.llvm.org/t/reverse-iteration-bots/72224
Re: I hate compilers
#178Earlier quoted context omitted.
If you feel like increasing your power as per your post, this is a somewhat decent first LLVM issue, take a look at WebAssemblyCFGStackify.cpp :) llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll and friends are existing tests that you can kinda mangle if you want to get a good reproducer. Also take a look at https://discourse.llvm.org/t/reverse-iteration-bots/72224 Otherwise, happy to put my reproducer/patch on the b…
I'm gonna have to file the bug without a minimal reproduction case. The issue seems to be those try_table blocks getting nondeterministically reordered at link time (is it using machine pointers for iteration order?). Sadly I'm observing this with a local checkout of binaryen, so it may take a while for you to find the minimal reproduction case.
Re: I hate compilers
#179The compiler builders may take pity on you, but really there's no bug here, just unwarranted expectations.
Re: I hate compilers
#180Earlier quoted context omitted.
I think the intentional part is that you want to print the date and time something's been compiled, and the accidental part is that you suddenly made your build non-reproducible. But usually the realization follows the initial intent by several weeks, if not months! Your comment shines as the embodiment of hindsight is 20/20.
> the accidental part is that you suddenly made your build non-reproducible But that's exactly what I don't get. How can that be considered "accidental"? How can any thinking person not realize that putting the build time into the compiled image will make every build different because, you know, different builds happen at different times? Has software engineering really been dumbed down so much that this is not immed…