Update examples to set cues via show.

Update examples to set cues via show.

--- src/afterglow/examples.clj
+++ src/afterglow/examples.clj
@@ -333,7 +333,7 @@
                             :color color
                             :color-fn (cues/color-fn-from-cue-var color-var x y)
                             :variables [color-var])]
-    (ct/set-cue! (:cue-grid *show*) x y cue)))
+    (show/set-cue! x y cue)))

 (defn- name-torrent-gobo-cue
   "Come up with a summary name for one of the gobo cues we are
@@ -355,13 +355,12 @@
                                  x (if (< i 8) left (+ left 2))
                                  y (if (< i 8) (- top i) (- top i -1))
                                  cue-key (keyword (str (name prefix) "-gobo-fixed"))]
-                             (ct/set-cue! (:cue-grid *show*) x y
-                                          (cues/function-cue cue-key (keyword v) fixtures :color blue
-                                                             :short-name (name-torrent-gobo-cue prefix v)))
+                             (show/set-cue! x y (cues/function-cue cue-key (keyword v) fixtures :color blue
+                                                                   :short-name (name-torrent-gobo-cue prefix v)))
                              (let [function (keyword (str (name v) "-shake"))]
-                               (ct/set-cue! (:cue-grid *show*) (inc x) y
-                                            (cues/function-cue cue-key function fixtures :color blue
-                                                               :short-name (name-torrent-gobo-cue prefix function))))))
+                               (show/set-cue! (inc x) y (cues/function-cue
+                                                         cue-key function fixtures :color blue
+                                                         :short-name (name-torrent-gobo-cue prefix function))))))
                          ["gobo-fixed-mortar" "gobo-fixed-4-rings" "gobo-fixed-atom" "gobo-fixed-jacks"
                           "gobo-fixed-saw" "gobo-fixed-sunflower" "gobo-fixed-45-adapter"
                           "gobo-fixed-star" "gobo-fixed-rose-fingerprint"])])
@@ -369,13 +368,14 @@
   (doseq [_ (map-indexed (fn [i v]
                            (let [green (create-color :green)
                                  cue-key (keyword (str (name prefix) "-gobo-moving"))]
-                             (ct/set-cue! (:cue-grid *show*) (+ left 2) (- top i)
-                                          (cues/function-cue cue-key (keyword v) fixtures :color green
-                                                             :short-name (name-torrent-gobo-cue prefix v)))
+                             (show/set-cue! (+ left 2) (- top i)
+                                            (cues/function-cue cue-key (keyword v) fixtures :color green
+                                                               :short-name (name-torrent-gobo-cue prefix v)))
                              (let [function (keyword (str (name v) "-shake"))]
-                               (ct/set-cue! (:cue-grid *show*) (+ left 3) (- top i)
-                                            (cues/function-cue cue-key function fixtures :color green
-                                                               :short-name (name-torrent-gobo-cue prefix function))))))
+                               (show/set-cue! (+ left 3) (- top i)
+                                              (cues/function-cue
+                                               cue-key function fixtures :color green
+                                               :short-name (name-torrent-gobo-cue prefix function))))))
                          ["gobo-moving-rings" "gobo-moving-color-swirl" "gobo-moving-stars"
                           "gobo-moving-optical-tube" "gobo-moving-magenta-bundt"
                           "gobo-moving-blue-mega-hazard" "gobo-moving-turbine"])]))
@@ -393,15 +393,15 @@
   sensitivity, and having the base strobe color depend on a set of
   shared numeric show variable."
   [name fixtures x y]
-  (ct/set-cue! (:cue-grid *show*) x y
-               (cues/cue (keyword (str "strobe-" (clojure.string/replace (clojure.string/lower-case name) " " "-")))
-                         (fn [var-map] (fun/strobe (str "Strobe " name) fixtures
-                                                   (:level var-map 50) (:lightness var-map 100)))
-                         :color :purple
-                         :held true
-                         :priority 100
-                         :variables [{:key "level" :min 0 :max 100 :start 100 :name "Level"}
-                                     {:key "lightness" :min 0 :max 100 :name "Lightness" :velocity true}])))
+  (show/set-cue! x y
+                 (cues/cue (keyword (str "strobe-" (clojure.string/replace (clojure.string/lower-case name) " " "-")))
+                           (fn [var-map] (fun/strobe (str "Strobe " name) fixtures
+                                                     (:level var-map 50) (:lightness var-map 100)))
+                           :color :purple
+                           :held true
+                           :priority 100
+                           :variables [{:key "level" :min 0 :max 100 :start 100 :name "Level"}
+                                       {:key "lightness" :min 0 :max 100 :name "Lightness" :velocity true}])))

 (def white
   "The color to flash strobe cues to identify them as such."
@@ -421,21 +421,21 @@
     ;; If the default strobe color has not yet been established, set it to purple.
     (show/set-variable! :strobe-color (create-color :purple)))
   (let [color-var {:key :strobe-color :type :color :name "Strobe Color"}]
-    (ct/set-cue! (:cue-grid *show*) x y
-                 (cues/cue (keyword (str "strobe-" (clojure.string/replace (clojure.string/lower-case name) " " "-")))
-                           (fn [var-map] (fun/strobe-2 (str "Strobe " name) fixtures
-                                                       (:level var-map 50) (:lightness var-map 100)))
-                           :color :purple
-                           :color-fn (fn [cue active show snapshot]
-                                       (if (> (rhythm/snapshot-beat-phase snapshot 0.5) 0.7)
-                                         white
-                                         (or (show/get-variable :strobe-color)
-                                             (:color cue))))
-                           :held true
-                           :priority 100
-                           :variables [{:key "level" :min 0 :max 100 :start 100 :name "Level"}
-                                       {:key "lightness" :min 0 :max 100 :name "Lightness" :velocity true}
-                                       color-var]))))
+    (show/set-cue! x y
+                   (cues/cue (keyword (str "strobe-" (clojure.string/replace (clojure.string/lower-case name) " " "-")))
+                             (fn [var-map] (fun/strobe-2 (str "Strobe " name) fixtures
+                                                         (:level var-map 50) (:lightness var-map 100)))
+                             :color :purple
+                             :color-fn (fn [cue active show snapshot]
+                                         (if (> (rhythm/snapshot-beat-phase snapshot 0.5) 0.7)
+                                           white
+                                           (or (show/get-variable :strobe-color)
+                                               (:color cue))))
+                             :held true
+                             :priority 100
+                             :variables [{:key "level" :min 0 :max 100 :start 100 :name "Level"}
+                                         {:key "lightness" :min 0 :max 100 :name "Lightness" :velocity true}
+                                         color-var]))))

 (def light-groups
   "The named groupings of lights to build rows of effects in the cue grid."
@@ -470,14 +470,13 @@
   in [[light-groups]], or `nil` if the cue should affect all lights."
   [group x y color]
   (let [[effect-key fixtures end-keys effect-name] (build-group-cue-elements group "dimmers" "dimmers")]
-    (ct/set-cue! (:cue-grid *show*) x y
-                 (cues/cue effect-key
-                           (fn [var-map] (dimmer-effect
-                                          (params/bind-keyword-param (:level var-map 255) Number 255)
-                                          fixtures
-                                          :effect-name effect-name))
-                           :variables [{:key "level" :min 0 :max 255 :start 255 :name "Level"}]
-                           :color color :end-keys end-keys))))
+    (show/set-cue! x y
+                   (cues/cue effect-key
+                             (fn [var-map] (dimmer-effect
+                                            (params/bind-keyword-param (:level var-map 255) Number 255)
+                                            fixtures :effect-name effect-name))
+                             :variables [{:key "level" :min 0 :max 255 :start 255 :name "Level"}]
+                             :color color :end-keys end-keys))))

 (defn build-ratio-param
   "Creates a dynamic parameter for setting the beat ratio of one of
@@ -501,21 +500,21 @@
   oscillator parameters."
   [group x y color]
   (let [[effect-key fixtures end-keys effect-name] (build-group-cue-elements group "dimmers" "saw")]
-    (ct/set-cue! (:cue-grid *show*) x y
-                 (cues/cue effect-key
-                           (fn [var-map] (dimmer-effect
-                                          (oscillators/build-oscillated-param
-                                           (oscillators/sawtooth :down? (:down var-map)
-                                                                 :interval-ratio (build-ratio-param var-map)
-                                                                 :phase (:phase var-map)))
-                                          fixtures
-                                          :effect-name effect-name))
-                           :color color
-                           :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
-                                       {:key "down" :type :boolean :start true :name "Down?"}
-                                       {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
-                                       {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
-                           :end-keys end-keys))))
+    (show/set-cue! x y
+                   (cues/cue effect-key
+                             (fn [var-map] (dimmer-effect
+                                            (oscillators/build-oscillated-param
+                                             (oscillators/sawtooth :down? (:down var-map)
+                                                                   :interval-ratio (build-ratio-param var-map)
+                                                                   :phase (:phase var-map)))
+                                            fixtures
+                                            :effect-name effect-name))
+                             :color color
+                             :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
+                                         {:key "down" :type :boolean :start true :name "Down?"}
+                                         {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
+                                         {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
+                             :end-keys end-keys))))

 (defn make-triangle-dimmer-cue
   "Create a cue which applies a triangle oscillator to the dimmers of
@@ -523,19 +522,19 @@
   oscillator parameters."
   [group x y color]
   (let [[effect-key fixtures end-keys effect-name] (build-group-cue-elements group "dimmers" "triangle")]
-    (ct/set-cue! (:cue-grid *show*) x y
-               (cues/cue effect-key
-                         (fn [var-map] (dimmer-effect
-                                        (oscillators/build-oscillated-param
-                                         (oscillators/triangle :interval-ratio (build-ratio-param var-map)
-                                                               :phase (:phase var-map)))
-                                        fixtures
-                                        :effect-name effect-name))
-                         :color color
-                         :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
-                                     {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
-                                     {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
-                         :end-keys end-keys))))
+    (show/set-cue! x y
+                   (cues/cue effect-key
+                             (fn [var-map] (dimmer-effect
+                                            (oscillators/build-oscillated-param
+                                             (oscillators/triangle :interval-ratio (build-ratio-param var-map)
+                                                                   :phase (:phase var-map)))
+                                            fixtures
+                                            :effect-name effect-name))
+                             :color color
+                             :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
+                                         {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
+                                         {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
+                             :end-keys end-keys))))

 (defn make-sine-dimmer-cue
   "Create a cue which applies a sine oscillator to the dimmers of the
@@ -543,20 +542,20 @@
   oscillator parameters."
   [group x y color]
   (let [[effect-key fixtures end-keys effect-name] (build-group-cue-elements group "dimmers" "sine")]
-    (ct/set-cue! (:cue-grid *show*) x y
-                 (cues/cue effect-key
-                           (fn [var-map] (dimmer-effect
-                                          (oscillators/build-oscillated-param
-                                           (oscillators/sine :interval-ratio (build-ratio-param var-map)
-                                                             :phase (:phase var-map))
-                                           :min 1)
-                                          fixtures
-                                          :effect-name effect-name))
-                           :color color
-                           :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
-                                       {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
-                                       {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
-                           :end-keys end-keys))))
+    (show/set-cue! x y
+                   (cues/cue effect-key
+                             (fn [var-map] (dimmer-effect
+                                            (oscillators/build-oscillated-param
+                                             (oscillators/sine :interval-ratio (build-ratio-param var-map)
+                                                               :phase (:phase var-map))
+                                             :min 1)
+                                            fixtures
+                                            :effect-name effect-name))
+                             :color color
+                             :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
+                                         {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
+                                         {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
+                             :end-keys end-keys))))

 (defn make-square-dimmer-cue
   "Create a cue which applies a square oscillator to the dimmers of
@@ -564,21 +563,21 @@
   oscillator parameters."
   [group x y color]
   (let [[effect-key fixtures end-keys effect-name] (build-group-cue-elements group "dimmers" "square")]
-    (ct/set-cue! (:cue-grid *show*) x y
-               (cues/cue effect-key
-                         (fn [var-map] (dimmer-effect
-                                        (oscillators/build-oscillated-param
-                                         (oscillators/square :interval-ratio (build-ratio-param var-map)
-                                                             :width (:width var-map)
-                                                             :phase (:phase var-map)))
-                                        fixtures
-                                        :effect-name effect-name))
-                         :color color
-                         :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
-                                     {:key "width" :min 0 :max 1 :start 0.5 :name "Width"}
-                                     {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
-                                     {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
-                         :end-keys end-keys))))
+    (show/set-cue! x y
+                   (cues/cue effect-key
+                             (fn [var-map] (dimmer-effect
+                                            (oscillators/build-oscillated-param
+                                             (oscillators/square :interval-ratio (build-ratio-param var-map)
+                                                                 :width (:width var-map)
+                                                                 :phase (:phase var-map)))
+                                            fixtures
+                                            :effect-name effect-name))
+                             :color color
+                             :variables [{:key "beats" :min 1 :max 32 :type :integer :start 2 :name "Beats"}
+                                         {:key "width" :min 0 :max 1 :start 0.5 :name "Width"}
+                                         {:key "cycles" :min 1 :max 10 :type :integer :start 1 :name "Cycles"}
+                                         {:key "phase" :min 0 :max 1 :start 0 :name "Phase"}]
+                             :end-keys end-keys))))

 (defn x-phase
   "Return a value that ranges from zero for the leftmost fixture in a
@@ -597,21 +596,15 @@
   (let [hue-bar (oscillators/build-oscillated-param  ; Spread a rainbow across a bar of music
                  (oscillators/sawtooth :interval :bar) :max 360)
         hue-param (params/build-color-param :s :rainbow-saturation :l 50 :h hue-bar)]
-    (ct/set-cue! (:cue-grid *show*) 0 1
-                 (cues/cue :all-color (fn [_] (fx/scene "Rainbow with laser" (global-color-effect hue-param)
-                                                        (beyond/laser-color-effect server hue-param)))
-                           :short-name "Rainbow Bar Fade"
-                           :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
-                                        :type :integer}])))
-  (ct/set-cue! (:cue-grid *show*) 2 7
-               (cues/cue :beyond-cue-1-1 (fn [_] (beyond/cue-effect server 1 1))
-                         :short-name "Beyond 1 1"))
-  (ct/set-cue! (:cue-grid *show*) 3 7
-               (cues/cue :beyond-cue-1-2 (fn [_] (beyond/cue-effect server 1 2))
-                         :short-name "Beyond 1 2"))
-  (afterglow.controllers/set-cue! (:cue-grid *show*) 6 7
-                                  (cues/function-cue :snowball-sound :sound-active (show/fixtures-named "snowball")
-                                                     :color :cyan)))
+    (show/set-cue! 0 1
+                   (cues/cue :all-color (fn [_] (fx/scene "Rainbow with laser" (global-color-effect hue-param)
+                                                          (beyond/laser-color-effect server hue-param)))
+                             :short-name "Rainbow Bar Fade"
+                             :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
+                                          :type :integer}])))
+  (show/set-cue! 2 7 (cues/cue :beyond-cue-1-1 (fn [_] (beyond/cue-effect server 1 1)) :short-name "Beyond 1 1"))
+  (show/set-cue! 3 7 (cues/cue :beyond-cue-1-2 (fn [_] (beyond/cue-effect server 1 2)) :short-name "Beyond 1 2"))
+  (show/set-cue! 6 7 (cues/function-cue :snowball-sound :sound-active (show/fixtures-named "snowball") :color :cyan)))

 (defonce ^{:doc "A step parameter for controlling example chase cues.
   Change it to experiment with other kinds of timing and fades."}
@@ -670,61 +663,61 @@

     ;; Some special/fun cues
     (show/set-variable! :rainbow-saturation 100)
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 0) (+ y-base 1)
-                 (let [color-param (params/build-color-param :s :rainbow-saturation :l 50 :h hue-bar)]
-                   (cues/cue :all-color (fn [_] (global-color-effect color-param))
-                             :color-fn (cues/color-fn-from-param color-param)
-                             :short-name "Rainbow Bar Fade"
+    (show/set-cue! (+ x-base 0) (+ y-base 1)
+                   (let [color-param (params/build-color-param :s :rainbow-saturation :l 50 :h hue-bar)]
+                     (cues/cue :all-color (fn [_] (global-color-effect color-param))
+                               :color-fn (cues/color-fn-from-param color-param)
+                               :short-name "Rainbow Bar Fade"
+                               :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
+                                            :type :integer}])))
+    (show/set-cue! (+ x-base 1) (+ y-base 1)
+                   (cues/cue :all-color (fn [_] (global-color-effect
+                                                 (params/build-color-param :s :rainbow-saturation :l 50 :h hue-gradient)
+                                                 :include-color-wheels? true))
+                             :short-name "Rainbow Grid"
                              :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
-                                          :type :integer}])))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 1) (+ y-base 1)
-                 (cues/cue :all-color (fn [_] (global-color-effect
-                                               (params/build-color-param :s :rainbow-saturation :l 50 :h hue-gradient)
-                                               :include-color-wheels? true))
-                           :short-name "Rainbow Grid"
-                           :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
-                                        :type :integer}]))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 2) (+ y-base 1)
-                 (let [color-param (params/build-color-param :s :rainbow-saturation :l 50 :h hue-gradient
-                                                             :adjust-hue hue-bar)]
-                   (cues/cue :all-color (fn [_] (global-color-effect color-param))
-                             :color-fn (cues/color-fn-from-param color-param)
-                             :short-name "Rainbow Grid+Bar"
-                             :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
-                                          :type :integer}])))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 3) (+ y-base 1) ; Desaturate the rainbow as each beat progresses
-                 (let [color-param (params/build-color-param :s desat-beat :l 50 :h hue-gradient
-                                                             :adjust-hue hue-bar)]
-                   (cues/cue :all-color (fn [_] (global-color-effect color-param))
-                             :color-fn (cues/color-fn-from-param color-param)
-                             :short-name "Rainbow Pulse")))
-
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 4) (+ y-base 1)
-                 (cues/cue :transform-colors (fn [_] (color-fx/transform-colors (show/all-fixtures)))
-                           :priority 1000))
-
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 5) (+ y-base 1)
-                 (cues/cue :all-color (fn [_] (global-color-effect
-                                               (params/build-color-param :s 100 :l 50 :h hue-z-gradient)
-                                               :include-color-wheels? true))
-                           :short-name "Z Rainbow Grid"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 1)
-                 (let [color-param (params/build-color-param :s 100 :l 50 :h hue-z-gradient
-                                                             :adjust-hue hue-bar)]
-                   (cues/cue :all-color (fn [_] (global-color-effect color-param))
-                             :color-fn (cues/color-fn-from-param color-param)
-                             :short-name "Z Rainbow Grid+Bar")))
-
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 1)
-                 (let [color-param (params/build-color-param :s 100 :l 50 :h hue-gradient
-                                                             :adjust-hue hue-bar)]
-                   (cues/cue :all-color (fn [_] (global-color-effect color-param
-                                                                     :fixtures (show/fixtures-named "blade")))
-                             :color-fn (cues/color-fn-from-param color-param)
-                             :short-name "Rainbow Blades")))
-
-    #_(ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 7)
-                 (cues/function-cue :strobe-all :strobe (show/all-fixtures) :effect-name "Raw Strobe"))
+                                          :type :integer}]))
+    (show/set-cue! (+ x-base 2) (+ y-base 1)
+                   (let [color-param (params/build-color-param :s :rainbow-saturation :l 50 :h hue-gradient
+                                                               :adjust-hue hue-bar)]
+                     (cues/cue :all-color (fn [_] (global-color-effect color-param))
+                               :color-fn (cues/color-fn-from-param color-param)
+                               :short-name "Rainbow Grid+Bar"
+                               :variables [{:key :rainbow-saturation :name "Saturatn" :min 0 :max 100 :start 100
+                                            :type :integer}])))
+    (show/set-cue! (+ x-base 3) (+ y-base 1) ; Desaturate the rainbow as each beat progresses
+                   (let [color-param (params/build-color-param :s desat-beat :l 50 :h hue-gradient
+                                                               :adjust-hue hue-bar)]
+                     (cues/cue :all-color (fn [_] (global-color-effect color-param))
+                               :color-fn (cues/color-fn-from-param color-param)
+                               :short-name "Rainbow Pulse")))
+
+    (show/set-cue! (+ x-base 4) (+ y-base 1)
+                   (cues/cue :transform-colors (fn [_] (color-fx/transform-colors (show/all-fixtures)))
+                             :priority 1000))
+
+    (show/set-cue! (+ x-base 5) (+ y-base 1)
+                   (cues/cue :all-color (fn [_] (global-color-effect
+                                                 (params/build-color-param :s 100 :l 50 :h hue-z-gradient)
+                                                 :include-color-wheels? true))
+                             :short-name "Z Rainbow Grid"))
+    (show/set-cue! (+ x-base 6) (+ y-base 1)
+                   (let [color-param (params/build-color-param :s 100 :l 50 :h hue-z-gradient
+                                                               :adjust-hue hue-bar)]
+                     (cues/cue :all-color (fn [_] (global-color-effect color-param))
+                               :color-fn (cues/color-fn-from-param color-param)
+                               :short-name "Z Rainbow Grid+Bar")))
+
+    (show/set-cue! (+ x-base 7) (+ y-base 1)
+                   (let [color-param (params/build-color-param :s 100 :l 50 :h hue-gradient
+                                                               :adjust-hue hue-bar)]
+                     (cues/cue :all-color (fn [_] (global-color-effect color-param
+                                                                       :fixtures (show/fixtures-named "blade")))
+                               :color-fn (cues/color-fn-from-param color-param)
+                               :short-name "Rainbow Blades")))
+
+    #_(show/set-cue! (+ x-base 7) (+ y-base 7)
+                     (cues/function-cue :strobe-all :strobe (show/all-fixtures) :effect-name "Raw Strobe"))

     ;; Dimmer cues to turn on and set brightness of groups of lights
@@ -732,14 +725,14 @@
     (doall (map-indexed (fn [i group] (make-dimmer-cue group (+ x-base (inc i)) (+ y-base 2) :yellow)) light-groups))

     ;; TODO: Write a macro to make it easier to bind cue variables?
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 2)
-                 (cues/cue :sparkle (fn [var-map] (fun/sparkle (show/all-fixtures)
-                                                               :chance (:chance var-map 0.05)
-                                                               :fade-time (:fade-time var-map 50)))
-                           :held true
-                           :priority 100
-                           :variables [{:key "chance" :min 0.0 :max 0.4 :start 0.05 :velocity true}
-                                       {:key "fade-time" :name "Fade" :min 1 :max 2000 :start 50 :type :integer}]))
+    (show/set-cue! (+ x-base 7) (+ y-base 2)
+                   (cues/cue :sparkle (fn [var-map] (fun/sparkle (show/all-fixtures)
+                                                                 :chance (:chance var-map 0.05)
+                                                                 :fade-time (:fade-time var-map 50)))
+                             :held true
+                             :priority 100
+                             :variables [{:key "chance" :min 0.0 :max 0.4 :start 0.05 :velocity true}
+                                         {:key "fade-time" :name "Fade" :min 1 :max 2000 :start 50 :type :integer}]))

     ;; Dimmer oscillator cues: Sawtooth
     (make-sawtooth-dimmer-cue nil (+ x-base 0) (+ y-base 3) :yellow)
@@ -771,19 +764,18 @@
     (make-strobe-cue-2 "Snowball" (show/fixtures-named "snowball") (+ x-base 6) (+ y-base 7))

     (let [color-var {:key :strobe-color :type :color :name "Strobe Color"}]
-      (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 7)
-                   (cues/cue :strobe-color (fn [_] (fx/blank "Strobe Color"))
-                             :color :purple
-                             :color-fn (cues/color-fn-from-cue-var color-var)
-                             :variables [color-var])))
+      (show/set-cue! (+ x-base 7) (+ y-base 7) (cues/cue :strobe-color (fn [_] (fx/blank "Strobe Color"))
+                                                         :color :purple
+                                                         :color-fn (cues/color-fn-from-cue-var color-var)
+                                                         :variables [color-var])))

     ;; This was the old way of adjusting strobe cues with only numeric parameters. The above
     ;; cue shows how to do it with the newer color parameter approach.
-    #_(ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 6)
-                 (cues/cue :adjust-strobe (fn [_] (fun/adjust-strobe))
-                           :color :purple
-                           :variables [{:key :strobe-hue :min 0 :max 360 :name "Hue" :centered true}
-                                       {:key :strobe-saturation :min 0 :max 100 :name "Saturatn"}]))))
+    #_(show/set-cue! (+ x-base 7) (+ y-base 6)
+                     (cues/cue :adjust-strobe (fn [_] (fun/adjust-strobe))
+                               :color :purple
+                               :variables [{:key :strobe-hue :min 0 :max 360 :name "Hue" :centered true}
+                                           {:key :strobe-saturation :min 0 :max 100 :name "Saturatn"}]))))

 (defn make-torrent-cues
   "Create a page of cues for configuring aspects of the Torrent F3s
@@ -791,72 +783,74 @@
   [page-x page-y]
   (let [x-base (* page-x 8)
         y-base (* page-y 8)]
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 0) (+ y-base 7)
-                 (cues/function-cue :torrent-shutter :shutter-open (show/fixtures-named "torrent")))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 1) (+ y-base 7)
-                 (cues/function-cue :torrent-reset :motor-reset (show/fixtures-named "torrent")
-                                    :color (create-color :red) :held true))
-
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 7)
-                 (cues/function-cue :t1-focus :focus (show/fixtures-named "torrent-1") :effect-name "Torrent 1 Focus"
-                                    :color (create-color :yellow)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 7)
-                 (cues/function-cue :t2-focus :focus (show/fixtures-named "torrent-2") :effect-name "Torrent 2 Focus"
-                                    :color (create-color :yellow)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 4) (+ y-base 7)
-                 (build-focus-oscillator :t1-focus "Torrent 1 Focus Sine" (show/fixtures-named "torrent-1")))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 5) (+ y-base 7)
-                 (build-focus-oscillator :t2-focus "Torrent 2 Focus Sine" (show/fixtures-named "torrent-2")))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 6)
-                 (cues/function-cue :t1-prism :prism-clockwise (show/fixtures-named "torrent-1") :level 100
-                                    :effect-name "T1 Prism Spin CW" :color (create-color :orange)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 6)
-                 (cues/function-cue :t2-prism :prism-clockwise (show/fixtures-named "torrent-2") :level 100
-                                    :effect-name "T2 Prism Spin CW" :color (create-color :orange)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 5)
-                 (cues/function-cue :t1-prism :prism-in (show/fixtures-named "torrent-1")
-                                    :effect-name "T1 Prism In" :color (create-color :orange)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 5)
-                 (cues/function-cue :t2-prism :prism-in (show/fixtures-named "torrent-2")
-                                    :effect-name "T2 Prism In" :color (create-color :orange)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 4)
-                 (cues/function-cue :t1-prism :prism-counterclockwise (show/fixtures-named "torrent-1")
-                                    :effect-name "T1 Prism Spin CCW" :color (create-color :orange)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 4)
-                 (cues/function-cue :t2-prism :prism-counterclockwise (show/fixtures-named "torrent-2")
-                                    :effect-name "T2 Prism Spin CCW" :color (create-color :orange)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 3)
-                 (cues/function-cue :t1-gobo-fixed :gobo-fixed-clockwise (show/fixtures-named "torrent-1")
-                                    :effect-name "T1 Fixed Gobos Swap CW" :color (create-color :blue)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 3)
-                 (cues/function-cue :t2-gobo-fixed :gobo-fixed-clockwise (show/fixtures-named "torrent-2")
-                                    :effect-name "T2 Fixed Gobos Swap CW" :color (create-color :blue)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 2)
-                 (cues/function-cue :t1-gobo-moving :gobo-moving-clockwise (show/fixtures-named "torrent-1")
-                                    :effect-name "T1 Moving Gobos Swap CW" :color (create-color :green)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 2)
-                 (cues/function-cue :t2-gobo-moving :gobo-moving-clockwise (show/fixtures-named "torrent-2")
-                                    :effect-name "T2 Moving Gobos Swap CW" :color (create-color :green)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 1)
-                 (cues/function-cue :t1-gobo-rotation :gobo-rotation-clockwise (show/fixtures-named "torrent-1")
-                                    :effect-name "T1 Spin Gobo CW" :color (create-color :cyan) :level 100))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 1)
-                 (cues/function-cue :t2-gobo-rotation :gobo-rotation-clockwise (show/fixtures-named "torrent-2")
-                                    :effect-name "T2 Spin Gobo CW" :color (create-color :cyan) :level 100))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 0)
-                 (cues/function-cue :t1-gobo-rotation :gobo-rotation-counterclockwise (show/fixtures-named "torrent-1")
-                                    :effect-name "T1 Spin Gobo CCW" :color (create-color :cyan)))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 0)
-                 (cues/function-cue :t2-gobo-rotation :gobo-rotation-counterclockwise (show/fixtures-named "torrent-2")
-                                    :effect-name "T2 Spin Gobo CCW" :color (create-color :cyan)))
+    (show/set-cue! (+ x-base 0) (+ y-base 7)
+                   (cues/function-cue :torrent-shutter :shutter-open (show/fixtures-named "torrent")))
+    (show/set-cue! (+ x-base 1) (+ y-base 7)
+                   (cues/function-cue :torrent-reset :motor-reset (show/fixtures-named "torrent")
+                                      :color (create-color :red) :held true))
+
+    (show/set-cue! (+ x-base 6) (+ y-base 7)
+                   (cues/function-cue :t1-focus :focus (show/fixtures-named "torrent-1") :effect-name "Torrent 1 Focus"
+                                      :color (create-color :yellow)))
+    (show/set-cue! (+ x-base 7) (+ y-base 7)
+                   (cues/function-cue :t2-focus :focus (show/fixtures-named "torrent-2") :effect-name "Torrent 2 Focus"
+                                      :color (create-color :yellow)))
+    (show/set-cue! (+ x-base 4) (+ y-base 7)
+                   (build-focus-oscillator :t1-focus "Torrent 1 Focus Sine" (show/fixtures-named "torrent-1")))
+    (show/set-cue! (+ x-base 5) (+ y-base 7)
+                   (build-focus-oscillator :t2-focus "Torrent 2 Focus Sine" (show/fixtures-named "torrent-2")))
+    (show/set-cue! (+ x-base 6) (+ y-base 6)
+                   (cues/function-cue :t1-prism :prism-clockwise (show/fixtures-named "torrent-1") :level 100
+                                      :effect-name "T1 Prism Spin CW" :color (create-color :orange)))
+    (show/set-cue! (+ x-base 7) (+ y-base 6)
+                   (cues/function-cue :t2-prism :prism-clockwise (show/fixtures-named "torrent-2") :level 100
+                                      :effect-name "T2 Prism Spin CW" :color (create-color :orange)))
+    (show/set-cue! (+ x-base 6) (+ y-base 5)
+                   (cues/function-cue :t1-prism :prism-in (show/fixtures-named "torrent-1")
+                                      :effect-name "T1 Prism In" :color (create-color :orange)))
+    (show/set-cue! (+ x-base 7) (+ y-base 5)
+                   (cues/function-cue :t2-prism :prism-in (show/fixtures-named "torrent-2")
+                                      :effect-name "T2 Prism In" :color (create-color :orange)))
+    (show/set-cue! (+ x-base 6) (+ y-base 4)
+                   (cues/function-cue :t1-prism :prism-counterclockwise (show/fixtures-named "torrent-1")
+                                      :effect-name "T1 Prism Spin CCW" :color (create-color :orange)))
+    (show/set-cue! (+ x-base 7) (+ y-base 4)
+                   (cues/function-cue :t2-prism :prism-counterclockwise (show/fixtures-named "torrent-2")
+                                      :effect-name "T2 Prism Spin CCW" :color (create-color :orange)))
+    (show/set-cue! (+ x-base 6) (+ y-base 3)
+                   (cues/function-cue :t1-gobo-fixed :gobo-fixed-clockwise (show/fixtures-named "torrent-1")
+                                      :effect-name "T1 Fixed Gobos Swap CW" :color (create-color :blue)))
+    (show/set-cue! (+ x-base 7) (+ y-base 3)
+                   (cues/function-cue :t2-gobo-fixed :gobo-fixed-clockwise (show/fixtures-named "torrent-2")
+                                      :effect-name "T2 Fixed Gobos Swap CW" :color (create-color :blue)))
+    (show/set-cue! (+ x-base 6) (+ y-base 2)
+                   (cues/function-cue :t1-gobo-moving :gobo-moving-clockwise (show/fixtures-named "torrent-1")
+                                      :effect-name "T1 Moving Gobos Swap CW" :color (create-color :green)))
+    (show/set-cue! (+ x-base 7) (+ y-base 2)
+                   (cues/function-cue :t2-gobo-moving :gobo-moving-clockwise (show/fixtures-named "torrent-2")
+                                      :effect-name "T2 Moving Gobos Swap CW" :color (create-color :green)))
+    (show/set-cue! (+ x-base 6) (+ y-base 1)
+                   (cues/function-cue :t1-gobo-rotation :gobo-rotation-clockwise (show/fixtures-named "torrent-1")
+                                      :effect-name "T1 Spin Gobo CW" :color (create-color :cyan) :level 100))
+    (show/set-cue! (+ x-base 7) (+ y-base 1)
+                   (cues/function-cue :t2-gobo-rotation :gobo-rotation-clockwise (show/fixtures-named "torrent-2")
+                                      :effect-name "T2 Spin Gobo CW" :color (create-color :cyan) :level 100))
+    (show/set-cue! (+ x-base 6) (+ y-base 0)
+                   (cues/function-cue :t1-gobo-rotation :gobo-rotation-counterclockwise
+                                      (show/fixtures-named "torrent-1")
+                                      :effect-name "T1 Spin Gobo CCW" :color (create-color :cyan)))
+    (show/set-cue! (+ x-base 7) (+ y-base 0)
+                   (cues/function-cue :t2-gobo-rotation :gobo-rotation-counterclockwise
+                                      (show/fixtures-named "torrent-2")
+                                      :effect-name "T2 Spin Gobo CCW" :color (create-color :cyan)))

     ;; Some compound cues
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 0) (+ y-base 0)
-                 (cues/cue :star-swirl (fn [_] (cues/compound-cues-effect
-                                                "Star Swirl" *show* [[8 12]
-                                                                     [10 9]
-                                                                     [6 15 {:level 60}]
-                                                                     [6 8 {:level 25}]]))))
+    (show/set-cue! (+ x-base 0) (+ y-base 0)
+                   (cues/cue :star-swirl (fn [_] (cues/compound-cues-effect
+                                                  "Star Swirl" *show* [[(+ x-base 8) (+ y-base 4)]
+                                                                       [(+ x-base 10) (+ y-base 1)]
+                                                                       [(+ x-base 6) (+ y-base 7) {:level 60}]
+                                                                       [(+ x-base 6) y-base {:level 25}]]))))

     (make-torrent-gobo-cues :t1 (show/fixtures-named "torrent-1") (+ y-base 7) (+ x-base 8))
     (make-torrent-gobo-cues :t2 (show/fixtures-named "torrent-2") (+ y-base 7) (+ x-base 12))))
@@ -878,72 +872,71 @@
     (let [hex-uv-fx [(chan-fx/function-effect "Hex UV" :uv 100 (show/fixtures-named "hex"))
                      (dimmer-effect 255 (show/fixtures-named "hex")
                                     :effect-name "Hex Dimmers for UV")]]
-      (ct/set-cue! (:cue-grid *show*) (+ x-base 2) (+ y-base 0)
-                   (cues/cue :hex-uv (fn [_] (apply fx/scene "Hex UV" hex-uv-fx))
-                             :color :purple :end-keys [:uv]))
-
-      (ct/set-cue! (:cue-grid *show*) (+ x-base 1) (+ y-base 0)
-                   (cues/function-cue :eco-uv :on (show/fixtures-named :eco-uv)
-                                      :color :purple :effect-name "Eco UV Bar" :end-keys [:uv]))
-
-      (ct/set-cue! (:cue-grid *show*) (+ x-base 0) (+ y-base 0)
-                   (cues/cue :uv (fn [_]
-                                   (apply fx/scene "All UV"
-                                          (conj hex-uv-fx
-                                                (chan-fx/function-effect "Eco UV Bar" :on 100
-                                                                         (show/fixtures-named :eco-uv)))))
-                             :color :purple :end-keys [:eco-uv :hex-uv])))
+      (show/set-cue! (+ x-base 2) (+ y-base 0)
+                     (cues/cue :hex-uv (fn [_] (apply fx/scene "Hex UV" hex-uv-fx))
+                               :color :purple :end-keys [:uv]))
+
+      (show/set-cue! (+ x-base 1) (+ y-base 0)
+                     (cues/function-cue :eco-uv :on (show/fixtures-named :eco-uv)
+                                        :color :purple :effect-name "Eco UV Bar" :end-keys [:uv]))
+
+      (show/set-cue! (+ x-base 0) (+ y-base 0)
+                     (cues/cue :uv (fn [_]
+                                     (apply fx/scene "All UV"
+                                            (conj hex-uv-fx
+                                                  (chan-fx/function-effect "Eco UV Bar" :on 100
+                                                                           (show/fixtures-named :eco-uv)))))
+                               :color :purple :end-keys [:eco-uv :hex-uv])))

     ;; Turn on the H2O LED
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 0)
-                 (cues/function-cue :h2o-led :on (show/fixtures-named :h2o-led)
-                                    :effect-name "H2O LED"))
+    (show/set-cue! (+ x-base 7) (+ y-base 0)
+                   (cues/function-cue :h2o-led :on (show/fixtures-named :h2o-led) :effect-name "H2O LED"))

     ;; Control the Hypnotic RGB Laser
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 0) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-red (show/fixtures-named "hyp-rgb")
-                                    :color :red :effect-name "Hypnotic Red"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 1) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-green (show/fixtures-named "hyp-rgb")
-                                    :color :green :effect-name "Hypnotic Green"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 2) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-blue (show/fixtures-named "hyp-rgb")
-                                    :color :blue :effect-name "Hypnotic Blue"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 3) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-red-green (show/fixtures-named "hyp-rgb")
-                                    :color :yellow :effect-name "Hypnotic Red Green"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 4) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-red-blue (show/fixtures-named "hyp-rgb")
-                                    :color :purple :effect-name "Hypnotic Red Blue"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 5) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-green-blue (show/fixtures-named "hyp-rgb")
-                                    :color :cyan :effect-name "Hypnotic Green Blue"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-red-green-blue (show/fixtures-named "hyp-rgb")
-                                    :color :white :effect-name "Hypnotic Red Green Blue"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 3)
-                 (cues/function-cue :hypnotic-beam :beam-all-random (show/fixtures-named "hyp-rgb")
-                                    :color :white :effect-name "Hypnotic Random"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 4)
-                 (cues/function-cue :hypnotic-spin :beams-ccw (show/fixtures-named "hyp-rgb")
-                                    :color :cyan :effect-name "Hypnotic Rotate CCW" :level 50))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 7) (+ y-base 4)
-                 (cues/function-cue :hypnotic-spin :beams-cw (show/fixtures-named "hyp-rgb")
-                                    :color :cyan :effect-name "Hypnotic Rotate Clockwise" :level 50))
+    (show/set-cue! (+ x-base 0) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-red (show/fixtures-named "hyp-rgb")
+                                      :color :red :effect-name "Hypnotic Red"))
+    (show/set-cue! (+ x-base 1) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-green (show/fixtures-named "hyp-rgb")
+                                      :color :green :effect-name "Hypnotic Green"))
+    (show/set-cue! (+ x-base 2) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-blue (show/fixtures-named "hyp-rgb")
+                                      :color :blue :effect-name "Hypnotic Blue"))
+    (show/set-cue! (+ x-base 3) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-red-green (show/fixtures-named "hyp-rgb")
+                                      :color :yellow :effect-name "Hypnotic Red Green"))
+    (show/set-cue! (+ x-base 4) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-red-blue (show/fixtures-named "hyp-rgb")
+                                      :color :purple :effect-name "Hypnotic Red Blue"))
+    (show/set-cue! (+ x-base 5) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-green-blue (show/fixtures-named "hyp-rgb")
+                                      :color :cyan :effect-name "Hypnotic Green Blue"))
+    (show/set-cue! (+ x-base 6) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-red-green-blue (show/fixtures-named "hyp-rgb")
+                                      :color :white :effect-name "Hypnotic Red Green Blue"))
+    (show/set-cue! (+ x-base 7) (+ y-base 3)
+                   (cues/function-cue :hypnotic-beam :beam-all-random (show/fixtures-named "hyp-rgb")
+                                      :color :white :effect-name "Hypnotic Random"))
+    (show/set-cue! (+ x-base 6) (+ y-base 4)
+                   (cues/function-cue :hypnotic-spin :beams-ccw (show/fixtures-named "hyp-rgb")
+                                      :color :cyan :effect-name "Hypnotic Rotate CCW" :level 50))
+    (show/set-cue! (+ x-base 7) (+ y-base 4)
+                   (cues/function-cue :hypnotic-spin :beams-cw (show/fixtures-named "hyp-rgb")
+                                      :color :cyan :effect-name "Hypnotic Rotate Clockwise" :level 50))

     ;; Sound active mode for groups of lights
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 2) (+ y-base 7)
-                 (cues/function-cue :blade-sound :sound-active (show/fixtures-named "blade")
-                                    :color :orange :effect-name "Blade Sound"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 4) (+ y-base 7)
-                 (cues/function-cue :hex-sound :sound-active (show/fixtures-named "hex")
-                                    :color :orange :effect-name "Hex Sound"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 5) (+ y-base 7)
-                 (cues/function-cue :puck-sound :sound-active (show/fixtures-named "puck")
-                                    :color :orange :effect-name "Puck Sound"))
-    (ct/set-cue! (:cue-grid *show*) (+ x-base 6) (+ y-base 7)
-                 (cues/function-cue :snowball-sound :sound-active (show/fixtures-named "snowball")
-                                    :color :orange :effect-name "Snowball Sound"))))
+    (show/set-cue! (+ x-base 2) (+ y-base 7)
+                   (cues/function-cue :blade-sound :sound-active (show/fixtures-named "blade")
+                                      :color :orange :effect-name "Blade Sound"))
+    (show/set-cue! (+ x-base 4) (+ y-base 7)
+                   (cues/function-cue :hex-sound :sound-active (show/fixtures-named "hex")
+                                      :color :orange :effect-name "Hex Sound"))
+    (show/set-cue! (+ x-base 5) (+ y-base 7)
+                   (cues/function-cue :puck-sound :sound-active (show/fixtures-named "puck")
+                                      :color :orange :effect-name "Puck Sound"))
+    (show/set-cue! (+ x-base 6) (+ y-base 7)
+                   (cues/function-cue :snowball-sound :sound-active (show/fixtures-named "snowball")
+                                      :color :orange :effect-name "Snowball Sound"))))

 (defn make-cues
   "Create a bunch of example cues for experimentation."
@@ -966,138 +959,132 @@
                                    :min -90 :max 0)))
         can-can-dir (params/build-direction-param-from-pan-tilt :pan triangle-phrase :tilt staggered-triangle-bar)
         can-can-p-t (params/build-pan-tilt-param :pan triangle-phrase :tilt staggered-triangle-bar)]
-    (ct/set-cue! (:cue-grid *show*) 0 9
+    (show/set-cue! 0 9
+                   (cues/cue :movement (fn [var-map]
+                                         (move/direction-effect "Can Can" can-can-dir (show/all-fixtures)))))
+    (show/set-cue! 1 9
+                   (cues/cue :movement (fn [var-map]
+                                         (move/pan-tilt-effect "P/T Can Can" can-can-p-t (show/all-fixtures))))))
+
+  (show/set-cue! 2 9
                  (cues/cue :movement (fn [var-map]
-                                       (move/direction-effect "Can Can" can-can-dir (show/all-fixtures)))))
-    (ct/set-cue! (:cue-grid *show*) 1 9
-                 (cues/cue :movement (fn [var-map]
-                                       (move/pan-tilt-effect "P/T Can Can" can-can-p-t (show/all-fixtures))))))
+                                       (fun/twirl (concat (show/fixtures-named "blade")
+                                                          (show/fixtures-named "torrent"))))
+                           :color :green))

   ;; A couple snowball cues
-  (ct/set-cue! (:cue-grid *show*) 0 10 (cues/function-cue :sb-pos :beams-fixed (show/fixtures-named "snowball")
-                                                          :effect-name "Snowball Fixed"))
-  (ct/set-cue! (:cue-grid *show*) 1 10 (cues/function-cue :sb-pos :beams-moving (show/fixtures-named "snowball")
-                                                          :effect-name "Snowball Moving"))
+  (show/set-cue! 0 10 (cues/function-cue :sb-pos :beams-fixed (show/fixtures-named "snowball")
+                                         :effect-name "Snowball Fixed"))
+  (show/set-cue! 1 10 (cues/function-cue :sb-pos :beams-moving (show/fixtures-named "snowball")
+                                         :effect-name "Snowball Moving"))

   ;; TODO: Write a function to create direction cues, like function cues? Unless macro solves.
-  (ct/set-cue! (:cue-grid *show*) 0 8
-               (cues/cue :torrent-dir (fn [var-map]
-                                        (move/direction-effect
-                                         "Pan/Tilt"
-                                         (params/build-direction-param-from-pan-tilt :pan (:pan var-map 0.0)
-                                                                                :tilt (:tilt var-map 0.0)
-                                                                                :degrees true)
-                                         (show/all-fixtures)))
-                         :variables [{:key "pan" :name "Pan"
-                                      :min -180.0 :max 180.0 :start 0.0 :centered true :resolution 0.5}
-                                     {:key "tilt" :name "Tilt"
-                                      :min -180.0 :max 180.0 :start 0.0 :centered true :resolution 0.5}]))
-  (ct/set-cue! (:cue-grid *show*) 1 8
-               (cues/cue :torrent-dir (fn [var-map]
-                                        (move/aim-effect
-                                         "Aim"
-                                         (params/build-aim-param :x (:x var-map 0.0)
-                                                                 :y (:y var-map 0.0)
-                                                                 :z (:z var-map 1.0))
-                                         (show/all-fixtures)))
-                         :variables [{:key "x" :name "X"
-                                      :min -20.0 :max 20.0 :start 0.0 :centered true :resolution 0.05}
-                                     {:key "z" :name "Z"
-                                      :min -20.0 :max 20.0 :start 0.0 :centered true :resolution 0.05}
-                                     {:key "y" :name "Y"
-                                      :min 0.0 :max 20.0 :start 0.0 :centered false :resolution 0.05}]))
-  (ct/set-cue! (:cue-grid *show*) 3 8
-               (cues/function-cue :blade-speed :movement-speed (show/fixtures-named "blade")
-                                  :color :purple :effect-name "Slow Blades"))
+  (show/set-cue! 0 8
+                 (cues/cue :torrent-dir (fn [var-map]
+                                          (move/direction-effect
+                                           "Pan/Tilt"
+                                           (params/build-direction-param-from-pan-tilt :pan (:pan var-map 0.0)
+                                                                                :tilt (:tilt var-map 0.0)
+                                                                                :degrees true)
+                                           (show/all-fixtures)))
+                           :variables [{:key "pan" :name "Pan"
+                                        :min -180.0 :max 180.0 :start 0.0 :centered true :resolution 0.5}
+                                       {:key "tilt" :name "Tilt"
+                                        :min -180.0 :max 180.0 :start 0.0 :centered true :resolution 0.5}]))
+  (show/set-cue! 1 8 (cues/cue :torrent-dir (fn [var-map]
+                                              (move/aim-effect
+                                               "Aim"
+                                               (params/build-aim-param :x (:x var-map 0.0)
+                                                                       :y (:y var-map 0.0)
+                                                                       :z (:z var-map 1.0))
+                                               (show/all-fixtures)))
+                               :variables [{:key "x" :name "X"
+                                            :min -20.0 :max 20.0 :start 0.0 :centered true :resolution 0.05}
+                                           {:key "z" :name "Z"
+                                            :min -20.0 :max 20.0 :start 0.0 :centered true :resolution 0.05}
+                                           {:key "y" :name "Y"
+                                            :min 0.0 :max 20.0 :start 0.0 :centered false :resolution 0.05}]))
+  (show/set-cue! 3 8 (cues/function-cue :blade-speed :movement-speed (show/fixtures-named "blade")
+                                        :color :purple :effect-name "Slow Blades"))

   ;; Some fades
-  (ct/set-cue! (:cue-grid *show*) 0 12
-               (cues/cue :color-fade (fn [var-map]
-                                       (fx/fade "Color Fade"
-                                                (global-color-effect :red :include-color-wheels? true)
-                                                (global-color-effect :green :include-color-wheels? true)
-                                                (params/bind-keyword-param (:phase var-map 0) Number 0)))
-                         :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
-                         :color :yellow))
-
-  (ct/set-cue!
-   (:cue-grid *show*) 1 12
-   (cues/cue :fade-test (fn [var-map]
-                          (fx/fade "Fade Test"
-                                   (fx/blank)
-                                   (global-color-effect :blue :include-color-wheels? true)
-                                   (params/bind-keyword-param (:phase var-map 0) Number 0)))
-             :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
-             :color :cyan))
-
-  (ct/set-cue!
-   (:cue-grid *show*) 2 12
-   (cues/cue :fade-test-2 (fn [var-map]
-                            (fx/fade "Fade Test 2"
-                                     (move/direction-effect
-                                      "p/t" (params/build-direction-param-from-pan-tilt :pan 0 :tilt 0)
-                                      (show/fixtures-named "torrent"))
-                                     (move/direction-effect
-                                      "p/t" (params/build-direction-param-from-pan-tilt :pan 0 :tilt 0)
-                                      (show/fixtures-named "blade"))
-                                     (params/bind-keyword-param (:phase var-map 0) Number 0)))
-             :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
-             :color :red))
-
-  (ct/set-cue!
-   (:cue-grid *show*) 3 12
-   (cues/cue :fade-test-3 (fn [var-map]
-                            (fx/fade "Fade Test P/T"
-                                     (move/pan-tilt-effect
-                                      "p/t" (params/build-pan-tilt-param :pan 0 :tilt 0)
-                                      (show/fixtures-named "torrent"))
-                                     (move/pan-tilt-effect
-                                      "p/t" (params/build-pan-tilt-param :pan 0 :tilt 0)
-                                      (show/fixtures-named "blade"))
-                                     (params/bind-keyword-param (:phase var-map 0) Number 0)))
-             :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
-             :color :orange))
+  (show/set-cue! 0 12 (cues/cue :color-fade (fn [var-map]
+                                              (fx/fade "Color Fade"
+                                                       (global-color-effect :red :include-color-wheels? true)
+                                                       (global-color-effect :green :include-color-wheels? true)
+                                                       (params/bind-keyword-param (:phase var-map 0) Number 0)))
+                                :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
+                                :color :yellow))
+
+  (show/set-cue! 1 12 (cues/cue :fade-test (fn [var-map]
+                                             (fx/fade "Fade Test"
+                                                      (fx/blank)
+                                                      (global-color-effect :blue :include-color-wheels? true)
+                                                      (params/bind-keyword-param (:phase var-map 0) Number 0)))
+                                :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
+                                :color :cyan))
+
+  (show/set-cue! 2 12
+                 (cues/cue :fade-test-2 (fn [var-map]
+                                          (fx/fade "Fade Test 2"
+                                                   (move/direction-effect
+                                                    "p/t" (params/build-direction-param-from-pan-tilt :pan 0 :tilt 0)
+                                                    (show/fixtures-named "torrent"))
+                                                   (move/direction-effect
+                                                    "p/t" (params/build-direction-param-from-pan-tilt :pan 0 :tilt 0)
+                                                    (show/fixtures-named "blade"))
+                                                   (params/bind-keyword-param (:phase var-map 0) Number 0)))
+                           :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
+                           :color :red))
+
+  (show/set-cue! 3 12 (cues/cue :fade-test-3 (fn [var-map]
+                                               (fx/fade "Fade Test P/T"
+                                                        (move/pan-tilt-effect
+                                                         "p/t" (params/build-pan-tilt-param :pan 0 :tilt 0)
+                                                         (show/fixtures-named "torrent"))
+                                                        (move/pan-tilt-effect
+                                                         "p/t" (params/build-pan-tilt-param :pan 0 :tilt 0)
+                                                         (show/fixtures-named "blade"))
+                                                        (params/bind-keyword-param (:phase var-map 0) Number 0)))
+                                :variables [{:key "phase" :min 0.0 :max 1.0 :start 0.0 :name "Fade"}]
+                                :color :orange))

   ;; Some chases
-  (ct/set-cue!
-   (:cue-grid *show*) 0 13
-   (cues/cue :chase (fn [var-map]
-                      (fx/chase "Chase Test"
-                                [(global-color-effect :red :include-color-wheels? true)
-                                 (global-color-effect :green :fixtures (show/fixtures-named "hex"))
-                                 (global-color-effect :blue :include-color-wheels? true)]
-                                (params/bind-keyword-param (:position var-map 0) Number 0)
-                                :beyond :bounce)
-                      )
-             :variables [{:key "position" :min -0.5 :max 10.5 :start 0.0 :name "Position"}]
-             :color :purple))
+  (show/set-cue! 0 13
+                 (cues/cue :chase (fn [var-map]
+                                    (fx/chase "Chase Test"
+                                              [(global-color-effect :red :include-color-wheels? true)
+                                               (global-color-effect :green :fixtures (show/fixtures-named "hex"))
+                                               (global-color-effect :blue :include-color-wheels? true)]
+                                              (params/bind-keyword-param (:position var-map 0) Number 0)
+                                              :beyond :bounce))
+                           :variables [{:key "position" :min -0.5 :max 10.5 :start 0.0 :name "Position"}]
+                           :color :purple))

   ;; Set up an initial value for our step parameter
   (reset! step-param (params/build-step-param :fade-fraction 0.3 :fade-curve :sine))

-  (ct/set-cue!
-   (:cue-grid *show*) 1 13
-   (cues/cue :chase (fn [var-map]
-                      (fx/chase "Chase Test 2"
-                                [(global-color-effect :red :fixtures (show/fixtures-named "hex"))
-                                 (global-color-effect :green :fixtures (show/fixtures-named "blade"))
-                                 (global-color-effect :blue :fixtures (show/fixtures-named "hex"))
-                                 (global-color-effect :white :fixtures (show/all-fixtures))]
-                                @step-param :beyond :loop))
-             :color :magenta))
+  (show/set-cue! 1 13
+                 (cues/cue :chase (fn [var-map]
+                                    (fx/chase "Chase Test 2"
+                                              [(global-color-effect :red :fixtures (show/fixtures-named "hex"))
+                                               (global-color-effect :green :fixtures (show/fixtures-named "blade"))
+                                               (global-color-effect :blue :fixtures (show/fixtures-named "hex"))
+                                               (global-color-effect :white :fixtures (show/all-fixtures))]
+                                              @step-param :beyond :loop))
+                           :color :magenta))

   ;; Some color cycle chases
-  (ct/set-cue! (:cue-grid *show*) 0 15
-               (cues/cue :all-color (fn [_] (fun/iris-out-color-cycle-chase (show/all-fixtures)))))
-  (ct/set-cue! (:cue-grid *show*) 1 15
-               (cues/cue :all-color (fn [_] (fun/wipe-right-color-cycle-chase (show/all-fixtures)
-                                             :transition-phase-function rhythm/snapshot-bar-phase))))
-  (ct/set-cue! (:cue-grid *show*) 2 15
-               (cues/cue :all-color (fn [_] (fun/wipe-right-color-cycle-chase
-                                             (show/all-fixtures)
-                                             :color-index-function rhythm/snapshot-beat-within-phrase
-                                             :transition-phase-function rhythm/snapshot-beat-phase
-                                             :effect-name "Wipe Right Beat")))))
+  (show/set-cue! 0 15 (cues/cue :all-color (fn [_] (fun/iris-out-color-cycle-chase (show/all-fixtures)))))
+  (show/set-cue! 1 15 (cues/cue :all-color
+                                (fn [_] (fun/wipe-right-color-cycle-chase
+                                         (show/all-fixtures)
+                                         :transition-phase-function rhythm/snapshot-bar-phase))))
+  (show/set-cue! 2 15 (cues/cue :all-color (fn [_] (fun/wipe-right-color-cycle-chase
+                                                    (show/all-fixtures)
+                                                    :color-index-function rhythm/snapshot-beat-within-phrase
+                                                    :transition-phase-function rhythm/snapshot-beat-phase
+                                                    :effect-name "Wipe Right Beat")))))

 (defn use-push
   "A trivial reminder of how to connect the Ableton Push to run the


partial full implementation

partial full implementation

--- src/clj/scrabble/logic.clj
+++ src/clj/scrabble/logic.clj
@@ -2,6 +2,7 @@
   (:require [clojure.core.logic :as l]
             [clojure.core.unify :as u]
             [clojure.core.logic.arithmetic :as la]
+            [clojure.core.logic.fd :as fd]
             [clojure.math.combinatorics :as combo]))

 (def words-list ["one" "two" "neo"])
@@ -77,6 +78,8 @@

 (defn init
   [vars hints]
+  (println "Vars = " vars
+           "hints = " hints)
   (if (seq vars)
     (let [hint (first hints)]
       (l/all
@@ -89,11 +92,18 @@
     l/succeed))

 (defn solver
-  [hints]
-  )
+  [hints letters]

-(l/run 2 [q]
-  (l/membero q words-list))
+  (let [vars (repeatedly (count hints) l/lvar)]
+    (l/run 1 [q]
+      ;; the order does matter in the amount of backtracking that gets done
+      (l/== q vars)
+      (l/membero q ["hello"])
+      (l/everyg #(l/membero % letters) vars)
+      (init vars hints))))
+
+(comment
+  (solver "h_ll_" "eo"))

 ;; would be nice to use unification directly but it doesn't work


deleted pvlists-routes in handler.clj

deleted pvlists-routes in handler.clj

--- src/clj/webapp/handler.clj
+++ src/clj/webapp/handler.clj
@@ -30,7 +30,7 @@
   (route/not-found "Not Found"))

 (def app
-  (-> (routes home-routes pdgm-routes pdgmcmp-routes pvdisp-routes pvlgpr-routes pvlgvl-routes pvprvllg-routes pvlists-routes listgen-routes listlgpr-routes listvlcl-routes listlpv-routes app-routes)
+  (-> (routes home-routes pdgm-routes pdgmcmp-routes pvdisp-routes pvlgpr-routes pvlgvl-routes pvprvllg-routes listgen-routes listlgpr-routes listvlcl-routes listlpv-routes app-routes)
       (handler/site)
       (wrap-base-url)))


Fixed typo in function name: use-wildchars

--- src/clj_mrazik/irc_bot.clj
+++ src/clj_mrazik/irc_bot.clj
@@ -132,19 +132,19 @@
     [input]
     (dictionary/find-word input))

-(defn use-wildchards?
+(defn use-wildchars?
     [input]
     (or (.startsWith input "*")
         (.endsWith input "*")))

 (defn one-word-like-this?
     [input]
-    (if (use-wildchards? input)
+    (if (use-wildchars? input)
         (= (dictionary/words-like-this input) 1)))

 (defn more-words-like-this?
     [input]
-    (if (use-wildchards? input)
+    (if (use-wildchars? input)
         (> (dictionary/words-like-this input) 1)))

 (defn return-word-like-this


Docstring format.

Docstring format.

--- src/clj_ravendb/client.clj
+++ src/clj_ravendb/client.clj
@@ -13,14 +13,14 @@
   given url and database.

   Optionally takes a map of options.
-  `:replicated?` is used to find replicated endpoints
-  `:master-only-writes?` is used to indicate that write operations only go to the master
-  `:caching?` is used to indicate if documents should be cached locally
-  `:enable-oauth?` is used to enable oauth with RavenDB
-  `:oauth-url` is the oauth url to use
-  `:oauth-expiry-seconds` is the number of seconds to use an oauth token before requesting a new one
-  `:api-key` the api key to use for oauth autentication
-  `:ssl-insecure? use insecure underlying http requests"
+  *`:replicated?` is used to find replicated endpoints
+  *`:master-only-writes?` is used to indicate that write operations only go to the master
+  *`:caching?` is used to indicate if documents should be cached locally
+  *`:enable-oauth?` is used to enable oauth with RavenDB
+  *`:oauth-url` is the oauth url to use
+  *`:oauth-expiry-seconds` is the number of seconds to use an oauth token before requesting a new one
+  *`:api-key` the api key to use for oauth autentication
+  *`:ssl-insecure? use insecure underlying http requests"
   ([url database]
    (client url database {}))
   ([url database {:keys [caching] :as options


Removed the initial event from the db

Removed the initial event from the db

--- src/cljs/chatapp/core.cljs
+++ src/cljs/chatapp/core.cljs
@@ -14,7 +14,7 @@
 (re-frame/register-handler
  :initialise-db
  (fn [_ _]
-   {:messages      [{:key 0 :style "init" :message "initial message"}]
+   {:messages      []
     :message-input {:text "" :focus true}}))

 (re-frame/register-handler


Remove redundant require

Remove redundant require

--- src/cljs/zetawar/core.cljs
+++ src/cljs/zetawar/core.cljs
@@ -1,6 +1,5 @@
 (ns zetawar.core
   (:require
-   [integrant.core :as ig]
    [integrant.core :as ig]
    [reagent.core :as r]
    [taoensso.timbre :as log]


Adding TODO

Adding TODO

--- src/cljs/zetawar/subs.cljs
+++ src/cljs/zetawar/subs.cljs
@@ -424,6 +424,7 @@
                       :app/targeted-r])
       not-empty))

+;; TODO: this should be removed; you can't treat selected + targeted as a unit
 (deftrack selected-and-targeted-hex [conn]
   (-> @(app conn)
       (select-values [:app/selected-q


correct usage string for types to include dot

--- src/cljs_api_gen/write.clj
+++ src/cljs_api_gen/write.clj
@@ -207,7 +207,9 @@
                         (:removed item) md-strikethru)
         :data (with-out-str (pprint item))
         :history (map history-change-shield (:history item))
-        :signature (map #(hash-map :name (:name item)
+        :signature (map #(hash-map :name (if (= "type" (:type item))
+                                           (str (:name item) ".")
+                                           (:name item))
                                    :args (sig-args %))
                         (:signature item))
         :source-path (source-path item)


Adding the token to ingest management permission cache.

--- src/cmr/indexer/system.clj
+++ src/cmr/indexer/system.clj
@@ -14,7 +14,8 @@
             [cmr.transmit.config :as transmit-config]
             [clojure.string :as str]
             [cmr.common.config :as cfg]
-            [cmr.elastic-utils.config :as es-config]))
+            [cmr.elastic-utils.config :as es-config]
+            [cmr.acl.core :as acl]))

 (def collections-with-separate-indexes
@@ -44,7 +45,8 @@
              :parent-collection-cache nil
              :zipkin (context/zipkin-config "Indexer" false)
              :caches {:acls (ac/create-acl-cache)
-                      :general (cache/create-cache)}
+                      :general (cache/create-cache)
+                      acl/token-imp-cache-key (acl/create-token-imp-cache)}
              :scheduler (jobs/create-scheduler
                           `system-holder
                           [(ac/refresh-acl-cache-job "indexer-acl-cache-refresh")])}]


Remove REPL from GUI

Remove REPL from GUI

as it causes some trouble which I do not understand yet

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/contrib/gui/base.clj
+++ src/conexp/contrib/gui/base.clj
@@ -64,11 +64,9 @@

     ;; tabbed-pane setup
     (let [tabbed-pane (JTabbedPane.),
-          clj-repl    (make-repl main-frame),
           split-pane  (JSplitPane. JSplitPane/VERTICAL_SPLIT)]
       (doto split-pane
         (.setTopComponent tabbed-pane)
-        (.setBottomComponent clj-repl)
         (.setOneTouchExpandable true)
         (.setResizeWeight 1.0))
       (doto (.getContentPane main-frame)


API 접근 허용을 위해서 Access-Control-Allow-Origin: * 적용

--- src/clj/cauca/component/rest.clj
+++ src/clj/cauca/component/rest.clj
@@ -86,6 +86,7 @@
   (log/log-message "uri=" uri ", json=" json)
   (-> (resp/response json)
     (resp/status status)
+    (resp/header "Access-Control-Allow-Origin" "*")
     (resp/content-type "application/json; charset=utf-8")
     )
   )


Adjustments to the previous gathering

Adjustments to the previous gathering

--- src/clj/chili_dog_night/data.clj
+++ src/clj/chili_dog_night/data.clj
@@ -5,9 +5,10 @@
                   :address "3828 Meridian Ave N, Seattle, WA 98103, USA"
                   :synopsis "March 2nd, 2016: Chili Dogs, Fuller House, The Intern, and Before We Go."
                   :food ["Chili Dogs"
+                         "King's Hawaiian Original Sweet Dinner Rolls"
                          "Red Velvet Oreo Sandwich Cookies"
                          "Oreo Mega Stuf Chocolate Sandwich Cookies"
-                         "Chips Ahoy! Original Chocolate Chip"]
+                         "Chips Ahoy! Original Chocolate Chip Cookies"]
                   :attendees ["Alex Sanchez"
                               "Greg Ryan"
                               "Jason Aumann"
@@ -34,6 +35,10 @@
                           (el/link-to "http://www.avclub.com/review/netflixs-fuller-house-porn-parody-without-porn-232696" "Fuller House is like a porn parody without the porn")
                           [:br]
                           (el/link-to "https://www.youtube.com/watch?v=fJWmbLS2_ec" "Kokomo")
+                          [:br]
+                          (el/link-to "https://www.youtube.com/watch?v=UCJJ1iZuoQ4" "Dekkar")
+                          " performs at "
+                          (el/link-to "https://www.youtube.com/watch?v=ANNOQWby8R8" "The 4th Annual Live On Cinema Oscar Special")
                           [:br]
                           (el/link-to "http://www.imdb.com/name/nm1913734/" "The")
                           " "


fetch assets with https?

fetch assets with https?

--- src/clj/clojurelive_web/view.clj
+++ src/clj/clojurelive_web/view.clj
@@ -6,12 +6,12 @@
    [:title "Clojure Live - Up-to-date news on Clojure, ClojureScript, and Datomic"]
    [:meta {:name "viewport" :content "width=device-width, initial-scale=1"}]

-   (h/include-css "css/vendor/normalize.css"
-                  "css/vendor/bootstrap.min.css"
-                  "css/flat-ui.min.css"
-                  "css/main.css")
-   (h/include-js "js/vendor/jquery.min.js"
-                 "js/flat-ui.min.js")])
+   (h/include-css "//css/vendor/normalize.css"
+                  "//css/vendor/bootstrap.min.css"
+                  "//css/flat-ui.min.css"
+                  "//css/main.css")
+   (h/include-js "//js/vendor/jquery.min.js"
+                 "//js/flat-ui.min.js")])

 (def body
   [:body
@@ -39,7 +39,7 @@
    [:script {:type "text/javascript"}
     "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-62980400-1', 'auto');ga('send', 'pageview');"]

-   (h/include-js "js/main.js")])
+   (h/include-js "//js/main.js")])

 (defn splash []
   (h/html5 [:html


added benchmark helper to impl

added benchmark helper to impl

--- src/clj/com/rpl/specter/impl.clj
+++ src/clj/com/rpl/specter/impl.clj
@@ -3,6 +3,11 @@
   (:require [clojure.walk :as walk]
             [clojure.core.reducers :as r])
   )
+
+(defn benchmark [iters afn]
+  (time
+   (dotimes [_ iters]
+     (afn))))

 (defprotocol CoerceStructureValsPath
   (coerce-path [this]))


fixed chat message

fixed chat message

--- src/clj/funstructor/commands.clj
+++ src/clj/funstructor/commands.clj
@@ -160,11 +160,11 @@
   (let [game-id (u/uuid-from-string (get-in command [:data :game-id]))
         message (get-in command [:data :message])
         player-id (gs/player-for-channel (gs/current-global-state) channel)]
-    (send-command {:type :chat-message-response
-                   :data {:player-id (gs/get-player-name (gs/current-global-state) player-id)
-                          :message message}}
-                  (map #(gs/channel-for-player (gs/current-global-state) %)
-                       (f/get-game-players (gs/get-game (gs/current-global-state) game-id))))))
+    (send-command-by-channels {:type :chat-message-response
+                               :data {:player-id (gs/get-player-name (gs/current-global-state) player-id)
+                                      :message message}}
+                              (map #(gs/channel-for-player (gs/current-global-state) %)
+                                   (f/get-game-players (gs/get-game (gs/current-global-state) game-id))))))

 (defmethod handle-command :default [command channel]
   (u/printerr "Unrecognized command: " command))


drop :access from state after using Film Critic if run has ended

--- src/clj/game/cards-resources.clj
+++ src/clj/game/cards-resources.clj
@@ -245,7 +245,8 @@
                                 (swap! state update-in [side :prompt] rest)
                                 (when-let [run (:run @state)]
                                   (when (and (:ended run) (empty? (get-in @state [:runner :prompt])) )
-                                    (handle-end-run state :runner)))))
+                                    (handle-end-run state :runner)
+                                    (swap! state dissoc :access)))))
                  :msg (msg "host " (:title (:card (first (get-in @state [side :prompt])))) " instead of accessing it")}
                 {:cost [:click 2] :label "Add hosted agenda to your score area"
                  :req (req (not (empty? (:hosted card))))


fix cljs.spec.test.alpha$macros bug in the build API

--- src/cljs/snapshot/lumo/repl.cljs
+++ src/cljs/snapshot/lumo/repl.cljs
@@ -858,8 +858,10 @@
   ([form]
    (eval form (.-name *ns*)))
   ([form ns]
+   (eval form ns env/*compiler*))
+  ([form ns compiler]
    (let [result (volatile! nil)]
-     (cljs/eval st form
+     (cljs/eval compiler form
        {:ns ns
         :context :expr
         :def-emits-var true}


Moved reset code into a single function.

--- src/cmr/mock_echo/api/routes.clj
+++ src/cmr/mock_echo/api/routes.clj
@@ -17,13 +17,17 @@
             [cmr.mock-echo.data.provider-db :as provider-db]
             [cmr.mock-echo.data.acl-db :as acl-db]))

+(defn reset
+  [context]
+  (token-db/reset context)
+  (provider-db/reset context)
+  (acl-db/reset context))
+
 (defn- build-routes [system]
   (routes

     (POST "/reset" {context :request-context}
-      (token-db/reset context)
-      (provider-db/reset context)
-      (acl-db/reset context)
+      (reset context)
       {:status 204})

     ;; Add routes


Fix docs typos

Fix docs typos

--- src/com/wsscode/pathom/core.cljc
+++ src/com/wsscode/pathom/core.cljc
@@ -1100,7 +1100,7 @@

   ::pp/max-key-iterations - there is a loop that happens when processing attributes in
   parallel, this loop will cause multiple iterations to happen in order for a single
-  atribute to be processed, but in some conditions this loop can go indefinely, to
+  attribute to be processed, but in some conditions this loop can go indefinitely, to
   prevent this situation this option allows to control the max number of iterations, after
   that it will give up on processing that attribute. Default: 10


Ignore favicon

Ignore favicon

--- dev/src/yada/dev/docsite.clj
+++ dev/src/yada/dev/docsite.clj
@@ -108,7 +108,8 @@
   (routes [component]
     (try
       [""
-       [["/index.html" (index component)]
+       [["/favicon.ico" (yada nil)]
+        ["/index.html" (index component)]

         ["/hello.html" (hello/index)]

@@ -134,6 +135,7 @@
                                        [:meta {:name "viewport" :content "width=device-width,initial-scale=1"}]
                                        [:title (.getName f)]
                                        [:style {:type "text/css"} (slurp (io/resource "style.css"))]]
+
                                       [:body
                                        [:p "The " [:span {:class "yada"} "yada"] " manual"]
                                        (md-to-html-string (slurp f)) \newline])


Some skeleton implementation for inf-irreducible lattice layouts

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/layout/util.clj
+++ src/conexp/layout/util.clj
@@ -56,4 +56,27 @@
 		   (let [order (order lattice)]
 		     (filter #(order [% x]) (base-set lattice))))))))

+
+;;; inf-irreducible additive layout
+
+(defn vector-plus
+  "Implements pointwise plus for vectors."
+  [vec1 vec2]
+  (vec (map + vec1 vec2)))
+
+(defn place-inf-irr-by-coatoms
+  "Places all other inf-irreducible elements of lattice by placement
+  of coatoms."
+  [lattice placement]
+  'to-be-done)
+
+(defn layout-by-coatom-placement
+  "Computes inf-irreducible additive layout of lattice by given
+  positions of the coatoms of lattice. placement should be a hash-map
+  with the coatoms of lattice as keys and positions as values."
+  [lattice placement]
+  (let [inf-irr (place-inf-irr-by-coatoms lattice placement)]
+    ; then place all others
+    'to-be-done))
+
 nil


Scale functions for layouts added.

Scale functions for layouts added.

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/layout/util.clj
+++ src/conexp/layout/util.clj
@@ -1,24 +1,66 @@
 (ns conexp.layout.util
-  (:use conexp.graphics.base
+  (:use conexp.base
+	conexp.graphics.base
 	conexp.fca.lattices
-	clojure.contrib.graph))
+	[clojure.contrib.graph :exclude (transitive-closure)]))

-(defn lattice->graph [lattice]
+(defn lattice->graph
+  "Converts given lattice to it's corresponding graph with loops
+  removed."
+  [lattice]
   (remove-loops
    (struct-map directed-graph
      :nodes (base-set lattice)
-     :neighbors (memoize
+     :neighbors (memoize
 		 (fn [x]
 		   (let [order (order lattice)]
 		     (filter #(order [x %]) (base-set lattice))))))))

-(defn layers [lattice]
+(defn layers
+  "Returns the layers of the given lattice, that is sequence of points
+  with equal heights."
+  [lattice]
   (dependency-list (lattice->graph lattice)))

 (defn scale-points-to-rectangle
-  "Scales the collection of points such that they fit int the
+  "Scales the collection of points such that they fit in the
   rectangle given by [x1 y1] and [x2 y2]."
   [[x1 y1] [x2 y2] points]
-  'to-be-done)
+  (if (empty? points)
+    (illegal-argument (str "Cannot scale empty sequence of points.")))
+  (if (or (= x1 x2)
+	  (= y1 y2))
+    (illegal-argument (str "Cannot scale to rectangle with size 0.")))
+  (let [[x0 y0] (first points)
+	[x_min y_min x_max y_max] (loop [x_min x0
+					 y_min y0
+					 x_max x0
+					 y_max y0
+					 points (rest points)]
+				    (if (empty? points)
+				      [x_min y_min x_max y_max]
+				      (let [[x y] (first points)]
+					(recur (min x x_min)
+					       (min y y_min)
+					       (max x x_max)
+					       (max y y_max)
+					       (rest points)))))
+	a_x (/ (- x1 x2) (- x_min x_max))
+	b_x (- x1 (* a_x x_min))
+	a_y (/ (- y1 y2) (- y_min y_max))
+	b_y (- y1 (* a_y y_min))]
+    (map (fn [[x y]]
+	   [(+ (* a_x x) b_x) (+ (* a_y y) b_y)])
+	 points)))
+
+(defn scale-layout
+  "Scales given layout to rectangle (x1 y1), (x2 y2). Layout is given
+  as a map of points to coordinates and a sequence of connection pairs."
+  [[x1 y1] [x2 y2] [points-to-coordinates point-connections]]
+  (let [points (seq points-to-coordinates)]
+    [(apply hash-map (interleave (map first points)
+				 (scale-points-to-rectangle [x1 y1] [x2 y2]
+							    (map second points))))
+     point-connections]))

 nil


Make toc in format-sexp optional

Make toc in format-sexp optional

This is used in neu-als-hörbuch

--- src/catalog/layout/fop.clj
+++ src/catalog/layout/fop.clj
@@ -307,10 +307,11 @@

 (defn format-sexp
   ([items fmt level]
-   (format-sexp items fmt level nil))
-  ([items fmt level path-to-numbers]
+   (format-sexp items fmt level nil true))
+  ([items fmt level path-to-numbers with-toc?]
    [(heading (level-to-h level) [fmt] path-to-numbers)
-    (toc items [fmt] 2 nil)
+    (when with-toc?
+      (toc items [fmt] 2 nil))
     (set-marker (layout/translations fmt))
     (case fmt
       ;; handle the special case where the editorial or the recommendations are passed in the tree
@@ -519,7 +520,7 @@
        (block {:break-before "odd-page"}) ;; toc should start on recto
        (toc subitems [] 3 path-to-numbers :heading? true)
        (block {:break-before "odd-page"}) ;; the very first format should start on recto
-       (mapcat #(format-sexp (get subitems %) % 1 path-to-numbers) (order (keys subitems)))])]])
+       (mapcat #(format-sexp (get subitems %) % 1 path-to-numbers false) (order (keys subitems)))])]])

 (defmethod document-sexp :all-formats
   [items _ _ _ {:keys [description date]}]


give new-thread-view a constant react-id

need this so that the input doesn't get clobbered when the open threads
changes, since otherwise on re-render the new-thread-view is recreated
from scratch

--- src/chat/client/views.cljs
+++ src/chat/client/views.cljs
@@ -131,7 +131,7 @@
                             :onClick (fn [_] (dispatch! :logout nil))} "Log Out")))
           (apply dom/div #js {:className "threads"}
             (concat (om/build-all thread-view threads {:key :id})
-                    [(om/build new-thread-view {})])))))))
+                    [(om/build new-thread-view {} {:react-key "new-thread"})])))))))

 (defn login-view [data owner]
   (reify


remove unused file

remove unused file

--- src/chessground/react.cljs
+++ src/chessground/react.cljs
@@ -1,12 +0,0 @@
-(ns chessground.react
-  (:require [chessground.common :refer [pp]]))
-
-(def dom (.-DOM js/React))
-
-(def div (.-div dom))
-
-(defn class-set [obj]
-  (-> obj
-      js/Object.keys
-      (.filter #(aget obj %))
-      (.join " ")))


Send nice messages on known errors from binary client.

--- src/clj/fleetdb/server.clj
+++ src/clj/fleetdb/server.clj
@@ -63,7 +63,8 @@
               (let [result (process-query dba query)]
                 (io/dos-write out [0 result]))))
           (catch Exception e
-            (io/dos-write out [1 (stacktrace/pst-str e)])))
+            (io/dos-write out
+              [1 (if (raised? e) (str e) (stacktrace/pst-str e))])))
         (recur)))
     (catch Exception e
       (stacktrace/pst-on System/err false e)


Rainbow test

Rainbow test

--- src/clj_mrazik/irc_bot.clj
+++ src/clj_mrazik/irc_bot.clj
@@ -155,6 +155,8 @@
                           "die"      "thanks for your feedback, I appreciate it"
                           "Good bot" "I know"
                           "Good bot." "I know"
+                          "rainbow"   (apply str (for [color (range 16)]
+                                                     (str (char 3) (format "%02d" color) "test" (char 3) "99")))
                           (cond
                               (and number-cruncher? (is-number? input))               (print-prime-factors input)
                               (and number-cruncher? (is-two-numbers? input))          (print-gcd input)


Get corpus from the query string

Get corpus from the query string

--- src/cljs/cglossa/core.cljs
+++ src/cljs/cglossa/core.cljs
@@ -50,7 +50,9 @@
              (reset! (get model-state model-name) data)
              (.error js/console (str "Error: " body))))))))

-(get-models "/corpus" {:code "bokmal"})
+(if-let [corpus (second (re-find #"corpus=(\w+)" (.-location.search js/window)))]
+  (get-models "/corpus" {:code corpus})
+  (js/alert "Please provide a corpus in the query string (on the form corpus=mycorpus)"))

 (defn ^:export main []
   (r/render


Organize code

Organize code

--- src/cljs/pizarra/core.cljs
+++ src/cljs/pizarra/core.cljs
@@ -92,18 +92,6 @@
                                (om/transact! data [:actions idx] #(-move line-tool % x y)))))}))
         nil))))

-(defn history [undo-history owner]
-  (reify
-    om/IRender
-    (render [_]
-      (dom/div nil
-               (when (undo/undo-is-possible)
-                 (dom/button #js {:onClick (fn [_] (undo/do-undo app-state))}
-                             "Undo"))
-               (when (undo/redo-is-possible)
-                 (dom/button #js {:onClick (fn [_] (undo/do-redo app-state))}
-                             "Redo"))))))
-
 (defn tools-component [tools owner]
   (reify
     om/IRender
@@ -130,18 +118,34 @@
                (om/build tools-component (:tools app))
                (om/build canvas (:canvas app))))))

-(undo/init-history app-state)
-
 (om/root
   app-component
   app-state
   {:target (. js/document (getElementById "app"))
    :tx-listen undo/handle-transaction})

+;; History management
+
+(defn history [undo-history owner]
+  (reify
+    om/IRender
+    (render [_]
+      (dom/div nil
+               (when (undo/undo-is-possible)
+                 (dom/button #js {:onClick (fn [_] (undo/do-undo app-state))}
+                             "Undo"))
+               (when (undo/redo-is-possible)
+                 (dom/button #js {:onClick (fn [_] (undo/do-redo app-state))}
+                             "Redo"))))))
+
+(undo/init-history app-state)
+
 (om/root
   history
   undo/app-history
   {:target (. js/document (getElementById "history"))})
+
+;; Keyboard shortcuts

 (.bind js/Mousetrap #js ["u" "ctrl+z" "command+z"] #(undo/do-undo app-state))
 (.bind js/Mousetrap #js ["ctrl+r"] #(undo/do-redo app-state))


Fix loading of "move-through-friendly" settings

--- src/cljs/zetawar/game.cljs
+++ src/cljs/zetawar/game.cljs
@@ -969,7 +969,8 @@
     :game/flanking-attack-bonus (:flanking-attack-bonus settings-def)
     :game/opposite-attack-bonus (:opposite-attack-bonus settings-def)
     :game/stochastic-damage (:stochastic-damage settings-def)
-    :game/self-repair (:self-repair settings-def)}])
+    :game/self-repair (:self-repair settings-def)
+    :game/move-through-friendly (:move-through-friendly settings-def)}])

 (defn terrain-types-tx [game terrains-def]
   (into []


Fix api jars-by-groupname performance

Fix api jars-by-groupname performance

Sqlite explain shows that without restricting join queries by
group_name, sqlite is doing full table scans.
Quick dotimes 1000 shows improvement from 15 seconds to 800ms on my
computer.

--- src/clojars/routes/api.clj
+++ src/clojars/routes/api.clj
@@ -20,6 +20,7 @@
             "join "
             "(select jar_name, group_name, max(created) as created "
             "from jars "
+            "where group_name = ? "
             "group by group_name, jar_name) l "
             "on j.jar_name = l.jar_name "
             "and j.group_name = l.group_name "
@@ -30,12 +31,15 @@
             "(select jar_name, group_name, max(created) as created "
             "from jars "
             "where version not like '%-SNAPSHOT' "
+            "and group_name = ? "
             "group by group_name, jar_name) r "
             "on j.jar_name = r.jar_name "
             "and j.group_name = r.group_name "
             ;; Find version for latest release
             "left join "
-            "(select jar_name, group_name, version, created from jars) as r2 "
+            "(select jar_name, group_name, version, created from jars "
+            "where group_name = ? "
+            ") as r2 "
             "on j.jar_name = r2.jar_name "
             "and j.group_name = r2.group_name "
             "and r.created = r2.created "
@@ -44,7 +48,7 @@
             "order by j.group_name asc, j.jar_name asc"]
         (remove nil?)
         (apply str))
-      (remove nil? [group-id artifact-id])]
+      (remove nil? [group-id group-id group-id group-id artifact-id])]
      :results)))

 (defn get-artifact [group-id artifact-id]


Call browse-projects with correct arity. #86

--- src/clojars/web/browse.clj
+++ src/clojars/web/browse.clj
@@ -13,7 +13,7 @@
      [:h1 "All projects"]
      (page-description page per-page project-count)
      [:ul
-      (for [jar (browse-projects page)]
+      (for [jar (browse-projects page per-page)]
         [:li.browse-results
           (jar-link jar) " " (h (:version jar))
           [:br]


Actually just use two blues

Actually just use two blues

Otherwise, too busy

--- planck-cljs/src/planck/themes.cljs
+++ planck-cljs/src/planck/themes.cljs
@@ -25,9 +25,9 @@

 (def ^:private dark
   (merge theme-ansi-base
-    {:results-fn   ansi/green
+    {:results-fn   ansi/bold-blue
      :ex-msg-fn    ansi/bold-red
-     :ex-stack-fn  ansi/yellow
+     :ex-stack-fn  ansi/green
      :err-font     ansi/red-font
      :verbose-font ansi/white-font}))


Whitespace formatting

Whitespace formatting

--- planck-cljs/src/planck/repl.cljs
+++ planck-cljs/src/planck/repl.cljs
@@ -219,7 +219,7 @@
   constructor named by closure-namespace to the current namespace. Use :import in the ns
   macro in preference to calling this directly."}
     load-file      {:arglists ([name])
-                    :doc     "Sequentially read and evaluate the set of forms contained in the file."}
+                    :doc      "Sequentially read and evaluate the set of forms contained in the file."}
     doc            {:arglists ([name])
                     :doc      "Prints documentation for a var or special form given its name"}
     source         {:arglists ([name])