<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Wow thank you for all these pointers ... I must take the time to look into these libraries. Stuff like this doesn't come up when you Google "Functional Reactive Programming" or at least doesn't rank very high.</div>
<div>&nbsp;</div>
<div>I'm not sure I understand the sodium approach (couldn't find switch in elerea). The aging/'trimming' approach in banana seems to rely on the events being switched into being known from the start, i.e. the point in time 'switch' starts executing. This way you can dynamically switch into a static set of events but not dynamically into a dynamic set of events.<br></div>
<div>&nbsp;</div>
<div>In any case, considering such concerns seem to be transcend individual libraries/frameworks, you wouldn't know of any mailing list/forum that is more suitable for this discussion, i.e. a general FRP forum not tied to any library or one purely focused on theory?<br></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>On Wed, Feb 6, 2013, at 07:22 PM, John Lato wrote:<br></div>
<blockquote class="QuoteMessage" type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>&nbsp;</div>
<div style="">This can be a serious issue, however most modern FRP implementations (by which I mean at least reactive-banana, elerea, and sodium) have solutions. &nbsp;I'm sure elm does as well, but I don't have experience with it.<br></div>
<div style="">&nbsp;</div>
<div style="">I'm aware of two general approaches. &nbsp;The first, used by elerea and sodium, enforces that the creation of signaling and switching constructs happen within a monad. &nbsp;In this case the switching primitive looks something like<br></div>
<div style="">&nbsp;</div>
<div style="">mSwitch :: Behavior (SGen a) -&gt; SGen (Behavior a)<br></div>
<div style="">&nbsp;</div>
<div style="">this function is responsible for ensuring that signals and behaviors are represented in the monad, and thus executed.<br></div>
<div style="">&nbsp;</div>
<div style="">The other approach was introduced in Grapefruit, and to my knowledge is only used in Grapefruit and reactive-banana. &nbsp;Instead of a signal generation monad, switchable constructs have an extra type parameter that's used to enforce aging. &nbsp;apfelmus has written a bit about it at&nbsp;<a href="http://apfelmus.nfshost.com/blog/2012/09/03-frp-dynamic-event-switching-0-7.html">http://apfelmus.nfshost.com/blog/2012/09/03-frp-dynamic-event-switching-0-7.html</a> . &nbsp;Conceptually it's very similar to how the "st" parameter is used in the ST monad if you're familiar with that.<br></div>
<div style="">&nbsp;</div>
<div style="">as to scaling, it is possible for a reactive network to scale to fairly large systems, but not all of them do. &nbsp;I've been meaning to blog about this soon, maybe over the next week or two.<br></div>
<div style="">&nbsp;</div>
<div style="">John L.<br></div>
</div>
</div>
</div>
</blockquote></body>
</html>