actually test we're on the right screen

actually test we're on the right screen

--- pedestal-app/test/semtag_web/integration_test.clj
+++ pedestal-app/test/semtag_web/integration_test.clj
@@ -73,7 +73,7 @@

   (url-ends-with "#/search?query=feynman&search-type=tagged")
   (is (= "Search results for 'feynman'" (taxi/text "#search_title")))
-  (is (.contains (taxi/text "#table_stats") "Tag Type Counts: 1 - 1 funny"))
+  (is (seq (taxi/text "#table_stats")))
   (is (seq (taxi/find-elements {:css "tbody tr"}))))

 (deftest second-search-with-another-search-type-works
@@ -90,9 +90,19 @@
   (Thread/sleep 1000)
   (url-ends-with "#/search?query=maxwell&search-type=tagged-with-type"))

+(def expected-tables
+  {"#/types" "#type_stats_table"
+   "#/tag-stats" "#tag_stats_table"
+   "#/all" "#all_table"
+   "#/" "#search_table"})
+
 (deftest direct-urls-work
   (doseq [rel-url (vals route/routes)]
     (taxi/to (full-app-url rel-url))
+    ;; necessary for a hash url to be recognized
+    (taxi/refresh)
+    (Thread/sleep 500)
+    (is (taxi/element (get expected-tables rel-url)))
     (url-ends-with rel-url)))

 ;; TODO - revisit not being able to go forward - log count stays the same going forward


:bento: Change completely the builtins colors


use transducers

use transducers

--- src/cljam/algo/pileup.clj
+++ src/cljam/algo/pileup.clj
@@ -35,33 +35,51 @@
   [^long start ^long end alns]
   (seq-step start end 0 alns))

+(defn- index-to-seq-qual
+  [^String seqs ^String quals]
+  (let [empty-qual? (and (= (.length quals) 1)
+                         (= (.charAt quals 0) \*))]
+    (fn [[op x xs]]
+      (let [c (if (number? x) (.charAt seqs x) x)
+            q (if (or empty-qual? (char? x))
+                93
+                (qual/fastq-char->phred-byte (.charAt quals x)))]
+        (if (= op :m)
+          [[c] q]
+          (if (= op :d)
+            [[c xs] q]
+            [[c (subs seqs (first xs) (last xs))] q]))))))
+
+(defn- index-transducer
+  [convert-fn]
+  (fn [rf]
+    (let [seqs-at-ref (volatile! (transient []))
+          quals-at-ref (volatile! (transient []))]
+      (fn
+        ([] (rf))
+        ([acc]
+         (-> acc
+             (rf (persistent! @seqs-at-ref))
+             (rf (persistent! @quals-at-ref))))
+        ([acc idx]
+         (let [[s q] (convert-fn idx)]
+           (vswap! seqs-at-ref conj! s)
+           (vswap! quals-at-ref conj! q)
+           acc))))))
+
 (defn index-cigar
   "Align bases and base quality scores with the reference coordinate."
   [^SAMAlignment aln]
   (let [idx (cigar/to-index (.cigar aln))
         ^String seqs (:seq aln)
         ^String quals (.qual aln)
-        empty-qual? (and (= (.length quals) 1)
-                         (= (.charAt quals 0) \*))]
-    (loop [[[op x xs] & idx] idx
-           seqs-at-ref (transient [])
-           quals-at-ref (transient [])]
-      (if op
-        (let [c (if (number? x) (.charAt seqs x) x)
-              q (if (or empty-qual? (char? x))
-                  93
-                  (qual/fastq-char->phred-byte (.charAt quals x)))]
-          (recur idx
-                 (conj! seqs-at-ref
-                        (if (= op :m)
-                          [c]
-                          (if (= op :d)
-                            [c xs]
-                            [c (subs seqs (first xs) (last xs))])))
-                 (conj! quals-at-ref q)))
-        (assoc aln
-               :seqs-at-ref (persistent! seqs-at-ref)
-               :quals-at-ref (persistent! quals-at-ref))))))
+        [seqs-at-ref quals-at-ref] (into []
+                                         (index-transducer
+                                          (index-to-seq-qual seqs quals))
+                                         idx)]
+    (assoc aln
+           :seqs-at-ref seqs-at-ref
+           :quals-at-ref quals-at-ref)))

 (defn basic-mpileup-pred
   "Basic predicate function for filtering alignments for mpileup."
@@ -129,49 +147,64 @@
           (into (subvec quals (+ (- correct-start start) len))))
       (into corrected-quals (subvec quals len)))))

+(defn- correct-pair-qual
+  [^SAMAlignment a1 ^SAMAlignment a2]
+  (let [pos1 (.pos a1)
+        pos2 (.pos a2)
+        quals1 (:quals-at-ref a1)
+        quals2 (:quals-at-ref a2)
+        seqs1  (:seqs-at-ref a1)
+        seqs2  (:seqs-at-ref a2)]
+    (fn [^long pos]
+      (let [relative-pos1 (- pos pos1)
+            relative-pos2 (- pos pos2)
+            ^int q1 (quals1 relative-pos1)
+            ^int q2 (quals2 relative-pos2)
+            [b1] (seqs1 relative-pos1)
+            [b2] (seqs2 relative-pos2)]
+        (if (= b1 b2)
+          [(min 200 (+ q1 q2)) 0]
+          (if (<= q2 q1)
+            [(int (* 0.8 q1)) 0]
+            [0 (int (* 0.8 q2))]))))))
+
+(defn- correct-pair-transducer
+  [correct-fn]
+  (fn [rf]
+    (let [quals1 (volatile! (transient []))
+          quals2 (volatile! (transient []))]
+      (fn
+        ([] (rf))
+        ([acc]
+         (-> acc
+             (rf (persistent! @quals1))
+             (rf (persistent! @quals2))))
+        ([acc pos]
+         (let [[q1 q2] (correct-fn pos)]
+           (vswap! quals1 conj! q1)
+           (vswap! quals2 conj! q2)
+           acc))))))
+
 (defn- correct-pair-quals
   "Correct quals of a pair. Returns a map with corrected quals."
   [^SAMAlignment a1 ^SAMAlignment a2]
-  (when (and (pos? (.pnext a1))
-             (<= (max (.pos a1) (.pos a2)) (.end a1)))
-    (let [pos1 (.pos a1)
-          pos2 (.pos a2)
-          quals1 (:quals-at-ref a1)
-          quals2 (:quals-at-ref a2)
-          seqs1  (:seqs-at-ref a1)
-          seqs2  (:seqs-at-ref a2)
-          correct-start (max pos1 pos2)
-          correct-end (min (.end a1) (.end a2))]
-      (loop [p correct-start
-             new1 (transient [])
-             new2 (transient [])]
-        (if (<= p correct-end)
-          (let [relative-pos1 (- p pos1)
-                relative-pos2 (- p pos2)
-                ^int q1 (quals1 relative-pos1)
-                ^int q2 (quals2 relative-pos2)
-                [b1] (seqs1 relative-pos1)
-                [b2] (seqs2 relative-pos2)]
-            (if (= b1 b2)
-              (recur (inc p)
-                     (conj! new1 (min 200 (+ q1 q2)))
-                     (conj! new2 0))
-              (if (<= q2 q1)
-                (recur (inc p)
-                       (conj! new1 (int (* 0.8 q1)))
-                       (conj! new2 0))
-                (recur (inc p)
-                       (conj! new1 0)
-                       (conj! new2 (int (* 0.8 q2)))))))
-          (let [new-quals1 (merge-corrected-quals a1
-                                                  correct-start
-                                                  (persistent! new1))
-                new-quals2 (merge-corrected-quals a2
-                                                  correct-start
-                                                  (persistent! new2))]
-            (if (flag/r1? (.flag a1))
-              [new-quals1 new-quals2]
-              [new-quals2 new-quals1])))))))
+  (let [correct-start (max (.pos a1) (.pos a2))
+        correct-end (min (.end a1) (.end a2))]
+    (when (and (pos? (.pnext a1))
+               (<= correct-start (.end a1)))
+      (let [[quals1 quals2] (into []
+                                  (correct-pair-transducer
+                                   (correct-pair-qual a1 a2))
+                                  (range correct-start (inc correct-end)))
+            new-quals1 (merge-corrected-quals a1
+                                              correct-start
+                                              quals1)
+            new-quals2 (merge-corrected-quals a2
+                                              correct-start
+                                              quals2)]
+        (if (flag/r1? (.flag a1))
+          [new-quals1 new-quals2]
+          [new-quals2 new-quals1])))))

 (defn- make-corrected-quals-map
   "Make a map which has corrected quals of all overlapping pairs."


Avoiding reversing maps.

Avoiding reversing maps.

--- src/clojure/clojurewerkz/cassaforte/conversion.clj
+++ src/clojure/clojurewerkz/cassaforte/conversion.clj
@@ -322,11 +322,10 @@
        (to-plain-hash cosc-map "UTF8Type"))
     ([cosc-map key-format]
        (let [list  (map to-map cosc-map)
-             names (reverse (map #(or
-                                   (keyword (:name %))
-                                   (cb/deserialize key-format (:key %)))
-                                 list))
-             values (reverse (map #(to-plain-hash (or (:columns %) (:value %))) list))]
+             names (map #(or (keyword (:name %))
+                             (cb/deserialize key-format (:key %)))
+                        list)
+             values (map #(to-plain-hash (or (:columns %) (:value %))) list)]
          (apply array-map (interleave names values)))))

   ColumnOrSuperColumn


added switching to errors tab when error is reported

--- src/clojure/org/turtle/geometry/TurtleGraphics.clj
+++ src/clojure/org/turtle/geometry/TurtleGraphics.clj
@@ -188,9 +188,18 @@
                        (getText)
                        (toString))))

-(defn report-error [^org.turtle.geometry.TurtleGraphics activity
-                    ^String msg]
-  (.setText (error-output @activity) msg))
+(defn report-error
+  ([activity msg]
+     (report-error activity msg true))
+  ([^org.turtle.geometry.TurtleGraphics activity
+     ^String msg
+    switch-to-errors-tab]
+     (.setText (error-output @activity) msg)
+     (when switch-to-errors-tab
+       (.setCurrentTabByTag (activity-tab-host @activity)
+                            (.getString activity
+                                        (resource :string
+                                                  :errors_tab_label))))))

 (defn get-animation-duration [^org.turtle.geometry.TurtleGraphics activity]
   (text-input->int (duration-entry @activity)))


Adjusted defaults.

Adjusted defaults.

--- src/clojush/problems/integer_regression/golomb.clj
+++ src/clojush/problems/integer_regression/golomb.clj
@@ -58,14 +58,15 @@

 (def argmap
   {:error-function (fn [ind] (golomb-error ind training))
-   :atom-generators (vec (concat [0 1 Math/PI Math/E 'in1]
-                                 (registered-for-stacks [:integer :float :boolean :exec])))
+   :atom-generators (vec (concat [0 1 0.0 1.0 Math/PI Math/E 'in1]
+                                 (registered-for-stacks
+                                   [:integer :float :boolean :exec])))
    :max-points 400
-   :max-genome-size-in-initial-program 20
+   :max-genome-size-in-initial-program 100
    :evalpush-limit 400
    :genetic-operator-probabilities {:alternation 0.5
                                     :uniform-mutation 0.5}
    :parent-selection :lexicase
-   :problem-specific-report golomb-report
-   })
+   :report-simplifications 0
+   :problem-specific-report golomb-report})


Reinstate :resource-uri test

Reinstate :resource-uri test

--- spec/rook/rook_spec.clj
+++ spec/rook/rook_spec.clj
@@ -229,14 +229,12 @@
           (should= :post method)
           (should= "/:user-name/:password" uri))))

-  #_
   (describe ":resource-uri argument resolver"

-    (with handler (-> (namespace-handler nil 'creator
-                                         (compojure/routes
-                                           (namespace-handler "/nested" 'creator)
-                                           default-rook-pipeline))
-                      wrap-with-standard-middleware))
+    (with handler (wrap-with-standard-middleware
+                    (namespace-handler
+                      [[] 'creator]
+                      [["nested"] 'creator])))
     (with request {:scheme         :http
                    :server-name    "rook.aviso.io"
                    :server-port    80


Fixed a ptpt count bug in conversations, and set up exception catching/writing in conv update


Test optimized for loops.

Test optimized for loops.


connection/wait-for-remote-debugging-port: use GET instead of HEAD

HEAD requests trip up (at least) `node.js/v16.14.2` with `HTTP/1.0 400 Bad Request`

That in turn made `inspectable-pages` fail on nodejs runtimes.

--- src/clj_chrome_devtools/impl/connection.clj
+++ src/clj_chrome_devtools/impl/connection.clj
@@ -65,7 +65,7 @@
 (defn- wait-for-remote-debugging-port [host port max-wait-time-ms]
   (let [wait-until (+ (System/currentTimeMillis) max-wait-time-ms)
         url        (str "http://" host ":" port "/json/version")]
-    (loop [response @(http/head url)]
+    (loop [response @(http/get url)]
       (cond
         (= (:status response) 200)
         :ok
@@ -77,7 +77,7 @@

         :default
         (do (Thread/sleep 100)
-            (recur @(http/head url)))))))
+            (recur @(http/get url)))))))

 (defn inspectable-pages
   "Collect the list of inspectable pages returned by the DevTools protocol."


No need to use apply here

No need to use apply here

--- src/clojure/clojurewerkz/cassaforte/cql.clj
+++ src/clojure/clojurewerkz/cassaforte/cql.clj
@@ -290,7 +290,7 @@
     (select session table
             (q/limit chunk-size))
     (select session table
-            (q/where (apply q/token partition-key) [> (apply q/token last-pk)])
+            (q/where (q/token partition-key) [> (q/token last-pk)])
             (q/limit chunk-size))))

 (defn iterate-table


AB & RS | 127 | Update test names

AB & RS | 127 | Update test names

--- test/objective8/integration/db/activities.clj
+++ test/objective8/integration/db/activities.clj
@@ -11,7 +11,7 @@
                          (ih/truncate-tables)))
    (after :facts (ih/truncate-tables))])

-(fact "an activity can be stored and retrieved"
+(fact "an activity can be stored"
       (let [{user-id :_id username :username} (sh/store-a-user)
             objective-data {:created-by-id user-id
                             :description "objective description"
@@ -30,7 +30,7 @@
                                                                        "description" "objective description"
                                                                        "url" stored-objective-url}}))

-(fact "about retrieving activities"
+(fact "activities can be retrieved"
       (let [stored-activity-1 (-> (sh/store-an-objective)
                                       :_id
                                       objectives/get-objective


errors -> edn

errors -> edn

--- src/district0x/server/emailer/sendgrid.cljs
+++ src/district0x/server/emailer/sendgrid.cljs
@@ -25,3 +25,20 @@
            :body (server-utils/clj->json body)}
           :handler success-handler
           :error-handler error-handler)))
+
+
+(comment
+  (defn sendmail []
+           (let [name "BLA"]
+             (try
+               (send-notification-email {:from-email "district0x@district0x.io"
+                                         :to-email "filip@district0x.io"
+                                         :subject (str "Your offering was bought: " name)
+                                         :content "Hello"}
+                                        {:header (str name "was bought")
+                                         :button-title "See offering details"
+                                         :button-href "www.google.be"}
+                                        #(prn "Success")
+                                        #(prn (str "Error " (district0x.shared.utils/jsobj->clj %))))
+               (catch :default e
+                 (prn (str "Exception" (district0x.shared.utils/jsobj->clj e))))))))


latest systems-toolbox version

latest systems-toolbox version

--- Clojure-Websockets/MainApp/project.clj
+++ Clojure-Websockets/MainApp/project.clj
@@ -11,7 +11,7 @@
                  [com.taoensso/timbre "4.3.1" :exclusions [io.aviso/pretty]]
                  [com.taoensso/encore "2.38.0"]
                  [com.taoensso/carmine "2.12.2"]
-                 [matthiasn/systems-toolbox "0.5.11"]
+                 [matthiasn/systems-toolbox "0.5.12"]
                  [matthiasn/systems-toolbox-sente "0.5.12"]
                  [matthiasn/systems-toolbox-ui "0.5.5"]
                  [matthiasn/systems-toolbox-metrics "0.5.2"]


explicit :pretty-print options

explicit :pretty-print options

--- Clojure-Websockets/MainApp/project.clj
+++ Clojure-Websockets/MainApp/project.clj
@@ -50,9 +50,11 @@
                                        :optimizations :none
                                        :output-dir    "resources/public/js/build/"
                                        :output-to     "resources/public/js/build/birdwatch.js"
-                                       :source-map    true}}
+                                       :source-map    true
+                                       :pretty-print  true}}
                        {:id           "release"
                         :source-paths ["src/cljs"]
                         :compiler     {:output-to     "resources/public/js/build/birdwatch.js"
                                        :optimizations :advanced
-                                       :externs       ["externs/misc.js"]}}]})
+                                       :externs       ["externs/misc.js"]
+                                       :pretty-print  false}}]})


Update copyright year on time ns.

Update copyright year on time ns.

--- frontend/src/uxbox/util/time.cljs
+++ frontend/src/uxbox/util/time.cljs
@@ -2,7 +2,7 @@
 ;; License, v. 2.0. If a copy of the MPL was not distributed with this
 ;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ;;
-;; Copyright (c) 2015-2016 Andrey Antukh <niwi@niwi.nz>
+;; Copyright (c) 2015-2017 Andrey Antukh <niwi@niwi.nz>

 (ns uxbox.util.time
   (:require [vendor.datefns]


adds timer metrics to ZK read, write and delete (#952)

--- waiter/src/waiter/kv.clj
+++ waiter/src/waiter/kv.clj
@@ -19,6 +19,7 @@
             [clojure.tools.logging :as log]
             [digest]
             [metrics.meters :as meters]
+            [metrics.timers :as timers]
             [taoensso.nippy :as nippy]
             [taoensso.nippy.compression :as compression]
             [waiter.curator :as curator]
@@ -124,32 +125,40 @@
     (meters/mark! (metrics/waiter-meter "core" "kv-zk" "retrieve"))
     (let [path (key->zk-path base-path key)]
       (when refresh
-        (let [response-promise (promise)]
-          (log/debug "(zk) SYNC" path)
-          (.sync curator-client path response-promise)
-          (log/debug "awaiting response from sync call")
-          (let [response (deref response-promise sync-timeout-ms :unrealized)]
-            (log/info "proceeding past sync() call with" response))))
-      (let [{:keys [data]} (curator/read-path curator-client path
-                                              :nil-on-missing? true
-                                              :serializer :nippy)]
-        (log/debug "(zk) FETCH" path "=>" (hashcode data))
-        data)))
+        (timers/start-stop-time!
+          (metrics/waiter-timer "core" "kv-zk" "refresh")
+          (let [response-promise (promise)]
+            (log/debug "(zk) SYNC" path)
+            (.sync curator-client path response-promise)
+            (log/debug "awaiting response from sync call")
+            (let [response (deref response-promise sync-timeout-ms :unrealized)]
+              (log/info "proceeding past sync() call with" response)))))
+      (timers/start-stop-time!
+        (metrics/waiter-timer "core" "kv-zk" "retrieve")
+        (let [{:keys [data]} (curator/read-path curator-client path
+                                                :nil-on-missing? true
+                                                :serializer :nippy)]
+          (log/debug "(zk) FETCH" path "=>" (hashcode data))
+          data))))
   (store [_ key value]
     (validate-zk-key key)
     (meters/mark! (metrics/waiter-meter "core" "kv-zk" "store"))
-    (let [path (key->zk-path base-path key)]
-      (log/debug "(zk) STORE" path "=>" (hashcode value))
-      (curator/write-path curator-client path value
-                          :serializer :nippy
-                          :mode :persistent
-                          :create-parent-zknodes? true)))
+    (timers/start-stop-time!
+      (metrics/waiter-timer "core" "kv-zk" "retrieve")
+      (let [path (key->zk-path base-path key)]
+        (log/debug "(zk) STORE" path "=>" (hashcode value))
+        (curator/write-path curator-client path value
+                            :serializer :nippy
+                            :mode :persistent
+                            :create-parent-zknodes? true))))
   (delete [_ key]
     (validate-zk-key key)
     (meters/mark! (metrics/waiter-meter "core" "kv-zk" "delete"))
-    (let [path (key->zk-path base-path key)]
-      (log/debug "(zk) DELETE" path)
-      (curator/delete-path curator-client path :ignore-does-not-exist true)))
+    (timers/start-stop-time!
+      (metrics/waiter-timer "core" "kv-zk" "delete")
+      (let [path (key->zk-path base-path key)]
+        (log/debug "(zk) DELETE" path)
+        (curator/delete-path curator-client path :ignore-does-not-exist true))))
   (state [_]
     {:base-path base-path, :variant "zookeeper"}))


Mark the icon collections as builtin.

Mark the icon collections as builtin.

--- frontend/uxbox/library/icons.cljs
+++ frontend/uxbox/library/icons.cljs
@@ -24,8 +24,10 @@

 (def +collections+
   [{:name "Material design"
+    :builtin true
     :id 1
     :icons +material+}
    {:name "External icons"
+    :builtin true
     :id 2
     :icons +external+}])


remove .lein

remove .lein

--- home/.lein/profiles.clj
+++ home/.lein/profiles.clj
@@ -1,5 +0,0 @@
-{:repl {:dependencies [[org.clojure/tools.nrepl "0.2.12"]]
-        :plugins [[refactor-nrepl "2.4.0"]
-                  [cider/cider-nrepl "0.18.0"]
-                  [lein-try "0.4.3"]]}
- :user {:plugins [[jonase/eastwood "0.3.3"]] }}


Try apply active chapter term styles

Try apply active chapter term styles

--- src/teach_by_friends/shared/scenes/new_design.cljs
+++ src/teach_by_friends/shared/scenes/new_design.cljs
@@ -73,13 +73,24 @@
 (def chapter-ds (ReactNative.ListView.DataSource. #js{:rowHasChanged not=}))

 (defn term-row [term]
-	[ui/touchable-opacity {:style    {:border-bottom-width 1
-																		:border-color        "rgba(0,0,0,.1)"
-																		:padding-top         20
-																		:padding-bottom      20
-																		:padding-left        30}
-												 :on-press #(dispatch [:nav/term term])}
-	 [ui/text {:style {:font-size 20 :color "rgb(72, 86, 155)"}} term]])
+	(if (= term "wink")
+		[ui/view {:style {:padding-left        10
+											:padding-right        10}}
+		 [ui/view {:style {:border-radius 15
+											 :background-color "rgb(132, 145, 206)"
+											 :padding-top 15
+											 :padding-bottom 15
+											 :padding-left 15
+											 :padding-right 15
+											 }}
+			[ui/text {:style {:font-size 20 :color "white"}} term]]]
+		[ui/touchable-opacity {:style    {:border-bottom-width 1
+																			:border-color        "rgba(0,0,0,.1)"
+																			:padding-top         20
+																			:padding-bottom      20
+																			:padding-left        30}
+													 :on-press #(dispatch [:nav/term term])}
+		 [ui/text {:style {:font-size 20 :color "rgb(72, 86, 155)"}} term]]))

 (defn get-new-design-scene [activity-indicator]
 	(fn new-design-scene [title]


remove assert that is not asserting anything

--- src/main/clojure/clojure/data/xml/name.cljc
+++ src/main/clojure/clojure/data/xml/name.cljc
@@ -121,7 +121,6 @@
      [& ans]
      (loop [[a n & rst :as ans] ans]
        (when (seq ans)
-         (assert (<= (count ans)) (pr-str ans))
          (let [xn (uri-symbol n)
                al (symbol (clj-ns-name a))]
            (create-ns xn)


Ensure replicates are indicated as :rep kwgit add src/aerobio/actions.clj

--- src/aerobio/actions.clj
+++ src/aerobio/actions.clj
@@ -55,6 +55,7 @@
 (defmethod action :run
   [_ eid params get-toolinfo template]
   (let [{:keys [user cmd action rep compfile eid]} params
+        rep (if rep :rep nil)
         exp (cmn/get-exp-info eid :exp)
         user (pams/get-params [:email (keyword user)])]
     (cmn/launch-action


Enable named datasources to participate in xa transactions [IMMUTANT-309]

--- modules/xa/src/main/clojure/immutant/xa.clj
+++ modules/xa/src/main/clojure/immutant/xa.clj
@@ -22,6 +22,18 @@
             [immutant.util           :as util]
             [immutant.xa.transaction :as tx]
             [immutant.xa.wrappers    :as wrap]))
+
+(defn wrap
+  "Wrap a DataSource (or a spec from which a DataSource can be
+   obtained) with a reified DataSource that will ignore method calls
+   illegal on an XA Connection."
+  [ds-or-spec]
+  (if-let [ds (cond
+               (not (map? ds-or-spec)) ds-or-spec
+               (:contains? ds-or-spec :datasource) (:datasource ds-or-spec)
+               (:contains? ds-or-spec :name) (.lookup (InitialContext.) (:name ds-or-spec)))]
+    (reify javax.sql.DataSource
+      (getConnection [_] (wrap/connection (.getConnection ds))))))

 (defn datasource
   "Create an XA-capable datasource named by 'id'. The result can be
@@ -53,8 +65,7 @@
         params (into {} (for [[k v] spec] [(name k) v]))
         name (.createDataSource (registry/get "xaifier") id params)
         ds (util/backoff 10 10000 (.lookup (InitialContext.) name))]
-    (reify javax.sql.DataSource
-      (getConnection [_] (wrap/connection (.getConnection ds))))))
+    (wrap ds)))

 (defmacro transaction
   "Execute body within the current transaction, if available,


Phonebook DELETE

Phonebook DELETE

--- dev/src/yada/dev/phonebook.clj
+++ dev/src/yada/dev/phonebook.clj
@@ -107,7 +107,9 @@

 (defrecord PhonebookEntry [db *router]
   p/Properties
-  (properties [_] {:parameters {:get {:path {:entry Long}}}
+  (properties [_] {:parameters {:get {:path {:entry Long}}
+                                :post {:path {:entry Long}
+                                       :form {(s/required-key "method") String}}}
                    :representations phonebook-representations})

   m/Get
@@ -119,8 +121,26 @@
         (html [:body
                [:h2 (format "%s %s" firstname surname)]
                [:p "Phone: " phone]
+               [:form {:method :post} [:input {:type :submit :name "method" :value "Delete"}]]
                [:p [:a {:href (path-for (:routes @*router) ::phonebook)} "Index"]]])
-        entry))))
+        entry)))
+
+  m/Post
+  (POST [this ctx]
+    ;; For supporting HTML browsers that can't do other methods
+    (when (= (get-in ctx [:parameters :form "method"]) "Delete")
+      (m/DELETE this ctx)
+      (-> (:response ctx)
+           (assoc :status 303)
+           (update-in [:headers] merge {"location" (path-for (:routes @*router) ::phonebook)}))))
+
+  m/Delete
+  (DELETE [_ ctx]
+    (let [id (get-in ctx [:parameters :path :entry])]
+      (dosync
+       (alter (:phonebook db) dissoc id)
+       ;; Body
+       nil))))

 (defn phonebook-api [db *router]
   ["/phonebook" {"" (yada (->Phonebook db *router) {:id ::phonebook})


creating temp file

creating temp file

--- src/athena_cmd/core.clj
+++ src/athena_cmd/core.clj
@@ -13,7 +13,8 @@
   (let [info (Properties.)
         s3_path_env "ATHENA_S3_PATH"
         s3_path (System/getenv s3_path_env)
-        ]
+        tmp (java.io.File/createTempFile "athena" ".log")]
+
     (doto info

       (.put "s3_staging_dir"
@@ -24,7 +25,7 @@
             "com.amazonaws.auth.DefaultAWSCredentialsProviderChain")

       (.put "log_path"
-            "/tmp/athenajdbc.log"))
+            (.getPath tmp)))

           info))


back to randomizing results

back to randomizing results

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -105,8 +105,7 @@
         ;; this is the relative depth; that is, the depth from the top of the current lightning bolt.
         ;; total-depth, on the other hand, is the depth all the way to the top of the entire
         ;; expression, which might involve several parent lightning bolts.
-        ;;        parents (lazy-shuffle (candidate-parents grammar spec))]
-        parents (candidate-parents grammar spec)]
+        parents (lazy-shuffle (candidate-parents grammar spec))]
     (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
           (when (= false (get-in spec [:head :phrasal] false))
             (lazy-mapcat
@@ -169,7 +168,7 @@
          (any-possible-complement?
           bolt [:comp] language-model total-depth
           :max-total-depth max-total-depth))
-       (if (or true (lexemes-before-phrases total-depth max-total-depth))
+       (if (lexemes-before-phrases total-depth max-total-depth)
          (lazy-cat lexical phrasal)
          (lazy-cat phrasal lexical))))))


standardize on [] rather than ()

standardize on [] rather than ()

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -139,7 +139,7 @@
         ;; from a model given a spec and a depth.
         ;; This is a contrived example - should be
         ;; for the model to provide these given a spec and a depth.
-        (and (= () (get-in spec [:synsem :subcat]))
+        (and (= [] (get-in spec [:synsem :subcat]))
              (= :verb (get-in spec [:synsem :cat]))
              (= :present (get-in spec [:synsem :sem :tense]))
              (= true (get-in spec [:synsem :sem :reflexive]))


fix optional argument support for (generate)

--- src/babel/italiano.cljc
+++ src/babel/italiano.cljc
@@ -71,20 +71,19 @@
    (morph/analyze surface-form lexicon)))

 (defn generate
-  [spec & [model
-           {:keys [do-enrich max-total-depth truncate-children]
-            :or {do-enrich true
-                 max-total-depth generate/max-total-depth
-                 truncate-children true}}]]
+  [spec & {:keys [do-enrich max-total-depth model truncate-children]
+           :or {do-enrich true
+                max-total-depth generate/max-total-depth
+                model medium
+                truncate-children true}}]
   (log/debug (str "generating with spec: " (strip-refs spec) " with max-total-depth: " max-total-depth))
-  (let [model (if model model medium)]
-    (let [result (engine/generate spec model
-                                  :do-enrich do-enrich
-                                  :max-total-depth max-total-depth
-                                  :truncate-children truncate-children)]
-      (if result
-        (conj {:surface (fo result)}
-              result)))))
+  (let [result (engine/generate spec model
+                                :do-enrich do-enrich
+                                :max-total-depth max-total-depth
+                                :truncate-children truncate-children)]
+    (if result
+      (conj {:surface (fo result)}
+            result))))

 (defn lightning-bolts [spec]
   (generate/lightning-bolts (:grammar medium) (:lexicon medium) spec 0 (:index medium) nil (:morph medium)))


Attempt to skip errno.h penalty

Attempt to skip errno.h penalty

--- src/caesium/binding.clj
+++ src/caesium/binding.clj
@@ -8,7 +8,7 @@
             [clojure.math.combinatorics :as c]
             [medley.core :as m]
             [clojure.string :as str])
-  (:import [jnr.ffi LibraryLoader]
+  (:import [jnr.ffi LibraryLoader LibraryOption]
            [jnr.ffi.annotations In Out Pinned LongLong]
            [jnr.ffi.types size_t]))

@@ -224,8 +224,9 @@

 (def ^Sodium sodium
   "The sodium library singleton instance."
-  (let [loader (LibraryLoader/create Sodium)]
-    (.load loader "sodium")))
+  (-> (LibraryLoader/create Sodium)
+      (.option LibraryOption/IgnoreError true)
+      (.load "sodium")))

 (assert (#{0 1} (.sodium_init sodium)))
 ;; TODO When does this get called? Guaranteed from 1 thread?


Set run time to 120s.

Set run time to 120s.

--- src/dsbdp/main.clj
+++ src/dsbdp/main.clj
@@ -162,5 +162,5 @@
                                (thread-info-fn) (println)
                                )
                   1000)
-      (run-once (executor) (fn [] (System/exit 0)) 20000))))
+      (run-once (executor) (fn [] (System/exit 0)) 120000))))


add html/links

add html/links

--- src/html.clj
+++ src/html.clj
@@ -66,3 +66,6 @@
      (for [body bodies]
        [:tr (for [b body] [:td b])])]]))

+
+(defn links [& title-url-pairs]
+  (ul #(apply link %) (partition 2 title-url-pairs)))


Add negative margin to the main board

Add negative margin to the main board

--- src/gol/styles.clj
+++ src/gol/styles.clj
@@ -10,12 +10,11 @@
   [:#app {
     :display "table-cell"
     :vertical-align "middle"
-    :text-align "center"
-    :margin [[0 (px -1) (px -1) 0]]}]
+    :text-align "center"}]

   [:.cell-area {
     :display "inline-block"
-    :margin 0
+    :margin [[0 (px -1) (px -1) 0]]
     :padding [[(px 1) (px 1) 0 0]]
     :list-style "none"
     :font-size 0


use not=

use not=

--- src/status_im/ui/screens/wallet/events.cljs
+++ src/status_im/ui/screens/wallet/events.cljs
@@ -87,7 +87,7 @@
 (handlers/register-handler-fx
   :update-wallet
   (fn [{{:keys [web3 accounts/current-account-id network network-status] :as db} :db} [_ symbols]]
-    (when-not (= network-status :offline)
+    (when (not= network-status :offline)
       {:get-balance {:web3          web3
                      :account-id    current-account-id
                      :success-event :update-balance-success
@@ -111,7 +111,7 @@
 (handlers/register-handler-fx
   :update-transactions
   (fn [{{:keys [accounts/current-account-id network network-status] :as db} :db} _]
-    (when-not (= network-status :offline)
+    (when (not= network-status :offline)
       {:get-transactions {:account-id    current-account-id
                           :network       network
                           :success-event :update-transactions-success


mkfn:optional was (harmlessly) returning the wrong value

--- src/structural_typing/surface/mechanics.clj
+++ src/structural_typing/surface/mechanics.clj
@@ -10,7 +10,7 @@
 (defn mkfn:optional [pred]
   (fn [leaf-value]
     (if (nil? leaf-value)
-      []
+      true
       (pred leaf-value))))


Add a print-method for TypeRepo

Add a print-method for TypeRepo

--- src/structural_typing/surface/type_repo.clj
+++ src/structural_typing/surface/type_repo.clj
@@ -3,7 +3,8 @@
   (:require [structural-typing.guts.mechanics.canonicalizing-types :as canon]
             [structural-typing.guts.mechanics.compiling-types :as compile]
             [structural-typing.surface.defaults :as default]
-            [structural-typing.guts.frob :as frob]))
+            [structural-typing.guts.frob :as frob]
+            [clojure.string :as str]))

 (defprotocol TypeRepoLike
   (hold-type [type-repo type-signifier type-descriptions])
@@ -43,6 +44,12 @@
     (the-error-handler [type-repo] (:error-handler type-repo))
     (the-success-handler [type-repo] (:success-handler type-repo)))

+(defmethod clojure.core/print-method TypeRepo [o, ^java.io.Writer w]
+  (.write w "#TypeRepo[")
+  (.write w (->> o :original-type-descriptions keys (str/join ", ")))
+  (.write w "]"))
+
+
 (def empty-type-repo
   "A type repo that contains no types and uses the default success and error handlers."
   (->TypeRepo default/default-success-handler default/default-error-handler))


namespace in trace

namespace in trace

--- src/latte/core.clj
+++ src/latte/core.clj
@@ -355,7 +355,7 @@
           (and *proof-certification-enabled*
                (cert/proof-certified? *ns* thm-name (:params thm) (:type thm) steps))]
       (when certified-proof?
-        (println (str "[proof] theorem '" thm-name "' has certified proof")))
+        (println (str "[proof] theorem '" *ns* "/" thm-name "' has certified proof")))
       (let [[status infos] (if certified-proof?
                              [:ok {}]
                              (p/check-proof def-env (reverse (:params thm)) thm-name (:type thm) steps))]


a bit of namespace cleanup

a bit of namespace cleanup

--- src/latte/core.clj
+++ src/latte/core.clj
@@ -4,8 +4,6 @@

   (:require [clojure.spec.alpha :as s]
             [clojure.pprint :as pp]
-            [latte-kernel.utils :as u]
-            [latte-kernel.syntax :as syntax]
             [latte-kernel.presyntax :as stx]
             [latte-kernel.unparser :as unparser]
             [latte-kernel.typing :as ty]


kind of element in doc

kind of element in doc

--- src/latte/core.clj
+++ src/latte/core.clj
@@ -42,11 +42,12 @@
       (throw (ex-info "Parameters of defterm must be a vector." {:def-name def-name :params params})))
     [def-name doc params body]))

-(defn mk-doc [content explanation]
+(defn mk-doc [kind content explanation]
   (str "\n"
        (with-out-str
          (pp/pprint content))
-       "\n"
+       "\n(" kind ")"
+       "\n\n"
        explanation))

 (defmacro defterm
@@ -74,7 +75,7 @@
         `(do
            (def ~def-name ~quoted-def#)
            (alter-meta! (var ~def-name)  (fn [m#] (assoc m#
-                                                         :doc (mk-doc (quote ~body) ~doc)
+                                                         :doc (mk-doc "definition" (quote ~body) ~doc)
                                                          :arglists (list (quote ~params)))))
            [:defined :term (quote ~def-name)])))))

@@ -119,7 +120,7 @@
       `(do
          (def ~def-name ~quoted-def#)
          (alter-meta! (var ~def-name)  (fn [m#] (assoc m#
-                                                       :doc (mk-doc (quote ~ty) ~doc)
+                                                       :doc (mk-doc "theorem" (quote ~ty) ~doc)
                                                        :arglists (list (quote ~params)))))
          [:declared :theorem (quote ~def-name)]))))

@@ -164,7 +165,7 @@
       `(do
          (def ~def-name ~quoted-def#)
          (alter-meta! (var ~def-name)  (fn [m#] (assoc m#
-                                                       :doc (mk-doc (quote ~ty) ~doc)
+                                                       :doc (mk-doc "axiom" (quote ~ty) ~doc)
                                                        :arglists (list (quote ~params)))))
          [:declared :axiom (quote ~def-name)]))))


require admin scope to edit doc

require admin scope to edit doc

--- src-cljs/frontend/components/overlay.cljs
+++ src-cljs/frontend/components/overlay.cljs
@@ -90,7 +90,7 @@
             (common/icon :login)
             [:span "Log in"]]))))))

-(defn doc-name [{:keys [doc-id doc-name]} owner]
+(defn doc-name [{:keys [doc-id doc-name max-document-scope]} owner]
   (reify
     om/IDisplayName (display-name [_] "Doc name")
     om/IInitState (init-state [_] {:listener-key (.getNextUniqueId (.getInstance IdGenerator))})
@@ -121,6 +121,7 @@
     (should-update [_ next-props next-state]
       (if (:editing? next-state)
         (or (not= (:doc-id next-props) (:doc-id (om/get-props owner)))
+            (not= (:max-document-scope next-props) (:max-document-scope (om/get-props owner)))
             (nil? (:local-doc-name next-state)))
         true))
     om/IRender
@@ -157,7 +158,7 @@
            (or doc-name (if (seq (:document/name doc))
                           (:document/name doc)
                           "Untitled"))]
-          (when-not false ;(om/get-state owner :editing?)
+          (when (auth/contains-scope? auth/scope-heirarchy max-document-scope :admin)
             [:a.doc-name-edit {:role "button"
                                :title "Change this doc's name"
                                :on-click #(do (om/set-state! owner :editing? true)
@@ -870,7 +871,8 @@

                      (keyword-identical? :start overlay-key)
                      (om/build doc-name {:doc-id (:document/id app)
-                                         :doc-name (:doc-name app)})
+                                         :doc-name (:doc-name app)
+                                         :max-document-scope (:max-document-scope app)})

                      (namespaced? overlay-key)
                      (str (:title component) " " (str/capitalize (name overlay-key)))


refactor tests to use more dynamic/random derivative ids

--- test/org/martinklepsch/derivatives_test.clj
+++ test/org/martinklepsch/derivatives_test.clj
@@ -5,14 +5,21 @@
 (def compute-log (atom []))
 (defn log! [id] (swap! compute-log conj id))

+(defn at-least-n-in [thing n seq]
+  (<= n (count (filter #(= % thing) seq))))
+
 (t/use-fixtures :each (fn [f] (reset! compute-log []) (f)))

+(def kbase   (str "base---" (java.util.UUID/randomUUID)))
+(def kinc    (str "inc----" (java.util.UUID/randomUUID)))
+(def kas-map (str "as-map-" (java.util.UUID/randomUUID)))
+(def ksum    (str "sum----" (java.util.UUID/randomUUID)))
+
 (defn test-spec [base]
-  {:base   [[]           base]
-   :inc    [[:base]      (fn [base] (log! :inc) (inc base))]
-   :as-map [[:base :inc] (fn [base inc] (log! :as-map) {:base base :after-inc inc})]
-   :sum    [[:as-map]    (fn [as-map] (log! :sum) (+ (:base as-map) (:after-inc as-map)))]})
-
+  {kbase   [[]           base]
+   kinc    [[kbase]      (fn [base] (log! kinc) (inc base))]
+   kas-map [[kbase kinc] (fn [base inc] (log! kas-map) {:base base :after-inc inc})]
+   ksum    [[kas-map]    (fn [as-map] (log! ksum) (+ (:base as-map) (:after-inc as-map)))]})

 (t/deftest not-required-test
   (t/is (= [2] (drv/not-required {:a 1 :b 2} #{:a})))
@@ -21,55 +28,61 @@

 (t/deftest build-test
   (let [drvs (drv/build (test-spec (atom 1)))]
-    (t/is (= 1 @(:base drvs)))
-    (t/is (= 2 @(:inc drvs)))
-    (t/is (= {:base 1 :after-inc 2} @(:as-map drvs)))
-    (t/is (= 3 @(:sum drvs)))))
+    (t/is (= 1 @(get drvs kbase)))
+    (t/is (= 2 @(get drvs kinc)))
+    (t/is (= {:base 1 :after-inc 2} @(get drvs kas-map)))
+    (t/is (= 3 @(get drvs ksum)))))

 (t/deftest sync-derivatives-test
-  (let [drvs (drv/sync-derivatives! (test-spec (atom 1)) (drv/prefix-id) {} [:base :inc])]
-    (t/is (= 1 @(:base drvs)))
-    (t/is (= 2 @(:inc drvs)))
-    (t/is (nil? (:as-map drvs)))
-    (t/is (nil? (:sum drvs)))
-    (t/is (= [:inc] @compute-log))))
+  (let [drvs (drv/sync-derivatives! (test-spec (atom 1)) (drv/prefix-id) {} [kbase kinc])]
+    (t/is (= 1 @(get drvs kbase)))
+    (t/is (= 2 @(get drvs kinc)))
+    (t/is (nil? (get drvs kas-map)))
+    (t/is (nil? (get drvs ksum)))
+    (t/is (= [kinc] @compute-log))))

 (t/deftest sync-derivatives-test
   (let [spec (test-spec (atom 1))
         id   (drv/prefix-id)
-        drvs (drv/sync-derivatives! spec id {} [:base :inc])]
-    (t/is (= 1 @(:base drvs)))
-    (t/is (= 2 @(:inc drvs)))
-    (t/is (nil? (:as-map drvs)))
-    (t/is (nil? (:sum drvs)))
-    (t/is (= [:inc] @compute-log))
+        drvs (drv/sync-derivatives! spec id {} [kbase kinc])]
+    (t/is (= 1 @(get drvs kbase)))
+    (t/is (= 2 @(get drvs kinc)))
+    (t/is (nil? (get drvs kas-map)))
+    (t/is (nil? (get drvs ksum)))
+    (t/is (= [kinc] @compute-log))
     ;; sync with more required keys
-    (let [drvs-updated (drv/sync-derivatives! spec id drvs [:base :inc :as-map])]
-      (t/is (= [:inc :as-map] @compute-log)))))
+    (let [drvs-updated (drv/sync-derivatives! spec id drvs [kbase kinc kas-map])]
+      (t/is (= [kinc kas-map] @compute-log)))))

 ;; This test will fail if watches are not properly removed from source refs
 (t/deftest watches-disposed-test
   (let [base  (atom 1)
         spec  (test-spec base)
         id    (drv/prefix-id)
-        drvs1 (drv/sync-derivatives! spec id {} [:base :inc])
-        drvs2 (drv/sync-derivatives! spec id drvs1 [:base])]
+        drvs1 (drv/sync-derivatives! spec id {} [kbase kinc])
+        drvs2 (drv/sync-derivatives! spec id drvs1 [kbase])]
     (swap! base inc)
-    (t/is (= [:inc] @compute-log))))
+    (t/is (= [kinc] @compute-log))))

 (t/deftest pool-test
   (let [base  (atom 1)
         spec  (test-spec base)
         {:keys [get! release!]} (drv/derivatives-pool spec)]
-    (t/is (= 1 @(get! :base :1-token)))
+    (t/is (= 1 @(get! kbase :1-token)))
     (t/is (= [] @compute-log))
-    (t/is (= 2 @(get! :inc :2-token)))
-    (t/is (= [:inc] @compute-log))
-    (t/is (= 3 @(get! :sum :3-token)))
-    (t/is (= [:inc :as-map :sum] @compute-log))
+    (t/is (= 2 @(get! kinc :2-token)))
+    (t/is (= [kinc] @compute-log))
+    (t/is (= 3 @(get! ksum :3-token)))
+    (t/is (= [kinc kas-map ksum] @compute-log))
     (swap! base inc)
-    (t/is (= [:inc :as-map :sum :inc :as-map :sum :as-map] @compute-log))
-    (t/is (= 5 @(get! :sum :3-token)))))
+    ;; Previously this test was used:
+    ;; (t/is (= [kinc kas-map ksum kinc kas-map ksum kas-map] @compute-log))
+    ;; We cannot guarantee an order in which the watches are triggered though
+    ;; and so all we can test is that a thing as been recomputed at least n times
+    (t/is (at-least-n-in kinc 2 @compute-log))
+    (t/is (at-least-n-in ksum 2 @compute-log))
+    (t/is (at-least-n-in kas-map 3 @compute-log))
+    (t/is (= 5 @(get! ksum :3-token)))))

 (t/deftest pool-throws-if-unknown-test
   (let [base  (atom 1)
@@ -85,21 +98,21 @@
         pool-state (atom {})
         dm (drv/->DerivativesPool spec (drv/prefix-id) (drv/spec->graph spec) pool-state)]

-    (drv/get! dm :sum :1-token)
-    (t/is (= {:sum #{:1-token}} (:registry @pool-state)))
-    (drv/get! dm :as-map :2-token)
-    (t/is (= {:sum #{:1-token} :as-map #{:2-token}} (:registry @pool-state)))
-    (t/is (= {:base 1 :after-inc 2} (-> @pool-state :derivatives :as-map deref)))
-    (t/is (= 3 (-> @pool-state :derivatives :sum deref)))
+    (drv/get! dm ksum :1-token)
+    (t/is (= {ksum #{:1-token}} (:registry @pool-state)))
+    (drv/get! dm kas-map :2-token)
+    (t/is (= {ksum #{:1-token} kas-map #{:2-token}} (:registry @pool-state)))
+    (t/is (= {:base 1 :after-inc 2} (-> @pool-state :derivatives (get kas-map) deref)))
+    (t/is (= 3 (-> @pool-state :derivatives (get ksum) deref)))

     ;; :as-map still needs to be present because :sum requires it
-    (drv/release! dm :as-map :2-token)
-    (t/is (= {:sum #{:1-token}} (:registry @pool-state)))
-    (t/is (= {:base 1 :after-inc 2} (-> @pool-state :derivatives :as-map deref)))
-    (t/is (= 3 (-> @pool-state :derivatives :sum deref)))
+    (drv/release! dm kas-map :2-token)
+    (t/is (= {ksum #{:1-token}} (:registry @pool-state)))
+    (t/is (= {:base 1 :after-inc 2} (-> @pool-state :derivatives (get kas-map) deref)))
+    (t/is (= 3 (-> @pool-state :derivatives (get ksum) deref)))

     ;; After releasing all, pool and registry should be empty
-    (drv/release! dm :sum :1-token)
+    (drv/release! dm ksum :1-token)
     (t/is (= {} (:registry @pool-state)))
     (t/is (= {} (:derivatives @pool-state)))))

@@ -108,9 +121,8 @@
         spec  (test-spec base)
         pool-state (atom {})
         dm (drv/->DerivativesPool spec (drv/prefix-id) (drv/spec->graph spec) pool-state)]
-    (t/is (= base (drv/get! dm :base :abc)))
-    (let [am-ref (drv/get! dm :as-map :t1)]
-      (t/is (= (drv/get! dm :sum :t1) (drv/get! dm :sum :t2)))
-      (t/is (= (drv/get! dm :sum :t2) (drv/get! dm :sum :t4)))
-      (t/is (= am-ref (drv/get! dm :as-map :t123))))))
- +    (t/is (= base (drv/get! dm kbase :abc)))
+    (let [am-ref (drv/get! dm kas-map :t1)]
+      (t/is (= (drv/get! dm ksum :t1) (drv/get! dm ksum :t2)))
+      (t/is (= (drv/get! dm ksum :t2) (drv/get! dm ksum :t4)))
+      (t/is (= am-ref (drv/get! dm kas-map :t123))))))


Fix the state change form in the main view

--- src/mdr2/views.clj
+++ src/mdr2/views.clj
@@ -48,12 +48,12 @@
                       (and (= next-state "recorded")
                              (:library_number production)
                              (prod/manifest? production))
-                      (do
-                        (form/form-to {:class "btn-group"} [:post (str "/production/" id "/state")])
-                        (form/hidden-field :state next-state)
-                        (anti-forgery-field)
-                        [:button.btn.btn-default (layout/glyphicon "transfer") " "
-                         (:name (first (cached-state {:id next-state})))])
+                      (form/form-to
+                       {:class "btn-group"} [:post (str "/production/" id "/state")]
+                       (form/hidden-field :state next-state)
+                       (anti-forgery-field)
+                       [:button.btn.btn-default (layout/glyphicon "transfer") " "
+                        (:name (first (cached-state {:id next-state})))])
                       ;; Enable the "Split" button if the next state is "split" and there
                       ;; is a split production
                       (and (= next-state "split") (prod/split? production))


Try to ensure consistent sorting of tags in manifest

--- src/docker_clojure/manifest.clj
+++ src/docker_clojure/manifest.clj
@@ -9,17 +9,23 @@
   (let [short-tag (:docker-tag variant)
         full-tag  (full-docker-tag variant)
         base      (into #{} [short-tag full-tag])]
-    (conj base
+    (-> base
+        (conj
           (docker-tag {:omit-jdk? true} variant)
           (docker-tag {:omit-build-tool? true} variant)
           (docker-tag {:omit-build-tool-version? true} variant)
-          (docker-tag {:omit-distro? true} variant))))
+          (docker-tag {:omit-distro? true} variant))
+        vec
+        sort)))

 (defn variant->manifest
   [variant]
   (str/join "\n"
             (conj
-              (remove nil? [(str/join " " (conj ["Tags:"] (str/join ", " (variant-tags variant))))
+              (remove nil? [(str/join " " (conj ["Tags:"]
+                                                (->> variant
+                                                     variant-tags
+                                                     (str/join ", "))))
                             (when-let [arch (:architectures variant)]
                               (str/join " " ["Architectures:" (str/join ", " arch)]))
                             (str/join " " ["Directory:" (df/build-dir variant)])])


transducers

transducers

--- transducers.clj
+++ transducers.clj
@@ -10,21 +10,27 @@
 (into [] a (range 4))

-(def c
-(chan 1 a))
+(def c (chan 1 a))

-(def cc
-(chan 1 (comp (map #(.-keyCode %))
-                  (filter #{37 39})
-                  (map {37 :previous 39 :next}))))
+(def cc (chan 1 (comp
+                 (filter #{37 39})
+                 (map {37 :previous 39 :next}))))
+
+
+(go
+ (<! (timeout 5000))
+ (println "done"))
+
+(def d (chan))
+
+
+(put! cc 37)
+(go
+ (println (<! cc)))

-(put! cc 5)
-
-(<!! cc)
-
 (put! c 19)

-(<! c)
-
+(go
+ (println (<! c)))


vector?->seqable?

vector?->seqable?

--- src/gamma_driver/impl/bind.cljs
+++ src/gamma_driver/impl/bind.cljs
@@ -36,7 +36,7 @@
            :element element
            :count (if-let [c (:count input)]
                     c
-                    (if (vector? data)
+                    (if (seqable? data)
                       (count data)))))))))

 (defmethod bind* :uniform [fns driver program element input]


Update deps

Update deps

--- ClojureScript/project.clj
+++ ClojureScript/project.clj
@@ -1,11 +1,11 @@
 (defproject shrimp "0.1.0-SNAPSHOT"
   :description "Demo project for Goby."
-  :dependencies [[org.clojure/clojure "1.7.0-RC1"]
-                 [org.clojure/clojurescript "0.0-3308"]
-                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
+  :dependencies [[org.clojure/clojure "1.8.0"]
+                 [org.clojure/clojurescript "1.9.293"]
+                 [org.clojure/core.async "0.2.395"]
                  [goby "0.3.1"]
-                 [org.omcljs/ambly "0.7.0"]]
-  :plugins [[lein-cljsbuild "1.0.6"]]
+                 [org.omcljs/ambly "0.8.0-SNAPSHOT"]]
+  :plugins [[lein-cljsbuild "1.1.5"]]
   :source-paths ["src"]
   :clean-targets ["target" "out"]
   :cljsbuild {:builds {:dev


rollbar fn improvements

rollbar fn improvements

--- src/pc/rollbar.clj
+++ src/pc/rollbar.clj
@@ -64,23 +64,12 @@
   (str/replace (str/capitalize s) #"-(.)"
                (fn [[_ char]] (str "-" (str/capitalize char)))))

-(defn headers-for
-  [{:keys [headers] :as request}]
-  (into {} (for [[k v] headers]
-             [(to-http-case k) v])))
-
 (defn request-data
-  [{method :request-method client :remote-addr qstr :query-string body :body
-    :as request} user-id]
-  (let [body (if (string? body)
-               body
-               (try (slurp body) (catch Throwable e "")))
-        rollbar-obj {:url (url-for request)
-                     :method (str/upper-case (name method))
-                     :headers (headers-for request)
-                     :query_string (or qstr "")
-                     :user_ip client
-                     :body body}
+  [{:keys [request-method remote-addr query-string] :as request} user-id]
+  (let [rollbar-obj {:url (url-for request)
+                     :method (str/upper-case (name request-method))
+                     :query_string (or query-string "")
+                     :user_ip remote-addr}
         rollbar-obj (if user-id
                       (assoc rollbar-obj :person {:id (str user-id)})
                       rollbar-obj)]


injecting default props in the right places

--- src/show/core.cljs
+++ src/show/core.cljs
@@ -23,10 +23,13 @@
 (defn get-node
   [component] (.getDOMNode component))

+(defn- props-with-defaults [component props]
+  (merge (.. component -__show_default_props) props))
+
 (defn get-props
   "Returns the value of the components inherited nested associative structure.
   ks is an optional property that gives quick access to a get-in call"
-  ([component] (aget (.-props component) "__show"))
+  ([component] (props-with-defaults component (aget (.-props component) "__show")))
   ([component ks]
    (let [ks (if (sequential? ks) ks [ks])]
      (get-in (get-props component) ks))))
@@ -144,14 +147,13 @@

    :getDefaultProps
    (fn [] (this-as this
-     (let [props       (execute-local-method  this :default-props)
-           mixin-props (execute-mixin-methods this :default-props)]
+     (let [props         (execute-local-method  this :default-props)
+           mixin-props   (into {} (apply merge (execute-mixin-methods this :default-props)))
+           default-props (merge mixin-props props)]
        ;; React will only merge prop data on the root level, and since there is
        ;; already a __show property, it does not merge new props. This is why
        ;; we dont rely on React for this merge
-       (set! (.. this -props -__show)
-             (merge (merge (into {} (apply merge mixin-props)) props)
-                    (get-props this))))
+       (set! (.. this -__show_default_props) default-props))
      nil))

    :componentWillMount
@@ -166,13 +168,13 @@

    :componentWillReceiveProps
    (fn [next-props] (this-as this
-     (let [next-props (get-show-data next-props)]
+     (let [next-props (props-with-defaults this (get-show-data next-props))]
        (execute-mixin-methods this :will-receive-props next-props)
        (execute-local-method  this :will-receive-props next-props))))

    :shouldComponentUpdate
    (fn [next-props next-state] (this-as this
-     (let [next-props (get-show-data next-props)
+     (let [next-props (props-with-defaults this (get-show-data next-props))
            next-state (get-show-data next-state)
            ;; Need to explicitly check for the method since a nil return is
            ;; acceptable from should-update
@@ -180,20 +182,20 @@
            local-should-update (execute-local-method this :should-update next-props next-state)
            mixin-update?       (not (empty? (local-mixins this :should-update)))
            mixin-should-update (every? identity (execute-mixin-methods this :should-update next-props next-state))]
-        (cond
-          (and local-update? mixin-update?)
-            (and local-should-update mixin-should-update)
-          mixin-update?
-            mixin-should-update
-          local-update?
-            local-should-update
-          :else
-            (or (not= (get-props this) next-props)
-                (not= (get-state this) next-state))))))
+       (cond
+         (and local-update? mixin-update?)
+           (and local-should-update mixin-should-update)
+         mixin-update?
+           mixin-should-update
+         local-update?
+           local-should-update
+         :else
+           (or (not= (get-props this) next-props)
+               (not= (get-state this) next-state))))))

    :componentWillUpdate
    (fn [next-props next-state] (this-as this
-     (let [next-props (get-show-data next-props)
+     (let [next-props (props-with-defaults this (get-show-data next-props))
            next-state (get-show-data next-state)]
        (execute-mixin-methods this :will-update next-props next-state)
        (execute-local-method  this :will-update next-props next-state))))
@@ -201,7 +203,7 @@
    :componentDidUpdate
    (fn [prev-props prev-state] (this-as this
      (let [prev-state (get-show-data prev-state)
-           prev-props (get-show-data prev-props)]
+           prev-props (props-with-defaults this (get-show-data prev-props))]
        (execute-mixin-methods this :did-update prev-props prev-state)
        (execute-local-method  this :did-update prev-props prev-state))))


refactor: use destructuring to save a couple bytes

--- src/sort/merge.clj
+++ src/sort/merge.clj
@@ -6,10 +6,10 @@
       (cond
         (empty? xs) (concat (reverse ys) sorted)
         (empty? ys) (concat (reverse xs) sorted)
-        :else (let [x (first xs) y (first ys)]
+        :else (let [[x & rest-x] xs [y & rest-y] ys]
                 (if (< x y)
-                  (recur (rest xs) ys (cons x sorted))
-                  (recur (rest ys) xs (cons y sorted))))))))
+                  (recur rest-x ys (cons x sorted))
+                  (recur xs rest-y (cons y sorted))))))))

 (defn merge-sort [xs]
   (let [n (count xs)]


Remove file

Remove file

--- android/assets/data_readers.clj
+++ android/assets/data_readers.clj
@@ -1 +0,0 @@
-{res/drawable neko.resource/resolve-drawable-reader, res/string neko.resource/resolve-string-reader, res/layout neko.resource/resolve-layout-reader, res/id neko.resource/resolve-id-reader}


Refactor regexp list matching code. (#1671)

* Refactor regexp list matching code.

* Update scheduler/src/cook/tools.clj

Co-authored-by: Nikolai Sinkov <096e2ca855e0d5a71823216f5078b4ae8955c1a2@gmail.com>

* Review feedback

Co-authored-by: Scott Crosby <23e8f75489aff47cf2cd5a529e9a769a24e9501c@twosigma.com>
Co-authored-by: Nikolai Sinkov <096e2ca855e0d5a71823216f5078b4ae8955c1a2@gmail.com>

--- scheduler/src/cook/tools.clj
+++ scheduler/src/cook/tools.clj
@@ -907,14 +907,23 @@
     (cond-> {:count 1 :cpus cpus :mem mem}
       gpus (assoc :gpus gpus))))

+(defn match-based-on-regexp
+  "Given a list of dictionaries [{:<regexp-name> <regexp> :<field-name> <field>} {:<regexp-name> <regexp> :<field-name> <field>} ...], match-list,
+   a key <field-name> and <regexp-name> name, return the first matching <field> where the <regexp> matches the key."
+  [regexp-name field-name match-list key]
+  (-> match-list
+      (->> (filter (fn [map]
+                     (let [regexp (get map regexp-name)
+                           pattern (re-pattern regexp)]
+                       (re-find pattern key)))))
+      first
+      (get field-name)))
+
 (defn match-based-on-pool-name
   "Given a list of dictionaries [{:pool-regexp .. :field ...} {:pool-regexp .. :field ...}
    a pool name and a <field> name, return the first matching <field> where the regexp matches the pool name."
   [match-list effective-pool-name field]
-  (->> match-list
-       (filter (fn [{:keys [pool-regex]}] (re-find (re-pattern pool-regex) effective-pool-name)))
-       first
-       field))
+  (match-based-on-regexp :pool-regex field match-list effective-pool-name))

 (defn global-pool-quota
   "Given a pool name, determine the quota for that pool."


Add Log4j as SLF4J implementation

Add Log4j as SLF4J implementation

Now Kafka Streams reveals its soul as soon as you initialize it.

--- clstreams/project.clj
+++ clstreams/project.clj
@@ -11,6 +11,7 @@
                  [org.apache.kafka/kafka-clients "0.10.2.1" :classifier "test"]
                  [org.apache.kafka/kafka-streams "0.10.2.1"]
                  [org.apache.kafka/kafka-streams "0.10.2.1" :classifier "test"]
+                 [org.slf4j/slf4j-jdk14 "1.7.25"]

                  [com.stuartsierra/component "0.3.2"]
                  [spootnik/signal "0.2.1"]]


added output example into progress download example


Remove the hiccup HTML rendering of vectors

With hindsight the pros of rendering vectors as HTML outweigh the cons
of removing the terseness of hiccup constants. And Hiccup is only one
function call away.

--- src/yada/body.clj
+++ src/yada/body.clj
@@ -145,10 +145,7 @@

 (defmethod render-seq "text/html"
   [s representation]
-  (-> (html s)
-      (str \newline) ; annoying on the command-line otherwise
-      (to-body representation) ; for string encoding
-      ))
+  (render-map s representation))

 (defmethod render-seq "application/xhtml+xml"
   [s representation]


Fix test and add comment

Fix test and add comment

--- transmit-lib/test/cmr/transmit/test/echo/rest.clj
+++ transmit-lib/test/cmr/transmit/test/echo/rest.clj
@@ -5,6 +5,10 @@

 (deftest test-error-masked
   (let [error-message "Unexpected error message: Token 123 does not exist."
-       status 500]
-    (is (= (format "Unexpected status %d from response. body: %s" status "Token does not exist")
-           (rest/unexpected-status-error! status error-message)))))
+        status 500]
+    (is (thrown-with-msg?
+        java.lang.Exception
+        ;; Fixme - (format "%d %s" status message) was getting the error:
+        ;; java.lang.ClassCastException: java.lang.String cannot be cast to java.util.regex.Pattern
+        #"Unexpected status 500 from response. body: Token does not exist"
+        (rest/unexpected-status-error! status error-message)))))


CMR-4117 Humanizers not showing non-english characters correctly

--- transmit-lib/src/cmr/transmit/humanizer.clj
+++ transmit-lib/src/cmr/transmit/humanizer.clj
@@ -53,5 +53,9 @@
                  :method :get
                  :raw? raw?
                  :http-options (merge {:headers headers
-                                       :accept :json}
+                                       :accept :json
+                                       ;; :decompress-body false is needed to
+                                       ;; workaround an issue with clj-http.client
+                                       ;; not handling gzip and unicode characters
+                                       :decompress-body false}
                                       http-options)}))))


I shouldn't need a lein profile

I shouldn't need a lein profile

--- leiningen/.lein/profiles.clj
+++ leiningen/.lein/profiles.clj
@@ -1,2 +1 @@
-{:user {:plugins []
-        :dependencies [[acyclic/squiggly-clojure "0.1.6"]]}}
+{}


another perf enhancement

another perf enhancement

--- src/clj/com/rpl/specter/impl.cljc
+++ src/clj/com/rpl/specter/impl.cljc
@@ -257,16 +257,28 @@
     (set-cell! cell ret)
     ret))

-;; TODO: this used to be a macro for clj... check if that's still important
-(defn compiled-traverse* [path result-fn structure]
-  (exec-select*
-   path
-   []
-   structure
-   (fn [vals structure]
-    (if (identical? vals [])
-      (result-fn structure)
-      (result-fn (conj vals structure))))))
+#?(
+   :clj
+   (defmacro compiled-traverse* [path result-fn structure]
+     `(exec-select*
+       ~path
+       []
+       ~structure
+       (fn [vals# structure#]
+        (if (identical? vals# [])
+          (~result-fn structure#)
+          (~result-fn (conj vals# structure#))))))
+
+   :cljs
+   (defn compiled-traverse* [path result-fn structure]
+     (exec-select*
+      path
+      []
+      structure
+      (fn [vals structure]
+       (if (identical? vals [])
+         (result-fn structure)
+         (result-fn (conj vals structure)))))))


add test for Casting Call

add test for Casting Call

--- src/clj/test/cards-operations.clj
+++ src/clj/test/cards-operations.clj
@@ -31,6 +31,35 @@
     (is (= 8 (:credit (get-corp))) "Gained 5 credits")
     (is (= 1 (:click (get-corp))))
     (is (= 7 (count (:hand (get-corp)))) "Drew 2 cards")))
+
+(deftest casting-call
+  "Casting Call - Only do card-init on the Public agendas.  Issue #1128"
+  (do-game
+    (new-game (default-corp [(qty "Casting Call" 2) (qty "Oaktown Renovation" 1)
+                             (qty "Improved Tracers" 1) (qty "Hunter" 1)])
+              (default-runner))
+    (core/gain state :corp :click 1)
+    (play-from-hand state :corp "Hunter" "HQ")
+    (let [hunter (get-ice state :hq 0)]
+      (core/rez state :corp hunter)
+      (is (= 4 (:current-strength (refresh hunter))))
+      (play-from-hand state :corp "Casting Call")
+      (prompt-select :corp (find-card "Improved Tracers" (:hand (get-corp))))
+      (prompt-choice :corp "New remote")
+      (let [imptrac (get-content state :remote1 0)]
+        (is (get-in (refresh imptrac) [:rezzed]) "Improved Tracers is faceup")
+        (is (= 4 (:current-strength (refresh hunter))) "Hunter hasn't gained strength")
+        (play-from-hand state :corp "Casting Call")
+        (prompt-select :corp (find-card "Oaktown Renovation" (:hand (get-corp))))
+        (prompt-choice :corp "New remote")
+        (let [oak (get-content state :remote2 0)]
+          (core/advance state :corp {:card (refresh oak)})
+          (is (= 5 (:credit (get-corp))) "Events on Public agenda work; gained 2 credits from advancing")
+          (take-credits state :corp)
+          (run-empty-server state "Server 2")
+          (prompt-select :runner oak)
+          (prompt-choice :runner "Steal")
+          (is (= 2 (:tag (get-runner))) "Runner took 2 tags from accessing agenda with Casting Call hosted on it"))))))

 (deftest closed-accounts
   "Closed Accounts - Play if Runner is tagged to make Runner lose all credits"


listlpv output in text rather than csv

listlpv output in text rather than csv

--- src/clj/webapp/routes/listlpv.clj
+++ src/clj/webapp/routes/listlpv.clj
@@ -86,7 +86,7 @@
                             {:query-params
                              {"query" query-sparql ;;generated sparql
                               ;;"format" "application/sparql-results+json"}})]
-                              "format" "text"}})]
+                              "format" "text"}})
                               ;;"format" "csv"}})
               ;;reqvec (csv/parse-csv req)
               reqvec (split (:body req) #"\n")


Removed orphan * in html.clj

Removed orphan * in html.clj

--- src/clj_highlight/output/html.clj
+++ src/clj_highlight/output/html.clj
@@ -13,6 +13,4 @@
 	(print (span style token))
 	(if-let [[f & n] (next tokenstream)]
 	  (recur f n))))
-    (print "")))
-
-*+    (print "")))


remove commented code

remove commented code

--- src/cljs/dbquery/data_import.cljs
+++ src/cljs/dbquery/data_import.cljs
@@ -12,11 +12,9 @@
         :error-handler #(reset! error (error-text %))))

 (defn size-required? [type]
-  ;; (#{"2" "3" "1" "12"} type)
   (#{2 3 1 12} type))

 (defn format-required? [type]
-  ;; (#{"91" "92" "93" "3" "8" "2" "7"} type)
   (#{91 92 93 3 8 2 7} type))

 (defn new-table-with-fields [import-form data dest-error]


stop storing history until we start using it

--- src/cljs/gc_api_browser/core.cljs
+++ src/cljs/gc_api_browser/core.cljs
@@ -36,7 +36,7 @@
   (om/transact! app (fn [m]
                       (-> m
                           (assoc :response resp)
-                          (update :history #(conj % (select-keys m [:request :response])))))))
+                          #_(update :history #(conj % (select-keys m [:request :response])))))))

 (defn render-schema-select [app-cursor]
   (dom/div #js {:className "flex-container u-direction-row"}


do 300 thread IDS in a go for now

do 300 thread IDS in a go for now

--- src/clueweb_disqus/posts.clj
+++ src/clueweb_disqus/posts.clj
@@ -93,6 +93,23 @@
           "&limit=100"
           (if cursor (str "&cursor=" cursor) ""))))

+(defn create-url-2
+  ([thread-ids api-key]
+     (create-url-2 thread-ids api-key nil))
+  ([thread-ids api-key cursor]
+     (str posts-endpoint
+          "?api_key="
+          api-key
+          (apply
+           str
+           (map
+            (fn [t]
+              (str "&thread=" t))
+            thread-ids))
+          "&order=asc"
+          "&limit=100"
+          (if cursor (str "&cursor=" cursor) ""))))
+
 (defn write-content
   [filename-to-write body]
   (let [content-to-write (get body "response")]
@@ -111,9 +128,9 @@
                              (get "cursor")
                              (get "next"))

-            next-pg-url (create-url thread-id
-                                    api-key
-                                    cursor-value)
+            next-pg-url (create-url-2 thread-id
+                                      api-key
+                                      cursor-value)

             next-pg-content (core/rate-limited-download next-pg-url)]
         (write-content filename-to-write
@@ -125,8 +142,8 @@
 (defn download-posts
   "Download all the posts for a single thread"
   [thread-id file-to-write api-key]
-  (let [url (create-url thread-id
-                        api-key)
+  (let [url (create-url-2 thread-id
+                          api-key)
         first-page-content (core/rate-limited-download url)]
     (write-content file-to-write first-page-content)
     (discover-iteration thread-id file-to-write first-page-content api-key)))
@@ -176,14 +193,7 @@

         deja-downloaded-file (string/replace thread-ids-file
                                              #".threads$"
-                                             ".downloaded")
-
-        downloaded (if (.exists
-                        (io/as-file deja-downloaded-file))
-                     (set
-                      (string/split-lines
-                       (slurp deja-downloaded-file)))
-                     (set []))]
+                                             ".downloaded")]
     (if-not (.exists
              (io/as-file file-to-write))

@@ -194,12 +204,11 @@
                      (io/as-file file-to-write)))

           ;; kick off download
-          (let [thread-ids (filter
-                            (fn [t]
-                              (not
-                               (some #{t} downloaded)))
-                            (string/split-lines
-                             (slurp thread-ids-file)))]
+          (let [thread-ids
+                (partition
+                 300
+                 (string/split-lines
+                  (slurp thread-ids-file)))]
             (do (doseq [thread-id thread-ids]
                   (download-posts thread-id
                                   file-to-write
@@ -224,10 +233,10 @@
   []
   (let [threads-listing (str core/disqus-jobs-dir "all.threads")
         downloaded-listing (if (.exists
-                                (io/as-file "all.downloaded"))
+                                (io/as-file (str core/disqus-jobs-dir "all.downloaded")))
                             (set
                              (string/split-lines
-                              (slurp "all.downloaded")))
+                              (slurp (str core/disqus-jobs-dir "all.downloaded"))))
                             (set []))
         thread-stream (with-open [rdr (io/reader threads-listing)]
                         (doall


Simplify

Simplify

--- src/app/ctl.cljs
+++ src/app/ctl.cljs
@@ -72,6 +72,7 @@
                                               (.focus (.-target e))
                                               (.select (.-target e)))}]
              ["#toggle-import-dlg" {:on-click #(dispatch-sync [:toggle-import-visibility])}]
+             ;; how to refer to the attrs of elements here?
              ["#playmode input.drizzle" (if (= (:playmode @player) "drizzle") {:checked "true"} {})]
              ["#playmode input.pairs" (if (= (:playmode @player) "pairs") {:checked "true"} {})]
              ["#playmode input.single" (if (= (:playmode @player) "single") {:checked "true"} {})]
@@ -84,15 +85,12 @@
                                           (dispatch-sync [:start])

                                                         )}]
-             ["#playmode .drizzle" {:on-change (fn []
-                                                 (dispatch-sync [:set-playmode "drizzle"])
-                                                 (dispatch-sync [:start]))}]
-             ["#playmode .pairs" {:on-change (fn []
-                                               (dispatch-sync [:set-playmode "pairs"])
-                                               (dispatch-sync [:start]))}]
-             ["#playmode .single" {:on-change (fn []
-                                                (dispatch-sync [:set-playmode "single"])
-                                                (dispatch-sync [:start]))}]
+             ["#playmode input"
+              {:on-change (fn [e]
+                            (dispatch-sync [:set-playmode
+                                            (.-value (.-target e))])
+                            (dispatch-sync [:start]))}]
+
              ["#ipm" {:value (Math/floor (* 60  (:items-per-sec @player)))
                       :on-change (fn [evt]
                                    (dispatch-sync [:set-ipm


idk wtf happened but it seems I checked in some goofed up code.  it should be corrected now

--- src/anyviz/views.clj
+++ src/anyviz/views.clj
@@ -24,7 +24,7 @@

 (defn common-footer []
   [:div#footer.footer
-    [:div.text-muted "Copyright © 2013, All Rights Reserved"] ])
+    [:div.text-muted "Copyright © 2013, All Rights Reserved"]])

 (def match-operators ["=","!=","<","<=",">",">="])
 (def group-times ["year","month","day","hour","minute"])
@@ -78,7 +78,7 @@
   [:div.form-group el extras])

 (defn ctl [el cols]
-  [:div {:class (nth bs-columns cols)} el])
+  [:div {:class (nth bs-columns (- cols 1))} el])

 (defn query-builder [db coll segments]
   (html
@@ -101,27 +101,27 @@
                   (label "Over the range" "date-period")
                   (ctl (dropdown date-periods "date-period") 4)
                   (label "Group time by" "group-times")
-                  (clt (dropdown group-times "group-times") 4))
+                  (ctl (dropdown group-times "group-times") 4))

                 (group
                   (label "Match where" "match-entities")
-                  (clt (dropdown segments "none" "match-entities") 4)
-                  (clt (dropdown match-operators "none" "match-ops") 2)
-                  (clt (input "value") 4))
+                  (ctl (dropdown segments "none" "match-entities") 4)
+                  (ctl (dropdown match-operators "none" "match-ops") 2)
+                  (ctl (input "value") 4))

                 (group
                   (label "Group results by" "group-entities")
-                  (clt (dropdown segments "none" "group-entities") 10))
+                  (ctl (dropdown segments "none" "group-entities") 10))

                 (group
                   (label "Aggregate" "reduce-entities")
-                  (clt (dropdown segments "reduce-entities") 4)
+                  (ctl (dropdown segments "reduce-entities") 4)
                   (label "Over the statistic" "reduce-ops")
-                  (clt (dropown reduce-operators "reduce-ops") 4))
+                  (ctl (dropdown reduce-operators "reduce-ops") 4))

                 (group
                   (label "Display results as" "graph-type")
-                  (clt (dropdown graph-types "graph-type") 10))
+                  (ctl (dropdown graph-types "graph-type") 10))

                 [:div.form-group
                   [:div.col-sm-10.col-sm-offset-2
@@ -140,8 +140,8 @@
             [:div#rawquery.tab-pane
               [:pre#query {:style "text-align: left;"}]]
             [:div#queryresults.tab-pane
-              [:pre#results {:style "text-align: left;"}]]]]]
-      (common-footer)]))
+              [:pre#results {:style "text-align: left;"}]]]]
+        (common-footer)]]))

 (defn instance-view [dbs]
   (html
@@ -155,8 +155,8 @@
             [:div.panel-heading
               [:h3.panel-title "Select a Database"]]
             [:div.panel-body
-              (linked-items (map linkify-db dbs))]]]]
-      (common-footer)]))
+              (linked-items (map linkify-db dbs))]]]
+        (common-footer)]]))

 (defn database-view [db colls]
   (html
@@ -170,5 +170,5 @@
             [:div.panel-heading
               [:h3.panel-title "Select a Collection"]]
             [:div.panel-body
-              (linked-items (map #(linkify-coll db %) colls))]]]]
-      (common-footer)]))+              (linked-items (map #(linkify-coll db %) colls))]]]
+        (common-footer)]]))


add return type hints to the connection-source protocol

--- src/asphalt/type.clj
+++ src/asphalt/type.clj
@@ -13,9 +13,9 @@

 (defprotocol IConnectionSource
-  (create-connection            [this] "Create connection from the source")
-  (obtain-connection            [this] "Obtain connection from the source")
-  (return-connection [this connection] "Return connection to the source"))
+  (^Connection create-connection [this] "Create connection from the source")
+  (^Connection obtain-connection [this] "Obtain connection from the source")
+  (return-connection  [this connection] "Return connection to the source"))

 (defprotocol ISqlSource


delete model instance

delete model instance

--- src/er_cassandra/model/delete.clj
+++ src/er_cassandra/model/delete.clj
@@ -1,22 +1,57 @@
 (ns er-cassandra.model.delete
-  (:require [manifold.deferred :as d]
-            [qbits.alia :as alia]
-            [qbits.alia.manifold :as aliam]
-            [qbits.hayt :as h]
-            [er-cassandra.key :as k]
-            [er-cassandra.record :as r]
-            [er-cassandra.model.types]
-            [er-cassandra.model.select :refer [select-one]])
+  (:require
+   [clojure.set :as set]
+   [clojure.core.match :refer [match]]
+   [manifold.deferred :as d]
+   [cats.core :as m]
+   [cats.monad.either :as either]
+   [cats.monad.deferred :as dm]
+   [qbits.alia :as alia]
+   [qbits.alia.manifold :as aliam]
+   [qbits.hayt :as h]
+   [er-cassandra.key :as k]
+   [er-cassandra.record-either :as r]
+   [er-cassandra.model.types :as t]
+   [er-cassandra.model.util :refer [combine-responses create-lookup-record]]
+   [er-cassandra.model.unique-key :as unique-key]
+   [er-cassandra.model.upsert :as upsert]
+   [er-cassandra.model.select :as select])
   (:import [er_cassandra.model.types Model]))

 (defn delete
-  "delete a single instance, removing primary, secondary and lookup records "
+  "delete a single instance, removing primary, secondary unique-key and
+   lookup records "

   ([session ^Model model key record-or-key-value]
-   (delete session model key record-or-key-value {}))

-  ([session ^Model model key record-or-key-value opts]
-   ;; delete from primary-table where uber-key=X
-   ;; delete from each secondary table where uber-key=X
-   ;; delete from each lookup table where uber-key=X
-   ))
+   (m/with-monad dm/either-deferred-monad
+     (m/mlet [record (select/select-one session
+                                        model
+                                        key
+                                        record-or-key-value)
+
+              primary-response (upsert/delete-record
+                                session
+                                model
+                                (:primary-table model)
+                                (t/extract-uber-key-value model record))
+
+              unique-responses (unique-key/release-stale-unique-keys
+                                session
+                                model
+                                record
+                                nil)
+
+              secondary-responses (upsert/delete-stale-secondaries
+                                   session
+                                   model
+                                   record
+                                   nil)
+
+              lookup-responses (upsert/delete-stale-lookups
+                                session
+                                model
+                                record
+                                nil)]
+             (m/return
+              [:ok record :deleted])))))


Missed a newline after the print character sheet question

--- src/hphelper/scengen/scenform.clj
+++ src/hphelper/scengen/scenform.clj
@@ -15,7 +15,7 @@
   [playerId]
   (html [:div
          "Name:" [:input {:type "text" :name (str "name_" playerId)}] [:br]
-         "Print Character Sheet?" [:input {:type "checkbox" :name (str "charsheet_" playerId)}]
+         "Print Character Sheet?" [:input {:type "checkbox" :name (str "charsheet_" playerId)}] [:br]
          (map (fn [society] (str (society :ss_name)
                                  (html [:input {:type "checkbox" :name (str "ss_" playerId "_" (society :ss_id))}])
                                  (html [:br])))


limit length of messages client-side

limit length of messages client-side

--- src/chat/client/views/new_message.cljs
+++ src/chat/client/views/new_message.cljs
@@ -175,11 +175,12 @@
             (dom/textarea #js {:placeholder (config :placeholder)
                                :value (state :text)
                                :onChange (fn [e]
-                                           (om/update-state! owner
-                                                             (fn [s]
-                                                               (assoc s
-                                                                 :text (.. e -target -value)
-                                                                 :force-close? false))))
+                                           (let [text (.slice (.. e -target -value) 0 5000)]
+                                             (om/update-state! owner
+                                                               (fn [s]
+                                                                 (assoc s
+                                                                   :text text
+                                                                   :force-close? false)))))
                                :onKeyDown
                                (fn [e]
                                  (condp = e.keyCode


small fix

small fix

--- src/cljs/salava/badge/ui/evidence.cljs
+++ src/cljs/salava/badge/ui/evidence.cljs
@@ -234,13 +234,13 @@
      (reduce (fn [r resource]
                (conj r [grid-element resource state :file_input])
                ) [:div [:label
-                        [:span [:i.fa.fa-upload] (t :file/Upload) ]
+                       [:a [:span [:i.fa.fa-upload] (t :file/Upload)]]
                         [:input {:id "grid-file-upload"
                                  :type "file"
                                  :name "file"
                                  :on-change #(upload-file (cursor state [:files]) state)
                                  :style {:display "none"}}]]
-                  [:div [:label {:style {:margin "5px"}} (t :badge/Orchoosefile)]]
+                  (if (seq files) [:div [:label {:style {:margin "5px" :margin-bottom "10px"}} (t :badge/Orchoosefile)]])
                   ] files)]))

 (defn pages-grid [state]
@@ -249,7 +249,7 @@
      (reduce (fn [r resource]
                (conj r [grid-element resource state :page_input])
                ) [:div
-                  [:label {:style {:margin "5px"}} (t :badge/Clickpagebelow)]
+                  (if (seq pages) [:div [:label {:style {:margin-bottom "10px"}} (t :badge/Clickpagebelow)]])
                   ] pages)]))


Don't error on applying default sink shape to non-IObj.

--- src/clojure/parkour/mapreduce/sink.clj
+++ src/clojure/parkour/mapreduce/sink.clj
@@ -4,7 +4,7 @@
             [parkour (conf :as conf) (cser :as cser) (wrapper :as w)]
             [parkour.util :refer [returning]])
   (:import [java.io Closeable]
-           [clojure.lang IFn]
+           [clojure.lang IFn IObj]
            [org.apache.hadoop.conf Configurable]
            [org.apache.hadoop.mapreduce MapContext ReduceContext]))

@@ -161,6 +161,6 @@
   "Annotate `coll` as containing values to sink as `kind`, unless `coll` is
 already annotated."
   [kind coll]
-  (if (contains? (meta coll) ::sink-as)
-    coll
-    (sink-as kind coll)))
+  (cond (contains? (meta coll) ::sink-as) coll
+        (instance? IObj coll) (sink-as kind coll)
+        :else coll))


waiting for ebs attachment and generalizing wait-for

--- src/aws/provider.clj
+++ src/aws/provider.clj
@@ -2,6 +2,7 @@
   (:require [aws.sdk.ec2 :as ec2])
   (:import (java.util UUID))
   (:use
+    [flatland.useful.utils :only (defm)]
     [minderbinder.time :only (parse-time-unit)]
     [slingshot.slingshot :only  [throw+ try+]]
     [aws.sdk.ec2 :only
@@ -27,28 +28,46 @@

 (defn creds [] (get-in config [:hypervisor :aws]))

-(def ids (synched-map :aws-keys))
+(defm ids [] (synched-map :aws-keys))

-(defn wait-for-status [instance req-stat  {:keys [timeout] :or {timeout [5 :minute]}}]
-  "Waiting for ec2 machine status timeout is in mili"
+(defn wait-for [{:keys [timeout] :or {timeout [5 :minute]}} pred err]
+  "A general wait for pred function"
   (let [wait (+ (curr-time) (parse-time-unit timeout))]
     (loop []
       (if (> wait (curr-time))
-        (if (= req-stat (.status instance))
+        (if (pred)
           true
           (do (Thread/sleep 2000) (recur)))
-        (throw+ {:type ::aws:status-failed :message "Failed to wait for status" :status req-stat})))))
+        (throw+ err)))))
+
+(defn wait-for-status [instance req-stat timeout]
+  "Waiting for ec2 machine status timeout is in mili"
+  (wait-for timeout #(= req-stat (.status instance))
+    {:type ::aws:status-failed :message "Failed to wait for status" :status req-stat}))

 (defmacro ec2 [f & args]
- `(~f (assoc (creds) :endpoint ~'endpoint) ~@args))
+  `(~f (assoc (creds) :endpoint ~'endpoint) ~@args))

 (defn instance-id [uuid]
-   (if-let [id (@ids uuid)]
-     id
-     (throw+
-       {:type ::aws:missing-id :message
-        "Instance id not found, make sure no to address deleted instances" :uuid uuid})
-     ))
+  (if-let [id (@(ids) uuid)]
+    id
+    (throw+
+      {:type ::aws:missing-id :message
+       "Instance id not found, make sure no to address deleted instances" :uuid uuid})
+    ))
+
+(defn image-desc [ami & ks]
+  (-> (ec2/describe-images (creds) (ec2/image-id-filter ami))
+      first (apply ks)))
+
+(defn instance-desc [endpoint uuid & ks]
+  (-> (ec2 describe-instances (instance-id-filter (instance-id uuid)))
+      first :instances first (get-in ks)))
+
+(defn wait-for-attach [endpoint uuid timeout]
+  (wait-for timeout
+    #(= "attached" (instance-desc endpoint uuid :block-device-mappings 0 :ebs :status))
+    {:type ::aws:ebs-attach-failed :message "Failed to wait for ebs root device attach"}))

 (defconstrainedrecord Instance [endpoint conf uuid]
   "An Ec2 instance, uuid used for instance-id tracking"
@@ -57,15 +76,18 @@
   Vm
   (create [this]
           (debug "creating" uuid)
-          (swap! ids assoc uuid (-> (ec2 run-instances conf) :instances first :id))
+          (swap! (ids) assoc uuid
+            (-> (ec2 run-instances conf) :instances first :id))
+          (when (= (image-desc (conf :image-id) :root-device-type) "ebs")
+             (wait-for-attach endpoint uuid {:timeout [10 :minute]}))
           this)
   (delete [this]
           (debug "deleting" uuid)
           (ec2 terminate-instances (instance-id uuid))
           (wait-for-status this "terminated" {:timeout [5 :minute]})
-          (swap! ids dissoc uuid))
+          (swap! (ids) dissoc uuid))
   (start [this]
-         (debug "starting" uuid)
+         (debug "starting" (instance-id uuid))
          (ec2 start-instances (instance-id uuid))
          (wait-for-status this "running" {:timeout [5 :minute]}))
   (stop [this]
@@ -73,9 +95,7 @@
         (ec2 stop-instances  (instance-id uuid))
         (wait-for-status this "stopped" {:timeout [2 :minute]}))
   (status [this]
-          (-> (ec2 describe-instances (instance-id-filter (instance-id uuid)))
-              first :instances first :state :name
-              )))
+          (instance-desc endpoint uuid :state :name)))

 (defmethod translate :aws [{:keys [aws machine]}]
   [(aws :endpoint) (dissoc aws :endpoint) (UUID/randomUUID)])
@@ -87,10 +107,24 @@
   (use 'celestial.fixtures)
   (def m (.create (vconstruct celestial.fixtures/redis-ec2-spec)))
   (.start m)
+
+  (-> (ec2/describe-images (creds) (ec2/image-id-filter "ami-64636a10"))
+      first :root-device-type
+      )
+
+  (-> (ec2/describe-images (creds) (ec2/image-id-filter "ami-5a60692e"))
+      first :root-device-type
+      )
+
+  (let [endpoint "ec2.eu-west-1.amazonaws.com" uuid (:uuid m)]
+    (wait-for-attach endpoint (:uuid m) {:timeout [1 :minute]}) )
+
+
   (.status m)
   (.stop m)
+  (.delete m)
+
   (wait-for-status m "stopped")
-  (.delete m)
   (parse-time-unit [1 :minute])
   (wait-for-status m "running" {:timeout [1 :minute]})
   )


logging

logging

--- src/babel/forest.clj
+++ src/babel/forest.clj
@@ -131,6 +131,9 @@
         bolt-spec (get-in bolt path :no-path)
         spec (unifyc spec bolt-spec)
         lexicon (if (future? lexicon) @lexicon lexicon)]
+    (log/debug (str "add-complement to bolt with bolt:[" (if (map? bolt) (:rule bolt)) "]" "'" (morph bolt) "'"))
+    (log/debug (str "add-complement to bolt with path:" path))
+
     (if (not (= bolt-spec :no-path)) ;; check if this bolt has this path in it.
       (let [immediate-parent (get-in bolt (butlast path))
             start-time (System/currentTimeMillis)
@@ -159,14 +162,15 @@
                         (or true
                         (not (fail? result))))
                       (map (fn [complement]
-                             (let [result
+                             (let [debug (log/debug (str "Trying complement:" (morph complement)))
+                                   result
                                    (unifyc bolt
                                            (path-to-map path
                                                         complement))
                                    is-fail? (fail? result)]
                                (if is-fail?
                                  (do
-                                   (log/trace (str "fail-path-between:" (fail-path-between (strip-refs (get-in bolt path))
+                                   (log/debug (str "fail-path-between:" (fail-path-between (strip-refs (get-in bolt path))
                                                                                (strip-refs complement))))))
                                (if is-fail? :fail result)))


CLJS-1319: Cannot locate module namespace when filename contains dash

Replace underscores in new module name with dashes before adding to :js-module-index.

--- src/main/clojure/cljs/closure.clj
+++ src/main/clojure/cljs/closure.clj
@@ -1539,7 +1539,8 @@
               (if (or (and (= module-type :commonjs) can-convert-commonjs?)
                       (and (= module-type :amd) can-convert-amd?)
                       (and (= module-type :es6) can-convert-es6?))
-                (let [module-name (ProcessCommonJSModules/toModuleName file)
+                (let [module-name (-> (ProcessCommonJSModules/toModuleName file)
+                                      (string/replace "_" "-"))
                       ijs (write-javascript opts (deps/load-foreign-library lib))]
                   (doseq [provide (:provides ijs)]
                     (swap! env/*compiler*


The cache function now returns a clustered cache if it can, accepting replication options as well.

--- modules/cache/src/main/clojure/immutant/cache.clj
+++ modules/cache/src/main/clojure/immutant/cache.clj
@@ -63,11 +63,11 @@
   (toString [_] (str cache)))

 (defn cache-mode
-  [kw {:keys [sync]}]
+  [kw sync]
   (cond
+   (= :invalidated kw) (if sync Configuration$CacheMode/INVALIDATION_SYNC Configuration$CacheMode/INVALIDATION_ASYNC)
    (= :distributed kw) (if sync Configuration$CacheMode/DIST_SYNC Configuration$CacheMode/DIST_ASYNC)
    (= :replicated kw) (if sync Configuration$CacheMode/REPL_SYNC Configuration$CacheMode/REPL_ASYNC)
-   (= :invalidated kw) (if sync Configuration$CacheMode/INVALIDATION_SYNC Configuration$CacheMode/INVALIDATION_ASYNC)
    (= :local kw) Configuration$CacheMode/LOCAL
    :default (throw (IllegalArgumentException. "Must be one of :distributed, :replicated, :invalidated, or :local"))))

@@ -94,19 +94,24 @@
     (doto (.getCache clustered-manager name)
       (.start))))

+(defn clustered-cache
+  [name & {:keys [mode base sync] :or {mode :invalidated}}]
+  (let [result (InfinispanCache. (if (.isRunning clustered-manager name)
+                                   (reconfigure name (cache-mode mode sync))
+                                   (configure name (cache-mode mode sync))))]
+    (clojure.core.cache/seed result base)))
+
 (defn local-cache
   ([] (InfinispanCache. (.getCache local-manager)))
   ([name] (InfinispanCache. (.getCache local-manager name)))
   ([name base] (clojure.core.cache/seed (local-cache name) base)))

-(defn clustered-cache
-  [name mode & {:as options}]
-  (InfinispanCache. (if (.isRunning clustered-manager name)
-                      (reconfigure name (cache-mode mode options))
-                      (configure name (cache-mode mode options)))))
-
 (defn cache
-  "The entry point to determine whether clustered, remote, or local.
-   Only local supported currently."
-  [& args] (apply local-cache args))
-
+  "The entry point to determine whether clustered or local"
+  ([name] (cache name nil {}))
+  ([name v] (if (keyword? v) (cache name v {}) (cache name nil v)))
+  ([name mode seed]
+     (if clustered-manager
+       (clustered-cache name :mode (or mode :invalidated) :base seed)
+       (local-cache name seed))))
+


fix issue with latest closure-compiler

fix issue with latest closure-compiler

--- src/main/shadow/build/closure.clj
+++ src/main/shadow/build/closure.clj
@@ -613,8 +613,13 @@
                 :source-excerpt source-excerpt}
                ))))))

-(defn closure-source-file [name code]
-  (SourceFile/fromCode name code))
+(defn closure-source-file
+  ([name code]
+   (SourceFile/fromCode name code))
+  ([name code original-name]
+   (-> (SourceFile/builder)
+       (.withOriginalPath original-name)
+       (.buildFromCode name code))))

 (defn add-input-source-maps [{:keys [build-sources] :as state} cc]
   (doseq [src-id build-sources
@@ -1830,7 +1835,8 @@
         (->> (for [{:keys [resource-id resource-name ns require-id file deps] :as src} sources]
                (let [source (data/get-source-code state src)
                      source-file
-                     (closure-source-file resource-name
+                     (closure-source-file
+                       resource-name
                        (str "shadow$provide["
                             (if (and require-id (:minimize-require js-options))
                               (pr-str require-id)
@@ -1849,10 +1855,9 @@

                               :else
                               (hide-closure-defines source))
-                            "\n};"))]
-
-                 (when file
-                   (.setOriginalPath source-file (.getAbsolutePath file)))
+                            "\n};")
+                       (when file
+                         (.getAbsolutePath file)))]

                  source-file))
              #_(map #(do (println (.getCode %)) %))


Upgrade om to 0.8.8

Upgrade om to 0.8.8

--- src/leiningen/new/chestnut/project.clj
+++ src/leiningen/new/chestnut/project.clj
@@ -14,7 +14,7 @@
                  [ring/ring-defaults "0.1.3"]
                  [compojure "1.3.1"]
                  [enlive "1.1.5"]
-                 [om "0.8.0-rc1"]
+                 [org.omcljs/om "0.8.8"]
                  [environ "1.0.0"]{{{project-clj-deps}}}]

   :plugins [[lein-cljsbuild "1.0.3"]


Fix route building wrt. context

Fix route building wrt. context

--- src/cider_ci/rm/web.clj
+++ src/cider_ci/rm/web.clj
@@ -57,7 +57,7 @@
     (logging/debug [log-handler request])
     (handler request)))

-(def main-handler
+(defn build-main-handler []
   ( -> (cpj.handler/api (build-routes (:context (:web @conf))))
        (log-handler)
        (ring.middleware.json/wrap-json-params)))
@@ -76,7 +76,7 @@
                           (select-keys (:web @conf) [:port :host]))]
     (if server (stop-server))
     (logging/info "starting server " server-conf)
-    (def server (jetty/run-jetty main-handler server-conf))))
+    (def server (jetty/run-jetty (build-main-handler) server-conf))))

 (defn initialize [new-conf]
   (reset! conf new-conf)


Add check to blob/get to verify that the id is a multihash.

--- src/blobble/core.clj
+++ src/blobble/core.clj
@@ -147,6 +147,9 @@
   This function checks the digest of the loaded content against the requested multihash,
   and throws an exception if it does not match."
   [store id]
+  (when-not (instance? multihash.core.Multihash id)
+    (throw (IllegalArgumentException.
+             (str "Id value " (pr-str id) " is not a multihash."))))
   (when-let [blob (get* store id)]
     (validate! blob)
     blob))


two lucky commands :four_leaf_clover:

two lucky commands :four_leaf_clover:

--- src/bolt/config.cljs
+++ src/bolt/config.cljs
@@ -4,6 +4,7 @@
   {:default :google
    :commands
    {:google {:alias "g" :url "https://google.com/search?q=%s"}
+    :google-lucky {:alias "gl" :url "http://www.google.com/search?sourceid=navclient&btnI=I&q=%s"}
     :amazon {:alias "a" :url "http://www.amazon.com/s/?field-keywords=%s"}
     :google-maps {:alias "map" :url "https://www.google.com/maps/preview#!q=%s"}
     :archive {:alias "arch" :url "http://web.archive.org/web/*/%s"}
@@ -21,6 +22,7 @@
     :freebase {:alias "fb" :url "http://www.freebase.com/search?query=%s"}
     :twitter {:url "https://twitter.com/search?q=%s"}
     :urbandictionary {:alias "urban" :url "http://www.urbandictionary.com/define.php?term=%s"}
+    :github-lucky {:alias "ghl" :url "http://tagaholic.me/github-lucky/?query=%s"}

     ;; not used on phone
     :google-group {:alias "ggs" :url "http://groups.google.com/groups/dir?q=%s"}


Remove unwanted dependency

Remove unwanted dependency

--- worker/project.clj
+++ worker/project.clj
@@ -16,6 +16,4 @@
                  [clj-time "0.5.1"]
                  [local/RserveEngine "1.7.0"]
                  [local/REngine "1.7.0"]]
-  :main clinicico.worker.main
-  :profiles
-  {:dev {:dependencies [[lein-marginalia "0.7.1"]]}})
+  :main clinicico.worker.main)


Print info in DEV that tells us we didn't read system config

--- src/clj/runbld/opts.clj
+++ src/clj/runbld/opts.clj
@@ -105,7 +105,9 @@
   (deep-merge-with deep-merge
                    config-file-defaults
                    (if (environ/env :dev)
-                     {}
+                     (do
+                       (io/log "DEV enabled, not attempting to read" (str (system-config)))
+                       {})
                      (let [sys (system-config)]
                        (if (.isFile sys)
                          (load-config-with-profiles job-name (system-config))