Use release version of gitiom

Use release version of gitiom

--- build.boot
+++ build.boot
@@ -22,7 +22,7 @@

                  ;; CUSTARD
                  [com.stuartsierra/component "0.3.1"]
-                 [gitiom "0.1.0-SNAPSHOT"]
+                 [gitiom "0.1.0"]
                  [juxt/dirwatch "0.2.2"]
                  [me.raynes/fs "1.4.6"]
                  [org.clojars.mpenet/clj-yaml "0.3.4"]


Update cheshire dependency to 5.5.0

Update cheshire dependency to 5.5.0

--- build.boot
+++ build.boot
@@ -27,7 +27,7 @@
                  [buddy/buddy-core "0.5.0"]
                  [buddy/buddy-auth "0.5.3"]
                  [cats "0.4.0"]
-                 [cheshire "5.4.0" :exclusions [com.fasterxml.jackson.core/jackson-core]]
+                 [cheshire "5.5.0" :exclusions [com.fasterxml.jackson.core/jackson-core]]
                  [funcool/cuerdas "0.4.0"]
                  [funcool/futura "0.2.0"]
                  [environ "1.0.0"]


Update AJAX project path request

Update AJAX project path request

--- src-cljs/frontend/controllers/navigation.cljs
+++ src-cljs/frontend/controllers/navigation.cljs
@@ -111,12 +111,12 @@
                        :context {:project-name (str (:org args) "/" (:repo args))})
             (when (:read-settings scopes)
               (ajax/ajax :get
-                         (gstring/format "/api/v1/project/%s/%s/settings" (:org args) (:repo args))
+                         (frontend.api.path/settings-path args)
                          :project-settings
                          api-ch
                          :context {:project-name (str (:org args) "/" (:repo args))})
               (ajax/ajax :get
-                         (gstring/format "/api/v1/project/%s/%s/plan" (:org args) (:repo args))
+                         (frontend.api.path/settings-plan args)
                          :project-plan
                          api-ch
                          :context {:project-name (str (:org args) "/" (:repo args))}))))))


Let the user to reset their password

Let the user to reset their password

--- modules/bootstrap/src/modular/bootstrap/cylon/user_forms.clj
+++ modules/bootstrap/src/modular/bootstrap/cylon/user_forms.clj
@@ -86,7 +86,9 @@

         [:div
          (when-let [signup-uri (-> model :form :signup-uri)]
-           [:p.note  "Don't have an account? " [:a {:href signup-uri} "Sign up"]])]
+           [:p.note  "Don't have an account? " [:a {:href signup-uri} "Sign up"]])
+         (when-let [reset-uri (-> model :form :reset-uri)]
+           [:p.note  "Have you forgotten your password? " [:a {:href reset-uri} "Reset"]])]

         #_[:p]
         #_[:a {:href "#"} "Reset password"]


Properly refer-clojure as we override c.c/promise.

--- src/async/http/client/util.clj
+++ src/async/http/client/util.clj
@@ -14,7 +14,8 @@

 (ns async.http.client.util
   "Async HTTP Client - Clojure - Utils"
-  {:author "Hubert Iwaniuk"})
+  {:author "Hubert Iwaniuk"}
+  (:refer-clojure :exclude [promise]))

 (defn promise
   "Alpha - subject to change.


fix bracketing scope typo

fix bracketing scope typo

--- src/babel/english/lexicon.cljc
+++ src/babel/english/lexicon.cljc
@@ -44,8 +44,8 @@
              :agr {:number :sing
                    :person :3rd
                    :gender :masc}
-             :sem {:pred :antonio}
-                   :human true}}
+             :sem {:pred :antonio
+                   :human true}}}
    "a"
    {:synsem {:cat :det
              :def :indef


add :obj to "carry"

add :obj to "carry"

--- src/babel/english/lexicon.cljc
+++ src/babel/english/lexicon.cljc
@@ -380,8 +380,9 @@
                    :sem {:pred :car}}}

    "carry" {:synsem {:cat :verb
-                     :sem {:human true
-                           :pred :carry}}
+                     :sem {:subj {:human true}
+                           :pred :carry
+                           :obj {:physical-object}}}
             :english {:past "carried"}}

    "cat" {:synsem {:cat :noun


"change clothes": intransitive

"change clothes": intransitive

--- src/babel/english/lexicon.cljc
+++ src/babel/english/lexicon.cljc
@@ -385,7 +385,8 @@

    "change clothes" {:synsem {:cat :verb
                               :sem {:pred :change-clothes
-                                    :reflexive true}}
+                                    :reflexive true}
+                              :subcat {:2 '()}}
                      :english {:present {:3sing "changes clothes"}
                                :participle "changing clothes"
                                :past "changed clothes"}}


use core.async for task dispatch

use core.async for task dispatch

--- src/ca_recipe/family_async.clj
+++ src/ca_recipe/family_async.clj
@@ -44,6 +44,28 @@
 (defn send-child-for-item
   "eventually shop for an item"
   [child item q]
-  (println child "is searching for" item) (dawdle)
+  (println child "is searching for" item)
+  (dawdle)
   (collect-assignment child)
   (>!! q child))
+
+(defn report []
+  (println "store inventory" @store/inventory)
+  (println "shopping-list" @shopping-cart)
+  (println "assignments" @assignments)
+  (println "shopping-cart" @shopping-cart))
+
+(defn go-shopping []
+  (init)
+  (report)
+  (let [kids (chan 10)]
+    (doseq [k my-kids]
+      (>!! kids k))
+    (if (seq @shopping-list)
+      (do
+        (go
+          (send-child-for-item kid (assign-item-to-child kid) kids))
+        (recur (<! kids)))
+      (do
+        (println "done shopping.")
+        (report)))))


Got rid of function call outside of tests.

--- nav_source_test.clj
+++ nav_source_test.clj
@@ -1,15 +1,16 @@
 (ns nav-source-test
-  (:use nav-source)
-  (:require [clojure.test :as test]))
+  (:use nav-source clojure.test))

 (def expected-metadata {:type-id 1 :type "Table" :id "70902" :name "Test Table (48)"})
 (def first-line-example "OBJECT Table 70902 Test Table (48)")
-(def meta-data-parsed (parse-first-line first-line-example))

-(test/deftest parsing-first-line-returns-map-of-named-elements
-  (test/is (= expected-metadata meta-data-parsed)))
+(deftest first-line-of-object-source?-should-return-true
+  (is (true? (first-line-of-object-source? first-line-example))))

-(test/deftest make-single-file-name-returns-uniquely-identifiable-filename
-  (test/is (= "1-Table-70902.txt" (make-single-file-name meta-data-parsed))))
+(deftest parsing-first-line-returns-map-of-named-elements
+  (is (= expected-metadata (parse-first-line first-line-example))))

-(test/run-tests 'nav-source-test)+(deftest make-single-file-name-returns-uniquely-identifiable-filename
+  (is (= "1-Table-70902.txt" (make-single-file-name (parse-first-line first-line-example)))))
+
+(run-tests 'nav-source-test)


:el_kanno:

--- src/clj/mokkameister/train.clj
+++ src/clj/mokkameister/train.clj
@@ -76,6 +76,8 @@
    (train-coffee :fuelpump)
    (train-coffee :alarm_clock)
    (train-coffee :punch)
+   (train-coffee :el_kanno)
+   (train-coffee :arrow_right :el_kanno)
    (train-coffee :monkey_face :wrench)
    (train-coffee :heavy_heart_exclamation_mark_ornament)
    (train-coffee :badger :mushroom)


spelling fint to font...

spelling fint to font...

--- src/clj_ns_browser/browser.clj
+++ src/clj_ns_browser/browser.clj
@@ -81,13 +81,13 @@

 (defn font-size+
-  "Increase the fint-size of the widget w by 1."
+  "Increase the font-size of the widget w by 1."
   [w]
   (config! w :font {:size (+ 1 (.getSize (config w :font)))}))

 (defn font-size-
-  "Decrease the fint-size of the widget w by 1."
+  "Decrease the font-size of the widget w by 1."
   [w]
   (config! w :font {:size (- (.getSize (config w :font)) 1)}))


Link autocomplete

Link autocomplete

--- src/cljs/clojuredocs/main.cljs
+++ src/cljs/clojuredocs/main.cljs
@@ -39,11 +39,12 @@

 (defn $ac-result [{:keys [name ns doc]}]
   (node [:tr.ac-result
-         [:td.name
-          (str name)
-          [:div.ac-metadata
-           "1 ex, 2 sa"]]
-         [:td.docstring (ellipsis (str doc) 200)]]))
+         [:a {:href (str "/v/" ns "/" name)}
+          [:td.name
+           (str name)
+           [:div.ac-metadata
+            "1 ex, 2 sa"]]
+          [:td.docstring (ellipsis (str doc) 200)]]]))

 (defn prevent [e]
   (.preventDefault e))


Saving works for Cljs part, clearing fields fixed

Well, calling save and it handling savable data
works, Dropbox integration missing.

--- src/cljs/modern_cljs/core.cljs
+++ src/cljs/modern_cljs/core.cljs
@@ -51,13 +51,13 @@
   (updatedb [:start] next))

 (defn update_field [id value]
-  (println "Updating" id value)
   (set! db (assoc-in db [:editing id] value)))

 (defn save []
-  (println "Saved!"))
+  (println "Saved!" (str (:editing db))))

 (defn clear []
+  (updatedb [:editing] {})
   (println "Cleared!"))

 ;


Increased number of cases and added validation reports for clojush.problems.software.levenshtein.

--- src/clojush/problems/software/levenshtein.clj
+++ src/clojush/problems/software/levenshtein.clj
@@ -40,37 +40,48 @@

 (defn generate-levenshtein-cases
   []
-  (repeatedly 5 (fn []
-                  (let [str1 (random-string 100)
-                        str2 (random-string 100)]
-                    [[str1 str2] (levenshtein-distance str1 str2)]))))
+  (repeatedly 10 (fn []
+                   (let [str1 (random-string 100)
+                         str2 (random-string 100)]
+                     [[str1 str2] (levenshtein-distance str1 str2)]))))

 (def levenshtein-cases (atom (generate-levenshtein-cases)))

 (println "Initial test cases:" (pr-str @levenshtein-cases))

+(def levenshtein-validation-cases
+  (apply concat (repeatedly 10 generate-levenshtein-cases)))
+
+(println "Validation cases:" (pr-str levenshtein-validation-cases))
+
 (defn levenshtein-error
-  [program]
-  (let [behavior (atom '())
-        errors (doall
-                 (for [[[str1 str2] distance] @levenshtein-cases]
-                   (let [state (->> (make-push-state)
-                                 (push-item str1 :input)
-                                 (push-item str2 :input)
-                                 (run-push program))
-                         top-int (top-item :integer state)]
-                     (when @global-print-behavioral-diversity
-                       (swap! behavior conj [top-int]))
-                     (if (number? top-int)
-                       (#(if (neg? %) (- %) %) (- top-int distance))
-                       1000))))]
-    (when @global-print-behavioral-diversity
-      (swap! population-behaviors conj @behavior))
-    errors))
+  ([program]
+    (levenshtein-error program @levenshtein-cases))
+  ([program cases]
+    (let [behavior (atom '())
+          errors (doall
+                   (for [[[str1 str2] distance] cases]
+                     (let [state (->> (make-push-state)
+                                   (push-item str1 :input)
+                                   (push-item str2 :input)
+                                   (run-push program))
+                           top-int (top-item :integer state)]
+                       (when @global-print-behavioral-diversity
+                         (swap! behavior conj [top-int]))
+                       (if (number? top-int)
+                         (#(if (neg? %) (- %) %) (- top-int distance))
+                         1000))))]
+      (when @global-print-behavioral-diversity
+        (swap! population-behaviors conj @behavior))
+      errors)))

 (defn levenshtein-report
   "Not actually used to report; instead, change test cases."
   [best population generation error-function report-simplifications]
+  (let [validation-errors (levenshtein-error (:program best)
+                                             levenshtein-validation-cases)]
+    (println "Validation errors:" validation-errors)
+    (println "Total validation errors:" (reduce + validation-errors)))
   (let [new-cases (generate-levenshtein-cases)]
     (println "New test cases:" (pr-str new-cases))
     (reset! levenshtein-cases new-cases)))


Alternative replace-attrs impl - not sure if there's really any difference.

--- src/clojure/freactive/dom.cljs
+++ src/clojure/freactive/dom.cljs
@@ -116,13 +116,8 @@
      ;(println "disposing")
      (when-let [disposed-callback (.-disposed-callback state)]
        (disposed-callback))
-     ;(when-let [spec (.-element-spec state)]
-     ;  (when-let [disposed (get-transition spec :node-disposed)]
-     ;    (disposed)))
      (when-not (identical? (aget child-key 0) "-")
        (js-delete element-state-lookup child-key)
-       ;(doseq [[child state] (.-child-states state)]
-       ;  (dispose-node child state))
        (goog.object/forEach (.-child-states state)
                             (fn [state child-key _]
                               (dispose-node child-key state)))))))
@@ -396,6 +391,21 @@
       (let [k (name k)]
         (rebind-attr! node k v node-state)))))

+;(defn- replace-attrs!* [node node-state old-attrs new-attrs rebinder]
+;  (let [hit #js {}]
+;    (doseq [[k new-val] new-attrs]
+;      (let [attr-name (name k)]
+;        (if-let [existing (get old-attrs k)]
+;          (do
+;            (when-not (identical? existing new-val)
+;              (rebinder node attr-name new-val node-state))
+;            (aset hit attr-name true))
+;          (rebinder node attr-name new-val node-state))))
+;    (doseq [[k _] old-attrs]
+;      (let [attr-name (name k)]
+;        (when-not (aget hit attr-name)
+;          (rebinder node attr-name nil node-state))))))
+
 (defn- replace-attrs!* [node node-state old-attrs new-attrs rebinder]
   (loop [[[k new-val] & new-attrs] (seq new-attrs)
          old-attrs old-attrs]


CMR-514: Added filter for unsupported geometries.

--- src/cmr/indexer/services/concepts/spatial.clj
+++ src/cmr/indexer/services/concepts/spatial.clj
@@ -41,9 +41,19 @@
            (mbr->elastic-attribs "mbr" mbr)
            (mbr->elastic-attribs "lr" lr))))

+(defn- unsupported-geometry?
+  "Check whether or not the given geometry is an unsupported type."
+  [geometry]
+  (some #(instance? % geometry) [cmr.spatial.point.Point cmr.spatial.mbr.Mbr]))
+
+(defn- unsupported-geometries?
+  "Check whether or not one of the geometries belongs to an unsupported type."
+  [geometries]
+  (some unsupported-geometry? geometries))

 (defn spatial->elastic-docs
   "Converts the spatial area of the given catalog item to the elastic documents"
   [coordinate-system catalog-item]
   (when-let [geometries (get-in catalog-item [:spatial-coverage :geometries])]
-    (shapes->elastic-doc geometries coordinate-system)))+    (when-not (unsupported-geometries? geometries)
+      (shapes->elastic-doc geometries coordinate-system))))


CMR-418: Added echo token to header when retrieving index sets.

--- src/cmr/transmit/index_set.clj
+++ src/cmr/transmit/index_set.clj
@@ -16,7 +16,8 @@
                     :url (format "%s/index-sets/%s" (conn/root-url conn) (str id))
                     :accept :json
                     :throw-exceptions false
-                    :connection-manager (conn/conn-mgr conn)})
+                    :connection-manager (conn/conn-mgr conn)
+                    :headers {"echo-token" (config/echo-system-token)}})
         status (:status response)
         body (cheshire/decode (:body response) true)]
     (case status


Layout manager #41

Layout manager #41

--- src/flatgui/samples/forms/layoutdemopanel.clj
+++ src/flatgui/samples/forms/layoutdemopanel.clj
@@ -16,18 +16,23 @@
             [flatgui.widgets.checkbox :as checkbox]
             [flatgui.widgets.textfield :as textfield]
             [flatgui.widgets.panel :as panel]
-            [flatgui.widgets.button :as button]))
+            [flatgui.widgets.button :as button]
+            [flatgui.widgets.scrollpanel :as scrollpanel]))

 (def layout-cfg
-  [[:name-label       [:name-editor :-]]
-   [:password-label   [:password-textfield :-]               :show-chars-btn]
-   [:position-label   [:x :y :-]                             :edit-pos-btn]
-   [:dimensions-label [:w-label [:w :---] :h-label [:h :--]] :edit-dim-btn]
-   [[:one :two :']    [:notes-entry :-|]]
-   [[:upper-ed :-']   [:notes-entry]]
-   [[:three :four]    [:notes-entry]]
-   [[:five :six :-.]  [:notes-entry]]
-   [:bottom-labels    [[:bleft :<] [:bright :>]]]])
+  ;[[:name-label       [:name-editor :-]]
+  ; [:password-label   [:password-textfield :-]               :show-chars-btn]
+  ; [:position-label   [:x :y :-]                             :edit-pos-btn]
+  ; [:dimensions-label [:w-label [:w :---] :h-label [:h :--]] :edit-dim-btn]
+  ; [[:one :two :']    [:notes-entry :-|]]
+  ; [[:upper-ed :-']   [:notes-entry]]
+  ; [[:three :four]    [:notes-entry]]
+  ; [[:five :six :-.]  [:notes-entry]]
+  ; [:bottom-labels    [[:bleft :<] [:bright :>]]]]
+
+  [:name-label       [:name-editor :-]]
+
+  )

 (def demo-window
   (fg/defcomponent
@@ -41,38 +46,39 @@
     (fg/defcomponent label/label :name-label {:text "Name:"})
     (fg/defcomponent textfield/textfield :name-editor {})

-    (fg/defcomponent label/label :password-label {:text "Password:"})
-    (fg/defcomponent textfield/textfield :password-textfield {})
-    (fg/defcomponent button/button :show-chars-btn {:text "A"})
-
-    (fg/defcomponent label/label :position-label {:text "Position:"})
-    (fg/defcomponent textfield/textfield :x {})
-    (fg/defcomponent textfield/textfield :y {})
-    (fg/defcomponent button/button :edit-pos-btn {:text "..."})
-
-    (fg/defcomponent label/label :dimensions-label {:text "Dimensions:"})
-    (fg/defcomponent label/label :w-label {:text "W:"})
-    (fg/defcomponent textfield/textfield :w {})
-    (fg/defcomponent label/label :h-label {:text "H:"})
-    (fg/defcomponent textfield/textfield :h {})
-    (fg/defcomponent button/button :edit-dim-btn {:text "..."})
-
-    (fg/defcomponent checkbox/checkbox :one {:text "One"})
-    (fg/defcomponent checkbox/checkbox :two {:text "Two"})
-
-    (fg/defcomponent textfield/textfield :upper-ed {})
-
-    (fg/defcomponent checkbox/checkbox :three {:text "Three"})
-    (fg/defcomponent checkbox/checkbox :four {:text "Four"})
-
-    (fg/defcomponent textfield/textfield :five {})
-    (fg/defcomponent textfield/textfield :six {})
-
-    (fg/defcomponent label/label :bottom-labels {:text "Bottom labels:"})
-    (fg/defcomponent label/label :bleft {:text "Left"})
-    (fg/defcomponent label/label :bright {:text "Right"})
-
-    (fg/defcomponent textfield/textfield :notes-entry {:multiline true})))
+    ;(fg/defcomponent label/label :password-label {:text "Password:"})
+    ;(fg/defcomponent textfield/textfield :password-textfield {})
+    ;(fg/defcomponent button/button :show-chars-btn {:text "A"})
+    ;
+    ;(fg/defcomponent label/label :position-label {:text "Position:"})
+    ;(fg/defcomponent textfield/textfield :x {})
+    ;(fg/defcomponent textfield/textfield :y {})
+    ;(fg/defcomponent button/button :edit-pos-btn {:text "..."})
+    ;
+    ;(fg/defcomponent label/label :dimensions-label {:text "Dimensions:"})
+    ;(fg/defcomponent label/label :w-label {:text "W:"})
+    ;(fg/defcomponent textfield/textfield :w {})
+    ;(fg/defcomponent label/label :h-label {:text "H:"})
+    ;(fg/defcomponent textfield/textfield :h {})
+    ;(fg/defcomponent button/button :edit-dim-btn {:text "..."})
+    ;
+    ;(fg/defcomponent checkbox/checkbox :one {:text "One"})
+    ;(fg/defcomponent checkbox/checkbox :two {:text "Two"})
+    ;
+    ;(fg/defcomponent textfield/textfield :upper-ed {})
+    ;
+    ;(fg/defcomponent checkbox/checkbox :three {:text "Three"})
+    ;(fg/defcomponent checkbox/checkbox :four {:text "Four"})
+    ;
+    ;(fg/defcomponent textfield/textfield :five {})
+    ;(fg/defcomponent textfield/textfield :six {})
+    ;
+    ;(fg/defcomponent label/label :bottom-labels {:text "Bottom labels:"})
+    ;(fg/defcomponent label/label :bleft {:text "Left"})
+    ;(fg/defcomponent label/label :bright {:text "Right"})
+    ;
+    ;(fg/defcomponent textfield/textfield :notes-entry {:multiline true})
+    ))

 (def layout-window
   (fg/defcomponent


Disable the login box

Disable the login box

--- backend/src/circle/web/views/common.clj
+++ backend/src/circle/web/views/common.clj
@@ -87,7 +87,8 @@
        (unordered-list {:id "nav"}
                        [(link-to {:class "current_page"}
                                  "/" "Signup")
-                        (login-box)])
+                        ;; (login-box)
+                        ])
        [:div.clear]]]
      content
      [:div.clear]


Connect blocking to avoid duplicate connections

--- src/clojure/uk/org/potentialdifference/darknet/websocket.clj
+++ src/clojure/uk/org/potentialdifference/darknet/websocket.clj
@@ -4,13 +4,14 @@
            [java.net URI]))

 (defn connect! [url options]
-  (.connect (proxy [WebSocketClient]
-                [(new URI url) (new Draft_10)]
-                (onOpen [handshake]
-                  ((:on-open options) handshake))
-                (onClose [code reason remote]
-                  ((:on-close options) code reason remote))
-                (onMessage [message]
-                  ((:on-message options) message))
-                (onError [^java.lang.Exception e]
-                  ((:on-error options) e)))))
+  (.connectBlocking
+   (proxy [WebSocketClient]
+       [(new URI url) (new Draft_10)]
+       (onOpen [handshake]
+         ((:on-open options) handshake))
+       (onClose [code reason remote]
+         ((:on-close options) code reason remote))
+       (onMessage [message]
+         ((:on-message options) message))
+       (onError [^java.lang.Exception e]
+         ((:on-error options) e)))))


CMR-2889 Removes unused messages

CMR-2889 Removes unused messages

--- access-control-app/src/cmr/access_control/services/acl_service_messages.clj
+++ access-control-app/src/cmr/access_control/services/acl_service_messages.clj
@@ -20,17 +20,3 @@

 (def token-required-for-acl-modification
   "Acls cannot be modified without a valid user token.")
-
-(defn- get-acl-name-from-concept
-  "Gets a acl name from a acl concept's metadata.
-   This is because we lowercase the native-id so it does not match the actual group name."
-  [concept]
-  (-> concept :metadata edn/read-string :name))
-
-(defn acl-already-exists
-  [acl concept]
-  (if (:provider-id acl)
-    (format "A provider acl with name [%s] already exists with concept id [%s] for provider [%s]."
-            (get-acl-name-from-concept concept) (:concept-id concept) (:provider-id acl))
-    (format "A system acl with name [%s] already exists with concept id [%s]."
-            (get-acl-name-from-concept concept) (:concept-id concept))))


CMR-1694: Modified a docstring to comment.

--- system-int-test/test/cmr/system_int_test/ingest/collection_validation_test.clj
+++ system-int-test/test/cmr/system_int_test/ingest/collection_validation_test.clj
@@ -209,10 +209,11 @@
          response)))

 (deftest revision-conflict-tests
-  "Added to test out of order processing of ingest and delete requests with revision-ids in their header.
-  The proper handling of incorrectly ordered requests is important for Virtual Product Service which picks
-  events off the queue and sends them to ingest service. It cannot be gauranteed that the ingest events are
-  processed by Virtual Product Service in the same order that the events are placed on the queue."
+  ;; Added to test out of order processing of ingest and delete requests with revision-ids in their
+  ;; header. The proper handling of incorrectly ordered requests is important for Virtual Product
+  ;; Service which picks events off the queue and sends them to ingest service. It cannot be
+  ;; gauranteed that the ingest events are processed by Virtual Product Service in the same order
+  ;; that the events are placed on the queue.
   (testing "Update with lower revision id should be rejected if it comes after an concept with a higher revision id"
     (let [concept (dc/collection-concept {:revision-id 4})
           concept-id (:concept-id (ingest/ingest-concept concept))


Missiles, alfa version.

Missiles, alfa version.

--- src/asteroids/core.clj
+++ src/asteroids/core.clj
@@ -14,8 +14,8 @@
 ; ----------------------------------------------------------
 ; START: constants

-(def width 120)
-(def height 100)
+(def width 160)
+(def height 85)
 (def point-size 8.5)
 (def ship-size 1.5)
 (def ship-life 3)
@@ -23,16 +23,22 @@
 (def ship-rotation-speed 4)
 (def shot-size (/ ship-size 10))
 (def shot-speed 2.5)
-(def shot-millis 200)
+(def shot-millis 300)
+(def missile-size (/ ship-size 3))
+(def missile-speed 1)
+(def missile-acceleration 1)
+(def missile-millis 10000)
 (def asteroids-start-number 1)
 (def asteroid-start-size 5)
 (def asteroid-min-size 1.2)
-(def asteroid-size-variance 0.3)
+(def asteroid-size-variance 0.2)
 (def asteroid-jaggedness 0.7)
 (def asteroid-max-speed 0.6)
 (def asteroid-max-rotation-speed 4)
 (def fragment-number 3)
+(def crit-fragment-number 30)
 (def fragment-size-reduction (Math/sqrt fragment-number))
+(def crit-fragment-size-reduction (Math/sqrt crit-fragment-number))
 (def debris-life-millis 3000)
 (def turn-millis 40)

@@ -40,6 +46,7 @@
               (int \A) {:rotation (- ship-rotation-speed)}
               (int \D) {:rotation ship-rotation-speed}
               (int \W) {:acceleration ship-acceleration}
+              (int \J) {:fire-missile true}
               (int \K) {:shoot true}
               (int \1) {:set-level 1}
               (int \2) {:set-level 2}
@@ -208,6 +215,33 @@
          shot-pos (vec+vec position (num*vec size dir-vec))
          shot-speed (vec+vec speed (num*vec shot-speed dir-vec))]
      (create-shot shot-pos direction shot-speed))))
+
+(defn create-missile
+  ([pos dir speed]
+   {:type           :missile
+
+    :size           missile-size
+    :shape          [[0.0 1.0] [0.5 -1.0] [0.5 -3.5] [1.0 -4.5] [0.5 -4.5] [0.25 -4.25]
+                     [-0.25 -4.25] [-0.5 -4.5] [-1.0 -4.5] [-0.5 -3.5] [-0.5 -1.0]]
+    :color          (Color. 10 50 250)
+    :paint-method   fill-polygon
+
+    :position       pos
+    :speed          speed
+    :acceleration   missile-acceleration
+
+    :direction      dir
+    :rotation-speed 0
+
+    :collidable+?   true
+    })
+  ([{:keys [position size direction speed] :as ship}]
+   (let [dir-vec (rotate-vec direction [0 1])
+         missile-pos (vec+vec position (num*vec size dir-vec))
+         missile-speed (vec+vec speed (num*vec missile-speed dir-vec))]
+     (create-missile missile-pos direction missile-speed))))
+
+

 (defn create-asteroid
   ([size pos speed]
@@ -262,7 +296,7 @@
          ;volume (.getControl clip FloatControl$Type/MASTER_GAIN)
          ]
      #_(doto volume
-       (.setValue gain))
+         (.setValue gain))
      (doto clip
        (.open audio-stream)
        (.setFramePosition 0)
@@ -293,11 +327,15 @@
               (and (sequential? obj1) (sequential? obj2)) :seq-seq)))

 (defmethod check-collision :map-map [obj1 obj2]
-  (if (and (:collidable? obj1)
+  (if (and (:collidable+? obj1)
            (:collidable? obj2)
            (collide? obj1 obj2))
-    [(assoc obj1 :hit? true) (assoc obj2 :hit? true)]
-    [obj1 obj2]))
+    [(assoc obj1 :hit? true) (assoc obj2 :crit-hit? true)]
+    (if (and (:collidable? obj1)
+             (:collidable? obj2)
+             (collide? obj1 obj2))
+      [(assoc obj1 :hit? true) (assoc obj2 :hit? true)]
+      [obj1 obj2])))

 (defmethod check-collision :map-seq [obj1 coll]
   (loop [obj1 obj1, coll coll, coll-result []]
@@ -331,11 +369,17 @@
     nil
     shot))

-(defmethod handle-collision :asteroid [{:keys [hit? size position speed] :as asteroid}]
-  (let [fragment-size (/ size fragment-size-reduction)]
-    (if hit?
-      (create-asteroids fragment-number fragment-size position speed)
-      asteroid)))
+(defmethod handle-collision :missile [{:keys [hit?] :as missile}]
+  (when hit? (play-sound "asteroid-hit"))
+  (if hit?
+    nil
+    missile))
+
+(defmethod handle-collision :asteroid [{:keys [hit? crit-hit? size position speed] :as asteroid}]
+  (cond
+    crit-hit? (create-asteroids crit-fragment-number (/ size crit-fragment-size-reduction) position speed)
+    hit? (create-asteroids fragment-number (/ size fragment-size-reduction) position speed)
+    :else asteroid))

 (defmethod handle-collision :other [{hit? :hit? :as object}]
   (if hit?
@@ -366,12 +410,14 @@
 ; Actions
 ; ----------------------------------------------------------------------

-(defn shoot [{:keys [shooting? shots millis-since-last-shot] :as ship}]
+(defn shoot [{:keys [shooting? shots millis-since-last-shot firing?] :as ship}]
   (let [millis-since-last-shot (+ turn-millis millis-since-last-shot)
         shoots? (and shooting? (>= millis-since-last-shot shot-millis))
-        shots (if shoots? (conj shots (create-shot ship)) shots)]
-    (when shoots? (play-sound "shot"))
-    (assoc ship :millis-since-last-shot (if shoots? 0 millis-since-last-shot)
+        shots (if shoots? (conj shots (create-shot ship)) shots)
+        fires? (and firing? (>= millis-since-last-shot shot-millis))
+        shots (if fires? (conj shots (create-missile ship)) shots)]
+    (when (or shoots? fires?) (play-sound "shot"))
+    (assoc ship :millis-since-last-shot (if (or shoots? fires?) 0 millis-since-last-shot)
                 :shots shots)))

 (defn basic-move
@@ -396,6 +442,9 @@
 (defmethod move :shot [shot]
   (basic-move shot false))

+(defmethod move :missile [missile]
+  (basic-move missile false))
+
 (defmethod move :asteroid [asteroid]
   (basic-move asteroid))

@@ -437,10 +486,11 @@
       (ref-set asteroids asteroids*))))

 (defn do-action!
-    ([ship {:keys [acceleration rotation shoot] :as action} activate?]
+  ([ship {:keys [acceleration rotation shoot fire-missile] :as action} activate?]
    (when acceleration (dosync (alter ship assoc :acceleration (if activate? acceleration 0) :collidable? true)))
    (when rotation (dosync (alter ship set-rotation rotation activate?)))
-   (when shoot (dosync (alter ship assoc :shooting? activate? :collidable? true))))
+   (when shoot (dosync (alter ship assoc :shooting? activate? :collidable? true)))
+   (when fire-missile (dosync (alter ship assoc :firing? activate? :collidable? true))))
   ([ship action]
    (do-action! ship action true)))


Rename encrypt/decrypt to encrypt-cbc/decrypt-cbc.

--- src/buddy/sign/jwe.clj
+++ src/buddy/sign/jwe.clj
@@ -32,8 +32,9 @@
             [cheshire.core :as json]
             [cats.core :as m]
             [cats.monad.exception :as exc]
-            [slingshot.slingshot :refer [throw+]])
+            [slingshot.slingshot :refer [throw+ try+]])
   (:import clojure.lang.Keyword
+           org.bouncycastle.crypto.InvalidCipherTextException
            java.nio.ByteBuffer
            java.io.ByteArrayInputStream
            java.io.ByteArrayOutputStream
@@ -108,7 +109,7 @@
                   (- inputsize cursormax)
                   (conj result buffer))))))))

-(defn- encrypt
+(defn- encrypt-cbc
   [cipher input key iv]
   (let [blocksize (crypto/get-block-size cipher)
         blocks (split-by-blocksize input blocksize)]
@@ -123,7 +124,7 @@
                          (conj acc eblock))))
                    [] blocks))))

-(defn- decrypt
+(defn- decrypt-cbc
   [cipher input key iv]
   (let [blocksize (crypto/get-block-size cipher)
         blocks (split-by-blocksize input blocksize false)]
@@ -226,7 +227,7 @@
   (let [cipher (crypto/block-cipher :aes :cbc)
         encryptionkey (extract-encryption-key secret algorithm)
         authkey (extract-authentication-key secret algorithm)
-        ciphertext (encrypt cipher plaintext encryptionkey iv)
+        ciphertext (encrypt-cbc cipher plaintext encryptionkey iv)
         tag (generate-authtag {:algorithm :sha256
                                :ciphertext ciphertext
                                :authkey authkey
@@ -241,7 +242,7 @@
   (let [cipher (crypto/block-cipher :aes :cbc)
         encryptionkey (extract-encryption-key secret algorithm)
         authkey (extract-authentication-key secret algorithm)
-        ciphertext (encrypt cipher plaintext encryptionkey iv)
+        ciphertext (encrypt-cbc cipher plaintext encryptionkey iv)
         tag (generate-authtag {:algorithm :sha384
                                :ciphertext ciphertext
                                :authkey authkey
@@ -256,7 +257,7 @@
   (let [cipher (crypto/block-cipher :aes :cbc)
         encryptionkey (extract-encryption-key secret algorithm)
         authkey (extract-authentication-key secret algorithm)
-        ciphertext (encrypt cipher plaintext encryptionkey iv)
+        ciphertext (encrypt-cbc cipher plaintext encryptionkey iv)
         tag (generate-authtag {:algorithm :sha512
                                :ciphertext ciphertext
                                :authkey authkey
@@ -275,7 +276,7 @@
         authkey (extract-authentication-key secret algorithm)]
     (when-not (verify-authtag authtag (assoc params :authkey authkey :algorithm :sha256))
       (throw+ {:type :validation :cause :authtag :message "Message seems corrupt or manipulated."}))
-    (decrypt cipher ciphertext encryptionkey iv)))
+    (decrypt-cbc cipher ciphertext encryptionkey iv)))

 (defmethod aead-decrypt :a192cbc-hs384
   [{:keys [algorithm authtag ciphertext secret iv] :as params}]
@@ -286,7 +287,7 @@
         authkey (extract-authentication-key secret algorithm)]
     (when-not (verify-authtag authtag (assoc params :authkey authkey :algorithm :sha384))
       (throw+ {:type :validation :cause :authtag :message "Message seems corrupt or manipulated."}))
-    (decrypt cipher ciphertext encryptionkey iv)))
+    (decrypt-cbc cipher ciphertext encryptionkey iv)))

 (defmethod aead-decrypt :a256cbc-hs512
   [{:keys [algorithm authtag ciphertext secret iv] :as params}]
@@ -297,7 +298,7 @@
         authkey (extract-authentication-key secret algorithm)]
     (when-not (verify-authtag authtag (assoc params :authkey authkey :algorithm :sha512))
       (throw+ {:type :validation :cause :authtag :message "Message seems corrupt or manipulated."}))
-    (decrypt cipher ciphertext encryptionkey iv)))
+    (decrypt-cbc cipher ciphertext encryptionkey iv)))

 (defn- generate-plaintext
   [claims zip exp nbf iat]


missed a couple

missed a couple

--- src/clj/flambo/api.clj
+++ src/clj/flambo/api.clj
@@ -32,10 +32,12 @@
                      :memory-and-disk-ser-2 StorageLevels/MEMORY_AND_DISK_SER_2
                      :disk-only-2 StorageLevels/DISK_ONLY_2})

-(defmacro sparkop [& body]
+(defmacro sparkop
+  [& body]
   `(sfn/fn ~@body))

-(defmacro defsparkfn [name & body]
+(defmacro defsparkfn
+  [name & body]
   `(def ~name
      (sparkop ~@body)))

@@ -47,13 +49,15 @@
      (log/debug "JavaSparkContext" master app-name)
      (JavaSparkContext. master app-name)))

-(defn local-spark-context [app-name]
+(defn local-spark-context
+  [app-name]
   (let [conf (-> (conf/spark-conf)
                  (conf/master "local[*]")
                  (conf/app-name app-name))]
     (spark-context conf)))

-(defn jar-of-ns [ns]
+(defn jar-of-ns
+  [ns]
   (let [clazz (Class/forName (clojure.string/replace (str ns) #"-" "_"))]
     (JavaSparkContext/jarOfClass clazz)))

@@ -70,7 +74,8 @@
     (conj! v (untuple t2))
     (persistent! v)))

-(defn ftruthy? [f]
+(defn ftruthy?
+  [f]
   (sparkop [x] (u/truthy? (f x))))

 ;; ## RDD construction


Description for +reserved-symbols+ with page reference

--- src/latte/kernel/presyntax.clj
+++ src/latte/kernel/presyntax.clj
@@ -6,7 +6,14 @@
 (def ^:private +examples-enabled+)

 (def +reserved-symbols+
-  '#{□ ✳ λ Π ⟶ ∃ ∀})
+  '#{□ ; Type of all kinds; Page 87
+     ✳ ; Type of all types; Page 70
+     λ ; Abstraction; Page 1
+     Π ; Type binder (pi-binder); Page 72
+     ⟶ ; Arrow type; Page 34
+     ∃ ; Existential quantifier; Page 247
+     ∀ ; Universal quantifier; Page 246
+     })

 (defn reserved-symbol? [s]
   (or (contains? +reserved-symbols+ s)


Improves docstrings

Improves docstrings

--- src/expound/alpha.cljc
+++ src/expound/alpha.cljc
@@ -1,5 +1,5 @@
 (ns expound.alpha
-  "Functions to print human-readable errors for clojure.spec"
+  "Generates human-readable errors for `clojure.spec`"
   (:require [expound.problems :as problems]
             [clojure.spec.alpha :as s]
             [clojure.string :as string]
@@ -859,9 +859,9 @@
   "Returns a printer.

   Options:
-   - `:show-valid-values?` - if false, replaces valid values with \"...\"
+   - `:show-valid-values?` - if `false`, replaces valid values with \"...\"
    - `:value-str-fn`       - function to print bad values
-   - `:print-specs?`       - if true, display \"Relevant specs\" section. Otherwise, omit that section.
+   - `:print-specs?`       - if `true`, display \"Relevant specs\" section. Otherwise, omit that section.
    - `:theme`               - enables color theme. Possible values: `:figwheel-theme`, `:none`"
   [opts]
   (fn [explain-data]


Add no-doc to public-specs

Add no-doc to public-specs

--- src/expound/specs.cljc
+++ src/expound/specs.cljc
@@ -28,7 +28,7 @@
 (ex/def ::uuid uuid? "should be a UUID")
 (ex/def ::vec vector? "should be a vector")

-(def public-specs
+(def ^:no-doc public-specs
   [::bool #?(:clj ::bytes) ::double ::ident ::indexed ::int ::kw
    ::map ::nat-int ::neg-int ::pos-int ::qualified-ident
    ::qualified-kw ::qualified-sym ::seqable ::simple-ident


also need to deal with possible duplicate fields ... sigh.

--- src/metabase/db/migrations.clj
+++ src/metabase/db/migrations.clj
@@ -232,15 +232,25 @@
                         (k/where      {:id table-id}))
                       ;; migrate all Fields in the Table (skipping :dynamic-schema dbs)
                       (when-not (driver/driver-supports? (driver/engine->driver engine) :dynamic-schema)
-                        (doseq [{field-id :id, column-name :name, :as field} (db/sel :many Field :table_id table-id, :visibility_type [not= "retired"])]
-                          (let [{raw-column-id :id} (db/ins RawColumn
-                                                      :raw_table_id  raw-table-id
-                                                      :name          column-name
-                                                      :is_pk         (= :id (:special_type field))
-                                                      :details       {:base-type (:base_type field)}
-                                                      :active        true)]
-                            ;; update the Field and link it with the RawColumn
-                            (k/update Field
-                              (k/set-fields {:raw_column_id raw-column-id
-                                             :last_analyzed (u/new-sql-timestamp)})
-                              (k/where      {:id field-id}))))))))))))))))
+                        (let [processed-fields (atom #{})]
+                          (doseq [{field-id :id, column-name :name, :as field} (db/sel :many Field :table_id table-id, :visibility_type [not= "retired"])]
+                            ;; guard against duplicate fields with the same name
+                            (if (contains? @processed-fields column-name)
+                              ;; this is a dupe, disable it
+                              (k/update Field
+                                (k/set-fields {:visibility_type "retired"})
+                                (k/where      {:id field-id}))
+                              ;; normal unmigrated field, so lets use it
+                              (let [{raw-column-id :id} (db/ins RawColumn
+                                                          :raw_table_id  raw-table-id
+                                                          :name          column-name
+                                                          :is_pk         (= :id (:special_type field))
+                                                          :details       {:base-type (:base_type field)}
+                                                          :active        true)]
+                                ;; update the Field and link it with the RawColumn
+                                (k/update Field
+                                  (k/set-fields {:raw_column_id raw-column-id
+                                                 :last_analyzed (u/new-sql-timestamp)})
+                                  (k/where      {:id field-id}))
+                                ;; add this column to the set we've processed already
+                                (swap! processed-fields conj column-name)))))))))))))))))


change to use pred-cond

change to use pred-cond

--- src/midje/ideas/background.clj
+++ src/midje/ideas/background.clj
@@ -184,15 +184,15 @@
   (validate-state-description forms))

 (defmethod validate "against-background" [[_against-background_ & forms]]
-  (let [state-descriptions (first forms)]
-    (cond
-      (vector? state-descriptions)
-      (when-valid (filter state-description? state-descriptions) forms)
-
-      (and (sequential? state-descriptions) (named? (first state-descriptions)))
-      (when-valid state-descriptions forms)
-
-      :else
+  (let [state-descriptions+fakes (first forms)]
+    (pred-cond state-descriptions+fakes
+      vector?
+      (when-valid (filter state-description? state-descriptions+fakes) forms)
+
+      #(and (sequential? %) (named? (first %)))
+      (when-valid state-descriptions+fakes forms)
+
+      :else
       forms)))

 (defmethod validate "background" [[_background_ & forms]]


[#447] Remove unnecessary runtime require

--- src/org/httpkit/sni_client.clj
+++ src/org/httpkit/sni_client.clj
@@ -2,8 +2,10 @@
   "Provides an SNI-capable SSL configurer and client, Ref. #335.
   In a separate namespace from `org.httpkit.client` so that
   http-kit can retain backwards-compatibility with JVM < 8."
-  (:import [java.net URI]
-           [javax.net.ssl SNIHostName SSLEngine SSLParameters]))
+  (:require [org.httpkit.client])
+  (:import
+   [java.net URI]
+   [javax.net.ssl SNIHostName SSLEngine SSLParameters]))

 (defn- parse-java-version
   "Ref. https://stackoverflow.com/a/2591122"
@@ -51,6 +53,5 @@
   ^{:doc "Like `org.httpkit.client/default-client`, but provides SNI support using `ssl-configurer`. NB Hostname verification currently requires Java version >= 11."}
   default-client
   (delay
-    (require '[org.httpkit.client]) ; Lazy require to help users avoid circular deps
     (org.httpkit.client/make-client
       {:ssl-configurer ssl-configurer})))


sound-control: allow placement of synth within group (head/tail)

--- src/overtime/sound_control.clj
+++ src/overtime/sound_control.clj
@@ -24,9 +24,9 @@
     val))

 (defn- define-sound
-  [key {:keys [synth params group] :or {group :producers}}]
+  [key {:keys [synth group group-pos params] :or {group :producers group-pos :tail}}]
   (let [params-list (->> (flatten (for [[key data] params] [key (sound-param key data)]))
-                         (cons [:tail (grp/group group)]))
+                         (cons [group-pos (grp/group group)]))
         sound-def {:synth synth :params params-list}]
     (log/debug "Defined sound for" key "in group" group)
     [key sound-def]))


Removing print statement.

Removing print statement.

--- src/overtone/gui/pianoroll.clj
+++ src/overtone/gui/pianoroll.clj
@@ -104,7 +104,6 @@
       (listen piano-roll
               :mouse-pressed
               (fn [e]
-                (println "press: " (mouse-event->note-coords state e))
                 (swap! state* toggle-note (mouse-event->note-coords state e))))
       panel)
     (catch Exception e


add input ugen docs

add input ugen docs

--- src/overtone/sc/ugen/input.clj
+++ src/overtone/sc/ugen/input.clj
@@ -15,30 +15,40 @@
       ;; }

       {:name "MouseX",
-       :args [{:name "min", :default 0.0}
-              {:name "max", :default 1.0}
+       :args [{:name "min", :default 0.0 :doc "minimum value (when mouse is at the left of the screen)"}
+              {:name "max", :default 1.0 :doc "maximum value (when mouse is at the right of the screen)"}
               {:name "warp",
                :default :linear
-               :map {:linear 0 :exponential 1 :lin 0 :exp 1}}
-              {:name "lag", :default 0.2}],
+               :map {:linear 0 :exponential 1 :lin 0 :exp 1}
+               :doc "mapping curve - either :linear or :exponential (:lin and :exp abbreviations are allowed)"}
+              {:name "lag", :default 0.2 :doc "lag factor to dezipper cursor movement."}],
        :rates #{:kr}
        :doc "maps the current mouse X coordinate to a value between min and max"}

-      {:name "MouseY" :extends "MouseX"
+      {:name "MouseY"
+              :args [{:name "min", :default 0.0 :doc "minimum value (when mouse is at the top of the screen)"}
+              {:name "max", :default 1.0 :doc "maximum value (when mouse is at the bottom of the screen)"}
+              {:name "warp",
+               :default :linear
+               :map {:linear 0 :exponential 1 :lin 0 :exp 1}
+               :doc "mapping curve - either :linear or :exponential (:lin and :exp abbreviations are allowed)"}
+              {:name "lag", :default 0.2 :doc "lag factor to dezipper cursor movement."}]
+
        :doc "maps the current mouse Y coordinate to a value between min and max"}

       {:name "MouseButton",
-       :args [{:name "up", :default 0.0}
-              {:name "down", :default 1.0}
-              {:name "lag", :default 0.2}],
+       :args [{:name "up", :default 0.0 :doc "value when the key is not pressed"}
+              {:name "down", :default 1.0 :doc "value when the key is pressed"}
+              {:name "lag", :default 0.2 :doc "lag factor"}],
        :rates #{:kr}
        :doc "toggles between two values when the left mouse button is up or down"}

       {:name "KeyState",
-       :args [{:name "keycode", :default 0.0}
-              {:name "minval", :default 0.0}
-              {:name "maxval", :default 1.0}
-              {:name "lag", :default 0.2}],
+       :args [{:name "keycode", :default 0.0 :doc "The keycode value of the key to check. This corresponds to the keycode values passed into the keyDownActions of SCViews."}
+              {:name "minval", :default 0.0 :doc "The value to output when the key is not pressed."}
+              {:name "maxval", :default 1.0 :doc "The value to output  when the key is pressed."}
+              {:name "lag", :default 0.2 :doc "lag factor"
+               }],
        :rates #{:kr}
-       :doc "toggles between two values when a key on the keyboard is up or down"}
+       :doc "Toggles between two values when a key on the keyboard is up or down. Note that this UGen does not prevent normal typing. "}
       ])


Use pmap instead of reducers to work with more versions of clojure and Java.

--- src/ring/middleware/incise.clj
+++ src/ring/middleware/incise.clj
@@ -1,7 +1,6 @@
 (ns ring.middleware.incise
   (:require [clojure.java.io :refer [file]]
             [ns-tracker.core :refer [ns-tracker]]
-            [clojure.core.reducers :as re]
             (incise [utils :refer [delete-recursively]]
                     [load :refer [load-parsers-and-layouts]]
                     [config :as conf])
@@ -31,9 +30,9 @@
         (->> (conf/get :in-dir)
              (file)
              (file-seq)
-             (re/filter modified?)
-             (re/map parse)
-             (re/fold (constantly nil))))
+             (filter modified?)
+             (pmap parse)
+             (dorun)))
       (handler request))))

 (defn wrap-reset-modified-files-with-source-change


bump perf: don't call git to check every tag parent

This relies on adding "no-parent" to every voom tag of a commit that has no
parents.  Is is nearly free at tagging time and saves multiple git calls for
every dep at bump time.

--- src/leiningen/voom.clj
+++ src/leiningen/voom.clj
@@ -316,15 +316,15 @@

 (defn parse-sha-refs
   [s]
-  (let [[sha datestr refstr] (vec (.split #"," s 3))
+  (let [[sha datestr parents refstr] (vec (.split #"," s 4))
         refs (when refstr
                (when-let [[_ x] (re-find #"\((.*)\)" refstr)]
                  (vec (.split #",\s+" x))))]
-    {:sha sha, :ctime (Date. ^String datestr), :refs refs}))
+    {:sha sha, :ctime (Date. ^String datestr), :parents parents, :refs refs}))

 (defn project-change-shas
   [gitdir]
-  (->> (git {:gitdir gitdir} "log" "--all" "--pretty=format:%H,%cd,%d"
+  (->> (git {:gitdir gitdir} "log" "--all" "--pretty=format:%H,%cd,%p,%d"
             "--name-status" "-m" "--" "project.clj" "**/project.clj")
        :lines
        (keep #(if-let [[_ op path] (re-matches #"(.)\t(.*)" %)]
@@ -342,17 +342,19 @@
 (defn tag-repo-projects
   [gitdir]
   (let [proj-shas (project-change-shas gitdir)]
-    (doseq [{:keys [sha refs ops]} (report-progress gitdir proj-shas)
+    (doseq [{:keys [sha refs parents ops]} (report-progress gitdir proj-shas)
             :when (not-any? #(.startsWith ^String % "tag: voom-") refs)
             {:keys [op path]} ops]
       (when-let [p (and (not= "D" op)
                         (robust-read-project gitdir sha path))]
-        (let [tag (s/join "--" ["voom"
-                                (str (:group p) "%" (:name p))
-                                (:version p)
-                                (s/replace (:root p) #"/" "%")
-                                (subs sha 0 7)])]
-          (git {:gitdir gitdir} "tag" tag sha))))))
+        (let [tag (s/join "--" (-> ["voom"
+                                    (str (:group p) "%" (:name p))
+                                    (:version p)
+                                    (s/replace (:root p) #"/" "%")
+                                    (subs sha 0 7)]
+                                   (cond-> (empty? parents)
+                                     (conj "no-parent"))))]
+          (git {:gitdir gitdir} "tag" "-f" tag sha))))))

 (defn clear-voom-tags
   [gitdir]
@@ -366,7 +368,7 @@
 (defn parse-tag
   [tag]
   (->
-   (zipmap [:prefix :proj :ver :path :sha] (s/split tag #"--"))
+   (zipmap [:prefix :proj :ver :path :sha :no-parent] (s/split tag #"--"))
    (update-in [:path] (fnil s/replace "") #"%" "/")
    (update-in [:proj] (fnil s/replace "") #"%" "/")))

@@ -389,13 +391,13 @@
         found-branch (map #(.getName ^File %)
                           (glob (str gitdir "/refs/remotes/origin/*")))
         :when (or (= found-branch branch) (nil? branch))
-        :let [neg-tags (map #(str "^" % "^") tags)
-              neg-tags (filter (partial contains-sha? gitdir) neg-tags)
+        :let [tags-with-parents (remove #(.endsWith ^String % "--no-parent") tags)
+              neg-tags (map #(str "^" % "^") tags-with-parents)
               commits
               , (map
                  parse-sha-refs
                  (:lines (apply git {:gitdir gitdir} "log"
-                                "--pretty=format:%H,%cd,%d" "--decorate" "--reverse"
+                                "--pretty=format:%H,%cd,%p,%d" "--reverse"
                                 (concat neg-tags [(str "origin/" found-branch) "--" found-path]))))]
         :when (seq commits)]
     (let [refs (-> commits first :refs)


'freshen got confused by user profile settings. Fixed.

--- src/leiningen/voom.clj
+++ src/leiningen/voom.clj
@@ -546,7 +546,9 @@
   (when (not-any? #{"--no-fetch"} args)
     (fetch-all))
   (let [prj-file-name (str (:root project) "/project.clj")
-        old-deps (:dependencies project)
+        ;; Read project.clj instead of taking lein's read of it, to be
+        ;; as similar as possible to reading the tmp file later.
+        old-deps (:dependencies (project/read (str prj-file-name)))
         repo-dbs (all-repo-dbs)
         desired-new-deps (doall (map #(fresh-version repo-dbs %) old-deps))]
     (doseq [[[prj old-ver] [_ new-ver]] (map list old-deps desired-new-deps)]
@@ -564,14 +566,16 @@
         (spit tmp-file
               (rewrite-project-file (slurp prj-file-name) replacement-map))

-        (if (= desired-new-deps (:dependencies (project/read (str tmp-file))))
-          (.renameTo tmp-file (File. prj-file-name))
-          (throw (ex-info (str "Freshen mis-fire. See "
-                               tmp-file " for attempted change.")
-                          {:old-deps old-deps
-                           :replacement-map replacement-map
-                           :desired-new-deps desired-new-deps
-                           :tmp-file-name (str tmp-file)})))))))
+        (let [new-deps (:dependencies (project/read (str tmp-file)))]
+          (if (= desired-new-deps new-deps)
+            (.renameTo tmp-file (File. prj-file-name))
+            (throw (ex-info (str "Freshen mis-fire. See "
+                                 tmp-file " for attempted change.")
+                            {:old-deps old-deps
+                             :replacement-map replacement-map
+                             :desired-new-deps desired-new-deps
+                             :new-deps new-deps
+                             :tmp-file-name (str tmp-file)}))))))))

 (defn resolve-short-proj
   [dep projects]


London setup

London setup

--- src/lights/my_show.clj
+++ src/lights/my_show.clj
@@ -129,15 +129,26 @@
       ;;       to something descriptive and in your own style:
       (show/show :universes [1] :description "London"))))

-  (show/patch-fixture! :front-1 (rgbd-simple) 1 1   :x 2)
-  (show/patch-fixture! :front-2 (rgbd-simple) 1 17  :x 3.5)
-
-  (show/patch-fixture! :scene-1 (rgbw-simple) 1 33  :x 0)
-
-  (show/patch-fixture! :head-1 (jb-systems-sirius-8ch) 1 49 :x 3.5)
-  (show/patch-fixture! :head-2 (jb-systems-sirius-8ch) 1 65 :x 3.5)
-  (show/patch-fixture! :head-3 (jb-systems-sirius-8ch) 1 81 :x 3.5)
-  (show/patch-fixture! :head-4 (jb-systems-sirius-8ch) 1 97 :x 3.5)
+  (show/patch-fixture! :front-1 (rgbd-simple) 1 1   :x 1.6  :y 3.5 :z 2.6)
+  (show/patch-fixture! :front-2 (rgbd-simple) 1 17  :x -1.6 :y 3.5 :z 2.6)
+
+  (show/patch-fixture! :scene-side-1 (rgbw-simple) 1 33  :x 0 :y 1.7 :z 1.5)
+
+  (show/patch-fixture! :head-1 (jb-systems-sirius-8ch) 1 49 :x 3.5  :y 7  :z 2.8
+     :x-rotation (tf/degrees -135))
+  (show/patch-fixture! :head-2 (jb-systems-sirius-8ch) 1 65 :x 3.5  :y 7  :z 2.8
+     :x-rotation (tf/degrees -135))
+  (show/patch-fixture! :head-3 (jb-systems-sirius-8ch) 1 81 :x 3.5  :y 7  :z 2.8
+     :x-rotation (tf/degrees -135))
+  (show/patch-fixture! :head-4 (jb-systems-sirius-8ch) 1 97 :x 3.5  :y 7  :z 2.8
+     :x-rotation (tf/degrees -135))
+
+  (show/patch-fixture! :back-1 (simple-rgbd) 1 113 :x -1.757 :y 0.325 :z 0.3)
+  (show/patch-fixture! :back-2 (simple-rgbd) 1 117 :x -1.057 :y 0.325 :z 0.3)
+  (show/patch-fixture! :back-3 (simple-rgbd) 1 121 :x -0.39  :y 0.325 :z 0.3)
+  (show/patch-fixture! :back-4 (simple-rgbd) 1 125 :x 0.39   :y 0.325 :z 0.3)
+  (show/patch-fixture! :back-5 (simple-rgbd) 1 129 :x 1.057  :y 0.325 :z 0.3)
+  (show/patch-fixture! :back-6 (simple-rgbd) 1 133 :x 1.757  :y 0.325 :z 0.3)

   ;; Return the show's symbol, rather than the actual map, which gets huge with
   ;; all the expanded, patched fixtures in it.


Remove unnecessary, and potentially dangerous, -f from delete! function.

--- src/lt/objs/files.cljs
+++ src/lt/objs/files.cljs
@@ -408,7 +408,7 @@
   "Delete file or directory from filesystem."
   [path]
   (if (dir? path)
-    (.rm shell "-rf" path)
+    (.rm shell "-r" path)
     (.unlinkSync fs path)))

 (defn move!


missing names

missing names

--- src/minreact/core.cljs
+++ src/minreact/core.cljs
@@ -46,16 +46,16 @@
 ;; --
 (defn update-state!
   "Set the components state at k to f applied to its current state and
-  args. See also: transact!"
+  args. See also: transact-state!"
   [c k f & args]
-  (apply transact! c update k f args))
+  (apply transact-state! c update k f args))

 (defn set-state!
   "Set the components state to newval, at k if provided."
   ([c newval]
    (.setState c (js-obj state-key newval)))
   ([c k newval]
-   (transact! c assoc k newval)))
+   (transact-state! c assoc k newval)))

 (def reserved-ks [:key :ref :dangerouslySetInnerHTML])

@@ -92,6 +92,13 @@
      (or (not= next-props props)
          (not= next-state state)))))

+;; TODO: Fix: Can't use the same watch key if iref ends up bound in
+;; multiple components
+
+;; TODO: One should be allowed to specifiy a getter that is watched
+;; explicitly as an optimization.  In the normal usecase this would be
+;; a keyword.
+
 (defn- install-watch [c iref]
   (set-state! c iref @iref)
   (add-watch iref ::watch
@@ -100,7 +107,7 @@

 (defn- uninstall-watch [c iref]
   (remove-watch iref ::watch)
-  (transact! c iref dissoc iref))
+  (transact-state! c iref dissoc iref))

 (defreact watch-irefs
   "React component that watches changes of irefs and invokes


Utils: housekeeping

Utils: housekeeping

--- src/taoensso/carmine/utils.clj
+++ src/taoensso/carmine/utils.clj
@@ -111,16 +111,13 @@
                             (if (< (- now ms) ttl-ms) exp-ks
                                 (conj exp-ks k))) [])
                (apply swap! cache dissoc))))
-      (let [cv (@cache args)]
-        (if (and cv (< (- (System/currentTimeMillis) (second cv))
-                       ttl-ms))
-          @(first cv)
-
+      (let [[dv ms] (@cache args)]
+        (if (and dv (< (- (System/currentTimeMillis) ms) ttl-ms))
+          @dv
           (locking cache ; For thread racing
-            (let [cv (@cache args)] ; Retry after lock acquisition!
-              (if (and cv (< (- (System/currentTimeMillis) (second cv))
-                             ttl-ms))
-                @(first cv)
+            (let [[dv ms] (@cache args)] ; Retry after lock acquisition!
+              (if (and dv (< (- (System/currentTimeMillis) ms) ttl-ms))
+                @dv
                 (let [dv (delay (apply f args))
                       cv [dv (System/currentTimeMillis)]]
                   (swap! cache assoc args cv)


add params for downloading images/pdf

add params for downloading images/pdf

--- src/pc/http/routes.clj
+++ src/pc/http/routes.clj
@@ -164,6 +164,9 @@
                   layers (layer-model/find-by-document layer-db doc)]
               {:status 200
                :headers (merge {"Content-Type" "image/svg+xml"}
+                               (when (-> req :params :dl)
+                                 {"Content-Disposition" (format "attachment; filename=\"precursor-document-%s.svg\""
+                                                                (:db/id doc))})
                                (image-cache-headers layer-db doc))
                :pc/doc doc
                :body (render/render-layers layers :invert-colors? (-> req :params :printer-friendly (= "false")))}))
@@ -202,6 +205,9 @@
                   layers (layer-model/find-by-document layer-db doc)]
               {:status 200
                :headers (merge {"Content-Type" "image/png"}
+                               (when (-> req :params :dl)
+                                 {"Content-Disposition" (format "attachment; filename=\"precursor-document-%s.png\""
+                                                                (:db/id doc))})
                                (image-cache-headers layer-db doc))
                :pc/doc doc
                :body (convert/svg->png (render/render-layers layers
@@ -236,6 +242,9 @@
                 layers (layer-model/find-by-document layer-db doc)]
             {:status 200
              :headers (merge {"Content-Type" "application/pdf"}
+                             (when (-> req :params :dl)
+                               {"Content-Disposition" (format "attachment; filename=\"precursor-document-%s.pdf\""
+                                                              (:db/id doc))})
                              (image-cache-headers layer-db doc))
              :pc/doc doc
              :body (convert/svg->pdf (render/render-layers layers


Better code format

Better code format

--- src/piper/template.clj
+++ src/piper/template.clj
@@ -110,8 +110,7 @@
                                                    ([[:name "fragment"] & attrs] {:fragment (into {} attrs)})
                                                    ([[:name tag-name] & attrs]
                                                      [:text (str "<" tag-name (add-leading-space
-                                                                                (attrs-to-string attrs)) "/>")]))
-                             }
+                                                                                (attrs-to-string attrs)) "/>")]))}
                             (parser template-1))]

     (reduce (fn [result next]
@@ -119,10 +118,6 @@
                 (match [last next]
                        [[:text t1] [:text t2]] (conj (vec (drop-last result)) [:text (str t1 t2)])
                        [last nil] result
-                       [last next] (conj result next))
-                ))
+                       [last next] (conj result next))))
             []
-            nodes)
-    ))
-
-(last [])+            nodes)))


Remove errant debugging prints.

Remove errant debugging prints.

--- src/shale/sessions.clj
+++ src/shale/sessions.clj
@@ -456,9 +456,6 @@
                                  (format "./session/%s")
                                  (url node-url)
                                  str)]
-            (prn "SESSION URL TO BE DESTROYED" session-url)
-            (prn "NODE URL" node-url)
-            (prn "SESSIONS ON NODE" (client/get (str node-url "/sessions")))
             (client/delete session-url
                            {:socket-timeout timeout
                             :conn-timeout timeout})))


don't block the new-doc link from triggering

--- src-cljs/frontend/components/overlay.cljs
+++ src-cljs/frontend/components/overlay.cljs
@@ -98,9 +98,7 @@
            (common/icon :info)
            [:span "About"]]
           [:a.vein.make
-           {:on-click         #(cast! :newdoc-button-clicked)
-            :on-touch-end #(do (cast! :newdoc-button-clicked) (.preventDefault %))
-            :href "/new"
+           {:href "/new"
             :role "button"}
            (common/icon :newdoc)
            [:span "New Document"]]


Revert "outer plans description update"

Revert "outer plans description update"

This reverts commit 35e75d3e11f1506d2bde12f93205a9510c3c1402.

--- src-cljs/frontend/components/pricing.cljs
+++ src-cljs/frontend/components/pricing.cljs
@@ -68,7 +68,7 @@
              [:div.row
               [:div.pricing-calculator-controls
                [:div.controls-containers
-                [:h2 "LXE Containers"]
+                [:h2 "Containers"]
                 [:p "All of your containers are shared across your entire organization."]
                 ;;TODO Use frontend.components.shared/styled-range-slider
                 [:div.containers-range {:on-click #(om/set-state! owner :drag-percent (calculate-drag-percent owner %))


updated version

updated version

--- src/speclj/version.clj
+++ src/speclj/version.clj
@@ -4,7 +4,7 @@

 (def major 1)
 (def minor 5)
-(def tiny 0)
+(def tiny 1)
 (def snapshot false)
 (def string
   (str


fix bug in simple-burst-sequence

fix bug in simple-burst-sequence

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@7594 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- acqEngine/src/org/micromanager/sequence_generator.clj
+++ acqEngine/src/org/micromanager/sequence_generator.clj
@@ -245,10 +245,11 @@
                                       channels default-exposure
                                       triggers]
   (let [numChannels (max 1 (count channels))
+        numFrames (max 1 numFrames)
         exposure (if (pos? numChannels)
                    (:exposure (first channels))
                    default-exposure)
-        x
+        events
         (->> (for [f (range numFrames)
                    c (range numChannels)]
                {:frame-index f
@@ -269,10 +270,11 @@
                     :channel (get channels c)
                     :slice-index 0
                     :metadata (make-channel-metadata (get channels c))))))]
+    (println "events:" events)
     (list
-      (assoc (first x)
+      (assoc (first events)
               :task :burst
-              :burst-data x
+              :burst-data events
               :trigger-sequence triggers))))


avoid errors when no z-drive is present

avoid errors when no z-drive is present

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@12061 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- acqEngine/src/org/micromanager/sequence_generator.clj
+++ acqEngine/src/org/micromanager/sequence_generator.clj
@@ -67,8 +67,8 @@
              (or (all-equal? s)
                  (and (core isPropertySequenceable d p)
                       (<= (count s) (core getPropertySequenceMaxLength d p)))))))
-    (all-equal?(map :exposure channels))))
-
+    (all-equal? (map :exposure channels))))
+
 (defn select-triggerable-sequences
   "Select only those sequences that can and must be triggered."
   [property-sequences]
@@ -221,10 +221,10 @@
     (and
       (channels-sequenceable (make-property-sequences props) channels)
       (or (= (e1 :slice) (e2 :slice))
-          (let [z-drive (. mmc getFocusDevice)]
+          (when-let [z-drive (. mmc getFocusDevice)]
             (and
-              (. mmc isStageSequenceable z-drive)
-              (< n (. mmc getStageSequenceMaxLength z-drive))
+              (.isStageSequenceable mmc z-drive)
+              (< n (.getStageSequenceMaxLength mmc z-drive))
               (<= (Math/abs (- (e1 :slice) (e2 :slice))) MAX-Z-TRIGGER-DIST)
               (<= (e1 :slice-index) (e2 :slice-index))))))))

@@ -406,7 +406,8 @@
         have-multiple-slices (< 1 (count slices))
         have-multiple-channels (< 1 (count channels))
         channel-properties-sequenceable (channels-sequenceable property-sequences channels)
-        slices-sequenceable (. mmc isStageSequenceable (. mmc getFocusDevice))
+        slices-sequenceable (when-let [z-drive (.getFocusDevice mmc)]
+                              (.isStageSequenceable mmc z-drive))
         no-channel-skips-frames (all-equal? 0 (map :skip-frames channels))
         all-channels-do-z-stack (all-equal? true (map :use-z-stack channels))]
     (println slices-first)


Fix authorization tests.

Fix authorization tests.

--- test/buddy/test_buddy_auth.clj
+++ test/buddy/test_buddy_auth.clj
@@ -16,8 +16,7 @@
   [request parsed-data]
   (let [username (:username parsed-data)]
     (cond
-      (= username "foo") :foo
-      :else :anonymous)))
+      (= username "foo") :foo)))

 (deftest authentication-middleware-test
   (testing "Auth middleware with http-basic backend 01"
@@ -34,7 +33,7 @@
           handler (wrap-authentication handler backend)]
       (let [req   (make-request "user" "pass")
             resp  (handler req)]
-        (is (= (:identity resp) :anonymous)))
+        (is (nil? (:identity resp))))
       (let [req   (make-request "foo" "pass")
             resp  (handler req)]
         (is (= (:identity resp) :foo))))))
@@ -42,11 +41,11 @@
 (deftest authorization-middleware-test
   (testing "Auth middleware with http-basic backend 01"
     (let [backend (http-basic :realm "Foo" :authfn auth-fn)
-          handler (fn [req] (if (= (:identity req) :anonymous)
+          handler (fn [req] (if (nil? (:identity req))
                               (throw-notauthorized {:msg "FooMsg"})
                               req))
           handler (wrap-authentication handler backend)
           handler (wrap-authorization handler backend)
           req     (make-request "user" "pass")
           resp    (handler req)]
-      (println resp))))
+      (is (= (:status resp) 401)))))


failing test

failing test

--- test/kixi/hecuba/amon_test.clj
+++ test/kixi/hecuba/amon_test.clj
@@ -21,35 +21,59 @@
 (defn add-metering-points [entity & uuids]
   (update-in entity [:meteringPointIds] concat uuids))

+(defn add-json-content-type [req]
+  (update-in req [:headers] conj ["Content-Type" "application/json"]))
+
 (defn as-json-body-request [body path]
   (-> (request :post path)
-      (update-in [:headers] conj ["Content-Type" "application/json"])
+      add-json-content-type
       (assoc-in [:body] (generate-string body))))

 (defn make-mock-records [r]
   {:commander (->RefCommander r :hecuba/id)
    :querier (->RefQuerier r)})

+(defn create-entity [db]
+  (let [handlers (-> db make-mock-records amon/make-handlers)
+        routes (-> handlers amon/make-routes)
+        path (-> routes (bidi/path-for (:entities-index handlers)))
+        handler (-> routes bidi/make-handler (wrap-routes routes))
+        response (-> (make-entity)
+                     (add-devices (uuid))
+                     (as-json-body-request path)
+                     handler)]
+    (is (not (nil? response)))
+    (is (= (:status response) 201))
+    (is (= (count @db) 1))
+    (let [{handler :handler {uuid :hecuba/id} :params}
+          (bidi/match-route routes (get-in response [:headers "Location"]))
+          uuid (UUID/fromString uuid)]
+      (is (= handler (:entities-specific handlers)))
+      (is (contains? @db uuid))
+      )
+    db))
+
+(defn delete-entity [db id]
+  (let [handlers (-> db make-mock-records amon/make-handlers)
+        routes (-> handlers amon/make-routes)
+        path (-> routes (bidi/path-for (:entities-specific handlers) :hecuba/id id))
+        handler (-> routes bidi/make-handler (wrap-routes routes))
+        response (-> (request :delete path) handler)]
+
+    (is (not (nil? response)))
+    (is (= (:status response) 200))
+    (is (= (count @db) 0))
+    db)
+)
+
 (deftest amon-api-tests
-  (testing "Create a new entity"
-    (let [database (ref {})
-          resource-key :entities-index
-          handlers (-> database make-mock-records amon/make-handlers)
-          routes (-> handlers amon/make-routes)
-          path (-> routes (bidi/path-for (resource-key handlers)))
-          handler (-> routes bidi/make-handler (wrap-routes routes))
-          response (-> (make-entity)
-                       (add-devices (uuid))
-                       (as-json-body-request path)
-                       handler)]
-      (is (not (nil? response)))
-      (is (= (:status response) 201))
-      (is (= (count @database) 1))
-      (let [{handler :handler {uuid :hecuba/id} :params}
-            (bidi/match-route routes (get-in response [:headers "Location"]))
-            uuid (UUID/fromString uuid)]
-        (is (= handler (:entities-specific handlers)))
-        (is (contains? @database uuid))
-        ))))
+  (-> (ref {}) create-entity)
+  (let [db (ref {})
+        db (create-entity db)]
+    (-> db (delete-entity (-> db deref keys first str)))
+    )
+
+
+  )

 ;; TODO: Can the above be simplified with Prismatic graph?


Reindent Adam definition

Reindent Adam definition

It's appropriate for the body forms of reader conditionals to be aligned
with their corresponding keywords. Also, the original indentation in the
docstring was causing it to be formatted incorrectly in (doc adam).

--- cortex/src/cortex/optimise.cljc
+++ cortex/src/cortex/optimise.cljc
@@ -17,25 +17,25 @@
 ;; Adam

 #?(:clj
-    (do
-      (defrecord Adam [^AdamOptimizer optimizer]
-        cp/PGradientOptimiser
-        (compute-parameters [this gradient parameter]
-          (.step optimizer (mp/as-double-array gradient) (mp/as-double-array parameter))
-          (assoc this :parameters parameter))
-        cp/PParameters
-        (parameters [this]
-          [(:parameters this)]))
-
-      (defn adam
-        "Returns a PGradientOptimiser that uses Adam to perform gradient
-        descent. For more information on the algorithm, see the paper at
-        http://arxiv.org/pdf/1412.6980v8.pdf
-        The implementation is in Java and is located at
-        cortex/java/cortex/impl/AdamOptimizer.java"
-        [& {:keys [a b1 b2 e]
-            :or { a 0.001 b1 0.9 b2 0.999 e 1e-8}}]
-        (->Adam (AdamOptimizer. a b1 b2 e)))))
+   (do
+     (defrecord Adam [^AdamOptimizer optimizer]
+       cp/PGradientOptimiser
+       (compute-parameters [this gradient parameter]
+         (.step optimizer (mp/as-double-array gradient) (mp/as-double-array parameter))
+         (assoc this :parameters parameter))
+       cp/PParameters
+       (parameters [this]
+         [(:parameters this)]))
+
+     (defn adam
+       "Returns a PGradientOptimiser that uses Adam to perform gradient
+  descent. For more information on the algorithm, see the paper at
+  http://arxiv.org/pdf/1412.6980v8.pdf
+  The implementation is in Java and is located at
+  cortex/java/cortex/impl/AdamOptimizer.java"
+       [& {:keys [a b1 b2 e]
+           :or { a 0.001 b1 0.9 b2 0.999 e 1e-8}}]
+       (->Adam (AdamOptimizer. a b1 b2 e)))))

 ;; ==============================================


Cleanp of key-press handle + added selecting parent node with 'h'.

--- evermind.web/src/evermind/web/core.cljs
+++ evermind.web/src/evermind/web/core.cljs
@@ -89,29 +89,56 @@
                    (fn [c] (select-node c selected))
                    children)))))

+(defn selected-node
+  [tree]
+  (d/reduce-tree
+    tree
+    (fn [n] (-> n :attributes :selected))))
+
+
+(defn handle-left
+  [data]
+  (om/transact! data [:mindmap]
+                (fn [m]
+                  (let [selected (first (selected-node m))
+                        parent (d/parent-node m selected)]
+                   (select-node m parent)))))
+
+(defn handle-delete
+  [data]
+  (om/transact! data [:mindmap]
+                (fn [m]
+                  (d/filter-tree
+                    m
+                    (fn [c] (not (-> c :attributes :selected)))))))
+
+(defn handle-insert
+  [data]
+  (om/transact! data [:mindmap]
+                (fn [m]
+                  (d/map-tree
+                    m
+                    (fn [n]
+                      (if (-> n :attributes :selected)
+                        (d/add-children n (d/set-attributes (d/create-node) {:text "New node"}))
+                        n))))))
+
 (defn handle-key-press [k data]
   (case k
-    100 ; d
-    (om/transact! data [:mindmap]
-                  (fn [m]
-                    (d/filter-tree
-                      m
-                      (fn [c] (not (-> c :attributes :selected))))))
-    97 ; a
-    (om/transact! data [:mindmap]
-                  (fn [m]
-                    (d/map-tree
-                      m
-                      (fn [n]
-                        (if (-> n :attributes :selected)
-                          (d/add-children n (d/set-attributes (d/create-node) {:text "New node"}))
-                          n)))))
-    73 ; I
-    data
-    105 ; i
-    data
-    111 ; o
-    data
+    ; h
+    104 (handle-left data)
+    ; j
+    106 data
+    ; d
+    100 (handle-delete data)
+    ; a
+    97 (handle-insert data)
+    ; I
+    73 data
+    ; i
+    105 data
+    ; o
+    111 data
     data))

 (defn mindmap-view [data owner]


core: set

core: set

--- data/core.clj
+++ data/core.clj
@@ -1871,3 +1871,11 @@
   "Returns true if x implements Set"
   {:added "1.0"}
   [x] (instance? Set x))
+
+(defn set
+  "Returns a set of the distinct elements of coll."
+  {:added "1.0"}
+  [coll]
+  (if (set? coll)
+    (with-meta coll nil)
+    (reduce1 conj #{} coll)))


Basic way of generating and running Go tests from Clojure

--- test/cljs/go_test.clj
+++ test/cljs/go_test.clj
@@ -2,8 +2,10 @@
   (:require [clojure.test :refer :all]
             [cljs.go :refer :all]
             [clojure.string :as s]
+            [clojure.java.io :as io]
             [clojure.java.shell :as sh]
-            [clojure.pprint :as pp]))
+            [clojure.pprint :as pp])
+  (:import [java.io File]))

 (defn emit* [cljs]
   (let [ast (cljs->ast cljs)
@@ -46,7 +48,46 @@
             ([x] (println "Hello " x))
             ([x & ys] (println "Hello " x ys))))))

-(deftest go-test
-  (let [{:keys [out err exit]} (sh/sh "go" "test")
+(defn go-test [package]
+  (let [{:keys [out err exit]} (sh/sh "go" "test" package)
         out (s/replace (s/replace (str err out) "\r" "\n") "\n\t\t" "")]
     (is (zero? exit) out)))
+
+(defn testify-header []
+  (with-out-str
+    (println "package go_test")
+    (println "import (")
+    (doseq [import ["math" "testing"
+                    "github.com/hraberg/cljs.go/js"
+                    "github.com/hraberg/cljs.go/js/Math"
+                    "github.com/stretchr/testify/assert"]]
+      (println "\t" (pr-str import)))
+    (println "\t" "." (pr-str "github.com/hraberg/cljs.go/cljs/core"))
+    (println ")")))
+
+(defn testify [test & assertions]
+  (with-out-str
+    (printf "func Test_%s(t *testing.T) {\n" (name test))
+    (doseq [[cljs assertion expected] assertions]
+      (printf "\tassert.%s(t%s, %s)\n"
+              assertion
+              (if expected (str ", " expected) "")
+              (if (string? cljs)
+                cljs
+                (-> cljs cljs->ast ast->go))))
+    (printf "}\n")))
+
+(defn emit-and-test [package src]
+  (let [^File f (io/file "target/generated/" (str package ".go"))]
+    (io/make-parents f)
+    (spit f (gofmt (apply str (testify-header) src)))
+    (go-test (str (io/file "." (.getParent f)))))  )
+
+(deftest go-emitter-tests
+  (->> [(testify "IncludeCljsCore"
+                 ["Truth_(true)" "True"]
+                 ["Truth_(false)" "False"])]
+       (emit-and-test "go_test")))
+
+(deftest go-main-test
+  (go-test "."))


don't die on empty msg

don't die on empty msg

--- src/cljc/ow/starbuck/impl/core_async.cljc
+++ src/cljc/ow/starbuck/impl/core_async.cljc
@@ -46,8 +46,8 @@
                   (and (= msg-ch ctrl-ch)
                        (= msg ::stop)))
       (debug name "got message:" msg #_(r/printable-msg msg))
-      (->> (safe-call name process-fn this msg)
-           (deliver-result-fn this))
+      (some->> (safe-call name process-fn this msg)
+               (deliver-result-fn this))
       (debug name "delivered result")
       (recur (a/alts! [in-ch ctrl-ch]))))
   this)


Pass final argument to utils/log through to enable dropping the log statement temporarily into code easily to see what's going on during debugging.

--- src/cljs/infinitelives/utils/console.cljs
+++ src/cljs/infinitelives/utils/console.cljs
@@ -1,3 +1,7 @@
 (ns infinitelives.utils.console)

-(defn log [& args] (js/console.log.apply js/console (clj->js (into [] args))))
+(defn log [& args]
+  "Logs arguments to the js console and returns the last argument (passthrough)."
+  (js/console.log.apply js/console (clj->js (into [] args)))
+  (last args))
+


init first

init first

--- src/cljs/just_married/home/countdown.cljs
+++ src/cljs/just_married/home/countdown.cljs
@@ -43,12 +43,16 @@
      :hours hours
      :minutes minutes}))

+(defn- init-time-left
+  []
+  (extract (get-time-left)))
+
 (defonce time-left
-  (r/atom (extract (get-time-left))))
+  (r/atom (init-time-left)))

 (defn reset-left-time
   []
-  (reset! time-left (extract (get-time-left))))
+  (reset! time-left (init-time-left)))

 (defn- or-zero
   [unit]


Fixed an error caused in resolve merge conflict.

--- src/cmr/indexer/data/concepts/granule.clj
+++ src/cmr/indexer/data/concepts/granule.clj
@@ -166,6 +166,7 @@
             :browsable browsable
             :start-date (when start-date (f/unparse (f/formatters :date-time) start-date))
             :end-date (when end-date (f/unparse (f/formatters :date-time) end-date))
+            :two-d-coord-name two-d-coord-name
             :two-d-coord-name.lowercase (when two-d-coord-name (s/lower-case two-d-coord-name))
             :start-coordinate-1 start-coordinate-1
             :end-coordinate-1 end-coordinate-1


sleeps

sleeps

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@5882 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- clojure/acq_engine.clj
+++ clojure/acq_engine.clj
@@ -76,9 +76,9 @@
 (defn clock-ms []
   (quot (System/nanoTime) 1000000))

-(defn acq-sleep [event last-wake-time]
+(defn acq-sleep [last-wake-time interval-ms]
   (let [sleep-time (-
-                     (+ last-wake-time (event :interval-ms))
+                     (+ last-wake-time interval-ms)
                      (clock-ms))]
     (when (pos? sleep-time)
       (Thread/sleep sleep-time)))
@@ -122,19 +122,23 @@
     (. mmc waitForDevice (. mmc getShutterDevice)))

 (defn collect-image [event]
-  (. mmc getImage))
+  (. mmc getImage)
+  (def my-event event))

-(defn run-event [event]
+(defn run-event [event last-wake-time]
   (run-actions (create-presnap-actions event))
   (await-for 10000 (device-agents (. mmc getCameraDevice)))
+  (swap! last-wake-time acq-sleep (event :wait-time-ms))
   (snap-image true true)
-  (send-device-action (. mmc getCameraDevice) #(collect-image event)))
+  (send-device-action (. mmc getCameraDevice)
+    #(collect-image (assoc event :time (clock-ms)))))

 (defn run-acquisition [settings]
   (def acq-settings settings)
-  (let [acq-seq (generate-acq-sequence settings)]
+  (let [acq-seq (generate-acq-sequence settings)
+        last-wake-time (atom (clock-ms))]
      (def acq-sequence acq-seq)
-     (map run-event acq-seq)))
+     (map #(run-event % last-wake-time) acq-seq)))

 (defn convert-settings [^SequenceSettings settings]
   (-> settings


get rid of the unused from function

get rid of the unused from function

--- frontend/controllers/navigation.cljs
+++ frontend/controllers/navigation.cljs
@@ -10,9 +10,6 @@
   (:require-macros [frontend.utils :refer [inspect]]))

 ;; --- Helper Methods ---
-
-(def from
-  :navigation-point)

 (defn set-page-title! [& [title]]
   (set! (.-title js/document) (if title
@@ -48,7 +45,6 @@

 (defmethod navigated-to :dashboard
   [history-imp to args state]
-  (mlog "Navigated from " (from state) " to " to)
   (-> state
       (assoc :navigation-point :dashboard
              :dashboard-data (select-keys args [:branch :repo :org]))


status codes moved to :status-code

status codes moved to :status-code

--- frontend/controllers/navigation.cljs
+++ frontend/controllers/navigation.cljs
@@ -100,10 +100,10 @@
                                                      :builds-per-page (:builds-per-page current-state)))
               api-resp (<! (ajax/managed-ajax :get builds-url))
               comms (get-in current-state [:comms])]
-          (condp = (inspect (:status api-resp))
-            :success (put! (:api comms) [:recent-builds :success (assoc api-resp :context args)])
-            404 (put! (:nav comms) [:error {:status 404 :inner? false}])
-            (put! (:errors comms) [:api-error api-resp]))))
+          (cond
+           (= :success (:status api-resp)) (put! (:api comms) [:recent-builds :success (assoc api-resp :context args)])
+           (= 404 (:status-code api-resp)) (put! (:nav comms) [:error {:status 404 :inner? false}])
+           :else (put! (:errors comms) [:api-error api-resp]))))
     (when (:repo args)
       (ajax/ajax :get
                  (gstring/format "/api/v1/project/%s/%s/settings" (:org args) (:repo args))


lein-release plugin: bumped version from 0.3.31 to 0.3.32-SNAPSHOT for next development cycle

--- re_view/project.clj
+++ re_view/project.clj
@@ -1,4 +1,4 @@
-(defproject re-view "0.3.31"
+(defproject re-view "0.3.32-SNAPSHOT"
   :description "Tiny React wrapper"
   :url "https://www.github.com/braintripping/re-view/tree/master/re_view"
   :license {:name "Eclipse Public License"


Added comment on map and flat-map

Added comment on map and flat-map

--- src/fpinscala/purely_functional_state.clj
+++ src/fpinscala/purely_functional_state.clj
@@ -320,11 +320,6 @@
   [s1 s2 f]
   (flat-map-s s1 (fn [a] (map-via-flat-map-s s2 #(f a %)))))

-(defn unit-state
-  "Generalized Unit function from section 6.5 of fpins"
-  [a]
-  (fn [rng] (make-result-state a rng)))
-
 (defn state-sequence-fpins
   "sequence function for exercise 6.7 FPINS variant"
   [fs]
@@ -361,4 +356,15 @@
               (make-result-state n nxt-rng))))

 ;usage example
-((state-sequence-fpins (repeat 5 non-negative-int-fpins-s)) (make-simple-rng-s 42))+((state-sequence-fpins (repeat 5 non-negative-int-fpins-s)) (make-simple-rng-s 42))
+
+;map and flat-map difference (afaic):
+;map accepts two functions where first function
+;produces state and second function simply
+;accepts value, maps it and returns new state along with value
+;flat-map also accepts two function where, again, first one
+;accepts produces some state however, second function accepts value
+;but returns function which again accepts some state and will
+;produce new value and next state. This yields flexibility which
+;plain map lacks, flat-map is able to adjust behavior
+;based on value


(MAINT) Adjust env-classes tests for gzip in etags

With the previous commit, the bump of tk-jetty9 to 1.7.0 allowed
sufficiently large response bodies to start being properly gzip encoded
again whereas, with even earlier commits, gzip encoding did not work.
When gzip encoding is used in response bodies, the Jetty webserver adds
"--gzip" to the end of the etag header.  The gzip encoding fix caused a
couple of the environment classes tests which had not been expecting the
"--gzip" characters to appear in the etag to start failing.

In this commit, the two failing environment-classes tests were adjusted
to allow for the "--gzip" characters to appear in an etag, allowing the
tests to once again pass.

--- test/integration/puppetlabs/services/master/environment_classes_int_test.clj
+++ test/integration/puppetlabs/services/master/environment_classes_int_test.clj
@@ -1,5 +1,6 @@
 (ns puppetlabs.services.master.environment-classes-int-test
   (:require [clojure.test :refer :all]
+            [clojure.string :as str]
             [puppetlabs.http.client.sync :as http-client]
             [puppetlabs.kitchensink.core :as ks]
             [puppetlabs.puppetserver.bootstrap-testutils :as bootstrap]
@@ -178,7 +179,13 @@
                                               "default_source" "\"is foo\""}]}]}]
                                         "name" "production"}
              initial-response (get-env-classes "production")
-             initial-etag (response-etag initial-response)]
+             initial-etag (response-etag initial-response)
+             initial-etag-with-gzip-suffix (if (.endsWith initial-etag "--gzip")
+                                             initial-etag
+                                             (str initial-etag "--gzip"))
+             initial-etag-without-gzip-suffix (str/replace initial-etag
+                                                           #"--gzip$"
+                                                           "")]
          (testing "initial fetch of environment_classes info is good"
            (is (= 200 (:status initial-response))
                (str
@@ -205,23 +212,20 @@
                  (str
                   "unexpected status code for response for no code change and "
                   "original etag roundtripped"))
-             (is (= initial-etag (response-etag response))
+             (is (= initial-etag-without-gzip-suffix (response-etag response))
                  "etag changed even though code did not")
              (is (empty? (:body response))
                  "unexpected body for response")))
          (testing (str "SERVER-1153 - HTTP 304 (not modified) returned when "
                        "request roundtrips last etag with '--gzip' suffix and "
                        "code has not changed")
-           (let [etag-with-gzip-suffix (if (.endsWith initial-etag "--gzip")
-                                         initial-etag
-                                         (str initial-etag "--gzip"))
-                 response (get-env-classes "production"
-                                           etag-with-gzip-suffix)]
+           (let [response (get-env-classes "production"
+                                           initial-etag-with-gzip-suffix)]
              (is (= 304 (:status response))
                  (str
                   "unexpected status code for response for no code change and "
                   "etag with '--gzip' suffix roundtripped"))
-             (is (= initial-etag (response-etag response))
+             (is (= initial-etag-without-gzip-suffix (response-etag response))
                  "etag changed even though code did not")
              (is (empty? (:body response))
                  "unexpected body for response")))


Fix stupid typo from WeGi

Fix stupid typo from WeGi

--- frontend/src/cruncher/utils/lib.cljs
+++ frontend/src/cruncher/utils/lib.cljs
@@ -224,4 +224,5 @@
   [s]
   (let [converted (js/parseInt s)]
     (if-not (js/isNaN converted)
-      converted s)))
+      converted
+      s)))


Minor refactoring

Minor refactoring

--- frontend/src/faceboard/firebase.cljs
+++ frontend/src/faceboard/firebase.cljs
@@ -32,21 +32,21 @@
                         (let [old-model (:model old)
                               new-model (:model new)]
                           (when (not= old-model new-model)
-                            (log "app model changed, writing model to firebase...")
+                            (log "app model changed")
+                            (log "firebase:" board-id "<<" new-model)
                             (transform-app-state (model/set [:ui :loading?] true))
                             (p/reset! board-ref new-model))))]
     (go-loop []
       (add-watch app-state :model-watcher model-watcher)
-      (let [[msg chan] (alts! [board-chan control-chan])]
+      (let [[[id value] chan] (alts! [board-chan control-chan])]
         (when (= chan board-chan)
-          (log "firebase:" msg)
-          (let [value (second msg)]
-            (remove-watch app-state :model-watcher)
-            (transform-app-state
-              (model/set [:ui :view] :board)
-              (model/set [:ui :loading?] false)
-              (model/set [:model] value))
-            (add-watch app-state :model-watcher model-watcher))
+          (log "firebase:" id ">>" value)
+          (remove-watch app-state :model-watcher)
+          (transform-app-state
+            (model/set [:ui :view] :board)
+            (model/set [:ui :loading?] false)
+            (model/set [:model] value))
+          (add-watch app-state :model-watcher model-watcher)
           (recur))
         (remove-watch app-state :model-watcher)
         (log "disconnected board " board-id)))))


add get-thrift

add get-thrift

--- elephantdb-client/src/clj/elephantdb/client.clj
+++ elephantdb-client/src/clj/elephantdb/client.clj
@@ -69,6 +69,13 @@
     (when-let [results-map (.multiGet connection domain key-set)]
       (parse-results-map results-map))))

+(defn get-thrift
+  "A convience wrapper around get for use with a thrift-based key."
+  [connection domain key]
+  (let [s (TSerializer.)
+        key (.serialize s key)]
+    (get connection domain key)))
+
 (defn multi-get-thrift
   "A convience wrapper around multi-get for use with thrift-based keys."
   [connection domain key-seq]


fix wrong recursion point, caught by CLJ-2317

--- src/main/clojure/clojure/tools/reader.clj
+++ src/main/clojure/clojure/tools/reader.clj
@@ -909,43 +909,43 @@
      (when (= :unknown *read-eval*)
        (err/reader-error "Reading disallowed - *read-eval* bound to :unknown"))
      (try
-       (loop []
-         (log-source reader
-           (if (seq pending-forms)
-             (.remove ^List pending-forms 0)
-             (let [ch (read-char reader)]
-               (cond
-                (whitespace? ch) (recur)
-                (nil? ch) (if eof-error? (err/throw-eof-error reader nil) sentinel)
-                (= ch return-on) READ_FINISHED
-                (number-literal? reader ch) (read-number reader ch)
-                :else (let [f (macros ch)]
-                        (if f
-                          (let [res (f reader ch opts pending-forms)]
-                            (if (identical? res reader)
-                              (recur)
-                              res))
-                          (read-symbol reader ch))))))))
-       (catch Exception e
-         (if (ex-info? e)
-           (let [d (ex-data e)]
-             (if (= :reader-exception (:type d))
-               (throw e)
-               (throw (ex-info (.getMessage e)
-                               (merge {:type :reader-exception}
-                                      d
-                                      (if (indexing-reader? reader)
-                                        {:line   (get-line-number reader)
-                                         :column (get-column-number reader)
-                                         :file   (get-file-name reader)}))
-                               e))))
-           (throw (ex-info (.getMessage e)
-                           (merge {:type :reader-exception}
-                                  (if (indexing-reader? reader)
-                                    {:line   (get-line-number reader)
-                                     :column (get-column-number reader)
-                                     :file   (get-file-name reader)}))
-                           e)))))))
+       ((fn read' []
+          (log-source reader
+            (if (seq pending-forms)
+              (.remove ^List pending-forms 0)
+              (let [ch (read-char reader)]
+                (cond
+                  (whitespace? ch) (read')
+                  (nil? ch) (if eof-error? (err/throw-eof-error reader nil) sentinel)
+                  (= ch return-on) READ_FINISHED
+                  (number-literal? reader ch) (read-number reader ch)
+                  :else (let [f (macros ch)]
+                          (if f
+                            (let [res (f reader ch opts pending-forms)]
+                              (if (identical? res reader)
+                                (read')
+                                res))
+                            (read-symbol reader ch)))))))))
+        (catch Exception e
+          (if (ex-info? e)
+            (let [d (ex-data e)]
+              (if (= :reader-exception (:type d))
+                (throw e)
+                (throw (ex-info (.getMessage e)
+                                (merge {:type :reader-exception}
+                                       d
+                                       (if (indexing-reader? reader)
+                                         {:line   (get-line-number reader)
+                                          :column (get-column-number reader)
+                                          :file   (get-file-name reader)}))
+                                e))))
+            (throw (ex-info (.getMessage e)
+                            (merge {:type :reader-exception}
+                                   (if (indexing-reader? reader)
+                                     {:line   (get-line-number reader)
+                                      :column (get-column-number reader)
+                                      :file   (get-file-name reader)}))
+                            e)))))))

 (defn read
   "Reads the first object from an IPushbackReader or a java.io.PushbackReader.


initial work on nested splits

initial work on nested splits

--- src/main/clojure/org/dada/demo/whales.clj
+++ src/main/clojure/org/dada/demo/whales.clj
@@ -411,7 +411,8 @@
   (fn [[metadata-fn direct-fn]]
       (let [[src-metadata metaprefix extra-keys] (metadata-fn)
 	    ;;dummy (println "PIVOT METADATA" pivot-key keys value-key)
-	    tgt-metadata (pivot-metadata src-metadata (remove #(= % pivot-key) extra-keys) pivot-values value-key)
+	    extra-keys (remove #(= % pivot-key) extra-keys)
+	    tgt-metadata (pivot-metadata src-metadata extra-keys pivot-values value-key)
 	    tgt-name (str ".pivot(" value-key "/" pivot-key")")]
 	[ ;; metadata
 	 (fn []
@@ -419,7 +420,9 @@
 	 ;; direct
 	 (fn []
 	     (let [[#^Model src-metamodel prefix #^Collection extra-pairs] (direct-fn)
-		   ;;dummy (println "PIVOT" extra-pairs)
+		   dummy (println "PIVOT BEFORE" extra-pairs)
+		   extra-pairs (remove #(= (first %) pivot-key) extra-pairs)
+		   dummy (println "PIVOT AFTER " extra-pairs)
 		   tgt-model (PivotModel.
 			      (str prefix tgt-name)
 			      src-metadata
@@ -452,6 +455,7 @@
 ;; (?2 [(ccount)(ccount)] all-whales)
 ;; (?2 [(union)(union)] all-whales)
 ;; (?2 [(ccount)(union)] all-whales)
+;; (?2 [(sum :weight)(union)] all-whales)
 ;; (?2 [(union)(ccount)] all-whales)
 ;; (?2 [(union)(split :type)] all-whales)
 ;; (?2 [(ccount)(split :type)] all-whales)
@@ -480,18 +484,24 @@

 (?2 [(union "sum(weight)/ocean/type")(split :ocean nil [(pivot :type types (keyword (sum-value-key :weight)))(sum :weight)(split :type )])] all-whales)

-;;(?2 [(split :ocean nil [(union)(split :type nil [(pivot :time years (keyword (count-value-key nil)))(ccount)(split :time (fn [time] (list (or (.lower years time) time))))])])] all-whales)
+;; (?2
+;;  ;;[(split :ocean nil
+;; 	 [
+;; 	  (sum :version)
+;; 	  (union)(split :type nil [(pivot :time years (keyword (count-value-key nil)))(ccount)(split :time (fn [time] (list (or (.lower years time) time))))])]
+;; 	 ;;)]
+;;  all-whales)

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

 ;; create some whales...

-(def num-whales 100000)
+(def num-whales 10000)

 (def some-whales
      (pmap (fn [id] (whale id)) (range num-whales)))

-(def some-whales2
+(def some-whales
      (let [#^Creator creator (.getCreator whale-metadata)]
        (map
 	#(.create creator (into-array Object %))


Added Franz chuckProcessingAllowed=yes flag to the ontology_id_denotes_concept_gen_obo rule

--- resources/rules/pre_identifier_merge/step_a_ontology_to_ice/step_b/ontology_id_denotes_concept_gen_obo.clj
+++ resources/rules/pre_identifier_merge/step_a_ontology_to_ice/step_b/ontology_id_denotes_concept_gen_obo.clj
@@ -10,7 +10,8 @@
          (?/id rdf/type ccp/IAO_EXT_0000088)) ; ontology concept identifier
   :reify ([?/id {:ln (:localname ?/ontology_concept)
                  :ns "ccp" :prefix "" :suffix ""}])
-  :sparql-string "prefix ccp: <http://ccp.ucdenver.edu/obo/ext/>
+  :sparql-string "prefix franzOption_chunkProcessingAllowed: <franz:yes>
+                  prefix ccp: <http://ccp.ucdenver.edu/obo/ext/>
                   prefix obo: <http://purl.obolibrary.org/obo/>
                   select ?ontology_concept {
                   ?root_id rdf:type ccp:IAO_EXT_0000190 . # ccp:ontology root concept identifier