Playing around, this classic programming test came to mind. So why
not. Here's "fizzbuzz" as done in remind:
$ (echo 'FSET doy() $U - date($Uy-1,12,31)'; echo 'MSG [iif(doy() % 15
== 0, "fizzbuzz", iif(doy() % 5 == 0, "buzz", iif(doy() % 3 == 0,
"fizz", doy())))]') | remind -c12 - 2020-1-1 | less
Or, if you prefer to put this in fizzbuzz.rem:
FSET doy() $U - date($Uy-1,12,31)
MSG [iif(doy() % 15 == 0, \
"fizzbuzz", \
iif(doy() % 5 == 0, \
"buzz", \
iif(doy() % 3 == 0, \
"fizz", \
doy() \
) \
) \
)]
and then
$ remind -c12 fizzbuzz.rem 2020-1-1 | less
to get a year worth of fizzbuzz.
I really should find a better hobby.
But doing dumb things like this is so fun! :-)
-tim
_______________________________________________
Remind-fans mailing list
[email protected]
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/