      [channels (keep #(% :from) (vals @started))]
      (let [[[message id args] ch] (alts! (conj channels (timeout 100)))]
        (case message
-         :line (println id " read " message " with args: " args)
+         :line (println "process " id " read " message " with args: " args)
          :exit (dosync (alter started dissoc id) (println id " exited"))
          nil)
        (recur (keep #(% :from) (vals @started)))))

             :http-error [:http-error "whoops! http error!"]
             :exit (do (println "dieing!") [:quit])
             true [:http-error "whoops! that's not a signal we understand"])]
       (>! output (if response response []))) ; send some data so we can recur the http
     (recur (<! input)))
     
    ;; read the signals from the started processes

  "A spawning process controlller.

Like a process supervisor.  This uses core.async extensively."
  (:require
   [clojure.core.async
    :refer [>! <! >!! <!! go go-loop chan close!  alts! alts!! timeout thread]])
  (:require [clojure.string :as str])
  (:require [clojure.java.io :as io])
  (:require [org.httpkit.client :as http-kit])
