WalletScrutiny on Nostr: ...
Most people don't dig that deeply but when they do, they have this question. Computers are 1s and 0s. They are digital. How can they be non-deterministic??
Software development mostly revolves around performance both in the end product and the development process. Only very few developers even spend a thought on reproducibility. So if they compile something and it compiles 5 seconds faster, they can test the feature they were working on 5 seconds quicker. These two reasons result in stuff being non-reproducible as:
Files are processed in the order they come and that order depends on many factors. For example some file systems sort by date and others by file name.
Compilers can optimize the result, so compiling something with one version of the compiler will often give a different result than when compiled with another version.
The compiler might process multiple files in parallel and pack them into the result as they finish compiling.
Other sources of problems are timestamps or file paths that end up in the result.
Some tools on purpose use randomnes to generate IDs that are unique to every build.
Of the above issues, all result in non-reproducibility by our standards. While some lead us to comment on the build looking benign as the diff is only some random number appearing twice, others might also be benign but result in differences far too big to quickly judge with the tools we are using.
The more developers care about reproducibility over only performance, the better it will get but there are some widely used tools that consistently cause issues and maybe should just be avoided in wallets.
Published at
2024-04-19 15:03:19Event JSON
{
"id": "f86f830b3a859100b5b424a9f4871d0dfd9b6537bae15caacf76e10d1d98e2d9",
"pubkey": "916cb5ff07d3b51cef7f6b6b7f5479b1001b401c0e82558ee1a22504c7d507c9",
"created_at": 1713538999,
"kind": 1,
"tags": [],
"content": "https://image.nostr.build/a9f29836a1d10f7a9830add2c3256066c0e6aa21db09e2b881d848c009e3f3e7.png\n\nMost people don't dig that deeply but when they do, they have this question. Computers are 1s and 0s. They are digital. How can they be non-deterministic??\n\nSoftware development mostly revolves around performance both in the end product and the development process. Only very few developers even spend a thought on reproducibility. So if they compile something and it compiles 5 seconds faster, they can test the feature they were working on 5 seconds quicker. These two reasons result in stuff being non-reproducible as:\n\nFiles are processed in the order they come and that order depends on many factors. For example some file systems sort by date and others by file name.\n\nCompilers can optimize the result, so compiling something with one version of the compiler will often give a different result than when compiled with another version.\n\nThe compiler might process multiple files in parallel and pack them into the result as they finish compiling.\n\nOther sources of problems are timestamps or file paths that end up in the result.\n\nSome tools on purpose use randomnes to generate IDs that are unique to every build.\n\nOf the above issues, all result in non-reproducibility by our standards. While some lead us to comment on the build looking benign as the diff is only some random number appearing twice, others might also be benign but result in differences far too big to quickly judge with the tools we are using.\n\nThe more developers care about reproducibility over only performance, the better it will get but there are some widely used tools that consistently cause issues and maybe should just be avoided in wallets.",
"sig": "67770c8f441bc90ec29160fc5f6869df852041e3417dd403aee167cde9e7684f3bd6396becb073362a963df9caa0a4b442e4217b6ae7643fde1672afcae20eb7"
}