[HN Gopher] Five Kinds of Nondeterminism
       ___________________________________________________________________
        
       Five Kinds of Nondeterminism
        
       Author : BerislavLopac
       Score  : 11 points
       Date   : 2025-02-19 20:36 UTC (1 days ago)
        
 (HTM) web link (buttondown.com)
 (TXT) w3m dump (buttondown.com)
        
       | orthecreedence wrote:
       | Lately I've been working on a testing system for a DAG identity
       | system I'm working on. The system tries thousands of permutations
       | of DAG setups, all driven from a random seed. In other words,
       | it's entirely repeatable and deterministic each time. If
       | something breaks, I can pinpoint the exact run and re-run it with
       | the exact same parameters.
       | 
       | It took a long time to get there. One of the main things I had
       | root out, time after time, was the use of HashMap/HashSet (this
       | is in rust) which I converted to BTreeMap/BTreeSet because the
       | former are not deterministic when iterating over them, causing
       | all kinds of random permutations for a given seed. I knew this
       | going in, but kind of surprised myself how often I almost
       | absentmindedly reached for a non-deterministic data type when
       | determinism was important.
        
       ___________________________________________________________________
       (page generated 2025-02-20 23:00 UTC)