I've added a new function to remind to call the C RNG, to be reminded of things at a random date. I guess someone else asked about this in 2001?
Anyway, patch is here: https://github.com/nfultz/remind/compare/nfultz/randint.patch Please feel free to add it to the official release (or not, it's a little buggy). Here is how it works in practice: nfultz@neal-nuc:Remind$cat test.rem REM MSG '[randint(10)]' '[randint(10,20)]'% REM [randint(28)] MSG random day of month% REM SATISFY [randint(7) == $Tw] MSG random day of week.% nfultz@neal-nuc:Remind$src/remind -n test.rem 2020/03/30 '3' '19' 2020/04/20 random day of month 2020/04/11 random day of week. nfultz@neal-nuc:Remind$src/remind -n test.rem 2020/03/30 '4' '20' 2020/04/23 random day of month 2020/04/01 random day of week. I don't quite get why 4/11 would be chosen by SATISFY in the first run, wouldn't 4/4 be the next Saturday? Perhaps the expression is reevaluated and advancing the RNG, iterating past 4/4 and essentially doing rejection sampling with p=1/7 ? Could be a defect in my implementation of randint, or my understanding of SATISFY. Anyways, thanks for the very useful program. vr Neal
_______________________________________________ Remind-fans mailing list [email protected] https://dianne.skoll.ca/mailman/listinfo/remind-fans Remind is at https://dianne.skoll.ca/projects/remind/
