1. 14
  1.  

  2. 9

    If you’re a level 500 elite hacker like I am, you will note that the cryptographic quality of numbers from /dev/urandom is not the same as numbers from /dev/random.

    I’m so done with this misconception. Not that it matters at all for generating random music.

    1. 4

      Pretty neat! Though it annoyingly highlights that half the time in a pipeline, you’re massaging text instead of passing data.

      Also on that page:

      .blink {
          -webkit-animation: blink 1s step-end infinite;
          -moz-animation: blink 1s step-end infinite
        -o-animation: blink 1s step-end infinite;
          animation: blink 1s step-end infinite;
      }
      
      1. 3

        <blink> best tag.

      2. 3

        Mac os version - after installing sox

        cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1382*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | sox -t raw -r 64k -c 1 -e unsigned -b 8 - -d
        
        1. 1

          I was expecting it to literally be in bash, not a series of commands piped together.

          1. 2

            How can it be only bash? Everything’s an external binary, even true; it’s how bash works.

            1. 1

              Dunno, that’s why I clicked it at first, thought maybe it was some sweet bashism.