Trying to optimize Uwes Algorithm

Trying to optimize Uwes Algorithm

unsuccessfully.

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

--- src/conexp/contrib/experimental/ryssel_algorithm.clj
+++ src/conexp/contrib/experimental/ryssel_algorithm.clj
@@ -107,26 +107,25 @@
         (collapse-equal-premises implications)
         (let [A            (first extents),
               implications (into implications
-                                 (set-of (make-implication #{m} #{n})
-                                         [N M
-                                          :when (subset? A N),
-                                          m (gens A),
-                                          n (gens N),
-                                          :when (not= m n)])),
-              candidates   (set-of U
-                                   [U (disj M A),
-                                    :when (not (exists [V M]
-                                                 (and (subset? (intersection U A) V)
-                                                      (proper-subset? V A))))]),
+                                 (for [N M
+                                       :when (subset? A N),
+                                       m (gens A),
+                                       n (gens N),
+                                       :when (not= m n)]
+                                   (make-implication #{m} #{n}))),
+              M-down-A     (set-of V | V M :when (proper-subset? V A)),
+              candidates   (set-of U | U (disj M A),
+                                       :when (not (exists [V M-down-A]
+                                                    (subset? (intersection U A) V)))),
               candidates   (difference candidates
                                        (set-of (intersection X Y) | X candidates, Y candidates
                                                                     :when (and (not (subset? X Y))
                                                                                (not (subset? Y X))))),
               covers       (cover (objects ctx) candidates A),
               B            (oprime A),
-              implications (union implications
-                                  (set-of (make-implication (set-of m | Y X, m (gens Y)) B)
-                                          | X covers))]
+              implications (into implications
+                                 (for [X covers]
+                                   (make-implication (set-of m | Y X, m (gens Y)) B)))]
           (recur implications (rest extents)))))))

 ;;;


read build log files to get VS errors

read build log files to get VS errors

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

--- buildscripts/buildcheck/src/buildcheck/core.clj
+++ buildscripts/buildcheck/src/buildcheck/core.clj
@@ -7,7 +7,7 @@
   (:require [clojure.xml])
   (:gen-class))

-(def micromanager (file* "../.."))
+(def micromanager (file* "../../.."))

 (def MS-PER-HOUR (* 60 60 1000))

@@ -16,26 +16,36 @@
         one-hour-ago (doto (Calendar/getInstance)
                        (.add Calendar/HOUR -1))]
     (.format format (.getTime one-hour-ago))))
-
+
 (defn result-file [bits mode]
   (File. micromanager (str "/results" bits ".txt")))

-(defn visual-studio-errors [result-text]
-  (map first
-       (re-seq #"\n[^\n]+\b([1-9]|[0-9][1-9]|[0-9][0-9][1-9])\b\serror\(s\)[^\n]+\n" result-text)))
-
-(defn visual-studio-error-info [result-text errors]
-  (for [error errors]
-    (let [prefix (ffirst (re-seq #"\n([1-9]|[0-9][1-9]|[0-9][0-9][1-9])>" error))
-          pattern (re-pattern (str prefix "[^\\n]+"))]
-      (when prefix
-          (re-seq (re-pattern pattern) result-text)))))
-
-(defn visual-studio-error-text [result-text]
-  (->> (visual-studio-error-info result-text (visual-studio-errors result-text))
-       (interpose "\n")
-       flatten
+(defn old-file? [file time-limit-hours]
+  (let [now (System/currentTimeMillis)
+        before (- now (* time-limit-hours MS-PER-HOUR))]
+    (< (.lastModified file) before)))
+
+(defn vs-log-files []
+  (->> micromanager
+       file-seq
+       (filter #(= "BuildLog.htm" (.getName %)))
+       (filter #(.contains (.getAbsolutePath %) "Release"))
+       (filter #(not (old-file? % 1)))))
+
+(defn vs-log-text [f]
+  (->> (slurp f :encoding "utf-16")
+       (re-seq #"(?s)<pre>(.*?)</pre>")
+       (drop 2)
+       (map second)
        (apply str)))
+
+(defn contains-errors? [log-text]
+  (if (re-find #"\n[^\n]+\b([1-9]|[0-9][1-9]|[0-9][0-9][1-9])\b\serror\(s\)[^\n]+\n"
+               log-text)
+    true false))
+
+(defn visual-studio-errors []
+  (filter contains-errors? (map vs-log-text (vs-log-files))))

 (defn javac-errors [result-text]
   (map first
@@ -50,10 +60,8 @@
       (.listFiles dir)))

 (defn old-files [files time-limit-hours]
-  (let [now (System/currentTimeMillis)
-        before (- now (* time-limit-hours MS-PER-HOUR))]
-    (filter #(< (.lastModified %) before) files)))
-
+  (filter #(old-file? % time-limit-hours) files))
+
 (defn old-dlls [dir time-limit-hours]
   (old-files (device-adapter-dlls dir) time-limit-hours))

@@ -125,7 +133,7 @@
                                   (set dll-names)
                                   (do-not-build)
                                   helper-vcprojs))))
-
+
 (defn device-pages []
   (let [index-txt (slurp "http://valelab.ucsf.edu/~MM/MMwiki/index.php/Device%20Support")]
     (map second (re-seq #"a href=\"/~MM/MMwiki/index.php/(.*?)\"" index-txt))))
@@ -152,7 +160,7 @@
 (defn report-build-errors [bits mode test]
   (let [f (result-file bits mode)
         result-txt (slurp f)
-        vs-error-text (visual-studio-error-text result-txt)
+        vs-errors (visual-studio-errors)
         outdated-dlls (map #(.getName %) (old-dlls (bin-dir bits) 24))
         javac-errs (javac-errors result-txt)
         outdated-jars (map #(.getName %)
@@ -160,7 +168,7 @@
         installer-ok (exe-on-server? bits today-token)
         missing-vcproj-files (missing-vcproj)]
     (when-not (and (not test)
-                   (empty? vs-error-text)
+                   (empty? vs-errors)
                    (empty? outdated-dlls)
                    (empty? javac-errs)
                    (empty? outdated-jars)
@@ -171,7 +179,7 @@
           ({:inc "INCREMENTAL" :full "FULL"} mode)
           " BUILD ERROR REPORT\n"
         "For the full build output, see " (.getAbsolutePath f)
-        (report-segment "Visual Studio reported errors" vs-error-text)
+        (report-segment "Visual Studio reported errors" vs-errors)
         (report-segment "Outdated device adapter DLLs" outdated-dlls)
         (report-segment "Errors reported by java compiler" javac-errs)
         (report-segment "Outdated jar files" outdated-jars)


function spieltag-treffer-pro-shots

function spieltag-treffer-pro-shots

--- src/paulkrake/spielplan.clj
+++ src/paulkrake/spielplan.clj
@@ -32,6 +32,9 @@
                              g_sog (get sog gast)]
                          (vector heim gast h_sog g_sog))) x))))

+(defn rounded [x]
+  (as-> x z (* 100.0 z) (Math/round z) (/ z 100.0)))
+
 (defn spieltag-treffer-pro-shots [saison spieltag-nr]
         (let [st (spieltag saison spieltag-nr)
               sog (d/shots-on-goal saison spieltag-nr)]
@@ -39,7 +42,7 @@
                 (map (fn [[heim gast hg gg]]
                        (let [h_sog (get sog heim)
                              g_sog (get sog gast)
-                             h_p (if (= h_sog 0) 0 (/ hg h_sog))
-                             g_p (if (= g_sog 0) 0 (/ gg g_sog))
+                             h_p (if (= h_sog 0) 0 (rounded (/ hg h_sog)))
+                             g_p (if (= g_sog 0) 0 (rounded (/ gg g_sog)))
                              ]
                          (vector heim gast h_p g_p) )) x))))


fix server implementation for lesson prev and next

--- src/server/daveconservatoire/server/parser.cljs
+++ src/server/daveconservatoire/server/parser.cljs
@@ -143,12 +143,14 @@
                                                 (go-catch
                                                   (let [res (<? (ps/sql-first-node env [[:where :lesson/order "<" (ps/row-get env :lesson/order)]
                                                                                [:and-where {:lesson/topic-id (ps/row-get env :lesson/topic-id)}]
+                                                                                [:order-by :lesson/order "desc"]
                                                                                [:limit 1]]))]
                                                     (if (not= res [:error :row-not-found]) res))))
                        :lesson/next           (fn [env]
                                                 (go-catch
                                                   (let [res (<? (ps/sql-first-node env [[:where :lesson/order ">" (ps/row-get env :lesson/order)]
                                                                                [:and-where {:lesson/topic-id (ps/row-get env :lesson/topic-id)}]
+                                                                                [:order-by :lesson/order]
                                                                                [:limit 1]]))]
                                                     (if (not= res [:error :row-not-found]) res))))}}


Remove camel case option from histogram.

--- src/gorilla_plot/core.clj
+++ src/gorilla_plot/core.clj
@@ -67,13 +67,13 @@

 (defn histogram
   "Plot the histogram of a sample."
-  [data & {:keys [plot-range bins normalize normalise plot-size aspect-ratio colour color opacity fillOpacity]
+  [data & {:keys [plot-range bins normalize normalise plot-size aspect-ratio colour color opacity fill-opacity]
            :or   {plot-range   [:all :all]
                   bins         :automatic
                   plot-size    400
                   aspect-ratio 1.618
                   opacity      1
-                  fillOpacity  0.4}
+                  fill-opacity  0.4}
            :as   opts}]
   (let [bin-range-spec (first plot-range)
         range-min (if (= bin-range-spec :all) (apply min data) (first bin-range-spec))
@@ -108,7 +108,7 @@
       (v/vega-view (merge
                         (vega/container plot-size aspect-ratio)
                         (vega/data-from-list series-name plot-data)
-                        (vega/histogram-marks series-name (or colour color) opacity fillOpacity)
+                        (vega/histogram-marks series-name (or colour color) opacity fill-opacity)
                         (vega/default-list-plot-scales series-name plot-range)
                         (vega/default-plot-axes))))))


Revert "Prepare a workaround for the Leiningen 2 Preview 9 provisioning issue"

This reverts commit fabd1289f525d6e3e5e24bac0ba7fdc49ebbb85c.

The workaround does not completely solve the issue. Bailing out!

--- ci_environment/leiningen/files/default/init.clj
+++ ci_environment/leiningen/files/default/init.clj
@@ -1,4 +0,0 @@
-;; https://github.com/technomancy/leiningen/issues/747#issuecomment-8024136
-(swap! leiningen.core.project/default-profiles
-       update-in [:base] assoc :repositories
-       [["clojars" {:url "https://clojars.org/repo/"}]])


Wrap riak impl in (async/thread ...)

Wrap riak impl in (async/thread ...)

--- src/icecap/store/riak.clj
+++ src/icecap/store/riak.clj
@@ -1,5 +1,6 @@
 (ns icecap.store.riak
-  (:require [clojurewerkz.welle.kv :as kv]
+  (:require [clojure.core.async :as a :refer [thread]]
+            [clojurewerkz.welle.kv :as kv]
             [icecap.store.api :refer [Store]]))

 (defn riak-store
@@ -7,11 +8,11 @@
   [conn bucket]
   (reify Store
     (create! [_ index blob]
-      (kv/store conn bucket index blob))
+      (thread (kv/store conn bucket index blob)))
     (retrieve [_ index]
-      (kv/fetch-one conn bucket index))
+      (thread (kv/fetch-one conn bucket index)))
     (delete! [_ index]
-      (kv/delete conn bucket))))
+      (thread (kv/delete conn bucket)))))

 (defn bucket-props
   "Creates some bucket props suitable for an icecap bucket.


clojure (pgraph_morphisms): print spacegroup by new method where Systre fails

--- clojure/org/gavrog/clojure/pgraph_morphisms.clj
+++ clojure/org/gavrog/clojure/pgraph_morphisms.clj
@@ -191,13 +191,15 @@
 (defn -main [path]
   (doseq [G (nets path)]
     (print (.getName G) "")
-    (if (not (systreable? G))
-      (println "n.a.")
-      (try
+    (try
+      (if (not (systreable? G))
+        (if (and (.isConnected G) (node-signatures G))
+          (println "->" (.getName (spacegroup G)))
+          (println "n.a."))
         (let [n1 (.getName (.getSpaceGroup G))
               n2 (.getName (spacegroup G))]
           (if (= n1 n2)
             (println "good")
-            (println (str "bad (" n1 " vs " n2 ")"))))
-        (catch Throwable x
-          (do (println "error") (throw x)))))))
+            (println (str "bad (" n1 " vs " n2 ")")))))
+      (catch Throwable x
+        (do (println "error") (throw x))))))


Minor fix on layers sidebar event handling.

--- src/uxbox/main/ui/workspace/sidebar/layers.cljs
+++ src/uxbox/main/ui/workspace/sidebar/layers.cljs
@@ -19,6 +19,7 @@
             [uxbox.main.ui.shapes.icon :as icon]
             [uxbox.main.ui.workspace.base :as wb]
             [uxbox.main.ui.icons :as i]
+            [uxbox.main.ui.keyboard :as kbd]
             [uxbox.util.mixins :as mx]
             [uxbox.util.dom.dnd :as dnd]
             [uxbox.util.dom :as dom])
@@ -126,6 +127,10 @@
                 (set! (.-draggable parent) true)
                 (rs/emit! (uds/update-shape data))
                 (swap! local assoc :edition false)))
+            (on-key-down [event]
+              (js/console.log event)
+              (when (kbd/enter? event)
+                (on-blur event)))
             (on-click [event]
               (dom/stop-propagation event)
               (dom/prevent-default event)
@@ -136,6 +141,7 @@
         [:input.element-name
          {:type "text"
           :on-blur on-blur
+          :on-key-down on-key-down
           :auto-focus true
           :default-value (:name shape "")}]
         [:span.element-name


full recursive reload; this should obviate on-jsload

--- support/src/figwheel/client/file_reloading.cljs
+++ support/src/figwheel/client/file_reloading.cljs
@@ -37,6 +37,7 @@
   (not (.startsWith goog.string n pre)))

 (defn invalidate-dependency-cache! []
+  (utils/debug-prn "Figwheel: Invalidating dependencies")
   (reset! dependency-cache {}))

 (defn relevant-nms []
@@ -46,7 +47,7 @@
           (js-keys (.. js/goog -dependencies_ -nameToPath))))

 (defn dependencies* []
-  (dev-assert (map? @dependency-cache))
+  (utils/debug-prn "Figwheel: Recalculating dependencies")
   (reduce (fn [acc-map nm]
             (let [pth (aget (.. js/goog -dependencies_ -nameToPath) nm)
                   reqs (js-keys (aget (.. js/goog -dependencies_ -requires) pth))]
@@ -56,37 +57,40 @@

 (defn dependencies []
   (dev-assert (map? @dependency-cache))
-  (if (not-empty @dependency-cache)
-    @dependency-cache
+  (if (not-empty (:deps @dependency-cache))
+    (:deps @dependency-cache)
     (let [deps (dependencies*)]
       (dev-assert (map? deps))
-      (reset! dependency-cache deps)
+      (swap! dependency-cache assoc :deps deps)
       deps)))

 (defn ns-that-depend-on [nm]
   (dev-assert (string? nm))
   (set (keys (get (dependencies) nm))))

-(defn ancestor* [nm nm2]
-  (dev-assert (string? nm) (string? nm2))
+(declare ns-that-depend-on-recur)
+
+;;mutual caching recursion
+(defn ns-that-depend-on-recur* [nm]
   (let [deps (ns-that-depend-on nm)]
     (dev-assert (set? deps))
     (if (empty? deps)
-      false
-      (if (get deps nm2)
-        true
-        (reduce #(or %1 %2) false
-                (map #(ancestor* % nm2) deps))))))
-
-(defn ancestor [nm nm2]
-  (dev-assert (string? nm) (string? nm2) (map? @dependency-cache))
-  ;; sharing a cache so that it gets blown away when deps are updated
-  (let [cached (get-in @dependency-cache [:ancestor nm nm2])]
+      deps
+      (set (concat deps (mapcat ns-that-depend-on-recur deps))))))
+
+(defn ns-that-depend-on-recur [nm]
+  (let [cached (get-in @dependency-cache [:full-deps nm])]
     (if (not (nil? cached))
       cached
-      (let [res (ancestor* nm nm2)]
-        (swap! dependency-cache assoc-in [:ancestor nm nm2] res)
+      (let [res (ns-that-depend-on-recur* nm)]
+        (swap! dependency-cache assoc-in [:full-deps nm] res)
         res))))
+
+(prn (ns-that-depend-on-recur* "figwheel.client.utils"))
+
+(defn ancestor [nm nm2]
+  (dev-assert (string? nm) (string? nm2))
+  (if (get (ns-that-depend-on-recur nm) nm2) true false))

 (defn topo-compare [nm nm2]
   (dev-assert (string? nm) (string? nm2))
@@ -95,6 +99,16 @@
     (ancestor nm nm2) -1
     :else 1))

+#_(prn (keys (dependencies)))
+
+#_(let [start (.getTime (js/Date.))]
+    (prn (sort topo-compare (map name (keys (dependencies)))))
+    (prn (sort topo-compare (map name (keys (dependencies)))))
+    (prn (sort topo-compare (map name (keys (dependencies)))))
+    (prn (sort topo-compare (map name (keys (dependencies)))))
+    (prn (- (.getTime (js/Date.))
+            start)))
+
 (defn topo-compare-file-msg [f1 f2]
   (dev-assert (namespace-file-map? f1) (namespace-file-map? f2))
   (topo-compare (:namespace f1) (:namespace f2)))
@@ -116,7 +130,7 @@
   (dev-assert (all? namespace-file-map? file-msgs))
   (store-meta-data-for-files! file-msgs)
   (let [current-ns    (set (map :namespace file-msgs))
-        dependent-ns  (set (mapcat ns-that-depend-on current-ns))
+        dependent-ns  (set (mapcat ns-that-depend-on-recur current-ns))
         additional-ns (difference dependent-ns current-ns)
         additional-files (map (fn [x] { :namespace x
                                        :meta-data (get @ns-meta-data x)
@@ -124,6 +138,7 @@
                                        :type :namespace }) additional-ns)]
     (topo-sort-files (concat (set file-msgs)
                              additional-files))))
+

 ;; this assumes no query string on url
 (defn add-cache-buster [url]


Add tiny bit of parallelism when starting/updating

Construct the indices and sort the images at the same time, in futures.

--- src/mars_ogler/images.clj
+++ src/mars_ogler/images.clj
@@ -145,16 +145,16 @@
 (defn setup!
   []
   (let [processed (-> (get-cached-images) process-images)
-        indices' (index-images processed)
-        sorted-images' (sort-images processed)]
-    (reset! indices indices')
-    (reset! sorted-images sorted-images')))
+        indices' (future (index-images processed))
+        sorted-images' (future (sort-images processed))]
+    (reset! indices @indices')
+    (reset! sorted-images @sorted-images')))

 (defn update!
   [imgs]
   (cache-images! imgs)
   (let [processed (-> imgs process-images)
-        indices' (index-images processed)
-        sorted-images' (sort-images processed)]
-    (reset! indices indices')
-    (reset! sorted-images sorted-images')))
+        indices' (future (index-images processed))
+        sorted-images' (future (sort-images processed))]
+    (reset! indices @indices')
+    (reset! sorted-images @sorted-images')))


fixture change

fixture change

--- my-show.clj
+++ my-show.clj
@@ -23,6 +23,14 @@
   my-show
   (atom nil))

+(defn my-rgb
+  "A simple RGB light"
+  []
+  {:channels [(chan/color 1 :red)
+              (chan/color 2 :green)
+              (chan/color 3 :blue)]
+   :name "Simple RGB"})
+
 (defn use-my-show
   "Set up the show on the OLA universes it actually needs."
   []
@@ -40,7 +48,7 @@
                     ;;       to something descriptive and in your own style:
                     (show/show :universes [1] :description "My Show"))))

-  (show/patch-fixture! :hyp-rgb (adj/hypnotic-rgb) universe 1)
+  (show/patch-fixture! :rgb-1 (my-rgb) 1 1)

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


Fetch invoices when navigating to the billing sub-page

--- frontend/controllers/navigation.cljs
+++ frontend/controllers/navigation.cljs
@@ -233,9 +233,15 @@
                  :context {:org-name org-name}))
     (condp = subpage
       :organizations (ajax/ajax :get "/api/v1/user/organizations" :organizations api-ch)
-      :billing (ajax/ajax :get
-                          (gstring/format "/api/v1/organization/%s/card" org-name)
-                          :plan-card
-                          api-ch
-                          :context {:org-name org-name})))
+      :billing (do
+                 (ajax/ajax :get
+                            (gstring/format "/api/v1/organization/%s/card" org-name)
+                            :plan-card
+                            api-ch
+                            :context {:org-name org-name})
+                 (ajax/ajax :get
+                            (gstring/format "/api/v1/organization/%s/invoices" org-name)
+                            :plan-invoices
+                            api-ch
+                            :context {:org-name org-name}))))
   (set-page-title! (str "Org settings - " org-name)))


CMR-5356: Modified tests for netcdf3 output.

--- test/cmr/opendap/tests/system/app/sizing/netcdf3.clj
+++ test/cmr/opendap/tests/system/app/sizing/netcdf3.clj
@@ -36,7 +36,7 @@
     (is (= 200 (:status response)))
     (is (= "cmr-service-bridge.v2.1; format=json"
            (get-in response [:headers :cmr-media-type])))
-    (is (= [{:bytes 8158
+    (is (= [{:bytes 8159
              :gb 0.0
              :mb 0.01}]
            (util/parse-response response)))))
@@ -77,9 +77,9 @@
     (is (= 200 (:status response)))
     (is (= "cmr-service-bridge.v2.1; format=json"
            (get-in response [:headers :cmr-media-type])))
-    (is (= [{:bytes 5768158
+    (is (= [{:bytes 11528159
              :gb 0.01
-             :mb 5.5}]
+             :mb 10.99}]
            (util/parse-response response)))))

 (deftest multi-var-different-gran-size-test
@@ -98,9 +98,9 @@
     (is (= 200 (:status response)))
     (is (= "cmr-service-bridge.v2.1; format=json"
            (get-in response [:headers :cmr-media-type])))
-    (is (= [{:bytes 17287615
+    (is (= [{:bytes 23047615
              :gb 0.02
-             :mb 16.49}]
+             :mb 21.98}]
            (util/parse-response response)))))

 (deftest multi-gran-multi-var-size-test
@@ -120,7 +120,7 @@
       (is (= 200 (:status response)))
       (is (= "cmr-service-bridge.v2.1; format=json"
              (get-in response [:headers :cmr-media-type])))
-      (is (= [{:bytes 23056316
+      (is (= [{:bytes 23056318
                :mb 21.99
                :gb 0.02}]
              (util/parse-response response)))))


Support new plugin interface.

Support new plugin interface.

--- src/onyx/plugin/kafka.clj
+++ src/onyx/plugin/kafka.clj
@@ -182,7 +182,7 @@
     drained)

   p/Input
-  (poll! [this _]
+  (poll! [this _ _]
     (if (and iter (.hasNext ^java.util.Iterator iter))
       (let [rec ^ConsumerRecord (.next ^java.util.Iterator iter)
             deserialized (some-> rec segment-fn)]


Add floor

Add floor

--- src/mermaid_ldjam/core.cljs
+++ src/mermaid_ldjam/core.cljs
@@ -8,13 +8,13 @@
   {:entities
     {;objects
      :bucket {:x 380 :y 290 :width 50 :height 60 :path "resources/bucket.png"}
-     :window {:x 400 :y 60 :width 150 :height 100 :path "resources/window.png" :hidden true}
+     :window {:x 400 :y 60 :width 150 :height 100 :path "resources/window.png"}
      :window-open {:x 400 :y 60 :width 150 :height 100 :path "resources/window-open.png" :hidden true}
-     :stone {:x 440 :y 320 :width 50 :height 45 :path "resources/stone.png" }
-     :broom {:x 20 :y 160 :width 90 :height 160 :path "resources/broom.png" }
-     :starfish {:x 100 :y 220 :width 50 :height 50 :path "resources/starfish.png"}
+     :stone {:x 440 :y 320 :width 50 :height 45 :path "resources/stone.png" :hidden true}
+     :broom {:x 20 :y 160 :width 90 :height 160 :path "resources/broom.png" :hidden true}
+     :starfish {:x 120 :y 270 :width 50 :height 50 :path "resources/starfish.png"}
      :bottle {:x 260 :y 290 :width 30 :height 80 :path "resources/bottle.png"}
-     :seagull {:x 400 :y 60 :width 150 :height 100 :path "resources/seagull.png"}
+     :seagull {:x 400 :y 60 :width 150 :height 100 :path "resources/seagull.png" :hidden true}
      ;actions
      :look {:x 10 :y (- (q/height) 50) :width 100 :height 40 :label "Look" :path "resources/action.png"}
      :flap {:x 110 :y (- (q/height) 50) :width 100 :height 40 :label "Flap":path "resources/action.png"}}
@@ -122,6 +122,10 @@

 (defn draw-background []
   (q/background 194 185 177)
+  (q/no-stroke)
+  (q/fill 165 152 141)
+  (q/rect 0 260 (q/width) (q/height))
+  (q/image (load-image "resources/line.png") 0 250 (q/width) 20)
   (q/image (load-image "resources/mermaid.png") 170 120 255 200))
  ; (q/image (load-image "resources/sea.jpg") 0 0 (q/width) (q/height)))


clarify dox

clarify dox

--- src/metabase/api/search.clj
+++ src/metabase/api/search.clj
@@ -38,7 +38,7 @@
 (defn get-search-results
   "Get search results for a given MODEL choice.

-    (get-search-results \"main_\" :table)"
+    (get-search-results \"main_\" (search-choices :table))"
   [query {:keys [entity url-prefix] :as model}]
   (->> (sel :many [entity :name :description :id] :name [like (str "%" query "%")])
        (map (fn [{:keys [name description id]}]
@@ -48,9 +48,9 @@
                :url (str url-prefix id)}))))

 (defn results-for-models
-  "Given a set of search-choices MODELS, get matching search results for QUERY.
+  "Given a seq of search choices MODELS, get matching search results for QUERY.

-    (results-for-models #{:card :dashboard} \"guides\")"
+    (results-for-models [(search-choices :table) (search-choices :field)] \"guides\")"
   [models query]
   (mapcat (partial get-search-results query)
           models))


LatLng's parent-with-id can be far away

LatLng's parent-with-id can be far away

Add an arity to latlng->ltree to explicitly provide the parent_with_id.

--- src/vip/data_processor/db/translations/util.clj
+++ src/vip/data_processor/db/translations/util.clj
@@ -98,17 +98,26 @@
                (simple-value->ltree :external_identifier_othertype "OtherType" parent-with-id)
                (simple-value->ltree :external_identifier_value "Value" parent-with-id)]))))

-(defn latlng->ltree [idx-fn parent-path row]
-  (when-not (and (str/blank? (:latitude row))
-                 (str/blank? (:longitude row)))
-    (let [index (idx-fn)
-          base-path (str parent-path ".LatLng." index)
-          parent-with-id (id-path parent-path)
-          sub-idx-fn (index-generator 0)]
-      (mapcat #(% sub-idx-fn base-path row)
-              [(simple-value->ltree :latitude "Latitude" parent-with-id)
-               (simple-value->ltree :longitude "Longitude" parent-with-id)
-               (simple-value->ltree :latlng_source "Source" parent-with-id)]))))
+(defn latlng->ltree
+  ([]
+   (fn [idx-fn parent-path row]
+     (let [parent-with-id (id-path parent-path)
+           ltree-fn (latlng->ltree parent-with-id)]
+       (ltree-fn idx-fn parent-path row))))
+  ([parent-with-id]
+   (fn [idx-fn parent-path row]
+     (when-not (and (str/blank? (:latitude row))
+                    (str/blank? (:longitude row)))
+       (let [index (idx-fn)
+             base-path (str parent-path ".LatLng." index)
+             sub-idx-fn (index-generator 0)]
+         (mapcat #(% sub-idx-fn base-path row)
+                 [(simple-value->ltree :latitude "Latitude" parent-with-id)
+                  (simple-value->ltree :longitude "Longitude" parent-with-id)
+                  (simple-value->ltree :latlng_source "Source" parent-with-id)])))))
+  ([idx-fn parent-path row]
+   (let [ltree-fn (latlng->ltree)]
+     (ltree-fn idx-fn parent-path row))))

 (defn ltreeify [row]
   (-> row


Refactor collision functions so that they no longer rely on shared state

--- src/particlebox/core.cljs
+++ src/particlebox/core.cljs
@@ -139,46 +139,65 @@
         p (map + p v)]
     [p v a]))

+(defn particle
+  "Creates a particle from the set of position, velocity, and acceleration
+vectors."
+  [[p v a]]
+  {:pos p :vel v :acc a})
+
+(defn update-universe
+  "Performs all motion in the universe for one stroboscopic 'tick' of the
+clock."
+  [particles]
+  (vec
+   (map #(particle (move (:pos %) (:vel %) particles))
+        particles)))
+
 (defn collided?
   "Determines whether the two particles have collided."
   [a b]
   (< (distance (:pos a) (:pos b)) particle-diameter))

-(defn handle-collisions!
-  "Scans all particles for collisions, and when any two particles collide,
+(defn detect-collisions
+  "Detects collisions in the universe, and returns them as pairs of index and
+particle."
+  [particles]
+  (for [a (range particle-count)
+        b (range particle-count)
+        :let [pa (nth particles a)
+              pb (nth particles b)]
+        :when (and (not= a b) (collided? pa pb))]
+    [a pa b pb]))
+
+(defn handle-collisions
+  "Scans the particles for collisions, and when any two particles collide,
 bounces them away from one another and cancels out velocity along the shared
 axis. This is not quite right, but suffices for now."
-  []
-  (doseq [a (range particle-count)
-          b (range particle-count)]
-    (let [pa (nth @particles a)
-          pb (nth @particles b)]
-      (when (and (not= a b) (collided? pa pb))
-        (let [dir (direction-from (:pos pa) (:pos pb))
-              dist (distance (:pos pa) (:pos pb))
-              bounce (direction dir (- particle-diameter dist))]
-          (swap! particles
-                 assoc
-                 a (assoc pa
-                     :pos (map - (:pos pa) bounce)
-                     :vel (map -
-                               (:vel pa)
-                               (direction dir (magnitude (:vel pa)))))
-                 b (assoc pb
-                     :pos (map + (:pos pb) bounce)
-                     :vel (map +
-                               (:vel pb)
-                               (direction dir (magnitude (:vel pb)))))))))))
-
-(defn motion-tick!
-  "Performs all motion in the universe for one stroboscopic 'tick' of the
-clock."
-  []
-  (doseq [i (range particle-count)]
-    (let [p (nth @particles i)
-          [p v a] (move (:pos p) (:vel p) @particles)]
-      (swap! particles
-             assoc i {:pos p :vel v}))))
+  [particles]
+   (let [collisions (detect-collisions particles)]
+     (if (empty? collisions)
+       particles
+
+       ;; if there are collisions, calculate the appropriate adjustments to
+       ;; position and velocity, and assoc the updated particles back into the
+       ;; particles vector.
+       (apply
+        (partial assoc particles)
+        (flatten
+         (for [[a pa b pb] collisions
+               :let [dir (direction-from (:pos pa) (:pos pb))
+                     dist (distance (:pos pa) (:pos pb))
+                     bounce (direction dir (- particle-diameter dist))]]
+           [a (assoc pa
+                :pos (map - (:pos pa) bounce)
+                :vel (map -
+                          (:vel pa)
+                          (direction dir (magnitude (:vel pa)))))
+            b (assoc pb
+                :pos (map + (:pos pb) bounce)
+                :vel (map +
+                          (:vel pb)
+                          (direction dir (magnitude (:vel pb)))))]))))))

 (defn generate-particles
   "Creates the given number of particles, and arranges them in the universe
@@ -189,20 +208,30 @@
      {:pos [(rand-x) (rand-y) (rand-y)]
       :vel (direction [(rand-x) (rand-y) (rand-y)] initial-speed)})))

+(defn update-graphics-meshes!
+  "Update the graphics meshes to be in sync with the current state of the
+universe."
+  [particles]
+  (doseq [i (range particle-count)]
+    (let [p (nth particles i)
+          m (nth @particle-meshes i)]
+
+      ;; static rotation for blinginess
+      (rotate-angles! m [0 2 0])
+
+      (set-position! m (:pos p)))))
+
 (defn render
   [drawfn]
-  (motion-tick!)
-  (handle-collisions!)
-
-  (doseq [i (range particle-count)]
-    (let [p (nth @particles i)
-          m (nth @particle-meshes i)]
-      ;; static rotation for blinginess
-      (rotate-angles! m [0 2 0])
-
-      (set-position! m (:pos p))))
-
-  (drawfn))
+  (let [updated-particles
+        (-> @particles
+            update-universe
+            handle-collisions)]
+
+    (reset! particles updated-particles)
+
+    (update-graphics-meshes! updated-particles)
+    (drawfn)))

 (defn animate
   [drawfn]


add completed flag to schema

add completed flag to schema

--- src/pc/datomic/schema.clj
+++ src/pc/datomic/schema.clj
@@ -810,6 +810,13 @@
    (attribute :issue/created-at
               :db.type/instant)

+   (attribute :issue/status
+              :db.type/ref
+              :db/index true)
+
+   (enum :issue.status/completed)
+
+
    (attribute :frontend/issue-id
               :db.type/uuid
               :db/unique :db.unique/identity)


variable renaming and logging improvements

--- src/babel/francais/morphology.cljc
+++ src/babel/francais/morphology.cljc
@@ -54,7 +54,7 @@
                                            (get lexicon lex))))))))
                  regular-patterns))]
     (if (not (empty? retval))
-      (log/info (str "analyze '" surface-form "': count=" (count retval) ";" (string/join "," (map strip-refs retval))))
+      (log/debug (str "analyze '" surface-form "': count=" (count retval) ";" (string/join "," (map strip-refs retval))))
       (log/warn (str " analyze: could not analyze surface-form: " surface-form)))
     retval))

@@ -71,27 +71,26 @@
                ;; ..

                ;; (unify) with spec should be last since it is expensive:
-               (not (fail? (unify spec lexeme)))
-
-               (or (log/debug (str " found a unify match:" (strip-refs lexeme))) true)
+               (not (= :fail (unify spec lexeme)))

                (or (log/debug (str "lookup-in: matched: " (strip-refs lexeme))) true)))
             lexemes)))

-(defn conjugate [infinitive unify-with & [lexicon]]
+(defn conjugate [infinitive conjugate-with & [lexicon]]
   "Conjugate an infinitive into a surface form by taking the first
    element of regular-patterns where the element's :u unifies successfully with
-   unify-with. If lexicon is supplied, look up infinitive in lexicon and use exceptional form of
+   conjugate-with. If lexicon is supplied, look up infinitive in lexicon and use exceptional form of
    first return value, if any."
   (if (nil? infinitive)
     (throw (Exception. (str "conjugate passed null infinitive.")))
     (let [diag
-          (log/debug (str "conjugate: infinitive=" infinitive "; unify-with: "
-                          (strip-refs unify-with)))
+          (log/debug (str "conjugate: infinitive=" infinitive "; conjugate-with: "
+                          (strip-refs conjugate-with)))
           exceptional-lexemes
           (lookup-in lexicon
-                     {:spec {:français {:infinitive infinitive
-                                        :exception true}}})
+                     {:spec (unify conjugate-with
+                                   {:français {:infinitive infinitive
+                                               :exception true}})})
           exceptional-surface-forms
           (map #(get-in % [:français :français])
                exceptional-lexemes)
@@ -106,7 +105,7 @@
                                            (:u replace-pattern)
                                            :top)
                            unified (unify unify-against
-                                          unify-with)]
+                                          conjugate-with)]
                        (if (and from to infinitive
                                 (not (= :fail unified))
                                 (re-matches from infinitive))


cleanup

cleanup

--- src/babel/francais/morphology.cljc
+++ src/babel/francais/morphology.cljc
@@ -53,21 +53,18 @@
         lexemes (reduce concat (vals lexicon))]
     (if (fail? spec)
       (throw (Exception. (str "lookup-in was given spec=fail."))))
-    (log/debug (str "lookup-in: spec=" (strip-refs spec)))
     (filter (fn [lexeme]
               (and
                (= infinitive (get-in lexeme [:français :infinitive] ::none))
-               (or (log/debug (str " found an infinitive match:" (strip-refs lexeme))) true)
-
+
                ;; add other (get-in) constraints here, if necessary:
                ;; ..
-
+
                ;; (unify) with spec should be last since it is expensive:
                (not (fail? (unify spec lexeme)))

                (or (log/debug (str " found a unify match:" (strip-refs lexeme))) true)
-
-
+
                (or (log/debug (str "lookup-in: matched: " (strip-refs lexeme))) true)))
             lexemes)))


Refactor

Refactor

--- src/buildviz/analyse/pipelines.clj
+++ src/buildviz/analyse/pipelines.clj
@@ -17,11 +17,13 @@

 (defn- find-pipeline [pipeline-end-build builds]
   (loop [pipeline [pipeline-end-build]]
-    (if (:triggered-by (first pipeline))
-      (if-let [triggering-build (find-build (:triggered-by (first pipeline)) builds)]
-        (recur (cons triggering-build pipeline))
-        pipeline)
-      pipeline)))
+    (let [current-start (first pipeline)]
+      (if (:triggered-by current-start)
+        (if-let [triggering-build (find-build (:triggered-by current-start)
+                                              builds)]
+          (recur (cons triggering-build pipeline))
+          pipeline)
+        pipeline))))

 (defn find-pipelines [builds]
   (let [pipeline-end-builds (filter #(is-pipeline-end? % builds) builds)]


fix conditional

fix conditional

--- src/chat/client/views/threads.cljs
+++ src/chat/client/views/threads.cljs
@@ -83,10 +83,9 @@
                         :onBlur (fn [e] (om/set-state! owner :focused? false)
                                   (dispatch! :mark-thread-read (thread :id)))
                         :onKeyUp (fn [e]
-                                   (when (and (= KeyCodes.X (.-keyCode e))
-                                           (.-ctrlKey e))
                                    (when (or (and (= KeyCodes.X (.-keyCode e))
-                                           (.-ctrlKey e)) (= KeyCodes.ESC (.-keyCode e)))
+                                               (.-ctrlKey e))
+                                             (= KeyCodes.ESC (.-keyCode e)))
                                      (.preventDefault e)
                                      (.stopPropagation e)
                                      (dispatch! :hide-thread {:thread-id (thread :id)})))


CLJS-1115: Reusable repl-bootstrap! fn

CLJS-1115: Reusable repl-bootstrap! fn

lift reusable logic into closure.browser.repl/bootstrap. Handle < IE9.

--- src/cljs/clojure/browser/repl.cljs
+++ src/cljs/clojure/browser/repl.cljs
@@ -111,6 +111,55 @@

 (def load-queue nil)

+(defn bootstrap
+  "Reusable browser REPL bootstrapping. Patches the essential functions
+  in goog.base to support re-loading of namespaces after page load."
+  []
+  ;; Monkey-patch goog.provide if running under optimizations :none - David
+  (when-not js/COMPILED
+    (set! (.-require__ js/goog) js/goog.require)
+    ;; suppress useless Google Closure error about duplicate provides
+    (set! (.-isProvided_ js/goog) (fn [name] false))
+    (set! (.-writeScriptTag__ js/goog)
+      (fn [src opt_sourceText]
+        (let [loaded (atom false)
+              onload (fn []
+                       (when (and load-queue (false? @loaded))
+                         (swap! loaded not)
+                         (if (zero? (alength load-queue))
+                           (set! load-queue nil)
+                           (.apply js/goog.writeScriptTag__ nil (.shift load-queue)))))]
+          (.appendChild js/document.body
+           (as-> (.createElement js/document "script") script
+             (doto script
+               (aset "type" "text/javascript")
+               (aset "onload" onload)
+               (aset "onreadystatechange" onload))
+             (if (nil? opt_sourceText)
+               (doto script (aset "src" src))
+               (doto script (gdom/setTextContext opt_sourceText))))))))
+    (set! (.-writeScriptTag_ js/goog)
+      (fn [src opt_sourceText]
+        (if load-queue
+          (.push load-queue #js [src opt_sourceText])
+          (do
+            (set! load-queue #js [])
+            (js/goog.writeScriptTag__ src opt_sourceText)))))
+    (set! (.-require js/goog)
+      (fn [src reload]
+        (when (= reload "reload-all")
+          (set! (.-cljsReloadAll_ js/goog) true))
+        (let [reload? (or reload (.-cljsReloadAll__ js/goog))]
+          (when reload?
+            (let [path (aget js/goog.dependencies_.nameToPath src)]
+              (js-delete js/goog.dependencies_.visited path)
+              (js-delete js/goog.dependencies_.written
+                (str js/goog.basePath path))))
+          (let [ret (.require__ js/goog src)]
+            (when (= reload "reload-all")
+              (set! (.-cljsReloadAll_ js/goog) false))
+            ret))))))
+
 (defn connect
   "Connects to a REPL server from an HTML document. After the
   connection is made, the REPL will evaluate forms in the context of
@@ -132,45 +181,5 @@
       (fn [iframe]
         (set! (.-display (.-style iframe))
           "none")))
-    ;; Monkey-patch goog.provide if running under optimizations :none - David
-    (when-not js/COMPILED
-      (set! (.-require__ js/goog) js/goog.require)
-      ;; suppress useless Google Closure error about duplicate provides
-      (set! (.-isProvided_ js/goog) (fn [name] false))
-      (set! (.-writeScriptTag__ js/goog)
-        (fn [src opt_sourceText]
-          (.appendChild js/document.body
-            (as-> (.createElement js/document "script") script
-              (doto script
-                (aset "type" "text/javascript")
-                (aset "onload"
-                  (fn []
-                    (when load-queue
-                      (if (zero? (alength load-queue))
-                        (set! load-queue nil)
-                        (.apply js/goog.writeScriptTag__ nil (.shift load-queue)))))))
-              (if (nil? opt_sourceText)
-                (doto script (aset "src" src))
-                (doto script (gdom/setTextContext opt_sourceText)))))))
-      (set! (.-writeScriptTag_ js/goog)
-        (fn [src opt_sourceText]
-          (if load-queue
-            (.push load-queue #js [src opt_sourceText])
-            (do
-              (set! load-queue #js [])
-              (js/goog.writeScriptTag__ src opt_sourceText)))))
-      (set! (.-require js/goog)
-        (fn [src reload]
-          (when (= reload "reload-all")
-            (set! (.-cljsReloadAll_ js/goog) true))
-          (let [reload? (or reload (.-cljsReloadAll__ js/goog))]
-            (when reload?
-              (let [path (aget js/goog.dependencies_.nameToPath src)]
-                (js-delete js/goog.dependencies_.visited path)
-                (js-delete js/goog.dependencies_.written
-                  (str js/goog.basePath path))))
-            (let [ret (.require__ js/goog src)]
-              (when (= reload "reload-all")
-                (set! (.-cljsReloadAll_ js/goog) false))
-              ret)))))
+    (bootstrap)
     repl-connection))


Add web project icon

Add web project icon

--- src/clojure/nightcode/projects.clj
+++ src/clojure/nightcode/projects.clj
@@ -195,13 +195,13 @@
                                :visible? false
                                :columns 20)
           types [[:app "Console" "Clojure"]
-                 [:app-java "Console" "Java"]
                  [:seesaw "Desktop" "Clojure"]
                  [:cljs-kickoff "Web" "ClojureScript"]
                  [:android "Android" "Clojure"]
-                 [:android-java "Android" "Java"]
+                 [:app-java "Console" "Java"]
                  [:simple-game "Simple Game" "Java"]
-                 [:advanced-game "Advanced Game" "Java"]]
+                 [:advanced-game "Advanced Game" "Java"]
+                 [:android-java "Android" "Java"]]
           toggle (fn [e]
                    (s/config! package-name
                               :visible?


Force flush of STDOUT

Force flush of STDOUT

--- src/sparql_to_csv/sparql.clj
+++ src/sparql_to_csv/sparql.clj
@@ -105,7 +105,7 @@
         write-fn (fn [writer] (csv/write-csv writer results :delimiter output-delimiter))]
     ; Don't close the standard output
     (if (= output *out*)
-      (write-fn output)
+      (do (write-fn output) (flush))
       (with-open [writer (io/writer output :append (and append? (util/file-exists? output)))]
         (write-fn writer)))))


Add an endpoint to retrive the list of orgs given a team-id.

--- src/oc/storage/api/orgs.clj
+++ src/oc/storage/api/orgs.clj
@@ -4,7 +4,7 @@
             [clj-time.core :as t]
             [clj-time.format :as f]
             [taoensso.timbre :as timbre]
-            [compojure.core :as compojure :refer (ANY OPTIONS POST DELETE)]
+            [compojure.core :as compojure :refer (ANY OPTIONS GET POST DELETE)]
             [liberator.core :refer (defresource by-method)]
             [schema.core :as schema]
             [oc.lib.time :as lib-time]
@@ -272,6 +272,38 @@
   :handle-unprocessable-entity (fn [ctx]
     (api-common/unprocessable-entity-response (schema/check common-res/Org (:updated-org ctx)))))

+;; A resource to get all orgs give a team id
+(defresource orgs-team [conn team-id]
+  (api-common/open-company-authenticated-resource config/passphrase) ; verify validity of optional JWToken
+
+  :allowed-methods [:options :get]
+
+  ;; Media type client accepts
+  :available-media-types [mt/org-media-type]
+  :handle-not-acceptable (api-common/only-accept 406 mt/org-media-type)
+
+  ;; Media type client sends
+  :known-content-type? (fn [ctx] (api-common/known-content-type? ctx mt/org-media-type))
+
+  ;; Authorization
+  :allowed? true
+
+  :processable? true
+
+  ;; Existentialism
+  :exists? (fn [ctx] (println "DBG orgs-team" team-id )
+                     (if-let* [_slug? (lib-schema/unique-id? team-id)
+                               orgs (org-res/list-orgs-by-team conn team-id [])]
+                        {:existing-orgs (api-common/rep orgs)}
+                        false))
+
+  ;; Responses
+  :handle-ok (fn [ctx] (let [existing-orgs (:existing-orgs ctx)]
+                         (org-rep/render-org-list existing-orgs (:user ctx))))
+
+  :handle-unprocessable-entity (fn [ctx]
+    (api-common/unprocessable-entity-response (schema/check common-res/Org (:updated-org ctx)))))
+
 ;; A resource for the authors of a particular org
 (defresource author [conn org-slug user-id]
   (api-common/open-company-authenticated-resource config/passphrase) ; verify validity and presence of required JWToken
@@ -386,6 +418,9 @@
       ;; Org operations
       (ANY "/orgs/:slug" [slug] (pool/with-pool [conn db-pool] (org conn slug)))
       (ANY "/orgs/:slug/" [slug] (pool/with-pool [conn db-pool] (org conn slug)))
+      ;; Orgs by team
+      (OPTIONS "/orgs-team/:team-id" [team-id] (pool/with-pool [conn db-pool] (println "DBG here OPTIONS team-id" team-id) (orgs-team conn team-id)))
+      (GET "/orgs-team/:team-id" [team-id] (pool/with-pool [conn db-pool] (println "DBG here team-id" team-id) (orgs-team conn team-id)))
       ;; Org author operations
       (OPTIONS "/orgs/:slug/authors" [slug] (pool/with-pool [conn db-pool] (author conn slug nil)))
       (OPTIONS "/orgs/:slug/authors/" [slug] (pool/with-pool [conn db-pool] (author conn slug nil)))


load_all.clj: add test.internal.idserver.client

--- src/org/altlaw/load_all.clj
+++ src/org/altlaw/load_all.clj
@@ -4,6 +4,7 @@

    org.altlaw.test.internal
    org.altlaw.test.internal.idserver.impl
+   org.altlaw.test.internal.idserver.client
    org.altlaw.test.run

    org.altlaw.util.context


:lipstick: Hide Teams tab in user settings

--- frontend/src/uxbox/main/ui/settings/header.cljs
+++ frontend/src/uxbox/main/ui/settings/header.cljs
@@ -51,9 +51,9 @@
       [:a.nav-item
        {:class (when options? "current")
         :on-click #(st/emit! (rt/nav :settings-options))}
-       (t locale "settings.options")]
+       (t locale "settings.options")]]]))

-      [:a.nav-item
-       {:class "foobar"
-        :on-click #(st/emit! (rt/nav :settings-profile))}
-       (t locale "settings.teams")]]]))
+      ;; [:a.nav-item
+      ;;  {:class "foobar"
+      ;;   :on-click #(st/emit! (rt/nav :settings-profile))}
+      ;;  (t locale "settings.teams")]]]))


Adding DIF10 to metadata format mappings stored in DB.

--- metadata-db-app/src/cmr/metadata_db/data/oracle/concepts.clj
+++ metadata-db-app/src/cmr/metadata_db/data/oracle/concepts.clj
@@ -40,7 +40,8 @@
   {"application/echo10+xml" "ECHO10"
    "application/iso:smap+xml" "ISO_SMAP"
    "application/iso19115+xml" "ISO19115"
-   "application/dif+xml" "DIF"})
+   "application/dif+xml" "DIF"
+   "application/dif10+xml" "DIF10"})

 (def db-format->mime-type
   "A mapping of the format strings stored in the database to the equivalent mime type in concepts"


Changed alength to count to be more idiomatic

--- test/clj/puppetlabs/trapperkeeper/services/webserver/jetty9_core_test.clj
+++ test/clj/puppetlabs/trapperkeeper/services/webserver/jetty9_core_test.clj
@@ -15,7 +15,7 @@
                               (fn [req] {:status 200
                                          :body "I am a handler"})
                               "/")
-      (is (= (alength (.getHandlers handlers)) 1)))))
+      (is (= (count (.getHandlers handlers)) 1)))))

 (deftest compression
   (testing "should return"


Change to render properly into root

Change to render properly into root

--- AwesomeProject/ClojureScript/awesome-project/src/awesome_project/core.cljs
+++ AwesomeProject/ClojureScript/awesome-project/src/awesome_project/core.cljs
@@ -99,6 +99,4 @@
 (defn root[]
   [navigator {:initial-route {:title "App4" :component page-comp} :style (styles "fullscreen")}])

-(.registerRunnable (.-AppRegistry js/React) "AwesomeProject"
-                   (fn [params]
-                     (r/render [root] (.-rootTag params))))
+(r/render [root] 1)


ignore flaky tests (#1430)

ignore flaky tests (#1430)

--- cimi/test/com/sixsq/slipstream/auth/external_test.clj
+++ cimi/test/com/sixsq/slipstream/auth/external_test.clj
@@ -71,7 +71,11 @@
     (is (= (assoc user :cyclonelogin "st")
            (dissoc (first (db/get-all-users)) :updated)))))

-(deftest match-existing-deleted-user
+;;
+;; ignore this test because it fails intermittently
+;; probably an explicit refresh of the ES index is required
+;;
+#_(deftest match-existing-deleted-user
   (th/add-user-for-test! {:username     "st"
                           :password     "secret"
                           :emailAddress "st@sixsq.com"


Use AbstractTableModel for all tables.

Use AbstractTableModel for all tables.

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

--- acqEngine/src/org/micromanager/config_editor.clj
+++ acqEngine/src/org/micromanager/config_editor.clj
@@ -1,13 +1,22 @@
 (ns org.micromanager.config-editor
-  (:import [javax.swing DefaultListModel JFrame JList JPanel JTable
+  (:import [javax.swing DefaultListModel JFrame JList JPanel JTable DefaultListSelectionModel
                         JScrollPane JViewport ListSelectionModel SpringLayout]
            [javax.swing.event CellEditorListener ListSelectionListener]
            [javax.swing.table AbstractTableModel]
            [java.awt Color Dimension])
   (:use [org.micromanager.mm :only [load-mm gui core edt get-config]]))

+(def widgets (atom nil))
+
 (declare update-presets-table)
-
+(declare update-groups-table)
+
+
+(defn get-selected-group []
+  (let [row (.getSelectedRow (@widgets :groups-table))]
+    (when (pos? row)
+      (nth @groups row))))
+

 ;; editing groups

@@ -83,18 +92,28 @@

 (load-mm)

-(def groups (atom nil))
-
-(defn update-groups []
-  (reset! groups (seq (core getAvailableConfigGroups)))
-  (.refreshGUI gui))

 (defn presets [group]
   (when-not (empty? group)
     (sort (seq (core getAvailableConfigs group)))))

-(defn group-data [group]
-  (into (sorted-map) (map #(vector % (get-config group %)) (presets group))))
+(def group-data (atom nil))
+
+(defn update-tables []
+  (doall (map #(.. % getModel fireTableDataChanged) (vals @widgets))))
+
+(defn update-group-data []
+    (reset! group-data
+            (when-let [group (get-selected-group)]
+              (into (sorted-map)
+                    (map #(vector % (get-config group %))
+                         (presets group))))))
+
+(def groups (atom nil))
+
+(defn update-groups []
+  (reset! groups (seq (core getAvailableConfigGroups)))
+  (update-group-data))

 (defn properties [group-data]
   (sort (set (apply concat (map keys (vals group-data))))))
@@ -102,31 +121,6 @@
 (defn property-name [prop-vec]
   (let [[dev prop] prop-vec]
     (str dev "-" prop)))
-
-(defn transpose [elements]
-  (apply map list elements))
-
-(defn table-data [group-data]
-  (transpose
-         (for [property (properties group-data)]
-           (for [preset (keys group-data)]
-             (get-in group-data [preset property] "")))))
-
-(defn into-1d-array
-  ([data]
-    (into-array data))
-  ([type data]
-    (if-not (empty? data)
-      (into-array data)
-      (make-array type 0))))
-
-(defn into-2d-array
-  ([data]
-    (into-array (map into-array data)))
-  ([type data]
-    (if-not (empty? data)
-      (into-array (map #(into-array type %) data))
-      (make-array type 0 0))))

 (defn table []
   (let [table (JTable.)]
@@ -164,7 +158,7 @@
         (reify CellEditorListener
           (editingStopped [this e]
             (handle-group-text-changed e))))))
-
+
 (defn group-table-model []
   (proxy [AbstractTableModel] []
     (getColumnName [_] "Groups")
@@ -177,6 +171,39 @@
         (core renameConfigGroup old-val val)
         (update-groups)))))

+(defn preset-names-table-model []
+  (proxy [AbstractTableModel] []
+    (getColumnName [_] "")
+    (getColumnCount [] 1)
+    (getRowCount [] (count (keys @group-data)))
+    (isCellEditable [_ _] true)
+    (getValueAt [row column] (nth (keys @group-data) row))
+    (setValueAt [val row column]
+      (let [old-val (.getValueAt this row column)]
+        (core renameConfig (get-selected-group) old-val val)
+        (update-group-data)))))
+
+(defn presets-table-model []
+  (proxy [AbstractTableModel] []
+    (getColumnName [column] (property-name (nth (properties @group-data) column)))
+    (getColumnCount [] (count (properties @group-data)))
+    (getRowCount [] (count (keys @group-data)))
+    (isCellEditable [_ _] true)
+    (getValueAt [row column] (get (nth (vals @group-data) row)
+                                  (nth (properties @group-data) column)))
+    (setValueAt [val row column]
+      (let [old-val (.getValueAt this row column)]
+        (core renameConfig (get-selected-group) old-val val)
+        (update-group-data)))))
+
+(defn link-table-row-selection [table-src table-dest]
+  (let [model (proxy [DefaultListSelectionModel] [])]
+    (.setListSelectionModel table-src model)
+    (.setListSelectionModel table-dest model)))
+
+(defn require-single-selection [table]
+  (.. table getSelectionModel (setSelectionMode ListSelectionModel/SINGLE_SELECTION)))
+
 (defn show []
   (let [f (JFrame. "Micro-Manager Configuration Preset Editor")
         cp (.getContentPane f)
@@ -188,7 +215,7 @@
         ]
     (edt
       (.setAutoResizeMode presets-table JTable/AUTO_RESIZE_OFF)
-      (.. groups-table getSelectionModel (setSelectionMode ListSelectionModel/SINGLE_SELECTION))
+      (doall (map require-single-selection [groups-table presets-table preset-names-table]))
       (.. presets-table getTableHeader (setReorderingAllowed false))
       (.setRowHeaderView presets-sp preset-names-table)
       (.. preset-names-table getParent (setPreferredSize (Dimension. 150 100)))
@@ -196,6 +223,10 @@
       ;(.setFixedCellHeight preset-names-list (.getRowHeight presets-table))
       (.setBackground preset-names-table (Color. 0xE0 0xE0 0xE0))
       (.setModel groups-table (group-table-model))
+      (.setModel preset-names-table (preset-names-table-model))
+      (.setModel presets-table (presets-table-model))
+      ;(link-table-row-selection presets-table preset-names-table)
+      (.setAutoResizeMode presets-table JTable/AUTO_RESIZE_OFF)
       (doto cp
         (.setLayout (SpringLayout.))
         (add-component presets-sp :n 5 :w 155 :s -5 :e -5)
@@ -206,32 +237,18 @@
      :presets-table presets-table
      :preset-names-table preset-names-table}))

-(defn set-table-data [table body header]
-  (.setDataVector
-    (.getModel table)
-    (into-2d-array String body)
-    (into-1d-array String header)))
-
-(defn update-presets-table [components group]
-  (let [preset-names-table (components :preset-names-table)
-        presets-table (components :presets-table)
-        group-data (group-data group)
-        body (table-data group-data)
-        header (map list (keys group-data))
-        prop-names (map property-name (properties group-data))]
-    (edt (set-table-data presets-table body prop-names)
-         (when-let [column-objects (.getColumns (.getColumnModel presets-table))]
-           (doseq [column (enumeration-seq column-objects)]
-             (.setPreferredWidth column 120)))
-         (set-table-data preset-names-table header (list ""))
-         (.. preset-names-table getColumnModel (getColumn 0) (setMaxWidth 150)))))
+(defn set-preferred-column-width [table]
+  (->> table
+       .getColumnModel .getColumns enumeration-seq
+       (map #(.setPreferredWidth % 125)) dorun))

 (defn activate-groups-table [components]
   (attach-selection-listener
     (components :groups-table)
-    #(update-presets-table components
-                           (try (.getValueAt (components :groups-table) % 0)
-                                (catch Exception _ nil)))))
+    (fn [_] (update-group-data)
+         (.fireTableDataChanged (.getModel (components :preset-names-table)))
+         (.fireTableStructureChanged (.getModel (components :presets-table)))
+         (set-preferred-column-width (components :presets-table)))))

 ;; test/run
@@ -240,7 +257,6 @@
   ([]
     (start nil))
   ([group]
-    (let [components (show)]
-      (update-groups)
-      (activate-groups-table components)
-      components)))
+    (reset! widgets (show))
+    (update-groups)
+    (activate-groups-table @widgets)))


♻ Print the stack trace if no UncaughtExceptionHandler is set

Why:
- The UncaughtExceptionHandler should ways be there, but this makes
  sure that no bug will go unnoticed.

--- src/territory_bro/poller.clj
+++ src/territory_bro/poller.clj
@@ -36,8 +36,9 @@
       (.interrupt (Thread/currentThread)))
     (catch Throwable e
       (let [t (Thread/currentThread)]
-        (when-let [handler (.getUncaughtExceptionHandler t)]
-          (.uncaughtException handler t e))))))
+        (if-let [handler (.getUncaughtExceptionHandler t)]
+          (.uncaughtException handler t e)
+          (.printStackTrace e))))))

 (defrecord AsyncPoller [^Queue available-tasks
                         ^ExecutorService executor]


Error message: dependency 'of' component, not 'in'

--- src/com/stuartsierra/component.clj
+++ src/com/stuartsierra/component.clj
@@ -80,7 +80,7 @@
   (let [dependency (get system system-key)]
     (when-not dependency
       (throw (ex-info (str "Missing dependency " dependency-key
-                           " in " (.getName (class component))
+                           " of " (.getName (class component))
                            " expected in system at " system-key)
                       {:reason ::missing-dependency
                        :system-key system-key


Add no-op implementation of Lifecycle on Object

--- src/com/stuartsierra/component.clj
+++ src/com/stuartsierra/component.clj
@@ -10,6 +10,14 @@
     "Ceases operation of this component. Synchronous, does not return
   until the component is stopped. Returns an updated version of this
   component."))
+
+;; No-op implementation if one is not defined.
+(extend-protocol Lifecycle
+  java.lang.Object
+  (start [this]
+    this)
+  (stop [this]
+    this))

 (defn dependencies
   "Returns the map of other components on which this component depends."


Changed timing for adding watched files

Changed timing for adding watched files

--- src/video_server/watcher.clj
+++ src/video_server/watcher.clj
@@ -18,8 +18,8 @@
             [video-server.process :refer [process-file]]
             [video-server.video :refer [modified]]))

-(def ^:const stable-time 30000)
-(def ^:const check-time 15000)
+(def ^:const stable-time 60000)
+(def ^:const check-time 10000)

 ;; Set of changing files
 (defonce pending-files (ref #{}))
@@ -40,7 +40,8 @@
   [file]
   (and (.isFile file)
        (pos? (.length file))
-       (< (.lastModified file) (- (System/currentTimeMillis) stable-time))))
+       (or (image? file)
+           (< (.lastModified file) (- (System/currentTimeMillis) stable-time)))))

 (defn add-metadata
   "Reads existing metadata for the given video."
@@ -67,7 +68,7 @@
   [folder]
   (let [files (.listFiles (:file folder) (movie-filter))]
     (doseq [file (filter stable? files)]
-      (log/info "adding file" (str file))
+      (log/info "adding video" (str file))
       (library/add-video folder file))
     (doseq [video (sort-by modified (current-videos))]
       (add-metadata folder video)


Use proper umm-library to parse given metadata

--- search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj
+++ search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj
@@ -11,7 +11,7 @@
    [cmr.search.data.metadata-retrieval.revision-format-map :as rfm]
    [cmr.search.services.humanizers.humanizer-service :as hs]
    [cmr.umm-spec.legacy :as umm-legacy]
-   [cmr.umm.umm-core :as umm-core])
+   [cmr.umm-spec.umm-spec-core :as umm-spec-core])
   (:import java.io.StringWriter))

 (def CSV_HEADER
@@ -25,7 +25,7 @@
   "Takes a revision format map and parses it into a UMM-spec record."
   [revision-format-map]
   (let [concept-id (:concept-id revision-format-map)
-        umm (umm-core/parse-concept
+        umm (umm-spec-core/parse-metadata
               (rfm/revision-format-map->concept :native revision-format-map))]
     (assoc umm
            :concept-id concept-id


Add :gen-class for main, removing one of two bugs preventing `lein uberjar` from working.

The other is that midje requires :skip-aot, which of course prevents jars from being properly generated.

--- backend/src/circle/init.clj
+++ backend/src/circle/init.clj
@@ -7,6 +7,7 @@
   ;; (:require circle.backend.nodes
   ;;           circle.backend.project.rails
   ;;           circle.backend.project.circle)
+  (:gen-class :main true)
   )

 (def init*


Extract people-desk as a separate component

--- frontend/src/faceboard/views/boards/people.cljs
+++ frontend/src/faceboard/views/boards/people.cljs
@@ -322,7 +322,7 @@
                     (build-socials-filter-predicate active-filters)]]
     (remove nil? predicates)))

-(defcomponent people-component [data _ _]
+(defcomponent people-desk-component [data _ _]
   (render [_]
     (let [{:keys [ui anims]} data
           people (get-in data [:content :people])
@@ -340,14 +340,18 @@
                                                     :filtered? (not (every? true? (map #(% person) filter-predicates)))))
                                              sorted-people)
           sorted-people-ordered-by-filter (sort-by :filtered? sorted-people-with-filter-status)]
-      (dom/div {:class "no-select"}
-        (om/build filters-component data)
-        (dom/div {:class "people-desk clearfix"}
-          (for [item sorted-people-ordered-by-filter]
-            (let [person (:person item)
-                  person-id (:id person)
-                  data {:person    person
-                        :extended? (contains? extended-set person-id)
-                        :filtered? (:filtered? item)
-                        :anim      (:person anims)}]
-              (om/build person-component data {:react-key person-id}))))))))+      (dom/div {:class "people-desk clearfix"}
+        (for [item sorted-people-ordered-by-filter]
+          (let [person (:person item)
+                person-id (:id person)
+                data {:person    person
+                      :extended? (contains? extended-set person-id)
+                      :filtered? (:filtered? item)
+                      :anim      (:person anims)}]
+            (om/build person-component data {:react-key person-id})))))))
+
+(defcomponent people-component [data _ _]
+  (render [_]
+    (dom/div {:class "no-select"}
+      (om/build filters-component data)
+      (om/build people-desk-component data))))


duplicated require

duplicated require

--- src/proxmox/provider.clj
+++ src/proxmox/provider.clj
@@ -13,7 +13,6 @@
   (:use
     [clojure.core.strint :only (<<)]
     [celestial.core :only (Vm)]
-    [supernal.sshj :only (execute)]
     [proxmox.remote :only (prox-post prox-delete prox-get)]
     [slingshot.slingshot :only  [throw+ try+]]
     [clojure.set :only (difference)]


Little debug message

Little debug message

--- src/polismath/stormspec.clj
+++ src/polismath/stormspec.clj
@@ -119,6 +119,7 @@

 (defn -main [& args]
   (let [{:keys [options arguments errors summary]} (parse-opts args cli-options)]
+    (println "Submitting storm topology")
     (cond
       (:help options)   (exit 0 (usage summary))
       (:errors options) (exit 1 (str "Found the following errors:" \newline (:errors options)))


Re-add the deleted call to nextBytes

Re-add the deleted call to nextBytes

--- diceware-clj/src/diceware/secure_rand.clj
+++ diceware-clj/src/diceware/secure_rand.clj
@@ -12,12 +12,14 @@
   "Try to create an appropriate SecureRandom.
    http://www.cigital.com/justice-league-blog/2009/08/14/proper-use-of-javas-securerandom/ "
   []
-  (try
-    (try (SecureRandom/getInstance "SHA1PRNG" "SUN")
-         (catch NoSuchProviderException _
-           (SecureRandom/getInstance "SHA1PRNG")))
-    (catch NoSuchAlgorithmException _
-      (SecureRandom.))))
+  (doto
+    (try
+      (try (SecureRandom/getInstance "SHA1PRNG" "SUN")
+           (catch NoSuchProviderException _
+             (SecureRandom/getInstance "SHA1PRNG")))
+      (catch NoSuchAlgorithmException _
+        (SecureRandom.)))
+    (.nextBytes (byte-array 16))))

 (defonce ^ThreadLocal ^:private threadlocal-random
   (proxy [ThreadLocal]


Add long-to-iso date utility

Add long-to-iso date utility

--- src/runbld/util/date.clj
+++ src/runbld/util/date.clj
@@ -37,3 +37,7 @@
   ([judate]
    (str
     (c/from-date judate))))
+
+(defn long-to-iso [num]
+  (str
+   (c/from-long num)))


Updated date

Updated date

--- scrape-n-mail/src/main/scrape_n_mail/core.cljs
+++ scrape-n-mail/src/main/scrape_n_mail/core.cljs
@@ -94,8 +94,8 @@
       [:br]
       [:p "Dear " (first-name (::submitter-name (first name-records))) ","]

-      [:p "Our general call for names for Wellbeing for July 2020 has gone out to the newDharma mailing list."
-          " newDharma currently meets remotely over Zoom - so we especially encourage you to join us on the first Tuesday of July, the 7th, as we place new names on the altar."]
+      [:p "Our general call for names for Wellbeing for August 2020 has gone out to the newDharma mailing list."
+          " newDharma currently meets remotely over Zoom - so we especially encourage you to join us on the first Tuesday of August, the 4th, as we place new names on the altar."]

       [:p "Currently, the community is holding the following names on the altar "
           "in support of their wellbeing at your request. Click "


Remove duplicate update to completed

Remove duplicate update to completed

--- jar-async/src/slipstream/async/launcher.clj
+++ jar-async/src/slipstream/async/launcher.clj
@@ -67,7 +67,6 @@
           (if (nil? v)
             (log-info "Reader " i " loop idle. Looping...")
             (do
-              (swap! completed inc)
               (launch! (first v) (second v)))))))))

 (defonce ^:dynamic *launch-processor* (launch-readers))


rdf:Property not rdfs:Property!

rdf:Property not rdfs:Property!

--- src/grafter/rdf/ontologies/rdf.clj
+++ src/grafter/rdf/ontologies/rdf.clj
@@ -6,7 +6,7 @@

 (def rdf:a (rdf "type"))

-(def rdf:Property (rdfs "Property"))
+(def rdf:Property (rdf "Property"))
 (def rdfs:subPropertyOf (rdfs "subPropertyOf"))

 (def rdfs:Class (rdfs "Class"))


Add function to get registered canvas from core

--- src/retro_fever/core.cljs
+++ src/retro_fever/core.cljs
@@ -6,18 +6,22 @@
             [retro-fever.stats :as stats]
             [retro-fever.scene :as scene]))

-                                        ; Atom for holding engine specific values
+; Atom for holding engine specific values
 (def app (atom {:game {:canvas nil :loop nil}}))

 (defn init-canvas [id width height]
-  "Initialize the game canvas to the canvas with given the id
+  "Initialize the game canvas to the canvas with the given id
 and set width and height"
   (let [canvas (.getElementById js/document (name id))]
     (set! (.-width canvas) width)
     (set! (.-height canvas) height)
-    (swap! app assoc-in [:game :canvas] {:context (.getContext canvas "2d")
+    (swap! app assoc-in [:game :canvas] {:element canvas
+                                         :context (.getContext canvas "2d")
                                          :width width
                                          :height height})))
+
+(defn get-canvas []
+  (get-in @app [:game :canvas :element]))

 (defn- update-loop [tick-interval update-fn]
   "Internal function to create the update loop logic"


Invoke web/stop at-exit so that any :destroy is called [IMMUTANT-226]

--- modules/web/src/main/clojure/immutant/web.clj
+++ modules/web/src/main/clojure/immutant/web.clj
@@ -26,6 +26,8 @@
             [ring.util.response :as response])
   (:use [immutant.web.internal :exclude [current-servlet-request]])
   (:import javax.servlet.http.HttpServletRequest))
+
+(declare stop)

 (defn ^HttpServletRequest current-servlet-request
   "Returns the currently active HttpServletRequest. This will only
@@ -74,8 +76,8 @@
              :sub-context sub-context-path
              :handler handler
              :destroy destroy})
-           (and init (init))
-           ))
+           (util/at-exit #(stop sub-context-path))
+           (and init (init))))
        nil)
      (log/warn "web/start called outside of Immutant, ignoring"))))


test refresh

test refresh

--- stow/lein/.lein/profiles.clj
+++ stow/lein/.lein/profiles.clj
@@ -3,7 +3,8 @@

         :plugins        [[lein-ancient "0.6.15"]
                          [lein-pprint "1.2.0"]
-                         [venantius/ultra "0.6.0"]]}
+                         [venantius/ultra "0.6.0"]
+                         [com.jakemccrary/lein-test-refresh "0.24.1"]]}

  :repl {:dependencies [[org.clojure/tools.namespace "0.3.1"]
                        [cljfmt "0.6.4"]


Added more complex easing to example.

Added more complex easing to example.

--- test/freactive/dom_perf.cljs
+++ test/freactive/dom_perf.cljs
@@ -77,15 +77,16 @@
    {:width "100%" :height "100%"
      :style {:position "absolute" :left 0 :top "1em"}}
    (circle mouse-x mouse-y)
-    (let [easer (animation/easer 0.0)]
+    (let [ease-x (animation/easer 0.0)
+          ease-y (animation/easer 0.0)]
       (debug-rx
         (rx (let [n* @n
                   spacer (partial spacing-factor n*)
                   offsets (map spacer (range n*))
-                  lefts (vec (for [x offsets] (rx (* x @mouse-x @easer))))
-                  rights (vec (for [x (reverse offsets)] (rx (let [w @width] (- w (* x (- w @mouse-x) @easer))))))
-                  tops (vec (for [y offsets] (rx (* y @mouse-y @easer))))
-                  bottoms (vec (for [y (reverse offsets)] (rx (let [h @height] (- h (* y (- h @mouse-y) @easer))))))]
+                  lefts (vec (for [x offsets] (rx (* x @mouse-x @ease-x))))
+                  rights (vec (for [x (reverse offsets)] (rx (let [w @width] (- w (* x (- w @mouse-x) @ease-x))))))
+                  tops (vec (for [y offsets] (rx (* y @mouse-y @ease-y))))
+                  bottoms (vec (for [y (reverse offsets)] (rx (let [h @height] (- h (* y (- h @mouse-y) @ease-y))))))]
               (dom/with-transitions
                 [:svg/g
                  (for [i (range n*)] (circle (nth lefts i) mouse-y))
@@ -97,11 +98,13 @@
                  (for [i (range n*) j (range n*)] (circle (nth rights i) (nth tops j)))
                  (for [i (range n*) j (range n*)] (circle (nth rights i) (nth bottoms j)))]
                 {:on-show (fn [x cb]
-                            (println "showing")
-                            (animation/start-easer! easer 0.0 1.0 1000 animation/quad-in-out cb))
+                            ;(println "showing")
+                            (animation/start-easer! ease-x 0.0 1.0 1000 animation/quad-in-out cb)
+                            (animation/start-easer! ease-y 0.0 1.0 1000 animation/quad-in cb))
                  :on-hide (fn [x cb]
-                            (println "hiding")
-                            (animation/start-easer! easer 1.0 0.0 1000 animation/quad-in-out cb))})))
+                            ;(println "hiding")
+                            (animation/start-easer! ease-x 1.0 0.0 1000 animation/quad-out cb)
+                            (animation/start-easer! ease-y 1.0 0.0 1000 animation/quad-in cb))})))
         (fn [x]                                             ;;(println "captured" x)
           )
         (fn []                                              ;;(println "invalidated")


[#102] Fix StringReader type

[#102] Fix StringReader type

--- priv/clojure/main.clj
+++ priv/clojure/main.clj
@@ -270,7 +270,7 @@
   "Evals expressions in str, prints each non-nil result using prn"
   [str]
   (let [eof (erlang/make_ref.e)
-        reader (new clojerl.StringReader str)]
+        reader (new erlang.io.StringReader str)]
       (loop [input (with-read-known (read reader false eof))]
         (when-not (= input eof)
           (let [value (eval input)]


Adjust y label precision to avoid ambiguity

--- metlog-vault/src-client/metlog_client/tsplot.cljs
+++ metlog-vault/src-client/metlog_client/tsplot.cljs
@@ -76,7 +76,7 @@
    {:line-width 0
     :stroke-style "#0000FF"
     :line-dash #js [ ]}
-
+
    :frame
    {:line-width 1
     :stroke-style "#000000"
@@ -167,16 +167,16 @@
         [val suffix precision]
         (cond
           (>= mag 1000000000)
-          [(/ val 1000000000) "G" 0]
+          [(/ val 1000000000) "G" 1]

           (>= mag 1000000)
-          [(/ val 1000000) "M" 0]
+          [(/ val 1000000) "M" 1]

           (>= mag 1000)
-          [(/ val 1000) "K" 0]
+          [(/ val 1000) "K" 1]

           :else
-          [val "" 2])]
+          [val "" 1])]
     (str (.toFixed val precision) suffix)))

 (defn largest-y-range-magnitude [ y-range ]
@@ -197,7 +197,7 @@
 (defn set-stroke-style [ ctx style-name ]
   (if-let [ style (get stroke-styles style-name false) ]
     (do
-      (aset ctx "lineWidth" (:line-width style))
+      (aset ctx "lineWidth" (:line-width style))
       (aset ctx "strokeStyle" (:stroke-style style))
       (.setLineDash ctx (:line-dash style)))
     (.error js/console "Unknown stroke style:" (pr-str style-name))))
@@ -266,7 +266,7 @@
                 (draw-x-grid ctx w h x-range)
                 (with-preserved-ctx ctx
                   (clip-rect ctx 0 0 w h)
-                  (draw-series-line ctx data x-range y-range w h)))))))
+                  (draw-series-line ctx data x-range y-range w h)))))))

 (defn draw-series-background [ ctx w h ]
   (with-preserved-ctx ctx
@@ -287,4 +287,3 @@
       (draw-series-background ctx w h)
       (draw-series ctx w h data {:min begin-t :max end-t})
       (draw-frame ctx w h))))
-


Only show osx/linux tabs if osx is enabled for that org.

--- src-cljs/frontend/components/add_projects.cljs
+++ src-cljs/frontend/components/add_projects.cljs
@@ -283,13 +283,14 @@
         (html
           [:div.proj-wrapper
            [:div.tabbed-wrapper
-            [:ul.nav.nav-tabs
-             [:li {:class (when (= selected-tab :linux) "active")}
-              [:a {:on-click #(om/set-state! owner [:selected-tab] :linux)}
-               [:i.fa.fa-linux.fa-lg] "Linux"]]
-             [:li {:class (when (= selected-tab :osx) "active")}
-              [:a {:on-click #(om/set-state! owner [:selected-tab] :osx)}
-               [:i.fa.fa-apple.fa-lg] " iOS"]]]
+            (when osx-enabled?
+              [:ul.nav.nav-tabs
+               [:li {:class (when (= selected-tab :linux) "active")}
+                [:a {:on-click #(om/set-state! owner [:selected-tab] :linux)}
+                 [:i.fa.fa-linux.fa-lg] "Linux"]]
+               [:li {:class (when (= selected-tab :osx) "active")}
+                [:a {:on-click #(om/set-state! owner [:selected-tab] :osx)}
+                 [:i.fa.fa-apple.fa-lg] " iOS"]]])
             (if selected-org-login
               (let [;; we display a repo if it belongs to this org, matches the filter string,
                     ;; and matches the fork settings.
@@ -510,6 +511,7 @@
        (om/build repo-lists {:user user
                              :repos repos
                              :selected-org selected-org
+                             :osx-enabled? (get-in data state/org-osx-beta-path)
                              :settings settings})
        [:hr]
        ;; This is a chain to get the organization that the user has clicked on and whether or not to show a payment plan upsell.


use new github repos-loading path

use new github repos-loading path

--- src-cljs/frontend/components/add_projects.cljs
+++ src-cljs/frontend/components/add_projects.cljs
@@ -101,7 +101,7 @@
                           (let [org-names (->> user :organizations (cons user) (map :login) set)
                                 in-orgs? (comp org-names :login)]
                             (->> repos (map :owner) (remove in-orgs?) (set))))))]
-           (when (:github-repos-loading user)
+           (when (get-in user [:repos-loading :github])
              [:div.orgs-loading
               [:div.loading-spinner common/spinner]])
            (missing-org-info owner)]])))))


CMR-1712: Added handling of multiple small provider tables during migration.

--- metadata-db-app/src/config/mdb_migrate_helper.clj
+++ metadata-db-app/src/config/mdb_migrate_helper.clj
@@ -32,13 +32,13 @@
   "Gets a list of all the collection tablenames. Primarily for enabling migrations of existing
   provider tables."
   []
-  (map #(concept-tables/get-table-name % :collection) (p/get-providers (config/db))))
+  (distinct (map #(concept-tables/get-table-name % :collection) (p/get-providers (config/db)))))

 (defn get-granule-tablenames
   "Gets a list of all the granule tablenames. Primarily for enabling migrations of existing
   provider tables."
   []
-  (map #(concept-tables/get-table-name % :granule) (p/get-providers (config/db))))
+  (distinct (map #(concept-tables/get-table-name % :granule) (p/get-providers (config/db)))))

 (defn concept-id-seq-missing?
   "Returns true if concept_id_seq does not exist"


using a more functional style to de-clutter the implementation of fake?

--- src/midje/internal_ideas/fakes.clj
+++ src/midje/internal_ideas/fakes.clj
@@ -30,12 +30,8 @@
   (:midje/faked-function (meta function)))

 (defn fake? [form]
-  (letfn [(function-fake? [form]
-            (first-named? form "fake"))
-          (data-fake? [form]
-            (first-named? form "data-fake"))]
-    (or (function-fake? form)
-      (data-fake? form))))
+  (some true? (map (partial first-named? form)
+                   ["fake" "data-fake"])))

 (defn- fake-form-funcall [[fake funcall => value & overrides]]
   funcall)


Remove ^:figwheel-always metadata from core.

--- src/wrongtangular/core.cljs
+++ src/wrongtangular/core.cljs
@@ -1,4 +1,4 @@
-(ns ^:figwheel-always wrongtangular.core
+(ns wrongtangular.core
   (:require [wrongtangular.data :as data]
             [wrongtangular.views :as views]
             [cljs.core.async :refer [>! <! chan put!] :as async]


Fix Add Projects for Bitbucket orgs

Fix Add Projects for Bitbucket orgs

The org map now contains a :vcs_type, not a :vcs-type.

--- src-cljs/frontend/components/add_projects.cljs
+++ src-cljs/frontend/components/add_projects.cljs
@@ -244,7 +244,7 @@
     om/IRenderState
     (render-state [_ {:keys [selected-tab-name]}]
       (let [selected-org-login (:login selected-org)
-            loading-repos? (get-in user [:repos-loading (keyword (:vcs-type selected-org))])
+            loading-repos? (get-in user [:repos-loading (keyword (:vcs_type selected-org))])
             repo-filter-string (get-in settings [:add-projects :repo-filter-string])
             show-forks (true? (get-in settings [:add-projects :show-forks]))]
         (html
@@ -266,7 +266,7 @@
                    display? (fn [repo]
                               (and
                                (or show-forks (not (:fork repo)))
-                               (select-vcs-type (or (:vcs-type selected-org)
+                               (select-vcs-type (or (:vcs_type selected-org)
                                                     "github") repo)
                                (= (:username repo) selected-org-login)
                                (gstring/caseInsensitiveContains (:name repo) repo-filter-string)))


Kill limited release notice

Kill limited release notice

--- src-cljs/frontend/components/org_settings.cljs
+++ src-cljs/frontend/components/org_settings.cljs
@@ -482,42 +482,6 @@
                 :on-click new-plan-fn}
                plan-img])))))))

-(defn limited-release-notice [plan owner]
-  (reify
-    om/IRender
-    (render [_]
-      (let [plan-migrations {"Starter" "Seed"
-                             "Standard" "Startup"
-                             "Growth" "Growth"}
-            current-plan-name (some-> plan
-                                      (pm/osx-plan-id)
-                                      (name)
-                                      (clojure.string/split "-")
-                                      (last)
-                                      (clojure.string/capitalize))]
-        (html
-          [:div {:data-component `limited-release-notice}
-           [:div.icon (om/build svg {:src (common/icon-path "Info-Warning")})]
-           [:div.message
-            [:span "CircleCI for OS X is now in General Release!
-                    Limited Release plans will be discontinued on March 31st and
-                    all organizations that have not switched to a new plan will be
-                    converted to the corresponding General Release plan. Please
-                    reach out to "]
-            [:a {:href "mailto:billing@circleci.com"} "billing@circleci.com"]
-            [:span " with any questions or concerns."]
-            (if-let [new-plan (get plan-migrations current-plan-name)]
-              [:div.your-plan
-               [:span "You are currently on '"]
-               [:span.plan-name "Limited Release " current-plan-name  " ($" (pm/osx-cost plan) "/mo)" ]
-               [:span "' and will be moved to '"]
-               [:span.plan-name "General Release " (get plan-migrations current-plan-name)]
-               [:span "' on March 31st."]]
-              [:div.your-plan
-               [:span "You're currently on a '"]
-               [:span.plan-name "Limited Release Custom Plan"]
-               [:span "'. Please contact your account manager for details."]])]])))))
-
 (defn osx-plans-list-ga [plan owner]
   (reify
     om/IRender
@@ -531,8 +495,7 @@
             [:legend (str "OS X Plans")]
             (when (and (pm/osx? plan)
                        (not (pm/osx-trial-plan? plan))
-                       (not (pm/osx-ga-plan? plan)))
-              (om/build limited-release-notice plan))
+                       (not (pm/osx-ga-plan? plan))))
             [:p "Your selection below only applies to OS X service and will not affect Linux Containers."]
             (when (and (pm/osx-trial-plan? plan) (not (pm/osx-trial-active? plan)))
               [:p "The OS X trial you've selected has expired, please choose a plan below."])


Annotated final solution.

Annotated final solution.

--- src/clojure_club/x106_number_maze/mbastian.clj
+++ src/clojure_club/x106_number_maze/mbastian.clj
@@ -57,4 +57,36 @@
 (time (fast-number-paths 7 43))
 (time (fast-number-paths 9 2))
 (time (fast-number-paths 2 9))
-(time (fast-number-paths 2 4))+(time (fast-number-paths 2 4))
+
+;The below code deconstructs the above function to demonstrate how easy it is to assemble/dissassemble and debug Clojure
+;forms.
+
+;How the front grows
+(defn nbrs[x] (cond-> [['* (* 2 x)] ['+ (+ x 2)]] (even? x) (conj ['/ (/ x 2)])))
+
+;One generation/step of growth - Must be self-similar for iteration
+(defn expand [{:keys [paths visited]}]
+  (let [p (for [path paths n (remove (comp visited second) (nbrs (peek path)))] (into path n))]
+    {:paths p :visited (into visited (map peek p))}))
+
+;Lazy sequence that expands all paths.
+; Note that iterate vs. loop-recur separates concerns of iteration from termination.
+(defn expand-from [s]
+  (iterate expand {:paths [[s]] :visited #{s}}))
+
+;When to stop
+(defn stop-cond [pred {:keys [paths]}] (when (some pred paths) paths))
+
+;The entire solution
+(defn fast-number-paths-deconstructed[s g]
+  (let [pred (comp #{g} peek)]
+    (->> (expand-from s)
+         (some (partial stop-cond pred))
+         (filter pred))))
+
+(time (fast-number-paths-deconstructed 1 4137))
+(time (fast-number-paths-deconstructed 7 43))
+(time (fast-number-paths-deconstructed 9 2))
+(time (fast-number-paths-deconstructed 2 9))
+(time (fast-number-paths-deconstructed 2 4))


whitespace

whitespace

--- resources/leiningen/new/tenzing/om-next-app.cljs
+++ resources/leiningen/new/tenzing/om-next-app.cljs
@@ -7,7 +7,7 @@

 (defui App
   Object
-  (render [this]
+  (render [this]
     (let [{:keys [greeting]} (om/props this)]
       (dom/h1 nil greeting))))

@@ -16,6 +16,5 @@

 (defn init []
   (om/add-root! reconciler
-                App
-                (gdom/getElement "container")))
-
+                App
+                (gdom/getElement "container")))


Remove logging.

Remove logging.

--- src-cljs/kixi/hecuba/tabs/hierarchy/sensors.cljs
+++ src-cljs/kixi/hecuba/tabs/hierarchy/sensors.cljs
@@ -50,8 +50,7 @@
                        parent-device lower_ts upper_ts actual_annual selected]} sensor
                        {:keys [description privacy location]} parent-device
                        id (str type "~" device_id)
-                       selected? (contains? (:selected sensors) id)
-                       _ (log "selected in cursor: " (:selected sensors))]
+                       selected? (contains? (:selected sensors) id)]
            [:tr {:onClick (fn [e] (put! selected-chan {:id id
                                                        :unit unit
                                                        :upper_ts upper_ts


Add warning to g-verb docstring to warn against modifying the roomsize param in the current version of the server. Fixes #213.

--- src/overtone/sc/machinery/ugen/metadata/misc.clj
+++ src/overtone/sc/machinery/ugen/metadata/misc.clj
@@ -91,7 +91,9 @@
        :rates #{:ar},
        :num-outs 2,
        :check (nth-input-stream? 0)
-       :doc "A two-channel reverb UGen, based on the \"GVerb\" LADSPA effect by Juhana Sadeharju (kouhia at nic.funet.fi)."}
+       :doc "A two-channel reverb UGen, based on the \"GVerb\" LADSPA effect by Juhana Sadeharju (kouhia at nic.funet.fi).
+
+WARNING - in the current version of the server, there are severe noise issues when you attempt to modify the roomsize or set it to a value greater than 40."}

       {:name "FreeVerb",
        :args [{:name "in", :doc "The input signal"}


[Fix #2590] Blank QR code on a quick double tap of the 'Show QR code'

--- src/status_im/ui/screens/profile/navigation.cljs
+++ src/status_im/ui/screens/profile/navigation.cljs
@@ -3,8 +3,8 @@

 (defmethod navigation/preload-data! :qr-code-view
   [{:accounts/keys [current-account-id] :as db} [_ _ {:keys [contact qr-source qr-value amount?]}]]
-  (assoc db :qr-modal {:contact   (or contact
-                                      (get-in db [:accounts/accounts current-account-id]))
-                       :qr-source qr-source
-                       :qr-value  qr-value
-                       :amount?   amount?}))
+  (update db :qr-modal #(merge % {:contact   (or contact
+                                                 (get-in db [:accounts/accounts current-account-id]))
+                                  :qr-source qr-source
+                                  :qr-value  qr-value
+                                  :amount?   amount?})))


[fix] remove mnemonic from current-account map

current-account is duplicated in `:qr-modal` key when tapping on `share my
profile` button in the Profile screen
this removes the mnemonic from the duplicated data so that it does persist
there after user backed up his mnemonic
this was only happening until logging out/restarting the app

Signed-off-by: yenda <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@status.im>

--- src/status_im/ui/screens/profile/user/views.cljs
+++ src/status_im/ui/screens/profile/user/views.cljs
@@ -267,7 +267,7 @@
         [react/view (merge action-button.styles/actions-list
                            styles/share-contact-code-container)
          [button/secondary-button {:on-press            #(re-frame/dispatch [:navigate-to :profile-qr-viewer
-                                                                             {:contact current-account
+                                                                             {:contact (dissoc current-account :mnemonic)
                                                                               :source  :public-key
                                                                               :value   public-key}])
                                    :style               styles/share-contact-code-button


sanity check

sanity check

--- test/matross/config_test.clj
+++ test/matross/config_test.clj
@@ -14,4 +14,10 @@
     (let [cr (config-resolver {:default {:foo "{{fact/bar}}" :baz "{{foo}}"}
                                :fact {:bar "herp"}})]
       (is (= (:foo cr) ((keyword "fact/bar") cr)))
-      (is (= (:foo cr) (:baz cr))))))
+      (is (= (:foo cr) (:baz cr)))))
+
+  (testing "I can use select-keys"
+    (let [cr (config-resolver {:default {:a "{{b}}" :b "value"}})
+          sub-set (select-keys cr [:a])]
+      (println sub-set)
+      (is (= (:a sub-set) "value")))))


Fixed #39 by relying on the x-forwarded-proto header. Thanks to @martinei, @phaus and @offlinehoster

--- src/statuses/routing.clj
+++ src/statuses/routing.clj
@@ -20,7 +20,7 @@

 (defn base-uri [request]
   (str
-   (name (:scheme request))
+   (name (or (get-in request [:headers "x-forwarded-proto"]) (:scheme request)))
    "://"
    (get-in request [:headers "host"])))

@@ -98,6 +98,7 @@
          [:table.table
           (item "# of entries" (core/get-count @db))
           (item "Last save at" (get-save-time @db))
+          (item "Base URI" (base-uri request))
           (item "Request" [:pre (with-out-str (pp/pprint request))])]
           (nav-links request))))


Switched from  to  for the big wrapper fn

Switched from  to  for the big wrapper fn

--- src/semantic_csv/core.clj
+++ src/semantic_csv/core.clj
@@ -29,7 +29,7 @@
 (ns semantic-csv.core
   "# Core API namespace"
   (:require [clojure.java.io :as io]
-            [clojure.data.csv :as csv]
+            [clojure-csv :as csv]
             [plumbing.core :as pc :refer [?>>]]))

@@ -164,9 +164,9 @@
 ;; You're welcome.

-;; ## parse-csv
-
-(defn parse
+;; ## process
+
+(defn process
   "This function wraps together all of the various input processing capabilities into one, with options
   controlled by an opts hash with a heavy-handed/opinionated set of defaults:

@@ -190,13 +190,14 @@
         (?>> cast-fns (cast-cols cast-fns))))
   ; Use all defaults
   ([rows]
-   (parse {} rows)))
+   (process {} rows)))

 ;; Using this function, the code we've been building above is reduced to the following:
 ;;
 ;;     (with-open [in-file (io/reader "test/test.csv")]
 ;;       (doall
-;;         (parse (csv/parse-csv in-file))))
+;;         (process (csv/parse-csv in-file))))
+
 ;;


Final example and closing message

Final example and closing message

--- src/semantic_csv/core.clj
+++ src/semantic_csv/core.clj
@@ -369,3 +369,41 @@
      (format-with formatters data))))

+;; # One last example showing everything together
+;;
+;; Let's see how Semantic CSV in the context of a little data pipeline.
+;; We're going to thread data in, tranform into maps to make things easier to work with, modify the data based
+;; on some computations, and then write the modified data out to a file, all maintaining laziness.
+;;
+;;     (with-open [in-file (io/reader "test/test.csv")
+;;                 out-file (io/writer "test-out.csv")]
+;;       (->>
+;;         (csv/parse-csv in-file)
+;;         remove-comments
+;;         mappify
+;;         (cast-with {:this ->int :that ->float})
+;;         ;; Do some of your own processing...
+;;         (map
+;;           (fn [row]
+;;             (assoc row :jazz (* (:this row) (:that row)))))
+;;         vectorify
+;;         ; clojure-csv doesn't like non string values
+;;         (format-all-with str)
+;;         ; Convert into row strings
+;;         (map (comp csv/write-csv vector))
+;;         (reduce
+;;           (fn [w row]
+;;             (.write w row)
+;;             w)
+;;           out-file)))
+;;
+;; <br/>
+
+
+;; # That's it for the core API
+;;
+;; Hope you find this library useful.
+;; If you have questions or comments please either [submit an issue](https://github.com/metasoarous/semantic-csv/issues)
+;; or join us in the [dedicated chat room](https://gitter.im/metasoarous/semantic-csv).
+
+


CMR-8616: Fixing comment indentation

CMR-8616: Fixing comment indentation

--- indexer-app/src/cmr/indexer/data/concepts/generic.clj
+++ indexer-app/src/cmr/indexer/data/concepts/generic.clj
@@ -109,7 +109,7 @@
          :native-id-lowercase native-id
          :associations-gzip-b64 (associations->gzip-base64-str generic-assoc-ids)}
         configs (gen-util/only-elastic-preferences (:Indexes index-data))
-             ;; now add the configured indexes
+        ;; now add the configured indexes
         doc (reduce
              (fn [data, config] (into data (field->index config parsed-concept)))
              common-doc


use graaljs scriptengine when available

use graaljs scriptengine when available

Not quite at the point where it will become full dependency.
Users can just add the dependency if they want though.

--- src/main/shadow/cljs/devtools/server/npm_deps.clj
+++ src/main/shadow/cljs/devtools/server/npm_deps.clj
@@ -22,12 +22,16 @@
     (Long/parseLong java-version)))

 (defn make-engine* []
-  (let [java-version (get-major-java-version)]
-    (when (>= java-version 11)
-      (System/setProperty "nashorn.args" "--no-deprecation-warning")))
-
-  (-> (ScriptEngineManager.)
-      (.getEngineByName "nashorn")))
+  (let [script-mgr (ScriptEngineManager.)]
+    ;; if graaljs scriptengine is on the classpath use it
+    ;; getEngineByName returns nil if not found
+    (or (.getEngineByName script-mgr "JavaScript")
+        ;; otherwise try nashorn
+        (let [java-version (get-major-java-version)]
+          (when (>= java-version 11)
+            (System/setProperty "nashorn.args" "--no-deprecation-warning"))
+
+          (.getEngineByName script-mgr "nashorn")))))

 (defn make-engine []
   (let [engine


CMR-2067: Changed destructuring style back

--- ingest-app/src/cmr/ingest/services/ingest_service.clj
+++ ingest-app/src/cmr/ingest/services/ingest_service.clj
@@ -155,8 +155,9 @@
 (defn-timed delete-concept
   "Delete a concept from mdb and indexer. Throws a 404 error if the concept does not exist or
   the latest revision for the concept is already a tombstone."
-  [context {:keys [concept-type provider-id native-id] :as concept-attribs}]
-  (let [existing-concept (first (mdb/find-concepts context
+  [context concept-attribs]
+  (let [{:keys [concept-type provider-id native-id]} concept-attribs
+        existing-concept (first (mdb/find-concepts context
                                                    {:provider-id provider-id
                                                     :native-id native-id
                                                     :exclude-metadata true


ensure cljs.core is loaded

ensure cljs.core is loaded

--- src/main/clojure/clojure/tools/analyzer/js.clj
+++ src/main/clojure/clojure/tools/analyzer/js.clj
@@ -402,3 +402,5 @@
                              (analyze form (assoc env :ns *ns*)))
                       (recur))))))))
         (get-in @*env* [::analyzed-cljs path])))))
+
+(require 'cljs.core)


Rewrite "are" macro to without using "is"

--- src/main/clojure/com/stuartsierra/lazytest.clj
+++ src/main/clojure/com/stuartsierra/lazytest.clj
@@ -157,6 +157,7 @@
                nxt))
       `(SimpleContainer ~r {:generator 'is
                             :line ~(:line (meta &form))
+                            :file *file*
                             :form '~&form}
                         nil))))

@@ -180,11 +181,24 @@
           (= (+ 8 -1) 7))
 "
   [argv expr & values]
-  (let [argc (count argv)]
+  (let [argc (count argv)
+        sym (gensym "f")]
     (assert (vector? argv))
     (assert (zero? (rem (count values) argc)))
-    `(is ~@(map (fn [vs] `((fn ~argv ~expr) ~@vs))
-                (partition argc values)))))
+    `(let [~sym (fn ~argv ~expr)]
+       (SimpleContainer ~(vec (map (fn [vs]
+                                     `(SimpleAssertion
+                                       (fn [] (~sym ~@vs))
+                                       {:form '(are ~argv ~expr ~@vs)
+                                        :file *file*
+                                        :line ~(some #(:line (meta %)) vs)}
+                                       nil))
+                                   (partition argc values)))
+                        {:generator 'are
+                         :file *file*
+                         :line ~(:line (meta &form))
+                         :form '~&form}
+                        nil))))

 (defmacro given
   "A series of assertions using values from contexts.