My colleague Thomas Davie was playing with your Tetris game, and it seemed that it contained a space leak; it was consuming more memory, slowly.<div><div><br></div><div>Could it be caused by the top level&nbsp;</div><div><br></div>
<div><span class="Apple-style-span" style="font-size: large;"><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">testTicks :: Event ()&nbsp;</span></span><div><span class="Apple-style-span" style="font-size: large;"><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">testTicks = levelToTicks 1</span></span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;; font-size: 16px;"><br></span></div><div>I&#39;m not sure how Events are implemented in Reactive, but in a classical FRP setting the &quot;heads&quot; of this top level variable would never get garbage collected.<br>
</div><div><div><br></div></div><div><div><div class="gmail_quote">2008/11/17 Creighton Hogg <span dir="ltr">&lt;<a href="mailto:wchogg@gmail.com">wchogg@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey Reactive,<br>Since I have no hosting space I&#39;m actually going to include the implementation as an attachment all in one file.&nbsp; It&#39;s not very long anyway, so it should be alright.<br><br>A few caveats:<br><br>This code is still _really_ ugly, but it does work as far as I&#39;ve tested<br>


There is no game over, you need to quit manually<br>There is no score or level adjustment yet.&nbsp; I need to add that when I have more time, i.e. after this week<br><br>That being said, my first real reactive program was surprisingly simple once I got comfortable with the semantics.&nbsp; The actual reactive code isn&#39;t that complicated, but it did take a pretty big shift in thinking from writing explicit game loops.<br>

<br>I&#39;ve included a good bit of comments so it hopefully it isn&#39;t too hard to follow, but if there are any questions about why I did something a particular way (the answer may be &#39;I&#39;m dumb&#39;) please e-mail me or find me on #haskell.<br>


<br>_______________________________________________<br>
Reactive mailing list<br>
<a href="mailto:Reactive@haskell.org">Reactive@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/reactive" target="_blank">http://www.haskell.org/mailman/listinfo/reactive</a><br>
<br></blockquote></div><br></div></div></div></div>