[<<][compsci][>>][..]

Sat Sep 25 11:25:37 CEST 2010

## void events

I'm building a reactive programming engine for a consulting project.
An interesting concept I keep running into is that of "void events".
Let's define an event as a <time,value> pair. Reactive programming
can then be seen as functions defined on events. My implementation is
strict (non-lazy) to allow integration of side effects for coupling
with the surrounding OO system.
This definition as <time,value> pairs is slightly more concrete
definition as Conal's "functions of time" definition[1][2]. The main
reason is that I don't see how to otherwise add strict side-effecting
code. One could see the <time,value> pairs as a piecewise constant
representation of continuous functions. I.e. this helps reasoning
about combinations of events with different time stamps: just think
"what would the continuous function do?".
Now, think of the qualitative difference of these two entities:
1. A push-button measurement. 1 = pressed, 0 = released
2. A stream of push events.
The second one is an abstraction of the first one, but it is radically
different as there is no longer a piecewise continuous function
associated.
The question is: is this thing "real" or an artifact of some modeling
confusing?
In essence, number 2 is a variant of the Dirac Impulse[3], a
generalized function[4] that allows the bridge between continuous
functions and discrete structures. A Dirac Impulse represents the
derivative of a step function, allowing for discrete state updates
as an integral of impulse.
In my system they seem to serve the same purpose: a void event
resembles a state change (a derivative) in the cases where it is not
necessary or possible to indicate "by howmuch" the state changes. It
thus seems to be an artifact of the side-effecting OO integration.
[1] http://conal.net/blog/posts/why-program-with-continuous-time/
[2] http://stackoverflow.com/questions/1028250/what-is-functional-reactive-programming/1030631#1030631
[3] http://en.wikipedia.org/wiki/Dirac_delta_function
[4] http://en.wikipedia.org/wiki/Generalized_function

[Reply][About]

[<<][compsci][>>][..]