Hacker News new | ask | show | jobs
by patrick_grant 4946 days ago
I really don't like how this behaves for populating the array initially, and how it behaves for small inputs...

  $ seq 15 | dimsum  -n 10 
  14
  12
  3
  4
  5
  6
  7
  8
  9
  10
2 comments

Looks like a valid sample to me. Are you bothered by the ordering of the sample members? Then I'd continue the pipeline to include a call to shuf.
yup, the order is biased. definitely worth a couple of minutes to fix that