title: How can I generate unique random numbers in quick succession?
body: <p>I have a function that is called three times in quick succession, and it needs to generate a pseudorandom integer between 1 and 6 on each pass. However I can't manage to get enough entropy out of the function.</p>
  
  <p>I've tried seeding math.randomseed() with all of the following, but there's never enough variation to affect the outcome.</p>
  
  <pre><code>os.time()
  tonumber(tostring(os.time()):reverse():sub(1,6))
  socket.gettime() * 1000
  </code></pre>
  
  <p>I've also tried <a href="http://snippets.luacode.org/snippets/Random_number_generator_for_calculations_147" rel="nofollow">this snippet</a>, but every time my application runs, it generates the same pattern of numbers in the same order. I need different(ish) numbers every time my application runs.</p>
  
  <p>Any suggestions?</p>