Generating Melodies with Markov Chains in Ruby | Hacker News Reader