
Modd: a flexible tool for responding to filesystem change - cortesi
http://corte.si/posts/modd/announce/index.html
======
pathikrit
Kinda related - I wrote a library to hook up file system monitoring to Akka
actors: [https://github.com/pathikrit/better-files#akka-file-
watcher](https://github.com/pathikrit/better-files#akka-file-watcher)

Here's a Java article describing its internals:
[http://www.javaadvent.com/2015/12/reactive-file-system-
monit...](http://www.javaadvent.com/2015/12/reactive-file-system-monitoring-
using-akka-actors.html)

------
christiangenco
Oh neat! I made something a while back that scratched my itch for this exact
problem:
[https://github.com/christiangenco/autorunner](https://github.com/christiangenco/autorunner)

I chose to build the commands into the file with a comment rather than add an
extra config file. For your test-compile cycle for Go, I think that would look
like this at the top of each of your go files:

# autorun go install ./cmd/devd

modd looks like it has the advantage of only specifying this one, and
specifying commands to be run when modd first starts up (autorun only has one
type of command that's run on startup and on file changes).

~~~
cortesi
Neat! The idea of putting the build commands into the code as a comment is
very interesting.

~~~
thwarted
Not directly applicable here, because you need to work with what you have, but
this kinds of stuff always reminds me of
[https://www.jwz.org/doc/cddb.html](https://www.jwz.org/doc/cddb.html)

~~~
cortesi
Heh, I know what you mean. BTW, directly following that link from here gets
you to jwz's wee joke about HN. You'll need to copy the link and paste it in a
new tab to see the article.

------
romuloab42
I've been using this tool for a month and it's really great. A focused tool
that does its job well.

The only caveat I got, and this is completely due to my inexperience with Go,
is to not use `daemon: go run foo.go`, but to `prep: go build foo.go; daemon
+sigint: ./foo`

Another good use is to restart webpack when a non-hot-replaceable file
changes:

    
    
      /projects/foo/src/index.js {
          daemon +sigint: npm start
      }

------
8ig8
By the author of mitmproxy, which I think is fantastic.

[http://mitmproxy.org](http://mitmproxy.org)

------
kitd
Great!

Tup on Windows doesn't support monitoring for source changes. This will fix
that nicely I guess.

------
arrakeen
i look forward to playing around with this. i scratched my head at devd
initially but now it is an indispensable piece of my development workflow

~~~
cortesi
Great to hear. :) Modd was born because because I was trying to figure out how
to add the ability to do a build step before livereload in devd. It soon
became clear that quite a different type of tool was needed to do this well,
and after a few iterations I settled on the current design for modd.

