more map matchers

more map matchers

--- src/matcha.clj
+++ src/matcha.clj
@@ -23,7 +23,6 @@
 ;;  if pass? if false
 ;;
 ;;  TODO: matchers list
-;;  - has-entry
 ;;  - has-key
 ;;  - has-value
 (defn describe-list [call xs]
@@ -199,10 +198,10 @@
   (on #(nth % n) m "nth value" "a collection"))

 (defn has-entry
-  "passes if the sequence received has the given map-entry
-
-  (matcha/run-match (matcha/has-entry [:a 1]) {:a 1}) ; => passes
-  (matcha/run-match (matcha/has-count [:a 1]) {:a 2})  ; => fails"
+  "passes if the map received has the given map-entry
+
+  (matcha/run-match (matcha/has-entry :a 1) {:a 1}) ; => passes
+  (matcha/run-match (matcha/has-entry :a 1) {:a 2})  ; => fails"
   [k v]
   {:match (fn [m] (core/= (get m k) v))
    :description (str "a map with entry " (pr-str k) " " (pr-str v))
@@ -211,6 +210,36 @@
      (if (core/contains? m k)
        (str "a map with " (pr-str (get m k)) " at key " (pr-str k) " should have had " (pr-str v) " (was " (pr-str m) ")")
        (str "a map not containing the key " (pr-str k) " (was " (pr-str m) ")")))})
+
+(defn has-entry-that
+  "passes if the map received has a value at the key given that matches the matcher
+
+  (matcha/run-match (matcha/has-entry-that :a (matcha/= 1)) {:a 1}) ; => passes
+  (matcha/run-match (matcha/has-entry-that :a (matcha/= 2)) {:a 2})  ; => fails"
+  [k matcher]
+  {:match (fn [m] ((:match matcher) (get m k)))
+   :description (str "a map with entry " (pr-str k) " that " (:description matcher))
+   :describe-mismatch
+   (fn [m]
+     (if (core/contains? m k)
+       (str "a map with "
+            ((:describe-mismatch matcher describe-class-mismatch) (get m k))
+            " at key "
+            (pr-str k)
+            " (was " (pr-str m) ")")
+       (str "a map not containing the key " (pr-str k) " (was " (pr-str m) ")")))})
+
+(defn has-val
+  "passes if the map received has the given val
+
+  (matcha/run-match (matcha/has-val 1) {:a 1}) ; => passes
+  (matcha/run-match (matcha/has-val 1) {:a 2})  ; => fails"
+  [v]
+  {:match (fn [m] (core/some #{v} (vals m)))
+   :description (str "a map with val " (pr-str v))
+   :describe-mismatch
+   (fn [m]
+     (str "vals: " (vals m) " (was " (pr-str m) ")"))})

 (defn includes
   "passes if the sequence received includes the given item


optimized ns/require

optimized ns/require

--- test/gorillalabs/tesla/component/appstate_test.clj
+++ test/gorillalabs/tesla/component/appstate_test.clj
@@ -1,15 +1,8 @@
 (ns gorillalabs.tesla.component.appstate-test
   (:require [clojure.test :refer :all]
-            [gorillalabs.tesla.component.appstate :as app-status]
-            [environ.core :as env]
             [clojure.data.json :as json]
-            [clojure.tools.logging :as log]
-            [gorillalabs.tesla.util.test-utils :as u]
-            [gorillalabs.tesla.component.handler :as handler]
             [ring.mock.request :as mock]
             [de.otto.status :as s]
-            [mount.core :as mnt]
-            [gorillalabs.tesla :as tesla]
             [gorillalabs.tesla.component.appstate :as appstate]))


Small "improvements" for implementation of Ryssels Algorithm

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

--- src/conexp/contrib/experimental/ryssel_algorithm.clj
+++ src/conexp/contrib/experimental/ryssel_algorithm.clj
@@ -16,7 +16,11 @@
 ;;;

 (defn- covers? [base-set sets]
-  (subset? base-set (reduce union #{} sets)))
+  (let [all-set (reduce! (fn [all set]
+                           (reduce conj! all set))
+                         #{}
+                         sets)]
+    (subset? base-set all-set)))

 (defn- redundant? [cover]
   (exists [set cover]
@@ -25,7 +29,8 @@
 (defn- minimum-covers [base-set sets]
   (if-not (covers? base-set sets)
     []
-    (let [sets   (vec (sort #(>= (count %1) (count %2)) sets)),
+    (let [drop   (memoize drop),
+          sets   (vec (sort #(>= (count %1) (count %2)) sets)),
           result (atom (transient [])),
           search (fn search [rest-base-set current-cover i]
                    (cond


Migrate go slide to an om component

Migrate go slide to an om component

Need to do the rest now

--- src-cljs/qcon/main.cljs
+++ src-cljs/qcon/main.cljs
@@ -19,7 +19,6 @@
 (def debug false)

 ;; A protocol for custom slides
-
 (defprotocol Slide
   (init-slide-state [_])
   (render-slide [_ data owner]))
@@ -137,28 +136,29 @@
             [:text {:x -10 :y 10 :style {:font-size "32pt"}} (str (om/get-state owner :label))]]
 ))))))

-(defrecord GoBlockSlide [opts]
-  Slide
-  (init-slide-state [_]
-    (let [circles (:circles opts)]
-      {:default-font (:font-size opts)
-       :circles (for [n (range circles)]
-                  (let [angle (* n (/ (* 2 Math/PI) circles))
-                        offset 250]
-                    (create-circle offset angle)))}))
-
-  (render-slide [_ data owner]
-    (let [default-font (om/get-state owner :default-font)]
-      [:div
-       [:svg {:version "1.1" :width 600 :height 600}
-        [:g
-         [:rect {:x 0 :y 0 :width 600 :height 600 :fill "#292"}]
-         (for [c (om/get-state owner :circles)]
-           (om/build c data))
-
-         #_[:text {:x 20 :y 120 :fill "#f00" :style {:font-size "80pt"}} "Hello Ruben, buon compleano!!!"]
-         ]
-        ]])))
+(defn go-block-slide [data owner opts]
+  (reify
+    om/IInitState
+    (init-state [_]
+      (let [circles (:circles opts)]
+        {:default-font (:font-size opts)
+         :circles (for [n (range circles)]
+                    (let [angle (* n (/ (* 2 Math/PI) circles))
+                          offset 250]
+                      (create-circle offset angle)))}))
+    om/IRender
+    (render [_]
+      (let [default-font (om/get-state owner :default-font)]
+        (html
+         [:div
+          [:svg {:version "1.1" :width 600 :height 600}
+           [:g
+            [:rect {:x 0 :y 0 :width 600 :height 600 :fill "#292"}]
+            (for [c (om/get-state owner :circles)]
+              (om/build c data))
+            #_[:text {:x 20 :y 120 :fill "#f00"
+                      :style {:font-size "80pt"}}
+               "Hello Ruben, buon compleano!!!"]]]])))))

 (def app-model
   (atom {:current-slide 8
@@ -183,20 +183,22 @@

           {:subtitle "channels (TODO)"}

-          {:subtitle "put and take"
+          #_{:subtitle "put and take"
            :custom (PutAndTakeSlide. {:buffer-size 7 :font-size "72pt" :radius 50})}

-          {:subtitle "timeouts"
+          #_{:subtitle "timeouts"
            :custom (TimeoutSlide. {:font-size "72pt"})}

           {:subtitle "buffers (TODO)"
            :code "(<! (chan))"}

-          {:subtitle "alts!"
+          #_{:subtitle "alts!"
            :custom (AltsSlide. {:font-size "30pt"})}

           {:subtitle "go blocks"
-           :custom (GoBlockSlide. {:font-size "80pt" :circles 5})}
+           :custom go-block-slide
+           :opts {:font-size "80pt" :circles 5}
+           }
           ;; Show result of race in alts! between a channel and a timeout

           ;; Go blocks
@@ -234,15 +236,16 @@

 (defn slide [data owner current]
   (reify
-    om/IInitState
-    (init-state [_]
+    #_om/IInitState
+    #_(init-state [_]
       (when-let [custom (:custom data)]
         (init-slide-state (om/value custom))))
     om/IRender
     (render [_]
       (html
        (if-let [bg (:background data)]
-         [:img {:class (str "slide " (:class data)) :src bg
+         [:img {:class (str "slide " (:class data))
+                :src bg
                 :style {:width "100%"
                         :height "100%"}}]

@@ -266,7 +269,8 @@
              )

            (when-let [custom (:custom data)]
-             (when (satisfies? Slide (om/value custom))
+             (om/build custom data {:opts (:opts data)})
+             #_(when (satisfies? Slide (om/value custom))
                (render-slide (om/value custom) data owner)))

            (when-let [event (:event data)]


Fix OrderedContest validation

Fix OrderedContest validation

util/validate-no-missing-elements now takes a vector element-path.

--- src/vip/data_processor/validation/v5/ordered_contest.clj
+++ src/vip/data_processor/validation/v5/ordered_contest.clj
@@ -2,4 +2,4 @@
   (:require [vip.data-processor.validation.v5.util :as util]))

 (def validate-no-missing-contest-ids
-  (util/validate-no-missing-elements :ordered-contest :contest-id))
+  (util/validate-no-missing-elements :ordered-contest [:contest-id]))


Tweaks to simulator impl

Tweaks to simulator impl

--- src/clj_bots/pin_ctrl_simulator/implementation.clj
+++ src/clj_bots/pin_ctrl_simulator/implementation.clj
@@ -8,7 +8,7 @@
 ;; This stuff really needs to be part of the core library

 (def full-available-modes
-  #{:input :output :input-rising :input-falling :input-both :ain :aout :pwm})
+  #{:input :output :ain :aout :pwm})

 (def available-modes
   #{:gpio :ain :aout :pwm})
@@ -38,7 +38,7 @@
 (defmulti read-pin*
   "Inner method for reading from a pin; dispatches on pin mode"
   (fn [board pin-n]
-    (get (pcp/current-pin-modes board) pin-n)))
+    (pc/current-pin-modes board) pin-n))

 ;; In addition to the standard protocol functions, we also need something which let's us set the state of
@@ -75,7 +75,9 @@
   (read-value [board pin-n]
     (read-pin* board pin-n))

-  pcp/PAinPin
+  pcp/PAnalogPin
+  (analog-bits [board pin-n]
+    (get-in board [:config :analog-bits pin-n]))
   (read-raw-value [board pin-n]
     (assert (= (current-pin-mode board pin-n) :ain)
             "Only :ain pins have raw values")


Only convert CQL result metadata if response actually contains it

--- src/clojure/clojurewerkz/cassaforte/conversion.clj
+++ src/clojure/clojurewerkz/cassaforte/conversion.clj
@@ -88,7 +88,10 @@

 (defn from-cql-result
   [^CqlResult result]
-  {:num    (.getNum result)
-   :schema (from-cql-metadata (.getSchema result))
-   :type   (.getType result)
-   :rows   (map from-cql-row (.getRows result))})
+  (let [base   {:num    (.getNum result)
+                :type   (.getType result)
+                :rows   (map from-cql-row (.getRows result))}
+        schema (.getSchema result)]
+    (if schema
+      (assoc base :schema (from-cql-metadata schema))
+      base)))


Fix bad doc

Fix bad doc

--- src/midje/emission/plugins/default_failure_lines.clj
+++ src/midje/emission/plugins/default_failure_lines.clj
@@ -80,7 +80,7 @@
    (str "    " ecosystem/issues-url)
    (str "    But first check " ecosystem/syntax-errors-that-will-not-be-fixed)
    (str)
-   (str "    In the repl, you can jump to those pages with `(guide file-issue)` and")
+   (str "    In the repl, you can jump to those pages with `(guide file-an-issue)` and")
    (str "    `(guide unfixed-syntax-errors)`.")
    (str "    Please include the following stack trace and your Midje version.")
    (indented (:stacktrace m))))


Add check to mil-add ugen to avoid server crashes when rates aren't similar

--- src/overtone/sc/machinery/ugen/metadata/basicops.clj
+++ src/overtone/sc/machinery/ugen/metadata/basicops.clj
@@ -25,5 +25,6 @@
            {:name "add" :doc "Addition Value"}],
     :rates #{:dr :ir :ar :kr}
     :default-rate :auto
+    :check (same-rate-as-first-input)
     :doc "Multiply the input source by mul then add the add value. Equivalent to, but more efficient than,  (+ add (* mul in))"}
    ])


don't (take 1 bolts): just bolts, for now

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -116,7 +116,7 @@
                                   language-model (+ total-depth (count path))
                                   :max-total-depth max-total-depth
                                   :truncate-children truncate-children))
-        (take 1 bolts))
+        bolts)
        language-model
        total-depth
        (rest comp-paths)


simplify index set-handling in (defn lightning-bolts)

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -104,21 +104,21 @@
                      cat (get-in spec [:synsem :cat])
                      pred-set (if (:pred2lex language-model) (get (:pred2lex language-model) pred))
                      cat-set (if (:cat2lex language-model) (get (:cat2lex language-model) cat))
+                     non-empty-index-sets (filter #(not (empty? %))
+                                                  [cat-set pred-set])
                      subset
                      (cond
-                       (and (not (= :top pred)) (not-empty pred-set)
-                            (not (= :top cat)) (not-empty cat-set))
-                       (intersection-with-identity pred-set cat-set)
-
-                       (and (not (= :top cat)) (not-empty cat-set))
-                       cat-set
-
-                       (and (not (= :top pred)) (not-empty pred-set))
-                       pred-set
+                       (not (empty? non-empty-index-sets))
+                       (reduce intersection-with-identity non-empty-index-sets)

                        true
-                       (get-lex parent :head (:index language-model)))]
-                 (over/overh parent (lazy-shuffle subset))))
+                       (do
+                         (log/warn (str "no index found for spec: " (strip-refs spec)))
+                         (get-lex parent :head (:index language-model))))]
+                 (log/debug (str "lightning-bolts: OPTIM size of subset of candidate heads: " (count subset) " with spec: " (strip-refs spec) " and parent:  " (:rule parent)))
+                 (let [result (over/overh parent (lazy-shuffle subset))]
+                   (log/debug (str "lightning-bolts: OPTIM surviving candidate heads: " (count result)))
+                   result)))
              parents))
           phrasal ;; 2. generate list of all phrases where the head child of each parent is itself a phrase.
           (if (and (< total-depth max-total-depth)


re-added filter-by function

re-added filter-by function

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -108,10 +108,14 @@
      (rest val-at-paths)
      model)))

+(defn filter-by [bolt-and-comps]
+  (not (some empty? (vals bolt-and-comps))))
+
 (defn nugents [model spec & [max-depth]]
   (log/debug (str "nugents:" (strip-refs spec)))
   (let [max-depth (or max-depth babel.generate/max-total-depth)
-        bolts-and-comps (bolts-with-comps spec model 0 max-depth)
+        bolts-and-comps (filter #(not (some empty? (vals %)))
+                                (bolts-with-comps spec model 0 max-depth))
         debug (str "nugents: bolts-and-comps:" (type bolts-and-comps))
         all-of-them
         (mapcat (fn [each-bolt-and-comps]
@@ -123,6 +127,7 @@
                 bolts-and-comps)]
     (filter not-fail?
             (map (fn [good-one]
+                   (log/debug (str "good-one: " ((:morph-ps model) (get good-one []))))
                    (do-defaults
                     (do-assocs (get good-one [])
                                (keys good-one)


Use builders for rolling metrics

Use builders for rolling metrics

--- src/beehive/metrics.clj
+++ src/beehive/metrics.clj
@@ -143,15 +143,12 @@
 (defn rolling-counts
   ([enum-class] (rolling-counts enum-class (* 60 15) 1 :seconds))
   ([^Class enum-class slots-to-track resolution time-unit]
-   (let [^TimeUnit time-unit (utils/->time-unit time-unit)
-         nanos-per (.toNanos time-unit (long resolution))]
+   (let [^TimeUnit time-unit (utils/->time-unit time-unit)]
      (decorate-metrics
-       (RollingCounts. enum-class (int slots-to-track) nanos-per)))))
-
-(defn- latency-at-percentile
-  [^PartitionedLatency latency-metrics metric percentile key->enum]
-  (when-let [enum (get key->enum metric)]
-    (.getValueAtPercentile latency-metrics enum percentile)))
+       (.build
+         (doto (RollingCounts/builder enum-class)
+           (.bucketCount (int slots-to-track))
+           (.bucketResolution (long resolution) time-unit)))))))

 (defn- latency-to-map [^PartitionedLatency latency start-millis end-millis]
   {:latencies


corrected bug with caret placement

corrected bug with caret placement

--- ccw.core/src/ccw/editors/antlrbased/PareditAutoEditStrategy.clj
+++ ccw.core/src/ccw/editors/antlrbased/PareditAutoEditStrategy.clj
@@ -20,12 +20,16 @@

 (defn -customizeDocumentCommand
   [#^IAutoEditStrategy this, #^IDocument document, #^DocumentCommand command]
-  (when (.doit command)
-    (if (and (= 0 (.length command))
+  (when (and (.doit command)
+             (= 0 (.length command))
              (contains? *one-char-command* (.text command)))
-      (let [result (paredit (get *one-char-command* (.text command)) {:text (.get document) :offset (.offset command) :length 0})]
-        #_(println "result:" result)
-        (set! (.offset command) 0)
-        (set! (.length command) (.length (.get document)))
-        (set! (.text command) (:text result))
-        (set! (.caretOffset command) (:offset result))))))+    (let [result (paredit (get *one-char-command* (.text command))
+                          {:text (.get document)
+                           :offset (.offset command)
+                           :length 0})]
+      (println "result:" result)
+      (set! (.offset command) 0)
+      (set! (.length command) (.length (.get document)))
+      (set! (.text command) (:text result))
+      (set! (.shiftsCaret command) false)
+      (set! (.caretOffset command) (:offset result)))))


Improve output for gosync

Improve output for gosync

--- src/buildviz/gosync.clj
+++ src/buildviz/gosync.clj
@@ -273,20 +273,23 @@
   (def go-url (first (:arguments args)))
   (def buildviz-url (:buildviz-url (:options args)))

+  (println "Go" go-url "-> buildviz" buildviz-url)
+
   (let [load-builds-from (get-start-date (:load-builds-from (:options args)))
         selected-pipeline-group-names (set (drop 1 (:arguments args)))
         pipeline-groups (get-pipeline-groups)
         selected-pipeline-groups (if (seq selected-pipeline-group-names)
                                    (select-pipeline-groups pipeline-groups selected-pipeline-group-names)
-                                   pipeline-groups)
-        builds-to-be-synced (->> selected-pipeline-groups
+                                   pipeline-groups)]
+    (println "Looking at pipeline groups" (map :name selected-pipeline-groups))
+    (println "Syncing all builds starting from" (tf/unparse (:date-time tf/formatters) load-builds-from))
+
+    (println "Finding all builds for syncing...")
+
+    (let [builds-to-be-synced (->> selected-pipeline-groups
                                  (mapcat stages-for-pipeline-group)
                                  (mapcat (partial job-instances-for-stage load-builds-from))
                                  (sort-by :scheduledDateTime))]
-
-    (println "Go" selected-pipeline-group-names go-url "-> buildviz" buildviz-url)
-    (println "Syncing all builds starting from" (tf/unparse (:date-time tf/formatters) load-builds-from))
-
     (println (format "Found %s builds to be synced, starting" (count builds-to-be-synced)))

     (let [builds-with-full-information (->> builds-to-be-synced
@@ -297,4 +300,4 @@
       (put-to-buildviz (map make-build-instance builds-with-full-information))

       (println)
-      (println (format "Done, wrote %s build entries" (count builds-with-full-information))))))
+      (println (format "Done, wrote %s build entries" (count builds-with-full-information)))))))


Change default behaviour to sync all jobs that happend after the last sync

--- src/buildviz/gosync.clj
+++ src/buildviz/gosync.clj
@@ -35,10 +35,9 @@
   [["-b" "--buildviz URL" "URL pointing to a running buildviz instance"
     :id :buildviz-url
     :default "http://localhost:3000"]
-   ["-f" "--from DATE" "DATE from which on builds are loaded"
+   ["-f" "--from DATE" "DATE from which on builds are loaded (by default tries to pick up where the last run finished)"
     :id :load-builds-from
-    :parse-fn #(tf/parse date-formatter %)
-    :default (t/minus (t/today-at-midnight tz) (t/weeks 1))]
+    :parse-fn #(tf/parse date-formatter %)]
    ["-h" "--help"]])

 ;; util
@@ -243,6 +242,23 @@
             (log/errorf "Unable to sync testresults for %s %s (status %s): %s" job-name build-no (:status data) (:body data))
             (log/errorf e "Unable to sync testresults for %s %s" job-name build-no)))))))

+;; build load start date
+
+(def last-week (t/minus (t/today-at-midnight tz) (t/weeks 1)))
+
+(defn- get-latest-synced-build-start []
+  (let [response (client/get (format "%s/status" buildviz-url))
+        buildviz-status (j/parse-string (:body response) true)]
+    (when-let [latest-build-start (:latest-build-start buildviz-status)]
+      (tc/from-long latest-build-start))))
+
+(defn- get-start-date [date-from-config]
+  (if (some? date-from-config)
+    date-from-config
+    (if-let [latest-sync-build-start (get-latest-synced-build-start)]
+      latest-sync-build-start
+      last-week)))
+
 ;; run

 (defn -main [& c-args]
@@ -256,7 +272,7 @@
   (def go-url (first (:arguments args)))
   (def buildviz-url (:buildviz-url (:options args)))

-  (let [load-builds-from (:load-builds-from (:options args))
+  (let [load-builds-from (get-start-date (:load-builds-from (:options args)))
         selected-pipeline-group-names (set (drop 1 (:arguments args)))
         pipeline-groups (get-pipeline-groups)
         selected-pipeline-groups (if (seq selected-pipeline-group-names)
@@ -268,7 +284,7 @@
                                  (sort-by :scheduledDateTime))]

     (println "Go" selected-pipeline-group-names go-url "-> buildviz" buildviz-url)
-    (println "Syncing all builds starting from" (tf/unparse date-formatter load-builds-from))
+    (println "Syncing all builds starting from" (tf/unparse (:date-time tf/formatters) load-builds-from))

     (println (format "Found %s builds to be synced, starting" (count builds-to-be-synced)))


Make the web tests init first.

Make the web tests init first.

--- test/circleci/web/test_web.clj
+++ test/circleci/web/test_web.clj
@@ -1,6 +1,9 @@
 (ns circleci.web.test-web
+  (:require circleci.init)
   (:require [clj-http.client :as http])
   (:use midje.sweet))
+
+(circleci.init/init)

 (def site "http://localhost:8080")


[test] refactor test with thread macros

[test] refactor test with thread macros

--- test/clj_dstream/core_test.clj
+++ test/clj_dstream/core_test.clj
@@ -206,7 +206,28 @@
                                                    ::core/gap_time    4}
                       ::core/initialized-clusters true}
         state-after  (core/initial-clustering state-before 1)]
-    (is (= 1 (count (filter #(= ::core/dense %) (map ::core/label (vals (::core/grid-cells state-after)))))))
-    (is (= 1 (count (filter #(= ::core/transitional %) (map ::core/label (vals (::core/grid-cells state-after)))))))
-    (is (= 1 (count (filter #(= ::core/sparse %) (map ::core/label (vals (::core/grid-cells state-after)))))))
-    (is (= 1 (count (remove nil? (map ::core/cluster-label (vals (::core/grid-cells state-after)))))))))+    (is (= 1 (->> state-after
+                  ::core/grid-cells
+                  vals
+                  (map ::core/label)
+                  (filter #(= ::core/dense %))
+                  count)))
+    (is (= 1 (->> state-after
+                  ::core/grid-cells
+                  vals
+                  (map ::core/label)
+                  (filter #(= ::core/transitional %))
+                  count)))
+    (is (= 1 (->> state-after
+                  ::core/grid-cells
+                  vals
+                  (map ::core/label)
+                  (filter #(= ::core/sparse %))
+                  count)))
+    (is (= 1
+           (->> state-after
+                ::core/grid-cells
+                vals
+                (map ::core/cluster-label)
+                (remove nil?)
+                count)))))


Adding comment about SO question

Adding comment about SO question

--- src/civs/logic/core.clj
+++ src/civs/logic/core.clj
@@ -7,6 +7,8 @@
     [civs.logic.tribe-choices :refer :all]
     [civs.logic.demographics :refer :all]))

+; Asked question about this function:
+; http://stackoverflow.com/questions/25632388/clojure-executing-an-operation-n-times-using-the-output-as-input-of-next-operat
 (defn generate-game [world n-tribes]
   (let [ game (create-game world)
          game (reduce (fn [acc, _] (:game (generate-tribe acc))) game (repeat n-tribes :just_something))]


fix inadvertently broken usage of (-> (c/clock ...) c/start!)

c/start! happened to return the clock atom before, now it's just for side
effects and we can't rely on the return value.

--- src/mantra/time.cljs
+++ src/mantra/time.cljs
@@ -4,8 +4,8 @@
 (def ^:dynamic *clock* (atom nil))

 (defn create-clock [context]
-  (reset! *clock* (-> (c/clock :context context)
-                      (c/start!))))
+  (reset! *clock* (doto (c/clock :context context)
+                    (c/start!))))

 (def ^:dynamic *tempo* (atom 60))


Initial commit

Initial commit

--- test/im/chit/matheran_test.clj
+++ test/im/chit/matheran_test.clj
@@ -1,7 +0,0 @@
-(ns im.chit.matheran-test
-  (:require [clojure.test :refer :all]
-            [im.chit.matheran :refer :all]))
-
-(deftest a-test
-  (testing "FIXME, I fail."
-    (is (= 0 1))))


use deterministic compile order and show progress in aot

--- boot/core/src/boot/task/built_in.clj
+++ boot/core/src/boot/task/built_in.clj
@@ -428,11 +428,12 @@
                       (map core/tmppath)
                       (filter #(.endsWith % ".clj"))
                       (map util/path->ns)
-                      (filter #(or all (contains? namespace %))))]
+                      (filter #(or all (contains? namespace %)))
+                      sort)]
         (pod/with-eval-in @compile-pod
           (binding [*compile-path* ~(.getPath tgt)]
-            (doseq [ns '~nses]
-              (boot.util/info "Compiling %s...\n" ns)
+            (doseq [[idx ns] (map-indexed vector '~nses)]
+              (boot.util/info "Compiling %s/%s %s...\n" (inc idx) (count '~nses) ns)
               (compile ns)))))
       (-> fileset (core/add-resource tgt) core/commit!))))


Add a little debugging output

Add a little debugging output

I don't want to add much b/c, in theory, I can search all of this in
ES but in the currently failing case it appears that something odd is
being passed in for "local" (a Jenkins URL) and I wanted to log a bit
more to be sure.  Also I cannot find this test output on build-stats.

--- src/clj/runbld/main.clj
+++ src/clj/runbld/main.clj
@@ -65,7 +65,11 @@
   branch."
   [local branch depth]
   (let [repo (git/load-repo local)]
-    (io/log "repo already cloned" local)
+    (io/log "repo already cloned"
+            "local:" local
+            "branch:" branch
+            "depth:" depth
+            "repo:" repo)
     (io/log "updating")
     (git/git-remote repo ["set-branches" "origin" branch])
     (let [fetch-args (concat (when depth


Add support for basic auth user and password in URL

--- src/clj_http/client.clj
+++ src/clj_http/client.clj
@@ -18,6 +18,7 @@
      :server-name (.getHost url-parsed)
      :server-port (if-pos (.getPort url-parsed))
      :uri (.getPath url-parsed)
+     :user-info (.getUserInfo url-parsed)
      :query-string (.getQuery url-parsed)}))

@@ -142,6 +143,15 @@
                         (basic-auth-value user password))))
       (client req))))

+(defn parse-user-info [user-info]
+  (when user-info
+    (str/split #":" user-info)))
+
+(defn wrap-user-info [client]
+  (fn [req]
+    (if-let [[user password] (parse-user-info (:user-info req))]
+      (client (assoc req :basic-auth [user password]))
+      (client req))))

 (defn wrap-method [client]
   (fn [req]
@@ -149,7 +159,6 @@
       (client (-> req (dissoc :method)
                       (assoc :request-method m)))
       (client req))))
-

 (defn wrap-url [client]
   (fn [req]
@@ -169,6 +178,7 @@
     wrap-output-coercion
     wrap-query-params
     wrap-basic-auth
+    wrap-user-info
     wrap-accept
     wrap-accept-encoding
     wrap-content-type


Enable `mask-image` for cljs as it is supported by p5js. Issue #255.

--- src/cljc/quil/core.cljc
+++ src/cljc/quil/core.cljc
@@ -2341,15 +2341,14 @@
   #?(:clj (PApplet/map (float val) (float low1) (float high1) (float low2) (float high2))
      :cljs (.map (ap/current-applet) val low1 high1 low2 high2)))

-#?(:clj
-   (defn
-     ^{:requires-bindings false
-       :processing-name "PImage.mask()"
-       :category "Image"
-       :subcategory "Loading & Displaying"
-       :added "1.0"}
-     mask-image
-     "Masks part of an image from displaying by loading another image and
+(defn
+  ^{:requires-bindings false
+    :processing-name "PImage.mask()"
+    :category "Image"
+    :subcategory "Loading & Displaying"
+    :added "1.0"}
+  mask-image
+  "Masks part of an image from displaying by loading another image and
   using it as an alpha channel.  This mask image should only contain
   grayscale data, but only the blue color channel is used. The mask
   image needs to be the same size as the image to which it is
@@ -2361,8 +2360,8 @@

   This method is useful for creating dynamically generated alpha
   masks."
-     ([^PImage mask] (mask-image (current-graphics) mask))
-     ([^PImage img ^PImage mask] (.mask img mask))))
+  ([^PImage mask] (mask-image (current-graphics) mask))
+  ([^PImage img ^PImage mask] (.mask img mask)))

 (defn
   ^{:requires-bindings true


move array list up for partition by, fix clear implementation

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -7302,13 +7302,24 @@
   ([k x y & more]
      (reduce #(min-key k %1 %2) (min-key k x y) more)))

+(deftype ArrayList [^:mutable arr]
+  Object
+  (add [_ x] (.push arr x))
+  (size [_] (alength arr))
+  (clear [_] (set! arr (array)))
+  (isEmpty [_] (zero? (alength arr)))
+  (toArray [_] arr))
+
+(defn array-list []
+  (ArrayList. (array)))
+
 (defn partition-all
   "Returns a lazy sequence of lists like partition, but may include
   partitions with fewer than n items at the end.  Returns a stateful
   transducer when no collection is provided."
   ([^long n]
    (fn [f1]
-     (let [a (array)]
+     (let [a (array-list)]
        (fn
          ([] (f1))
          ([result]
@@ -7498,21 +7509,6 @@
   "Returns a vector of [(take-while pred coll) (drop-while pred coll)]"
   [pred coll]
   [(take-while pred coll) (drop-while pred coll)])
-
-(defn- clear-array [a]
-  (while (pos? (alength a))
-    (.pop a)))
-
-(deftype ArrayList [^:mutable arr]
-  Object
-  (add [_] (.push arr))
-  (size [_] (alength arr))
-  (clear [_] (set! arr []))
-  (isEmpty [_] (zero? (alength arr)))
-  (toArray [_] arr))
-
-(defn array-list []
-  (ArrayList. (array)))

 (defn partition-by
   "Applies f to each value in coll, splitting it each time f returns a


* src/cljs/cljs/core.cljs: remove js* use for PersistentVector/EMPTY_NODE, we have make-array

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -2276,7 +2276,7 @@
   (-invoke [coll k not-found]
     (-lookup coll k not-found)))

-(set! cljs.core.PersistentVector/EMPTY_NODE (js* "(new Array(32))"))
+(set! cljs.core.PersistentVector/EMPTY_NODE (make-array 32))
 (set! cljs.core.PersistentVector/EMPTY (PersistentVector. nil 0 5 cljs.core.PersistentVector/EMPTY_NODE (array)))
 (set! cljs.core.PersistentVector/fromArray (fn [xs] (into cljs.core.PersistentVector/EMPTY xs)))


player / enemy sprites

player / enemy sprites

--- src/cljs/mpd/stage.cljs
+++ src/cljs/mpd/stage.cljs
@@ -1,33 +1,22 @@
 (ns mpd.stage
-  (:require [mpd.shared :refer [log]]))
+  (:require [mpd.shared :refer [log]]
+            [mpd.network :as network]))

-(defn pukeSprite [imagePath]
+(defn pukeSprite [imagePath scale]
   (let [texture (js/PIXI.Texture.fromImage imagePath)
         sprite (js/PIXI.Sprite. texture)]
     (aset sprite "anchor" (js-obj "x" 0.5 "y" 0.5))
+    (aset sprite "scale" (js-obj "x" scale "y" scale))
     sprite))

 (def crosshairSprite
-  (pukeSprite "images/crosshair.png"))
-
-(def playerSprite
-  (pukeSprite "images/player.png"))
-
-(def enemySprite
-  (pukeSprite "images/enemy.png"))
+  (pukeSprite "images/crosshair.png" 1.0))

 (def player-sprites (atom {}))
 (defn player-sprite [player]
   (let [exists (get @player-sprites (:id player))]
     (if (nil? exists)
-      (let [fill (case [(:primary player) (:secondary player)]
-               [true true] "green"
-               [true false] "red"
-               [false true] "blue"
-               "green")
-            sprite (js/PIXI.Text.
-              (str (:id player))
-              (js-obj "fill" fill))]
+      (let [sprite (pukeSprite (if (= (:id player) @network/server-id) "images/player.png" "images/enemy.png") 0.4)]
         (log "creating sprite for " (:id player))
         (swap! player-sprites assoc (:id player) sprite)
         sprite)


cleanup examples

cleanup examples

--- src/cljsbin/routes.cljs
+++ src/cljsbin/routes.cljs
@@ -68,8 +68,6 @@
           [:pre [:code "{\n   \"args\": {},\n   \"headers\": {\n      \"Accept\": \"*/*\",\n      \"Connection\": \"close\",\n      \"Content-Length\": \"\",\n      \"Content-Type\": \"\",\n      \"Host\": \"cljsbin.org\",\n      \"User-Agent\": \"curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3\"\n   },\n   \"origin\": \"24.127.96.129\",\n   \"url\": \"http://cljsbin.org/get\"\n}\n"]]
           [:h3#-curl-I-http-cljsbin-org-status-418 "$ curl -I http://cljsbin.org/status/418"]
           [:pre [:code "HTTP/1.1 418 I'M A TEAPOT\nServer: nginx/0.7.67\nDate: Mon, 13 Jun 2011 04:25:38 GMT\nConnection: close\nx-more-info: http://tools.ietf.org/html/rfc2324\nContent-Length: 135\n"]]
-          [:h3#-curl-https-httpbin-org-get-show_env-1 "$ curl https://cljsbin.org/get?show_env=1"]
-          [:pre [:code "{\n  \"headers\": {\n    \"Content-Length\": \"\",\n    \"Accept-Language\": \"en-US,en;q=0.8\",\n    \"Accept-Encoding\": \"gzip,deflate,sdch\",\n    \"X-Forwarded-Port\": \"443\",\n    \"X-Forwarded-For\": \"109.60.101.240\",\n    \"Host\": \"cljsbin.org\",\n    \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n    \"User-Agent\": \"Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11\",\n    \"X-Request-Start\": \"1350053933441\",\n    \"Accept-Charset\": \"ISO-8859-1,utf-8;q=0.7,*;q=0.3\",\n    \"Connection\": \"keep-alive\",\n    \"X-Forwarded-Proto\": \"https\",\n    \"Cookie\": \"_gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1; _gauges_unique_hour=1\",\n    \"Content-Type\": \"\"\n  },\n  \"args\": {\n    \"show_env\": \"1\"\n  },\n  \"origin\": \"109.60.101.240\",\n  \"url\": \"http://cljsbin.org/get?show_env=1\"\n}\n"]]
           [:h2#Installing-and-running "Installing and running from GitHub"]
           [:p "You can install httpbin from the source at GitHub and run it with leiningen and node:"]
           [:pre [:code.bash "$ git clone git@github.com:facundoolano/cljsbin.git .\n$ lein package\n$ npm start\n"]]


Only attempt to show http urls for VCS info

--- src/clojars/web/jar.clj
+++ src/clojars/web/jar.clj
@@ -28,14 +28,14 @@
        (url-encode (apply format "artifactdetails|%s|%s|%s|jar"
                           ((juxt :group_name :jar_name :version) jar)))))

+(def ^:private http-url-re #"^https?://")
 (def ^:private vcs-type-re #"^https?://(github|gitlab).com/")
 (def ^:private vcs-path-re #"^https?://[^/]+/([^/]+)/([^/]+)")

 (defn- vcs-host-info [jar]
-  (let [url (get-in jar [:scm :url])]
-    (when url
-      (let [url (str url)
-            [_ type] (re-find vcs-type-re url)
+  (let [url (str (get-in jar [:scm :url]))]
+    (when (re-find http-url-re url)
+      (let [[_ type] (re-find vcs-type-re url)
             [_ user name] (re-find vcs-path-re url)]
         {:repo-url url
          :type (keyword type)


Upgrading to Clojure v1.5.1, everything works pefectly, no changes to spraffbot code at all..  Amazing..

--- Spraff/project.clj
+++ Spraff/project.clj
@@ -2,7 +2,7 @@
 (defproject spraff "1.0.0-SNAPSHOT"
     :description "IRC bot."
     :dependencies [
-        [org.clojure/clojure "1.4.0"]
+        [org.clojure/clojure "1.5.1"]
         [irclj "0.4.1-SNAPSHOT"]
         [tuples "0.0.2"] ; v0.0.3 uses significantly more memory due to cached hascode values :/
         ]


transducer simplification

transducer simplification

--- src/clj/algorithms_clj/huffman.clj
+++ src/clj/algorithms_clj/huffman.clj
@@ -62,7 +62,7 @@
   "Encode a stream of values with the decoder provided as first parameter"
   [huffman-tree values]
   (let [encoder (memoize #(get-bits huffman-tree %))]
-    (transduce (mapcat encoder) conj [] values)))
+    (into [] (mapcat encoder) values)))

 (defn encode
   "Encode a stream, using the stream frequences to build the huffman tree"
@@ -95,7 +95,7 @@
 (defn decode ;; TODO - The transducer could be used to do pipe-line parallelism
   "Decode a stream of inputs, provided the huffman tree as first parameter"
   [huffman-tree inputs]
-  (transduce (huffman-xf huffman-tree) conj [] inputs))
+  (into [] (huffman-xf huffman-tree) inputs))

 ;; -----------------------------------------------------------


Add instruction checking utilities

Add instruction checking utilities

--- src/clojure_pf/bpf/instruction.clj
+++ src/clojure_pf/bpf/instruction.clj
@@ -1,8 +1,8 @@
 (ns clojure-pf.bpf.instruction
   "BPF instruction constants categorized by usage.")

-(def class-table
-  "Instruction classes."
+(def ^:private ^:const kind-table
+  "Instruction kinds"
   {:ld    0x00    ; load to acc
    :ldx   0x01    ; load to idx
    :st    0x02    ; store acc
@@ -11,13 +11,13 @@
    :ret   0x06    ; return
    :misc  0x07})  ; miscellaneous

-(def size-table
+(def ^:private ^:const size-table
   "Data size variants."
   {:w     0x00    ; word
    :h     0x08    ; halfword
    :b     0x10})  ; byte

-(def mode-table
+(def ^:private ^:const mode-table
   "Addressing modes."
   {:imm   0x00    ; constant
    :abs   0x20    ; data at fixed-offset
@@ -26,7 +26,7 @@
    :len   0x80    ; packet length
    :msh   0xa0})  ; IP header length

-(def op-table
+(def ^:private ^:const operation-table
   "Arithmetic and jump instructions."
   {:add   0x00    ; acc <- acc + k
    :sub   0x10    ; acc <- acc - k
@@ -43,13 +43,47 @@
    :jge   0x30    ; jump-if-greater-or-equal
    :jset  0x40})  ; jump-if-set

-(def src-table
+(def ^:private ^:const source-table
   "Value modes."
   {:k     0x00    ; constant
    :x     0x08})  ; index register

-(def rval-table
+(def ^:private ^:const retval-table
   "Return value modes."
   {:k     0x00    ; constant
    :x     0x08    ; index register
    :a     0x10})  ; accumulator
+
+(def ^:private ^:const table
+  "All instruction constants."
+  (merge kind-table
+         size-table
+         mode-table
+         operation-table
+         source-table
+         retval-table))
+
+; Category checking
+
+(defn kind? [ins]
+  (contains? kind-table ins))
+
+(defn size? [ins]
+  (contains? size-table ins))
+
+(defn mode? [ins]
+  (contains? mode-table ins))
+
+(defn op? [ins]
+  (contains? operation-table ins))
+
+(defn source? [ins]
+  (contains? source-table ins))
+
+(defn retval? [ins]
+  (contains? retval-table ins))
+
+; Translation
+
+(defn to-code [ins]
+  (get table ins))


STORM-1890: add code Cache-Control: no-cache to root html pages (/*.html)

--- storm-core/src/clj/org/apache/storm/ui/helpers.clj
+++ storm-core/src/clj/org/apache/storm/ui/helpers.clj
@@ -22,6 +22,7 @@
   (:use [org.apache.storm config log])
   (:use [org.apache.storm.util :only [clojurify-structure defnk not-nil?]])
   (:use [clj-time coerce format])
+  (:import [org.apache.commons.lang StringUtils])
   (:import [org.apache.storm.generated ExecutorInfo ExecutorSummary]
            [org.apache.storm.ui UIHelpers]
            [org.apache.storm.metric StormMetricsRegistry])
@@ -36,22 +37,41 @@
            [org.eclipse.jetty.server DispatcherType]
            [org.eclipse.jetty.servlets CrossOriginFilter]
            (org.json.simple JSONValue))
-  (:require [ring.util servlet])
+  (:require [ring.util servlet]
+            [ring.util.response :as response])
   (:require [compojure.route :as route]
             [compojure.handler :as handler]))

 ;; TODO this function and its callings will be replace when ui.core and logviewer and drpc move to Java
 (def num-web-requests (StormMetricsRegistry/registerMeter "num-web-requests"))
+;; (defn requests-middleware
+;;   "Coda Hale metric for counting the number of web requests."
+;;   [handler]
+;;   (fn [req]
+;;     (.mark num-web-requests)
+;;     (handler req)))
+
 (defn requests-middleware
-  "Coda Hale metric for counting the number of web requests."
+  "Wrap request with Coda Hale metric for counting the number of web requests,
+  and add Cache-Control: no-cache for /*.html files (html files in root directory)"
   [handler]
   (fn [req]
     (.mark num-web-requests)
-    (handler req)))
+    (let [uri (:uri req)
+          res (handler req)
+          content-type (response/get-header res "Content-Type")]
+      ;; check that the response is html and that uri is for a root page: a single / in the url
+      ;; then we know we don't want it cached (e.g. index.html)
+      (if (and (= content-type "text/html")
+               (= 1 (StringUtils/countMatches uri "/")))
+        ;; response for html page in root directory, no-cache
+        (response/header res "Cache-Control" "no-cache")
+        ;; else, carry on
+        res))))

 ;; TODO this function and its callings will be replace when ui.core and logviewer move to Java
 (defnk json-response
   [data callback :need-serialize true :status 200 :headers {}]
   {:status status
    :headers (UIHelpers/getJsonResponseHeaders callback headers)
-   :body (UIHelpers/getJsonResponseBody data callback need-serialize)})+   :body (UIHelpers/getJsonResponseBody data callback need-serialize)})


Fixed timbre appender

Fixed timbre appender

--- systems/logging/src/containium/systems/logging.clj
+++ systems/logging/src/containium/systems/logging.clj
@@ -107,15 +107,17 @@
   (try (require 'taoensso.timbre)
        ;; Make sure all logging statements arrive in the AppLogger, which will check whether it
        ;; should be logged itself.
-       (taoensso.timbre/set-config! :current-level :trace)
-       (taoensso.timbre/set-config!
-        :appenders
-        {:overtaken
-         {:enabled? true
-          :async? false
-          :fn (fn [{:keys [args level throwable ns]}]
-                (log-console app-logger level ns (or throwable
-                                                     (apply str (interpose " " args)))))}})
+       (taoensso.timbre/merge-config!
+        {:current-level :trace
+         :appenders
+          {:overtaken
+           {:enabled? true
+            :async? false
+            :output-fn :inherit
+            :fn (fn [{:keys [vargs_ level throwable ns] :as in}]
+                  ;(.println stdout (str 'overtake-logging ": " in))
+                  (log-console app-logger level ns (or throwable
+                                                       (apply str (interpose " " @vargs_)))))}}})
        (info app-logger "Timbre logging is configured to use the supplied containiums's AppLogger.")
        (catch Exception ex
          (debug app-logger "Could not configure Timbre logging to use AppLogger:" ex))))
@@ -242,8 +244,8 @@
      :async? false
      :min-level nil
      :output-fn :inherit
-     :fn (fn [{:keys [vargs_ instant level ?err_ output-fn] :as in}]
-           (let [message (output-fn in)  #_(or @?err_ @(first vargs_))
+     :fn (fn [{:keys [vargs_ instant level ?err_] :as in}]
+           (let [message (or @?err_ (first @vargs_))
                  level (apply style (format "%5S" (name level)) (get levels level))
                  raw? (and (map? message) (::raw message))
                  ^String ns (or (and (map? message) (::ns message)) nil)


fixing cloning call adding provisioning back in

--- test/celestial/integration/workflows/openstack.clj
+++ test/celestial/integration/workflows/openstack.clj
@@ -24,11 +24,11 @@

       (fact "openstack clone workflows" :integration :openstack :workflow
         (wf/create (spec)) => nil
-        (wf/clone 1 {:hostname "bar" :owner "ronen"}) => nil
+        (wf/clone {:system-id 1 :hostname "bar" :owner "ronen"}) => nil
         (wf/destroy (assoc (s/get-system 2) :system-id 2)) => nil
         (wf/destroy (spec)) => nil)

-      #_(fact "openstack provisioning workflows" :integration :openstack :workflow
+      (fact "openstack provisioning workflows" :integration :openstack :workflow
           (wf/create (spec)) => nil
           (wf/reload (spec)) => nil
           (wf/destroy (spec)) => nil)


logging improvements

logging improvements

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -74,19 +74,33 @@
   (let [total-depth (if total-depth total-depth 0)
         add-complements-to-bolts
         (fn [bolts path]
+          (log/debug (str "generate-all: "
+                          "add-complements-to-bolts@" path ":#bolts(" (count bolts) "):"
+                          (string/join ","
+                                       (map (fn [bolt]
+                                              (show-bolt bolt path morph))
+                                            bolts))))
           (mapcat
            #(if (not (= :none (get-in % path :none)))
               (add-complement % path :top grammar lexicon index morph 0 (+ total-depth (count path)))
               [%])
-           bolts))]
-    (-> (lightning-bolt (lazy-shuffle grammar)
-                        lexicon
-                        spec 0 index morph total-depth)
-        ;; TODO: allow more than a fixed maximum depth of generation (here, 4 levels from top of tree).
-        (add-complements-to-bolts [:head :head :head :comp] )
-        (add-complements-to-bolts [:head :head :comp])
-        (add-complements-to-bolts [:head :comp])
-        (add-complements-to-bolts [:comp]))))
+           bolts))
+
+        expressions
+        (-> (lightning-bolt (lazy-shuffle grammar)
+                            lexicon
+                            spec 0 index morph total-depth)
+            ;; TODO: allow more than a fixed maximum depth of generation (here, 4 levels from top of tree).
+            (add-complements-to-bolts [:head :head :head :comp] )
+            (add-complements-to-bolts [:head :head :comp])
+            (add-complements-to-bolts [:head :comp])
+            (add-complements-to-bolts [:comp]))]
+
+    (if (not (empty? expressions))
+      (log/info (str "generate-all: first expression generated for spec:" (strip-refs spec) " ):"
+                     "'" (morph (first expressions)) "'"))
+      (log/debug (str "generate-all: no expressions could be generated for spec:" (strip-refs expressions))))
+    expressions))

 (defn lightning-bolt [grammar lexicon spec depth index morph total-depth]
   "Returns a lazy-sequence of all possible trees given a spec, where
@@ -98,17 +112,19 @@
               (lightning-bolt grammar lexicon each-spec depth index morph total-depth))
             spec)
     (do
-      (log/debug (str "lightning-bolt(depth=" depth ", total-depth=" total-depth "; cat=" (get-in spec [:synsem :cat]) ")"))
+      (log/debug (str "lightning-bolt(depth=" depth "; total-depth=" total-depth "; cat=" (get-in spec [:synsem :cat]) ")"))
       (let [morph (if morph morph (fn [input] (get-in input [:rule] :default-morph-no-rule)))
             depth (if depth depth 0)
             parents (filter #(not (fail? %)) (mapfn (fn [rule] (unifyc spec rule)) grammar))]
         (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
               (mapcat (fn [parent]
                         (if (= false (get-in parent [:head :phrasal] false))
-                          (let [candidate-lexemes (get-lex parent :head index spec)]
-                            (over/overh parent
-                                        (mapfn copy (lazy-shuffle candidate-lexemes))))))
-                            parents)
+                          (let [candidate-lexemes (get-lex parent :head index spec)
+                                results (over/overh parent (mapfn copy (lazy-shuffle candidate-lexemes)))]
+                            (log/debug (str "lightning-bolt: " (get-in parent [:rule]) ": candidate head lexemes:'"
+                                            (string/join "','" (map morph candidate-lexemes)) "'"))
+                            results)))
+                      parents)
               phrasal ;; 2. generate list of all phrases where the head child of each parent is itself a phrase.
               (if (< depth max-total-depth)
                 (mapcat (fn [parent]
@@ -120,7 +136,7 @@
             (concat phrasal lexical)))))))

 (defn add-complement [bolt path spec grammar lexicon cache morph depth total-depth]
-  (log/info (str "add-complement: " (show-bolt bolt path morph)))
+  (log/debug (str "add-complement: " (show-bolt bolt path morph)))
   (let [input-spec spec
         from-bolt bolt ;; so we can show what (add-complement) did to the input bolt, for logging.
         spec (unifyc spec (get-in bolt path))
@@ -134,13 +150,19 @@
                                                  (get-in bolt (concat path [:phrasal]))))
                                        (if cached cached (flatten (vals lexicon))))
         complement-pre-check (fn [child parent path-to-child]
-                               (let [child-in-bolt (get-in bolt path-to-child)]
-                                 (and (not (fail?
-                                            (unifyc (get-in child [:synsem] :top)
-                                                    (get-in child-in-bolt [:synsem] :top)))))))
+                               (let [child-in-bolt (get-in bolt path-to-child)
+                                     result (not (fail?
+                                                  (unifyc (get-in child [:synsem] :top)
+                                                          (get-in child-in-bolt [:synsem] :top))))]
+                                 (log/trace (str "add-complement: checking child: " (morph child) "success?:" result))
+                                 result))
         filtered-lexical-complements (filter (fn [lexeme]
                                                (complement-pre-check lexeme bolt path))
-                                             complement-candidate-lexemes)]
+                                             complement-candidate-lexemes)
+        debug (log/debug
+               (if (not (empty? filtered-lexical-complements))
+                 (str "add-complement: " (show-bolt bolt path morph) ":candidate complement-lexemes:'"
+                      (string/join "','" (sort (map morph filtered-lexical-complements))) "'")))]
     (filter (fn [complement]
               (if (fail? complement)
                 (do
@@ -207,8 +229,8 @@
                                                                     (get-in bolt (concat path
                                                                                [:synsem :sem :pred]))))))
                                      (str "'" (morph %) "':"
-                                          (fail-path-between (strip-refs %)
-                                                             (strip-refs (get-in bolt path)))))
+                                          (fail-path (strip-refs %)
+                                                     (strip-refs (get-in bolt path)))))
                                   (take log-limit complement-candidate-lexemes)))

                 (if (< 0 (- (count complement-candidate-lexemes) log-limit))


map over heads in babel.generate as opposed to leaving it to babel.over

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -113,7 +113,9 @@
                      subset (if-let [index-fn (:index-fn language-model)]
                               (index-fn (get-in parent [:head] :top))
                               (flatten (vals lexicon)))]
-                 (let [result (over/overh parent (shuffle subset))]
+                 (let [result
+                       (mapcat #(over/overh parent %)
+                               (shuffle subset))]
                    (if (and (not (empty? subset)) (empty? result)
                             (> (count subset)
                                50))
@@ -131,11 +133,10 @@
                    (= true (get-in spec [:head :phrasal] true)))
             (lazy-mapcat (fn [parent]
                            (log/debug (str "parent: " (:rule parent) " over phrasal heads."))
-                           (over/overh
-                            parent
-                            (lightning-bolts language-model (get-in parent [:head])
-                                             (+ 1 depth) (+ 1 total-depth)
-                                             :max-total-depth max-total-depth)))
+                           (mapcat #(over/overh parent %)
+                                   (lightning-bolts language-model (get-in parent [:head])
+                                                    (+ 1 depth) (+ 1 total-depth)
+                                                    :max-total-depth max-total-depth)))
                            (filter #(= true
                                        (get-in % [:head :phrasal] true))
                                    parents)))]


Bind SHA512

Bind SHA512

--- src/caesium/binding.clj
+++ src/caesium/binding.clj
@@ -35,8 +35,13 @@
   ;; TODO: how do I reference a crypto_generichash_state *?

   (^int crypto_hash_sha256_bytes [])
+  (^int crypto_hash_sha256
+   [^bytes ^{Pinned {}} buf
+    ^bytes ^{Pinned {}} msg
+    ^long ^{LongLong {}} msglen])

-  (^int crypto_hash_sha256
+  (^int crypto_hash_sha512_bytes [])
+  (^int crypto_hash_sha512
    [^bytes ^{Pinned {}} buf
     ^bytes ^{Pinned {}} msg
     ^long ^{LongLong {}} msglen]))


More net world.

More net world.

--- src/cbfg/world-net.cljs
+++ src/cbfg/world-net.cljs
@@ -20,43 +20,56 @@
                                         :msg (get-el-value "msg")}))
         client-hist (atom {})] ; Keyed by opaque -> [request, replies].
     (vis-init (fn [world vis-chs]
-                (let [in-ch (achan-buf world 100)
-                      out-ch (achan-buf world 0)
+                (let [connect-ch (achan-buf world 10)
                       listen-ch (achan-buf world 10)
-                      connect-ch (achan-buf world 10)]
-                  (ago-loop client world [num-ins 0 num-outs 0]
-                            (let [[v ch] (aalts client [cmd-ch out-ch])
-                                  ts (+ num-ins num-outs)]
-                              (cond
-                               (= ch cmd-ch) (if (= (:op v) "replay")
-                                               (world-replay in-ch vis-chs world-vis-init el-prefix
-                                                             @client-hist (:replay-to v))
-                                               (let [cmd (assoc-in v [:opaque] ts)
-                                                     cmd-rq ((get cmd-handlers (:op cmd)) cmd)]
+                      listen-result-ch (achan world)]
+                  (make-net world listen-ch connect-ch)
+                  (ago init-world world
+                       (aput init-world listen-ch [:server 8000 listen-result-ch])
+                       (when-let [[close-accept-ch accept-ch] (atake init-world listen-result-ch)]
+                         (println "server is listening")
+                         (ago-loop server-accept-loop world
+                                   [num-accepts 0]
+                                   (println "server is accepting")
+                                   (when-let [[server-send-ch server-recv-ch close-server-recv-ch]
+                                              (atake server-accept-loop accept-ch)]
+                                     (println "server accepted")
+                                     (ago-loop server-conn-loop server-accept-loop
+                                               [num-requests 0]
+                                               (println "server is recv'ing")
+                                               (let [msg (atake server-conn-loop server-recv-ch)]
+                                                 (println "server echoing" msg)
+                                                 (aput server-conn-loop server-send-ch msg)
+                                                 (recur (inc num-requests))))
+                                     (recur (inc num-accepts))))
+                         (ago client-init world
+                              (let [connect-result-ch (achan client-init)]
+                                (aput client-init connect-ch [:server 8000 :client connect-result-ch])
+                                (when-let [[client-send-ch client-recv-ch close-client-recv-ch]
+                                           (atake client-init connect-result-ch)]
+                                  (println "client is connected")
+                                  (ago-loop client-loop world
+                                            [num-requests 0 num-responses 0]
+                                            (let [[v ch] (aalts client-loop [cmd-ch client-recv-ch])
+                                                  ts (+ num-requests num-responses)]
+                                              (println "client got event" v)
+                                              (cond
+                                               (= ch cmd-ch)
+                                               (if (= (:op v) "replay")
+                                                 (world-replay client-send-ch vis-chs world-vis-init el-prefix
+                                                               @client-hist (:replay-to v))
+                                                 (let [cmd (assoc-in v [:opaque] ts)
+                                                       cmd-rq ((get cmd-handlers (:op cmd)) cmd)]
+                                                   (render-client-hist (swap! client-hist
+                                                                              #(assoc % ts [cmd nil])))
+                                                   (aput client-loop client-send-ch cmd-rq)
+                                                   (recur (inc num-requests) num-responses)))
+                                               (= ch client-recv-ch)
+                                               (when v
                                                  (render-client-hist (swap! client-hist
-                                                                            #(assoc % ts [cmd nil])))
-                                                 (aput client in-ch cmd-rq)
-                                                 (recur (inc num-ins) num-outs)))
-                               (= ch out-ch) (when v
-                                               (do (render-client-hist (swap! client-hist
-                                                                              #(update-in % [(:opaque v) 1]
-                                                                                conj [ts v])))
-                                                   (recur num-ins (inc num-outs)))))))
-                  (ago server-init world
-                       (let [listen-result-ch (achan server-init)]
-                         (aput server-init listen-ch [:server 8000 listen-result-ch])
-                         (when-let [[close-accept-ch accept-ch] (atake server-init listen-result-ch)]
-                           (ago-loop server-accept-loop world
-                                     [num-accepts 0]
-                                     (when-let [[server-send-ch server-recv-ch close-server-recv-ch]
-                                                (atake server-accept-loop accept-ch)]
-                                       (ago-loop server-conn-loop server-accept-loop
-                                                 [num-requests 0]
-                                                 (aput server-conn-loop server-send-ch
-                                                       (atake server-conn-loop server-recv-ch))
-                                                 (recur (inc num-requests)))
-                                       (recur (inc num-accepts)))))))
-                  (make-net world listen-ch connect-ch)))
+                                                                            #(update-in % [(:opaque v) 1]
+                                                                                conj [ts v])))
+                                                 (recur num-requests (inc num-responses)))))))))))))
               el-prefix nil init-event-delay)
     cmd-inject-ch))


tempid & transit helpers, `force`

tempid & transit helpers, `force`

--- src/cellophane/next.clj
+++ src/cellophane/next.clj
@@ -1,9 +1,11 @@
 (ns cellophane.next
-  (:refer-clojure :exclude [var?])
+  (:refer-clojure :exclude [var? force])
   (:require [cellophane.protocols :as p]
             [clojure.reflect :as reflect]
             [clojure.string :as str]
-            [clojure.walk :as walk]))
+            [clojure.walk :as walk]
+            [om.tempid :as tempid]
+            [om.transit :as transit]))

 ;; ===================================================================
 ;; Query Protocols & Helpers
@@ -313,10 +315,43 @@
       (get-component-query x)
       (bind-query (class-query x) (class-params x)))))

+;; ===================================================================
+
+(defn tempid
+  "Return a temporary id."
+  ([] (tempid/tempid))
+  ([id] (tempid/tempid id)))
+
+(defn ^boolean tempid?
+  "Return true if x is a tempid, false otherwise"
+  [x]
+  (tempid/tempid? x))
+
+(defn reader
+  "Create a Om Next transit reader. This reader can handler the tempid type.
+   Can pass transit reader customization opts map."
+  ([] (transit/reader))
+  ([opts] (transit/reader opts)))
+
+(defn writer
+  "Create a Om Next transit writer. This writer can handler the tempid type.
+   Can pass transit writer customization opts map."
+  ([] (transit/writer))
+  ([opts] (transit/writer opts)))
+
+(defn force
+  "Given a query expression return an equivalent query expression that can be
+   spliced into a transaction that will force a read of that key from the
+   specified remote target."
+  ([expr]
+    (force expr :remote))
+  ([expr target]
+    (with-meta (list 'quote expr) {:target target})))
+
+
 (comment
   (defui* 'Artist
-     '(static IQuery
-        (query [_]
-          [:foo :bar])
-        Object
-        (render [_] "hello world"))))
+    '(static IQuery
+       (query [_]
+         [:foo :bar])))
+  )


Add defaction

Add defaction

--- src/clj/libx/macros.clj
+++ src/clj/libx/macros.clj
@@ -1,8 +1,9 @@
 (ns libx.macros
-    (:require [clara.rules :refer [defrule insert!]]
+    (:require [clara.rules :refer [defrule insert! fire-rules]]
               [clara.rules.dsl :as dsl]
               [clara.macros :as cm]
               [libx.lang :as lang]
+              [libx.util :refer [insert retract]]
               [clara.rules.compiler :as com]
               [clojure.spec :as s]))

@@ -191,17 +192,14 @@
         rhs (insert-each-logical facts)]
     `(cm/defrule ~name ~@lhs ~'=> ~@rhs)))

-;(defmacro defaction
-;  [name event effect & body]
-;  `(defrule ~name
-;     (conj `[:exists [event]] ~@body)
-;    => (second effect)))
-;
-;(macroexpand
-;  '(defaction foo
-;     :ui/toggle-complete-action
-;     [:effect [[?e :todo/done :tag]]]
-;     [:todo/title [[e a v]] (= ?e e)]))
-;
-
-
+(defmacro defaction
+  [name fact]
+  `(def ~name
+     (fn [session#]
+       (-> session#
+         (insert ~fact)
+         (fire-rules)
+         (retract ~fact)
+         (fire-rules)))))
+
+


Add warning documentation to `unparse-url` method

--- src/clj_http/client.clj
+++ src/clj_http/client.clj
@@ -184,7 +184,9 @@
      :query-string (url-encode-illegal-characters (.getQuery url-parsed))}))

 (defn unparse-url
-  "Takes a map of url-parts and generates a string representation"
+  "Takes a map of url-parts and generates a string representation.
+  WARNING: does not do any sort of encoding! Don't use this for strict RFC
+  following!"
   [{:keys [scheme server-name server-port uri user-info query-string]}]
   (str (name scheme) "://"
        (if (seq user-info)


* src/cljs/cljs/core.cljs: backing out RegExp equality until the implications of the Google Closure Compiler warning gets cleared up.

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -220,11 +220,6 @@
 (extend-type js/Date
   IEquiv
   (-equiv [o other] (identical? (. o (toString)) (. other (toString)))))
-
-(extend-type js/RegExp
-  IEquiv
-  (-equiv [o other]
-    (identical? (. o (toString)) (. other (toString)))))

 (extend-type number
   IEquiv


conj with 2 map args should combine the maps.

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -1646,7 +1646,12 @@
   (-meta [coll] meta)

   ICollection
-  (-conj [coll entry] (-assoc coll (-nth entry 0) (-nth entry 1)))
+  (-conj [coll entry]
+    (if (map? entry)
+      (reduce -conj
+              coll
+              entry)
+      (-assoc coll (-nth entry 0) (-nth entry 1))))

   IEmptyableCollection
   (-empty [coll] (with-meta cljs.core.ObjMap/EMPTY meta))
@@ -1715,7 +1720,12 @@
   (-meta [coll] meta)

   ICollection
-  (-conj [coll entry] (-assoc coll (-nth entry 0) (-nth entry 1)))
+  (-conj [coll entry]
+    (if (map? entry)
+      (reduce -conj
+              coll
+              entry)
+      (-assoc coll (-nth entry 0) (-nth entry 1))))

   IEmptyableCollection
   (-empty [coll] (with-meta cljs.core.HashMap/EMPTY meta))


old copy-on-write Vector long deprecated, remove

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -2830,100 +2830,6 @@
      (assoc m k (apply update-in (get m k) ks f a b c args))
      (assoc m k (apply f (get m k) a b c args)))))

-;;; Vector
-;;; DEPRECATED
-;;; in favor of PersistentVector
-(deftype Vector [meta array ^:mutable __hash]
-  Object
-  (toString [this]
-    (pr-str this))
-
-  IWithMeta
-  (-with-meta [coll meta] (Vector. meta array __hash))
-
-  IMeta
-  (-meta [coll] meta)
-
-  IStack
-  (-peek [coll]
-    (let [count (alength array)]
-      (when (> count 0)
-        (aget array (dec count)))))
-  (-pop [coll]
-    (if (> (alength array) 0)
-      (let [new-array (aclone array)]
-        (. new-array (pop))
-        (Vector. meta new-array nil))
-      (throw (js/Error. "Can't pop empty vector"))))
-
-  ICollection
-  (-conj [coll o]
-    (let [new-array (aclone array)]
-      (.push new-array o)
-      (Vector. meta new-array nil)))
-
-  IEmptyableCollection
-  (-empty [coll] (with-meta cljs.core.Vector/EMPTY meta))
-
-  ISequential
-  IEquiv
-  (-equiv [coll other] (equiv-sequential coll other))
-
-  IHash
-  (-hash [coll] (caching-hash coll hash-coll __hash))
-
-  ISeqable
-  (-seq [coll]
-    (when (> (alength array) 0)
-      (let [vector-seq
-             (fn vector-seq [i]
-               (lazy-seq
-                 (when (< i (alength array))
-                   (cons (aget array i) (vector-seq (inc i))))))]
-        (vector-seq 0))))
-
-  ICounted
-  (-count [coll] (alength array))
-
-  IIndexed
-  (-nth [coll n]
-    (if (and (<= 0 n) (< n (alength array)))
-      (aget array n)
-      #_(throw (js/Error. (str "No item " n " in vector of length " (alength array))))))
-  (-nth [coll n not-found]
-    (if (and (<= 0 n) (< n (alength array)))
-      (aget array n)
-      not-found))
-
-  ILookup
-  (-lookup [coll k] (-nth coll k nil))
-  (-lookup [coll k not-found] (-nth coll k not-found))
-
-  IAssociative
-  (-assoc [coll k v]
-    (let [new-array (aclone array)]
-      (aset new-array k v)
-      (Vector. meta new-array nil)))
-
-  IVector
-  (-assoc-n [coll n val] (-assoc coll n val))
-
-  IReduce
-  (-reduce [v f]
-    (ci-reduce array f))
-  (-reduce [v f start]
-    (ci-reduce array f start))
-
-  IFn
-  (-invoke [coll k]
-    (-lookup coll k))
-  (-invoke [coll k not-found]
-    (-lookup coll k not-found)))
-
-(set! cljs.core.Vector/EMPTY (Vector. nil (array) 0))
-
-(set! cljs.core.Vector/fromArray (fn [xs] (Vector. nil xs nil)))
-
 ;;; PersistentVector

 (deftype VectorNode [edit arr])
@@ -3274,7 +3180,7 @@
     (build-subvec meta (-assoc-n v end o) start (inc end) nil))

   IEmptyableCollection
-  (-empty [coll] (with-meta cljs.core.Vector/EMPTY meta))
+  (-empty [coll] (with-meta cljs.core.PersistentVector/EMPTY meta))

   ISequential
   IEquiv
@@ -6605,9 +6511,6 @@
   EmptyList
   (-pr-seq [coll opts] (list "()"))

-  Vector
-  (-pr-seq [coll opts] ^:deprecation-nowarn (pr-sequential pr-seq "[" " " "]" opts coll))
-
   PersistentVector
   (-pr-seq [coll opts] ^:deprecation-nowarn (pr-sequential pr-seq "[" " " "]" opts coll))

@@ -6740,9 +6643,6 @@

   EmptyList
   (-pr-writer [coll writer opts] (-write writer "()"))
-
-  Vector
-  (-pr-writer [coll writer opts] ^:deprecation-nowarn (pr-sequential-writer writer pr-writer "[" " " "]" opts coll))

   PersistentVector
   (-pr-writer [coll writer opts] ^:deprecation-nowarn (pr-sequential-writer writer pr-writer "[" " " "]" opts coll))


Set longer websocket test timeout (#354)

--- waiter/integration/waiter/websocket_integration_test.clj
+++ waiter/integration/waiter/websocket_integration_test.clj
@@ -31,6 +31,8 @@
            (org.eclipse.jetty.websocket.api UpgradeException UpgradeRequest)
            (org.eclipse.jetty.websocket.client WebSocketClient)))

+(def ^:const default-timeout-period (-> 4 t/minutes t/in-millis))
+
 (defn- ws-url [waiter-url endpoint]
   (str "ws://" waiter-url endpoint))

@@ -85,7 +87,7 @@
             {:middleware (fn [_ ^UpgradeRequest request]
                            (websocket/add-headers-to-upgrade-request! request waiter-headers)
                            (add-auth-cookie request auth-cookie-value))})
-          (is (= :done (deref response-promise (-> 2 t/minutes t/in-millis) :timed-out))))
+          (is (= :done (deref response-promise default-timeout-period :timed-out))))
         (is (= "Connected to kitchen" (first @ws-response-atom)))
         (let [{:keys [headers]} (-> @ws-response-atom second str json/read-str walk/keywordize-keys)
               {:keys [upgrade x-cid x-waiter-auth-principal]} headers]
@@ -177,7 +179,7 @@
                                            "x-waiter-timeout" "1000")]
                              (websocket/add-headers-to-upgrade-request! request headers))
                            (add-auth-cookie request auth-cookie-value))})
-          (is (= :done (deref response-promise (-> 2 t/minutes t/in-millis) :timed-out))))
+          (is (= :done (deref response-promise default-timeout-period :timed-out))))
         (is (not @send-success-after-timeout-atom))
         (finally
           (delete-service waiter-url waiter-headers))))))
@@ -216,7 +218,7 @@
                                            "x-waiter-timeout" "20000")]
                              (websocket/add-headers-to-upgrade-request! request headers))
                            (add-auth-cookie request auth-cookie-value))})
-          (is (= :done (deref response-promise (-> 2 t/minutes t/in-millis) :timed-out))))
+          (is (= :done (deref response-promise default-timeout-period :timed-out))))
         (is (not @send-success-after-timeout-atom))
         (finally
           (delete-service waiter-url waiter-headers))))))
@@ -269,7 +271,7 @@
                   (deliver response-promise :done)))
               {:middleware middleware})

-            (is (= :done (deref response-promise (-> 3 t/minutes t/in-millis) :timed-out)))
+            (is (= :done (deref response-promise default-timeout-period :timed-out)))
             (is (nil? (deref backend-data-promise 100 :timed-out)))
             (let [[message-key close-code close-message] (deref ctrl-data-promise 100 [:timed-out])]
               (is (= :qbits.jet.websocket/close message-key))
@@ -315,7 +317,7 @@
             {:middleware (fn [_ ^UpgradeRequest request]
                            (websocket/add-headers-to-upgrade-request! request waiter-headers)
                            (add-auth-cookie request auth-cookie-value))})
-          (is (= :done (deref response-promise (-> 2 t/minutes t/in-millis) :timed-out))))
+          (is (= :done (deref response-promise default-timeout-period :timed-out))))
         (is @uncorrupted-data-streamed-atom)
         (finally
           (delete-service waiter-url waiter-headers))))))
@@ -356,7 +358,7 @@
         {:middleware (fn [_ ^UpgradeRequest request]
                        (websocket/add-headers-to-upgrade-request! request (assoc waiter-headers "x-cid" correlation-id))
                        (add-auth-cookie request auth-cookie-value))})
-      (let [iteration-result (deref iteration-promise (-> 2 t/minutes t/in-millis) :timed-out)]
+      (let [iteration-result (deref iteration-promise default-timeout-period :timed-out)]
         (swap! all-iteration-result-atom assoc correlation-id iteration-result)))
     (catch Exception e
       (log/error e "error in executing websocket request for test")
@@ -388,7 +390,7 @@
             (request-streaming-helper waiter-url waiter-headers auth-cookie-value all-iteration-result-atom
                                       websocket-client)))
         (is (= num-requests (count @all-iteration-result-atom)))
-        (is (every? #(= :success (val %1)) @all-iteration-result-atom) (str @all-iteration-result-atom))
+        (is (every? #{:success} (vals @all-iteration-result-atom)) (str @all-iteration-result-atom))
         (is (pos? (num-instances waiter-url service-id)))
         (Thread/sleep 1000) ;; allow metrics to be sync-ed
         (let [service-data (service-settings waiter-url service-id)


Two tests for function contains?

Two tests for function contains?

--- test/emender_jenkins/utils_test.clj
+++ test/emender_jenkins/utils_test.clj
@@ -185,3 +185,21 @@
             "" (substring "Hello world!" 2 2)
             "" (substring "Hello world!" 10 10))))

+(deftest test-contains-1
+    "Check the function emender-jenkins.utils/contains."
+    (testing "the function emender-jenkins.utils/contains."
+        (are [x y] (= x y)
+            false (contains "Hello world!" "h")
+            true  (contains "Hello world!" "H")
+            true  (contains "Hello world!" " ")
+            true  (contains "Hello world!" "!"))))
+
+(deftest test-contains-2
+    "Check the function emender-jenkins.utils/contains."
+    (testing "the function emender-jenkins.utils/contains."
+        (are [x y] (= x y)
+            false (contains "Hello world!" "hello")
+            true  (contains "Hello world!" "Hello")
+            true  (contains "Hello world!" "o w")
+            true  (contains "Hello world!" "world!"))))
+


decouple xpath-context from mastodon

decouple xpath-context from mastodon

--- src/ostatus/util.clj
+++ src/ostatus/util.clj
@@ -105,16 +105,22 @@
         [uri]
         (get inverse uri)))))

+(defn maybe-set-prop!
+  [k v]
+  (if (nil? (System/getProperty k))
+    (System/setProperty k v)))
+
 ;; workaround for http://stackoverflow.com/questions/6340802/java-xpath-apache-jaxp-implementation-performance
-(System/setProperty "org.apache.xml.dtm.DTMManager" "org.apache.xml.dtm.ref.DTMManagerDefault")
-(System/setProperty "com.sun.org.apache.xml.internal.dtm.DTMManager" "com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault")
+(maybe-set-prop! "org.apache.xml.dtm.DTMManager" "org.apache.xml.dtm.ref.DTMManagerDefault")
+(maybe-set-prop! "com.sun.org.apache.xml.internal.dtm.DTMManager" "com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault")

 (defrecord XpathContext [
   ^javax.xml.xpath.XPathFactory xpath-factory
   ^XPath xpath-compiler
   ^java.util.Map compiled-xpaths])

-(def xpath-context
+(defn xpath-context
+  [namespaces]
   (thread-local
     (let [factory (org.apache.xpath.jaxp.XPathFactoryImpl.)
           ^XPath compiler (.newXPath factory)]
@@ -122,22 +128,30 @@
         (ns-context namespaces))
       (->XpathContext factory compiler (java.util.HashMap.)))))

+(def masto-context (xpath-context namespaces))
+
+(def ^{:dynamic true} *current-xpath-context* nil)
+(defmacro with-xpath-ns
+  [context & bodies]
+  `(binding [clj-xpath.core/*namespace-aware* true
+             *current-xpath-context* (deref ~context)
+             clj-xpath.core/*xpath-compiler* (:xpath-compiler *current-xpath-context*)]
+    ~@bodies))
+
 (def ^{:dynamic true} *is-masto-ns* false)
 (defmacro with-masto-ns
   [& bodies]
-  `(binding [clj-xpath.core/*namespace-aware* true
-             *is-masto-ns* true
-             clj-xpath.core/*xpath-compiler* (:xpath-compiler @xpath-context)]
-    ~@bodies))
+  `(binding [*is-masto-ns* true]
+    (with-xpath-ns masto-context ~@bodies)))

 (defn xp
   [^String query]
-  (if *is-masto-ns*
-    (let [ctx @xpath-context
+  (if *current-xpath-context*
+    (let [ctx *current-xpath-context*
           res (get (:compiled-xpaths ctx) query)]
       (if res
         res
-        (let [res (.compile ^XPath (:xpath-compiler ctx)  query)]
+        (let [res (.compile ^XPath (:xpath-compiler ctx) query)]
           (.put ^java.util.Map (:compiled-xpaths ctx) query res)
           res)))
     query))


more passing tests, refactoring

more passing tests, refactoring

--- src/paredit/core.clj
+++ src/paredit/core.clj
@@ -424,6 +424,7 @@
                  "foo (bar [ba|z] |foo)" "foo (bar |[baz] |foo)"
                  "foo (bar [ba|z]) (foo [bar (b|az)])" "foo |(bar [baz]) (foo [bar (baz)])|"
                  "foo |(bar [baz (b|am)])" "foo |(bar [baz (bam)])|"
+                 "(foo bar|)" "(foo |bar|)";
                  }]
      ["Shift+Alt+Right" :paredit-expand-right
                 {
@@ -443,11 +444,11 @@
                  "foo (bar| baz)" "foo (bar| |baz)"
                  "foo (bar |baz)" "foo (bar |baz|)"
                  "foo b|ar| baz" "foo |bar| baz"
-                 "foo (bar baz|)" "foo |(bar baz)|";
-                 "foo (bar |baz|)" "foo |(bar baz)|";
+                 "foo (bar baz|)" "foo |(bar baz)|"
+                 "foo (bar |baz|)" "foo |(bar baz)|"
                  "foo \"bar |baz\"" "foo |\"bar baz\"|"
                  "foo;ba|r\nbaz" "foo|;bar\n|baz"
-                 "foo (bar [ba|z] |foo)" "foo (bar |[baz] |foo)";;
+                 "foo (bar [ba|z] |foo)" "foo (bar |[baz] |foo)"
                  "foo (bar [ba|z]) (foo [bar (b|az)])" "foo |(bar [baz]) (foo [bar (baz)])|"
                  "foo |(bar [baz (b|am)])" "foo |(bar [baz (bam)])|"
                  }]
@@ -461,16 +462,16 @@
                  "foo bar |baz|" "|foo bar baz|"
                  "foo bar| baz|" "|foo bar baz|"
                  "foo |bar baz|" "|foo bar baz|"
-                 "|foo bar baz" "|foo bar baz|";;
+                 "|foo bar baz" "|foo bar baz|"
                  "|f|oo bar baz" "|foo| bar baz"
                  "|foo| bar baz" "|foo bar baz|"
-                 "|foo |bar baz" "|foo bar baz|"
+                 "|foo |bar baz" "|foo bar baz|"
                  "|foo b|ar baz" "|foo bar| baz"
                  "foo (bar| baz)" "foo |(bar baz)|"
                  "foo (bar |baz)" "foo |(bar baz)|"
                  "foo b|ar| baz" "foo |bar| baz"
-                 "foo (bar baz|)" "foo |(bar baz)|";
-                 "foo (bar |baz|)" "foo |(bar baz)|";
+                 "foo (bar baz|)" "foo |(bar baz)|"
+                 "foo (bar |baz|)" "foo |(bar baz)|"
                  "foo \"bar |baz\"" "foo |\"bar baz\"|"
                  "foo;ba|r\nbaz" "foo|;bar\n|baz"
                  "foo (bar [ba|z] |foo)" "foo (bar |[baz] |foo)"
@@ -827,31 +828,36 @@
    If the selection is not empty, the second loc will give the end (get it via a call to 'loc-end on it).
    Pre-requisites: length >=0, offset >=0. rloc = root loc of the tree"
   [rloc offset length]
-  (spy "+++++++++")
-  (let [left-leave (parse-node (leave-for-offset rloc offset))
-        _ (spy "1st ll" (zip/node left-leave))
-        right-leave (leave-for-offset rloc (+ offset length))
-        _ (spy "1st rl" (zip/node right-leave))
+  ;(spy "+++++++++")
+  (let [left-leave (parse-leave (leave-for-offset rloc offset))
+        ;_ (spy "1st ll" (zip/node left-leave))
+        right-leave (parse-leave (leave-for-offset rloc (+ offset length)))
+        ;_ (spy "1st rl" (zip/node right-leave))
         right-leave (cond
                       (= :root (loc-tag right-leave))
-                        (parse-node (leave-for-offset rloc (dec (+ offset length))))
+                        (parse-leave (leave-for-offset rloc (dec (+ offset length))))
                       (not= (+ offset length) (start-offset right-leave))
                         (parse-node right-leave)
                       (nil? (seq (previous-leaves right-leave)))
                         (parse-node right-leave)
                       :else
                         (parse-node (first (previous-leaves right-leave))))
-        _ (spy "2d rl" (zip/node right-leave))
+        ;_ (spy "2d rl" (zip/node right-leave))
         ]
     (if (or
           (= [0 0] [offset length])
           (and
-            (= (start-offset left-leave) offset)
-            (= (end-offset right-leave) (+ offset length))
-            (same-parent? left-leave right-leave)))
+            (= 0 length)
+            (= (start-offset left-leave) offset))
+          (and
+            (= (start-offset (parse-node left-leave)) offset)
+            (= (end-offset (parse-node right-leave)) (+ offset length))
+            (same-parent? (parse-node left-leave) (parse-node right-leave))))
+      (do ;(spy "already normalized")
+        [left-leave (when-not (zero? length) right-leave)])
       (do
-        [left-leave (when-not (zero? length) right-leave)])
-      (let [left-leave (parse-node left-leave)
+        ;(spy "not yet normalized")
+        (let [left-leave (parse-node left-leave)
             right-leave (parse-node right-leave)
             min-depth (min (loc-depth left-leave) (loc-depth right-leave))
             left-leave (up-to-depth left-leave min-depth)
@@ -861,7 +867,7 @@
             (fn [[l r]] (= (zip/up l) (zip/up r)))
             (iterate
               (fn [[l r]] [(zip/up l) (zip/up r)])
-              [left-leave right-leave])))))))
+              [left-leave right-leave]))))))))

 (deftest normalized-selection-tests
   (are [text offset length expected-offset expected-length]
@@ -884,6 +890,8 @@
     "foo (bar baz)" 4 4 4 9
     "foo (bar baz)" 9 4 4 9
     "foo (bar baz)" 0 0 0 0
+    "(foo bar)" 8 0 8 0
+    "foo (bar baz)" 12 1 4 9
     ))

 (defn sel-match-normalized?
@@ -922,27 +930,40 @@
   [cmd {:keys [#^String text offset length] :as t}]
   (let [parsed (parse text)]
     (if-let [rloc (-?> parsed (parsed-root-loc true))]
-      (let [[l r] (normalized-selection rloc offset length)
-            _ (spy (zip/node l))
-            _ (spy (when r (zip/node r)))
-            r (if (nil? r) l r)
-            _ (spy (when r (zip/node r)))
-            r (if (sel-match-normalized? offset length [l r])
-                (if-let [nr (zip/right r)] nr (zip/up r))
-                (do
-                  (spy [(zip/node r) (and r (zip/node r))])
-                  (spy "not normalized!" r)))
-            _ (spy "before renormalized:" (zip/node l))
-            _ (spy "before renormalized:" (zip/node r))
-            [l r] (normalized-selection rloc (spy (start-offset l)) (spy (- (end-offset r) (start-offset l))))
-            _ (spy "renormalized:" (zip/node l))
-            _ (spy "renormalized:" (when r (zip/node r)))
-
-            ]
-          (spy (-> t (assoc-in [:offset] (start-offset l))
-                (assoc-in [:length] (if (nil? r) 0 (- (end-offset r) (start-offset l))))))))))
+      (let [[l r] (normalized-selection rloc offset length)]
+        (if-not (sel-match-normalized? offset length [l r])
+          (-> t (assoc-in [:offset] (start-offset l))
+            (assoc-in [:length] (if (nil? r) 0 (- (end-offset r) (start-offset l)))))
+          (let [r (if (nil? r)
+                    l
+                    (if-let [nr (zip/right r)]
+                      nr
+                      (zip/up r)))
+                [l r] (normalized-selection rloc (spy (start-offset l)) (spy (- (end-offset r) (start-offset l))))]
+            (-> t (assoc-in [:offset] (start-offset l))
+              (assoc-in [:length] (if (nil? r) 0 (- (end-offset r) (start-offset l)))))))))))

 (defmethod paredit
+  :paredit-expand-up
+  [cmd {:keys [#^String text offset length] :as t}]
+  (let [parsed (parse text)]
+    (if-let [rloc (-?> parsed (parsed-root-loc true))]
+      (let [[l r] (normalized-selection rloc offset length)]
+        (if-not (sel-match-normalized? offset length [l r])
+          (-> t (assoc-in [:offset] (start-offset l))
+            (assoc-in [:length] (if (nil? r) 0 (- (end-offset r) (start-offset l)))))
+          (let [;
+                _ (spy "l before up" (zip/node l))
+                l (if-let [nl (zip/up (if (= offset (start-offset (parse-node l)))
+                                        (parse-node l)
+                                        (parse-leave l)))]
+                    nl
+                    l)
+                _ (spy "l after up" (zip/node l))]
+            (-> t (assoc-in [:offset] (start-offset l))
+              (assoc-in [:length] (- (end-offset l) (start-offset l))))))))))
+
+#_(defmethod paredit
   :paredit-expand-up
   [cmd {:keys [#^String text offset length] :as t}]
   (let [parsed (parse text)]


Changed parse-concept-id to return a string for the concept-prefix.

--- src/cmr/common/util.clj
+++ src/cmr/common/util.clj
@@ -43,7 +43,7 @@
 (defn parse-concept-id
   "Split a concept id into concept-type-prefix, sequence number, and provider id."
   [concept-id]
-  (let [prefix (first concept-id)
+  (let [prefix (subs concept-id 0 1)
         seq-num (re-find #"\d+" concept-id)
         provider-id (get (re-find #"\d+-(.*)" concept-id) 1)]
     {:concept-prefix prefix :sequence-number seq-num :provider-id provider-id}))


Add aerospike dependency.

Add aerospike dependency.

--- project.clj
+++ project.clj
@@ -8,6 +8,8 @@
                  [clj-http "2.3.0"]
                  [incanter "1.5.7"]   ;; R-like library
                  [cheshire "5.7.0"]   ;; json
+                 [aeroclj "0.1.1"]
+                 ;; [com.aerospike/aerospike-client "3.0.9"]
                  ]
   :main ^:skip-aot forecast.core
   :target-path "target/%s"


bump version

bump version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.clojars.civa86/pretty.cli "0.2.0"
+(defproject org.clojars.civa86/pretty.cli "0.2.1"
   :description "Clojure utilities to create amazing Command Line Interfaces"
   :url "https://github.com/civa86/pretty.cli"
   :license {:name "MIT"


Well deserved version bump to 0.3 before release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject memento "0.3-SNAPSHOT"
+(defproject memento "0.3"
   :description "Memento mori"
   :url "https://mementoapp.herokuapp.com/"


upgrade a few libs

upgrade a few libs

--- project.clj
+++ project.clj
@@ -7,38 +7,39 @@

   :dependencies [[bk/ring-gzip "0.2.1"]
                  [clj-jwt "0.1.1"]
-                 [compojure "1.5.2"]
+                 [compojure "1.6.0"]
                  [environ "1.1.0"]
                  [garden "1.3.2"]
                  [http-kit "2.2.0"]
                  [metosin/ring-http-response "0.8.2"]
                  [mutant "0.2.0"]
+                 ;; [org.clojure/clojure "1.9.0-alpha16"]
                  [org.clojure/clojure "1.8.0"]
-                 [org.clojure/clojurescript "1.9.495"]
-                 [org.clojure/core.async "0.3.441"]
+                 [org.clojure/clojurescript "1.9.521"]
+                 [org.clojure/core.async "0.3.442"]
                  [org.clojure/data.json "0.2.6"]
                  [org.clojure/math.combinatorics "0.1.4"]
                  [org.clojure/tools.cli "0.3.5"]
                  [re-frame "0.9.2"]
-                 [reagent "0.6.0"]
-                 [ring "1.5.1"]
+                 [reagent "0.6.1"]
+                 [ring "1.6.0"]
                  [ring-middleware-format "0.7.2" :exclusions [ring]]
                  [ring.middleware.logger "0.5.0"]
-                 [ring/ring-defaults "0.2.3"]
+                 [ring/ring-defaults "0.3.0"]
                  [ring/ring-json "0.4.0"]
-                 [cljs-ajax "0.5.8"]
+                 [cljs-ajax "0.5.9"]
                  [secretary "1.2.3"]
                  [org.clojure/test.check "0.9.0"]
-                 [integrant "0.2.3"]
+                 [integrant "0.4.0"]
                  [sqlitejdbc "0.5.6"]
-                 [datascript "0.15.5"]
+                 [datascript "0.16.1"]
                  [doo "0.1.7"]
-                 [re-frisk "0.3.2"]
+                 [re-frisk "0.4.5"]
                  [org.clojure/core.match "0.2.2"]
                  [org.clojure/core.unify "0.5.7"]
                  [org.hugoduncan/core.logic "0.8.11.1"]
                  [ring.middleware.logger "0.5.0"]
-                 [com.taoensso/timbre "4.8.0"]]
+                 [com.taoensso/timbre "4.10.0"]]

   :uberjar-name "scrabble.jar"
   :plugins [[lein-ring "0.8.13"]
@@ -89,10 +90,10 @@
               [lein-doo "0.1.7"]]

     :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
-    :dependencies [[binaryage/devtools "0.9.2"]
+    :dependencies [[binaryage/devtools "0.9.4"]
                    [com.cemerick/piggieback "0.2.1"]
-                   [figwheel "0.5.9"]
-                   [figwheel-sidecar "0.5.9"]
+                   [figwheel "0.5.10"]
+                   [figwheel-sidecar "0.5.10"]
                    [javax.servlet/servlet-api "2.5"]
                    [lambdaisland/garden-watcher "0.3.0"]
                    ;; dependencies for the reloaded workflow


Bump clojure.java.jdbc.

Bump clojure.java.jdbc.

--- project.clj
+++ project.clj
@@ -6,6 +6,6 @@
   :dependencies [[org.clojure/clojure        "1.6.0"]
                  [org.clojure/data.json      "0.2.5"]
                  [com.stuartsierra/component "0.2.2"]
-                 [org.clojure/java.jdbc      "0.3.5"]
+                 [org.clojure/java.jdbc      "0.3.6"]
                  [mysql/mysql-connector-java "5.1.25"]
                  [korma                      "0.4.0"]])


Version 0.2.0

Version 0.2.0

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject kixi/terraboot "0.2.0-SNAPSHOT"
+(defproject kixi/terraboot "0.2.0"
   :description "Terraform modules for kixi framework"
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"


Depend on an older version of ring-json

Depend on an older version of ring-json

to avoid conflicts


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -21,11 +21,11 @@
                  [cljsjs/react "15.3.1-0"]
                  [cljsjs/react-dom "15.3.1-0"]
                  [cljsjs/react-dom-server "15.3.1-0"]
-                 [cljsjs/moment "2.10.6-4"]
+                 [cljsjs/moment "2.15.2-2"]
                  [funcool/struct "1.0.0"]
                  [funcool/lentes "1.2.0"]
                  [funcool/beicon "2.3.0"]
-                 [funcool/cuerdas "1.0.2"]
+                 [funcool/cuerdas "2.0.0"]
                  [funcool/bide "1.0.5"]]
   :plugins [[lein-ancient "0.6.10"]]
   :clean-targets ^{:protect false} ["resources/public/js" "target"]


start working on 1.3.1

start working on 1.3.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject babel "1.3.0"
+(defproject babel "1.3.1-SNAPSHOT"
   :description "A Clojure library for generation of expressions from grammars and lexicons."
   :url "http://github.com/ekoontz/babel"
   :license {:name "Proprietary: all rights reserved. No distribution allowed without consent of owners."}


lein-release plugin: preparing 0.3.4 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.domaindrivenarchitecture/dda-user-crate "0.3.4-SNAPSHOT"
+(defproject org.domaindrivenarchitecture/dda-user-crate "0.3.4"
   :description "A crate to handle users"
   :url "https://www.domaindrivenarchitecture.org"
   :license {:name "Apache License, Version 2.0"
@@ -18,7 +18,7 @@
             {:dependencies
              [[org.clojure/test.check "0.9.0"]
               [com.palletops/pallet "0.8.12" :classifier "tests"]
-              [org.domaindrivenarchitecture/dda-pallet-commons "0.2.0" :classifier "tests"]]
+              [org.domaindrivenarchitecture/dda-pallet-commons "0.2.1" :classifier "tests"]]
              :plugins
              [[com.palletops/pallet-lein "0.8.0-alpha.1"]]}
              :leiningen/reply


Add grafter-url project path to docs source, so despite being separate repos we can build one set of docs.

--- project.clj
+++ project.clj
@@ -30,8 +30,10 @@
   :codox {:defaults {:doc "FIXME: write docs"
                      :doc/format :markdown}
           :output-dir "api-docs"
-          :source ["src/common" "src/rdf-repository" "src/tabular"
-                   "src/templater" "src/rdf-common" "src/pipeline" ]
+          :sources ["src/common" "src/rdf-repository" "src/tabular"
+                   "src/templater" "src/rdf-common" "src/pipeline"
+                   ;; Include docs from grafter-url project too
+                   "../grafter-url/src"]
           :src-dir-uri "http://github.com/Swirrl/grafter/blob/master/"
           :src-linenum-anchor-prefix "L"}


library ugrades

library ugrades

--- project.clj
+++ project.clj
@@ -9,14 +9,14 @@
   :profiles {:dev {:source-paths ["dev"]
                    :dependencies
                    [[org.clojure/tools.namespace "0.2.4"]
-                    [org.clojure/java.classpath "0.2.1"]
-                    [midje "1.5.1" :exclusions [org.clojure/clojure]]
+                    [org.clojure/java.classpath "0.2.2"]
+                    [midje "1.6.3" :exclusions [org.clojure/clojure]]
                     ]}
              :uberjar {:aot :all}
              :provided {:dependencies [[javax.servlet/servlet-api "2.5"]]}}

   :dependencies [[org.clojure/clojure "1.5.1"]
-                 [org.clojure/tools.trace "0.7.6"]
+                 [org.clojure/tools.trace "0.7.8"]

                  ;; logging
                  [org.clojure/tools.logging "0.2.6"
@@ -25,8 +25,8 @@
                    commons-logging/commons-logging
                    org.slf4j/slf4j-api
                    org.slf4j/slf4j-log4j12]]
-                 [ch.qos.logback/logback-classic "1.0.13"]
-                 [org.slf4j/log4j-over-slf4j "1.7.5"]
+                 [ch.qos.logback/logback-classic "1.1.2"]
+                 [org.slf4j/log4j-over-slf4j "1.7.7"]

                  ;; database
                  [org.clojure/java.jdbc "0.3.0-beta1"]
@@ -34,22 +34,22 @@
                  [honeysql "0.4.3"]
                  [org.postgresql/postgresql "9.3-1100-jdbc41"]
                  [com.jolbox/bonecp "0.8.0.RELEASE"]
-                 [ragtime/ragtime.core "0.3.4"]
-                 [ragtime/ragtime.sql "0.3.4"]
+                 [ragtime/ragtime.core "0.3.6"]
+                 [ragtime/ragtime.sql "0.3.6"]
                  ;; database test
-                 [com.h2database/h2 "1.3.174"]
+                 [com.h2database/h2 "1.4.177"]

                  ;; web, rest
-                 [org.clojure/data.json "0.2.3"]
-                 [ring/ring-devel "1.2.1"]
-                 [ring/ring-core "1.2.1"]
-                 [ring/ring-json "0.2.0"]
+                 [org.clojure/data.json "0.2.4"]
+                 [ring/ring-devel "1.2.2"]
+                 [ring/ring-core "1.2.2"]
+                 [ring/ring-json "0.3.1"]
                  [compojure "1.1.6"]
-                 [liberator "0.10.0"]
-                 [http-kit "2.1.16"]
+                 [liberator "0.11.0"]
+                 [http-kit "2.1.18"]
                  [cheshire "5.3.1"]
-                 [ring-cors "0.1.0"]
+                 [ring-cors "0.1.1"]

                  ;; structure
@@ -63,7 +63,7 @@
                  [org.clojars.runa/clj-schema "0.9.4"]

                  ;; util
-                 [clj-time "0.6.0"]
+                 [clj-time "0.7.0"]
                  [org.clojure/tools.cli "0.3.1"]

                  ]


0.0.7

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject com.rpl/specter "0.0.6"
+(defproject com.rpl/specter "0.0.7"
   :dependencies [[org.clojure/clojure "1.6.0"]
                  ]
   :jvm-opts ["-XX:-OmitStackTraceInFastThrow"] ; this prevents JVM from doing optimizations which can remove stack traces from NPE and other exceptions


Version 1.2.0

Version 1.2.0

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject dda/dda-serverspec-crate "1.2.0-SNAPSHOT"
+(defproject dda/dda-serverspec-crate "1.2.0"
   :description "A crate to get facts from server nodes and test these facst against your expectation."
   :url "https://domaindrivenarchitecture.org"
   :license {:name "Apache License, Version 2.0"


pump version

pump version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sync "0.9.3"
+(defproject sync "0.9.4-SNAPSHOT"
   :description "sync is a Leiningen plugin to sync same code base between different clojure projects"
   :url "https://github.com/otto-de/leinsync"
   :license {:name "Eclipse Public License"


Version 0.13.0-SNAPSHOT

Version 0.13.0-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.zalando.stups/friboo "0.12.0"
+(defproject org.zalando.stups/friboo "0.13.0-SNAPSHOT"
   :description "A utility library to write microservices in clojure."
   :url "https://github.com/zalando-stups/friboo"


Bump selenium version to support Firefox 47+

--- project.clj
+++ project.clj
@@ -5,7 +5,7 @@
             :url "https://github.com/greywolve/clj-webdriver-boilerplate/blob/master/LICENSE"}
   :dependencies [[org.clojure/clojure "1.8.0"]
                  [clj-webdriver "0.7.2"]
-                 [org.seleniumhq.selenium/selenium-java "2.53.0"]
+                 [org.seleniumhq.selenium/selenium-java "2.53.1"]
                  ; > Starting with 2.53.0 you need to explicitly include HtmlUnitDriver as a dependency to include it.
                  ; > Version number of the driver is now tracking HtmlUnit itself.
                  ; Source: http://www.seleniumhq.org/download/maven.jsp


lein-release plugin: preparing 0.1.0 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject racehub/stripe-clj "0.1.0-SNAPSHOT"
+(defproject racehub/stripe-clj "0.1.0"
   :description "Schemafied Stripe bindings for Clojure."
   :url "https://github.com/racehub/stripe-clj"
   :license {:name "Eclipse Public License"


Version 1.6.4-SNAPSHOT

Version 1.6.4-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject puppetlabs/lein-ezbake "1.6.3"
+(defproject puppetlabs/lein-ezbake "1.6.4-SNAPSHOT"
   :description "A system for building packages for trapperkeeper-based applications"
   :url "https://github.com/puppetlabs/ezbake"
   :license {:name "Apache License 2.0"