Version 0 of Random worklist generator

Updated 2008-09-17 12:02:57 by theover

TV

Do make sure certain chores get no prevalence over other chores, association-wise, I made a little worklist randomizer.

Lets say I have a number of chores in a list:

 set w {
  {washing up}
  {cut the grass}
  {shave (very important!)}
  {watch CNN}
  {finish some Tcl programs}
  {work in computer field}
  {buy tickets in a lottery}
  {go voting (even more important!)}
  {etc (whatever else comes up)}
 }

Now we want a random iten from the list, or a random permutation of the list, with no priorities:

 lindex $w [expr int(9*rand())]

Of course we could do the same with the rest of the list.


enter categories here