<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">kqueue is the "low level" interface, but requires that you handle all file system events as they happen, and fast. There is a higher level interface called fsevents (with accompanying daemon fseventsd) which allows you a more calm way to read the file system events.<div><br></div><div><a href="http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html">http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html</a></div><div><br></div><div>I think launchd just happens to have an integration to kqueue or fseventsd, I'm not sure launching a program every time a file changes would be the best thing :-)</div><div><br></div><div>-Ross</div><div><br><div><br><div><div>On Dec 4, 2009, at 11:08 AM, David Leimbach wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">d<br><br><div class="gmail_quote">On Thu, Dec 3, 2009 at 7:55 PM, Gregory Collins <span dir="ltr">&lt;<a href="mailto:greg@gregorycollins.net">greg@gregorycollins.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">Conal Elliott &lt;<a href="mailto:conal@conal.net">conal@conal.net</a>&gt; writes:<br>
<br>
&gt; I'd like to make some FRPish toys that keep files updated to have<br>
&gt; functional relationships with other files.&nbsp; hinotify looks like just<br>
&gt; the sort of underlying magic I could use for efficient implementation<br>
&gt; on linux.&nbsp; Is there any support for mac os x?&nbsp; Could support be either<br>
&gt; added to hinotify or maybe inotify and a mac-friendly library be<br>
&gt; abstracted into a common Haskell interface?&nbsp; I'm fine with an<br>
&gt; imperative interface, since I can abstract into a functional library,<br>
&gt; which I guess would be a sort of persistent simplified FRP.<br>
<br>
</div></div>On Mac &amp; BSD you have to use kqueue, and on Windows it's<br>
ReadDirectoryChangesW. A platform-agnostic Haskell library for detecting<br>
filesystem change notifications is something that I would really<br>
appreciate!<br></blockquote><div><br></div><div>launchd does everything on mac os x, like literally everything. &nbsp;My mother said if I can't say something good about someone or something then don't say anything at all, and in this case, I'm taking her advice on what I think about launchd, however if you click the link below you might get an idea of how that works on Mac OS X.</div>
<div><font class="Apple-style-span" face="arial, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New'"><br></font></div><div><span class="Apple-style-span" style="font-family: arial, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New'; "><a href="http://stackoverflow.com/questions/1515730/is-there-a-command-like-watch-or-inotifywait-on-the-mac">http://stackoverflow.com/questions/1515730/is-there-a-command-like-watch-or-inotifywait-on-the-mac</a></span></div>
<div><font class="Apple-style-span" face="arial, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New'"><br></font></div><div><span class="Apple-style-span" style="font-family: arial, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New'; ">Dave&nbsp;</span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
G<br>
<font color="#888888">--<br>
Gregory Collins &lt;<a href="mailto:greg@gregorycollins.net">greg@gregorycollins.net</a>&gt;<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
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>
_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>http://www.haskell.org/mailman/listinfo/haskell-cafe<br></blockquote></div><br></div></div></body></html>