I will test it on a couple of machines, desktops and laptops. I think the problem was my laptop going into power safe mode or something, since sometimes it runs smooth, sometimes it doesn&#39;t. This could indeed be a problem with GLFW&#39;s time attribute on windows (which uses the CPU tick frequency which gets trottled to safe energy), although I believe the Windows API should take care of this. I haven&#39;t seen this yet with my own frp experiments, which seem to run smooth all the time, but again I will do more testing.<div>
<br></div><div>I have been thinking about your approach, using mutable variables to hold a signal&#39;s sample. This is exactly what I did with on old C# prototype, and it worked out nicely. If you take a look what Yampa does: it hides signals and only exposes signal functions. But that means that the FRP engine itself could indeed use mutable variables for its signals, as long as during the evaluation of the circuit at time T no side effects should occur; the side effects should take place when the simulation is advanced to T+dT, which is done after the circuit is fully evaluated at time T. If you want higher order integration, you would need to keep a buffer of more samples, but it would still work. So I think you approach is a very good pragmatic one! I&#39;m only a bit worried about your automatic insertion of delays; this might break referential transparency at time T, since it depends on the order in which the nodes in the circuit are evaluated no? The latter could be problematic when doing evaluation in parallel on multiple cores I guess.</div>
<div>  </div><div><div class="gmail_quote">2009/4/14 Patai Gergely <span dir="ltr">&lt;<a href="mailto:patai_gergely@fastmail.fm">patai_gergely@fastmail.fm</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; Interesting. I&#39;m testing it on Window though. You&#39;re using Linux? Maybe<br>
&gt; the scheduling is different.<br>
</div>Now I tried it on Windows in VirtualBox, and it still looks quite smooth<br>
to me (except that hardware acceleration doesn&#39;t seem to work properly<br>
through virtualisation, but it&#39;s okay as long as I keep the window small<br>
enough). However, unlike the Linux version, it does max out the CPU, so<br>
the trick with threadDelay 0 doesn&#39;t work. Apparently, I&#39;ll have to find<br>
a real Windows box somewhere, because I couldn&#39;t reproduce the jerkiness<br>
you&#39;re talking about.<br>
<br>
Gergely<br>
<font color="#888888"><br>
--<br>
</font><div class="im"><a href="http://www.fastmail.fm" target="_blank">http://www.fastmail.fm</a> - The way an email service should be<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>