<div dir="ltr">I think it entirely depends on how you plan to inject the new values into a running program. If you are doing iterations, then it might make sense to do an IOref that contains the entire space of values that may change and then atomically update the whole space when a config update happens. Or maybe you can put each update in a queue inside of an IORef and then do an atomic modify, or I see there is a package providing lockfree queues in hackage. Again, I think it more depends on how you are going about running your program, and where it makes sense to inject new values.<div><br></div><div>Charlie</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 9:48 PM, Anatoly Yakovenko <span dir="ltr"><<a href="mailto:aeyakovenko@gmail.com" target="_blank">aeyakovenko@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Cool, thanks.  <br>But the ChangeHandler would still be modifying some mutable state that some other thread is referencing while it's running.  That would still be via an IORef?<br>I guess this is a similar problem as having a play/pause/skip controls to a video player.  Is the interface between the "running" thread and the user triggered events an IORef? Or is there some other way to wrap that.<br>Thanks,<br>Anatoly<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Thu, May 28, 2015 at 6:32 PM Charlie Durham <<a href="mailto:cpdurham@gmail.com" target="_blank">cpdurham@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Check out the configurator package:<div><a href="https://hackage.haskell.org/package/configurator" target="_blank">https://hackage.haskell.org/package/configurator</a><br></div><div><br></div><div>It has auto reloading of config files through the aptly named autoReload function. Pretty cool stuff. </div></div><div dir="ltr"><div><br></div><div>Charlie</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 9:21 PM, Anatoly Yakovenko <span dir="ltr"><<a href="mailto:aeyakovenko@gmail.com" target="_blank">aeyakovenko@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">How would the program get updated values?  via an IORef?  This thing is running until the user decides the output looks good<div><br></div><div>Anatoly<br><br><div class="gmail_quote"><div dir="ltr">On Thu, May 28, 2015 at 12:16 PM Carlos López-Camey <<a href="mailto:c.lopez@kmels.net" target="_blank">c.lopez@kmels.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Cloud Haskell + Event streaming via some Protocol (like json on websockets) ?<div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">2015-05-25 15:14 GMT-06:00 Anatoly Yakovenko <span dir="ltr"><<a href="mailto:aeyakovenko@gmail.com" target="_blank">aeyakovenko@gmail.com</a>></span>:<br></div></div><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am playing around with some deep learning algorithms and I need a way to periodically read the intermediate result and change some of the system variables.<div><br></div><div>Any ideas on how to best approach this problem?  I was thinking of something basic, like having the program periodically read and write from some files.</div><div><br></div><div>Thanks,</div><div>Anatoly</div></div>
<br></blockquote></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>