[reactive] Temporal mechanics

Thomas Davie tom.davie at gmail.com
Fri Jul 31 04:26:06 EDT 2009


On 30 Jul 2009, at 22:40, Svein Ove Aas wrote:

> One thing I'm not entirely sure about is the interface between
> absolute and relative time. Probably, the best option is to have a
> specialized join function for absolute :. relative -> absolute; other
> requirements will likely surface over time.

Looks like an AdditiveGroup instance to me.
>
> This setup lends itself well to many common cases. When mapping one
> event occurence to an event consisting of multiple reactions spread
> over time, the reactions are naturally relative to the original
> occurence; using a sum function to join them, you won't have to care
> about exactly when that original happens.
>
> What do you think? Sounds reasonable?

Seems sensible to me -- you can add time intervals and get new time  
intervals.

> Lastly one ability that would take implementation effort all out of
> its proportion to its usefulness is the ability to subtract two
> absolute times, giving a relative time, and have that time provide
> partial information at any point before both absolute times are fully
> defined. If any of you would like that, and have a good reason, now is
> the time to speak up; doing it later would only increase the needed
> effort (though not beyond the bounds of Time.hs).

That would certainly be nice (and required by AdditiveGroup), but it  
does sound a little problematic... Suppose we set up a situation  
where  an interval i is constructed by subctrating two times a and  
b... We then want an event c at time b+i/2.  It's possible (probable  
even?) that the time of c will only be determined after a has passed  
(too late).  Is the semantics here that c occurs at the first time its  
occurrence time is known to be less than "now"?

Bob


More information about the Reactive mailing list