1. 6
  1.  

  2. 4

    I have something similar. Obviously this implementation isn’t as efficient as the proposed Go daemon, but it’s language agnostic and works well enough on smaller projects. As a bash function:

    wait_do() {
        if ! command -v inotifywait &>/dev/null; then
            echo "inotifywait not found!"
            return
        fi
        while inotifywait -e close_write,moved_to,create . &>/dev/null; do
            ${@}
        done
    }
    

    Used as such: wait_do runghc Tests.hs

    1. 4

      This isn’t new or revolutionary by any means, but it is fun to see Go mature and grow as a language. My coworker and I were working on a Go application that I wrote at work and he remarked, “You should have just written this entire application in Go from the beginning.” To which I replied, “Go didn’t exist when this application was written.” :)

      1. 2

        I’ve been using a customised fork of levi cook’s glitch, which automatically runs go build, go vet, go lint and go test on code when files change. It’ll be nice when that functionality is in the standard go tool.

        1. 1

          It’s pretty great to see an os/fsnotify package - this just should make a bunch of things in Zeus much easier to handle, and allow it to be more cross-platform, too (currently, it builds a C proxy for OS X and Linux, the only two supported OSes). Exciting!