Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "hey siri, create alarms every 5 minutes starting at 6am tomorrow"

“OK, I’ve created an infinite number of alarms, every five minutes, starting at 6 AM tomorrow!”

(As a native English speaker, I'm not sure what specific outcome you want to happen from that request. That's the one that makes the most sense.)



As a native English speaker, that seems a profoundly odd request but that is what you asked for.

And you now have me wondering how open-ended calendar requests are actually implemented given that they can't literally have entries out to infinity. (I assume they go out some finite period and some background process periodically re-populates future entries.)


A recurrence rule is added to a start event, then an occurrence cache is either generated on the fly for periods of interest, or, yes, a rolling cache a year or two in the future is maintained and updated daily.


Perhaps trivial, but actually seems like an interesting question given you have to potentially tradeoff RPCs for routine queries (and the number of database records) vs. being wrong for the random "Am I free on this day three years from now?" query. Of course, the answer may be that, in general, the differences don't really matter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: