Karsten Johansson on Nostr: npub19y8xk…vwxgj npub1wcnj9…xs6w5 The test I know to find out is a nice visual ...
npub19y8xknr5twkrg2aeu6dyt9rhk5eg6punm4kl4q07pp0av8aa47esmvwxgj (npub19y8…wxgj) npub1wcnj98km846h0gnpsprf4tlnchzujh69mccnsmpc084qlmde8l9qkxs6w5 (npub1wcn…s6w5) The test I know to find out is a nice visual one, and super easy to program in #CommonLisp.
Generate a list of 3 random numbers.
Plot them as X Y and Z on a 3D graph.
Do a lot of them in consecutive lists of 3 prn.
For bonus points, increasingly colourize collisions through a rainbow/prism. If your consistent fog isn't monochrome, it isn't random enough. If you see lines and a lot of colours, it totally sucks. If you see spots that are higher in colour value, it sucks sucks sucks and also sucks, too.
If the 3D graph doesn't look like a regular mist, (even a regular coloured mist if you run too many loops for them to be single anymore) it isn't random enough.
My opinion is that this is a better way to demonstrate someone is a good coder - coming up with easy solutions like this to test "randomness."
#Lisp #randomnumber
Generate a list of 3 random numbers.
Plot them as X Y and Z on a 3D graph.
Do a lot of them in consecutive lists of 3 prn.
For bonus points, increasingly colourize collisions through a rainbow/prism. If your consistent fog isn't monochrome, it isn't random enough. If you see lines and a lot of colours, it totally sucks. If you see spots that are higher in colour value, it sucks sucks sucks and also sucks, too.
If the 3D graph doesn't look like a regular mist, (even a regular coloured mist if you run too many loops for them to be single anymore) it isn't random enough.
My opinion is that this is a better way to demonstrate someone is a good coder - coming up with easy solutions like this to test "randomness."
#Lisp #randomnumber