Corrected typos in TTL for whoami service (using 5 minutes)

--- src/cia/auth.clj
+++ src/cia/auth.clj
@@ -38,7 +38,7 @@
    (WhoamiService.
     url
     (memo/ttl (make-whoami-fn url)
-              :ttl/threshold (* 100 50 5)))))
+              :ttl/threshold (* 1000 60 5)))))

 (defrecord Identity [org-id role]
   IIdentity


Added hadoop job namespace for common data model query


refactor

refactor


Fix reflection warnings.

Fix reflection warnings.


Adding TODO comments about spec formats

Adding TODO comments about spec formats

--- src/clj/zetawar/data.cljs
+++ src/clj/zetawar/data.cljs
@@ -16,7 +16,6 @@
    :deep-water    {:name "Deep Water"
                    :image "tilesets/elite-command/terrains/deep-water.png"}})

-;; TODO: remove redundancy between state map and unit/can-capture flag (?)
 ;; TODO: move transitions one level deeper under :transitions key
 ;; TODO: add :description for state maps and states
 (def unit-state-maps
@@ -47,6 +46,7 @@

 ;; TODO: check how capturing armor works in Elite Command
 ;; TODO: check how repair amount works in Elite Command
+;; TODO: add :buildable-at => {<terrain type ids>...}
 (def units
   {:infantry {:name "Infantry"
               :cost 75
@@ -140,8 +140,6 @@
             :max-range 1
             :armor-type :armored
             :armor 8
-            ;; TODO: capturing armor doesn't make sense for units that can't canpture
-            :capturing-armor 2
             :repair 1
             :state-map :free-attack-twice
             :image "tilesets/elite-command/units/humvee-COLOR.png"
@@ -161,8 +159,6 @@
           :max-range 1
           :armor-type :armored
           :armor 12
-          ;; TODO: capturing armor doesn't make sense for units that can't canpture
-          :capturing-armor 2
           :repair 1
           :state-map :move-attack
           :image "tilesets/elite-command/units/tank-COLOR.png"
@@ -1078,6 +1074,7 @@
     }
    })

+;; TODO: add :allowed-unit-types
 ;; TODO: remove redundant id keys
 (def scenarios
   {:sterlings-aruba-multiplayer


Simplify the regular expression for long breakends

--- src/cljam/io/vcf/util.clj
+++ src/cljam/io/vcf/util.clj
@@ -236,8 +236,8 @@
           (merge (into {} (for [k sample-kws] [k (stringify-sample (v fmt-kw) (v k))])))))))

 (def ^:private long-breakend-regexp
-  ;;     pre-seq      [ or ]  chr      pos   [ or ]    post-seq
-  #"((?:[ACGTN]*|\.))([\[\]])(.+?)(?::(\d+))([\[\]])((?:[ACGTN]*|\.))")
+  ;;   pre-seq    [ or ]  chr    pos     [ or ]    post-seq
+  #"([ACGTN]*|\.)([\[\]])(.+?)(?::(\d+))([\[\]])([ACGTN]*|\.)")

 (def ^:private short-breakend-regexp
   #"(\.?)([ATGCN]+)(\.?)")


memoize

memoize

--- src/clojure_noon/core.clj
+++ src/clojure_noon/core.clj
@@ -935,8 +935,9 @@

 ;;memoize is useful for functions that are computationally intensive or that make network requests - any subsequent calls will not bear the cost

-
-
-
-
-
+;;Peg Thing
+
+
+
+
+


PDOK-2420: Alternative implementation for getting id attribute

--- src/featured_gml/xml.clj
+++ src/featured_gml/xml.clj
@@ -24,8 +24,12 @@
 (defn tag [loc]
   ((fnil name "") (:tag (zip/node loc))))

+(defn attr-with-name [loc attrname]
+  "Get the attribute with attrname. Alternative implementation for attr"
+  (some #(if (= (.getLocalPart (.getName %)) attrname) (.getValue %)) (iterator-seq (:attrs (zip/node loc)))))
+
 (defn id-attr [loc]
-   (some #(if (= (.getLocalPart (.getName %)) "id") (.getValue %)) (iterator-seq (:attrs (zip/node loc)))))
+  (attr-with-name loc "id"))

 (defn attr
   "Returns the xml attribute named attrname, of the xml node at location loc."


stats.clj divide by zero exception

stats.clj divide by zero exception

--- storm-core/src/clj/backtype/storm/stats.clj
+++ storm-core/src/clj/backtype/storm/stats.clj
@@ -1333,7 +1333,7 @@

 (defn- val-avg
   [[t c]]
-  (if (= t 0) 0
+  (if (= c 0) 0
     (double (/ t c))))

 (defn aggregate-averages


Update timer.clj

Update timer.clj

Give a upper bound to the sleeping time, to guarantee a bounded response time for detecting new events.

--- storm-core/src/clj/backtype/storm/timer.clj
+++ storm-core/src/clj/backtype/storm/timer.clj
@@ -53,8 +53,11 @@
                                    ;; event generation. If any recurring events
                                    ;; are scheduled then we will always go
                                    ;; through this branch, sleeping only the
-                                   ;; exact necessary amount of time.
-                                   (Time/sleep (- time-millis (current-time-millis)))
+                                   ;; exact necessary amount of time. We give
+                                   ;; an upper bound, e.g. 1000 millis, to the
+                                   ;; sleeping time, to limit the response time
+                                   ;; for detecting any new event within 1 secs.
+                                   (Time/sleep (max 1000 (- time-millis (current-time-millis))))
                                    ;; Otherwise poll to see if any new event
                                    ;; was scheduled. This is, in essence, the
                                    ;; response time for detecting any new event


fix minibuffer options

fix minibuffer options

--- src/fugue/ide/state.cljs
+++ src/fugue/ide/state.cljs
@@ -116,7 +116,7 @@
 (defn minibuffer-options [state]
   (let [{::keys [action-name args]} (::minibuffer state)
         arg-types (get-in state [::actions action-name ::arg-types])
-        arg-type (drop (count args) arg-types)]
+        arg-type (first (drop (count args) arg-types))]
     (case arg-type
       :action (map clj->js (keys (::actions state)))
       :file (keys (::files state))


call event fn on existing layers only

call event fn on existing layers only

--- src/hatti/map/utils.cljs
+++ src/hatti/map/utils.cljs
@@ -455,49 +455,50 @@
 (defn register-mapboxgl-mouse-events
   "Register map mouse events."
   [owner map event-chan id_string style]
-  (let [mousemove-fn
+  (let [layer-id id_string
+        mousemove-fn
         (fn [e]
-          (let [layer-id id_string
-                features
-                (.queryRenderedFeatures
-                 map (.-point e) (clj->js {:layers [layer-id]}))
-                no-of-features (.-length features)
-                view-by (om/get-props owner [:map-page :view-by])
-                selected-id (om/get-props
-                             owner [:map-page :submission-clicked :id])]
-            (set! (.-cursor (.-style (.getCanvas map)))
-                  (if (pos? (.-length features)) "pointer" ""))
-            (when-not view-by
-              (if (= no-of-features 1)
-                (set-mapboxgl-paint-property
-                 map layer-id
-                 (get-style-properties
-                  style :hover :selected-id (get-id-property features)))
-                (do
+          (when (.getLayer map layer-id)
+            (let [features
+                  (.queryRenderedFeatures
+                   map (.-point e) (clj->js {:layers [layer-id]}))
+                  no-of-features (.-length features)
+                  view-by (om/get-props owner [:map-page :view-by])
+                  selected-id (om/get-props
+                               owner [:map-page :submission-clicked :id])]
+              (set! (.-cursor (.-style (.getCanvas map)))
+                    (if (pos? (.-length features)) "pointer" ""))
+              (when-not view-by
+                (if (= no-of-features 1)
                   (set-mapboxgl-paint-property
                    map layer-id
-                   (get-style-properties style :normal))
-                  (when selected-id
+                   (get-style-properties
+                    style :hover :selected-id (get-id-property features)))
+                  (do
+                    (set-mapboxgl-paint-property
+                     map layer-id
+                     (get-style-properties style :normal))
+                    (when selected-id
+                      (set-mapboxgl-paint-property
+                       map layer-id
+                       (get-style-properties
+                        style :clicked :selected-id selected-id)))))))))
+        click-fn
+        (fn [e]
+          (when (.getLayer map layer-id)
+            (let [features
+                  (.queryRenderedFeatures
+                   map (.-point e) (clj->js {:layers [layer-id]}))
+                  no-of-features (.-length features)
+                  view-by (om/get-props owner [:map-page :view-by])]
+              (when (pos? no-of-features)
+                (let [feature-id (get-id-property features)]
+                  (put! event-chan {:mapped-submission-to-id feature-id})
+                  (when-not view-by
                     (set-mapboxgl-paint-property
                      map layer-id
                      (get-style-properties
-                      style :clicked :selected-id selected-id))))))))
-        click-fn
-        (fn [e]
-          (let [layer-id id_string
-                features
-                (.queryRenderedFeatures
-                 map (.-point e) (clj->js {:layers [layer-id]}))
-                no-of-features (.-length features)
-                view-by (om/get-props owner [:map-page :view-by])]
-            (when (pos? no-of-features)
-              (let [feature-id (get-id-property features)]
-                (put! event-chan {:mapped-submission-to-id feature-id})
-                (when-not view-by
-                  (set-mapboxgl-paint-property
-                   map layer-id
-                   (get-style-properties
-                    style :clicked :selected-id feature-id)))))))]
+                      style :clicked :selected-id feature-id))))))))]
     ;; Remove existing event functions
     (.off map "mousemove" (om/get-state owner :mousemove-fn))
     (.off map "click" (om/get-state owner :click-fn))


Update docstrings

Update docstrings

--- src/io/perun.clj
+++ src/io/perun.clj
@@ -299,7 +299,7 @@
       :pod pod})))

 (deftask markdown
-  "Parse markdown files
+  "Parse markdown files with yaml front matter

   This task will look for files ending with `md` or `markdown`
   and writes an HTML file that contains the result from
@@ -463,7 +463,7 @@
    :extensions [".html"]})

 (deftask slug
-  "Adds :slug key to files metadata. Slug is derived from filename."
+  "Renames a file so that the part before the extension matches the result of `slug-fn`"
   [s slug-fn    SLUGFN     code  "function to build slug from file metadata"
    _ filterer   FILTER     code  "predicate to use for selecting entries (default: `identity`)"
    e extensions EXTENSIONS [str] "extensions of files to include"]
@@ -487,9 +487,7 @@
    :extensions [".html"]})

 (deftask permalink
-  "Adds :permalink key to files metadata. Value of key will determine target path.
-
-   Make files permalinked. E.x. about.html will become about/index.html"
+  "Moves a file so that its location matches the result of `permalink-fn`"
   [p permalink-fn PERMALINKFN code  "function to build permalink from TmpFile metadata"
    _ filterer     FILTER      code  "predicate to use for selecting entries (default: `identity`)"
    e extensions   EXTENSIONS  [str] "extensions of files to include"]
@@ -678,7 +676,7 @@
    :extensions [".html"]})

 (deftask render
-  "Render individual pages for entries in perun data.
+  "Render individual pages from input files

    The symbol supplied as `renderer` should resolve to a function
    which will be called with a map containing the following keys:


Made recommendations service stub

Made recommendations service stub

--- src/kmg/core.clj
+++ src/kmg/core.clj
@@ -12,20 +12,31 @@
    :headers {"Content-Type" "application/edn"}
    :body (pr-str data)})

+(defn recommendations-stub [user]
+  [{:media/id "book1" :media/title (str "book1 for " user)}
+    {:media/id "book2" :media/title (str "book2 for " user)}])
+
+(defn recommendations [user]
+  (response (recommendations-stub user)))
+
 (defn user-list []
   (response (model/users)))
+
+(defroutes recommendation-routes
+  (GET "/list/:user" [user] (recommendations user)))

 (defroutes user-routes
   (GET "/list" [] (user-list)))

 (defroutes compojure-handler
   (GET "/" [] (slurp (io/resource "public/html/index.html")))
+
+  (context "/recommendation" [] recommendation-routes)
+
   (context "/user" [] user-routes)
   (GET "/req" request (str request))
   (route/resources "/")
-  #_(route/files "/" {:root (config :external-resources)})
   (route/not-found "Not found!"))
-

 (def app
   (-> compojure-handler


Check for valid job-id in kill

Check for valid job-id in kill

--- src/onyx/api.clj
+++ src/onyx/api.clj
@@ -126,6 +126,8 @@
    Task lifecycle APIs for closing tasks are invoked. This job is never again scheduled
    for execution."
   [config job-id]
+  (when (nil? job-id)
+    (throw (ex-info {:error "Invalid job id" :job-id job-id})))
   (let [client (component/start (system/onyx-client config))
         entry (create-log-entry :kill-job {:job job-id})]
     (extensions/write-log-entry (:log client) entry)


Exclude the 'script' sub-directory when building the plugin metadata cache.

Fixes #2177

--- src/lt/objs/plugins.cljs
+++ src/lt/objs/plugins.cljs
@@ -202,8 +202,13 @@
    (deploy/is-newer? a b) -1
    :else 1))

+(defn- valid-plugin-dir?
+  [path]
+  (and (files/dir? path)
+       (not (= "script" (files/basename path)))))
+
 (defn build-cache [sha]
-  (let [items (filter files/dir? (files/full-path-ls metadata-dir))
+  (let [items (filter valid-plugin-dir? (files/full-path-ls metadata-dir))
         cache (into {:__sha sha}
                     (for [plugin items
                           :let [versions (->> (files/full-path-ls plugin)


When you reset the  endpoint atom this isn't affect base-url def, that's why it is a function now

--- src/etcd_clojure/core.clj
+++ src/etcd_clojure/core.clj
@@ -7,7 +7,8 @@

 (def ^:private api-version "v1")

-(def ^:private base-url
+(defn ^:private base-url
+  []
   (str @endpoint "/" api-version))

 (defn connect!
@@ -16,7 +17,7 @@

 (defn- build-url
   [& {:keys [key value ttl prev-val]}]
-  (cond-> base-url
+  (cond-> (base-url)
           key (str "/keys/" key)
           value (str "?value=" value)
           prev-val (str "&prevValue=" prev-val)
@@ -51,7 +52,7 @@

 (defn watch
   [key callback]
-  (let [f (future (parse-string (:body (client/get (str base-url "/watch/" key)))))]
+  (let [f (future (parse-string (:body (client/get (str (base-url) "/watch/" key)))))]
     (when-done f #(callback %)) f))

 (defn machines
@@ -60,4 +61,4 @@

 (defn leader
   []
-  (:body (client/get (str base-url "/leader"))))
+  (:body (client/get (str (base-url) "/leader"))))


Spacing fixed

Spacing fixed

--- src/foreclojure/users.clj
+++ src/foreclojure/users.clj
@@ -19,7 +19,7 @@
   [:table#user-table.my-table
    [:thead
     [:tr
-     [:th "Rank"]
+     [:th {:style "width: 40px;"} "Rank"]
      [:th "Username"]
      [:th "Problems Solved"]]]
    (map-indexed #(vec [:tr (row-class %1)


Change default codemirror theme to 'neat'.

--- src/foreclojure/utils.clj
+++ src/foreclojure/utils.clj
@@ -208,9 +208,9 @@
 (def codemirror-themes ["ambiance" "blackboard" "cobalt" "eclipse" "elegant" "erlang-dark"
                         "lesser-dark" "monokai" "neat" "night" "rubyblue" "vibrant-ink" "xq-dark"])

-(def default-theme "eclipse")
+(def default-theme "neat")

 (defn get-theme []
   (if-user [{:keys [theme]}]
-           (or theme default-theme)
-           default-theme))+    (or theme default-theme)
+    default-theme))


added update-vals function

added update-vals function

--- src/frontend/uploads.cljs
+++ src/frontend/uploads.cljs
@@ -67,16 +67,19 @@
         new-upload-ids (set/difference (set uploads-order)
                                        (set old-uploads-order))
         removed-upload-ids (set/difference (set old-uploads-order)
-                                           (set uploads-order))]
+                                           (set uploads-order))
+        update-vals (fn [f m vals] (reduce #(update % %2 f)
+                                           m
+                                           vals))]
     (cond
       (< (count active-uploads) upload-slots)
       (assoc new-state
              :uploads
-              (reduce #(update % %2 start)
-                      uploads
-                      (take (- upload-slots
-                            (count active-uploads))
-                      uploads-order)))
+              (update-vals start
+                           uploads
+                           (take (- upload-slots
+                                    (count active-uploads))
+                                 uploads-order)))

       ;(> (count active-uploads) upload-slots)
       ;new-state


version bump

version bump

--- example/project.clj
+++ example/project.clj
@@ -1,10 +1,10 @@
-(defproject example "0.1.8"
+(defproject example "0.1.9-SNAPSHOT"
   :description "Example Application for Inspect Library"
   :url "https://github.com/matthiasn/inspect"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [com.matthiasnehlsen/inspect "0.1.8"]
+                 [com.matthiasnehlsen/inspect "0.1.9-SNAPSHOT"]
                  [clj-pid "0.1.1"]
                  [org.clojure/core.async "0.1.346.0-17112a-alpha"]]


#9 fix use position

#9 fix use position

--- src/misaki/transform.clj
+++ src/misaki/transform.clj
@@ -27,9 +27,9 @@
   [sexp]
   (let [[defs sexp] (split-with-definition sexp)]
     `(do
+       (use 'misaki.html.core)
        ~@defs
        (fn [~'contents]
-         (use 'misaki.html.core)
          (let [~'site (meta ~'contents)]
            ~sexp)))))


Use first name in the digest subtitle.

Use first name in the digest subtitle.

--- src/oc/email/content.clj
+++ src/oc/email/content.clj
@@ -48,7 +48,8 @@

 (def digest-weekly-title "Your weekly brief")
 (def digest-daily-title "Your daily brief")
-(def digest-message "Here are the new posts to the %s digest.")
+(def digest-message "Hi %s, here are the new posts to the %s digest.”")
+(def digest-message-no-name "Here are the new posts to the %s digest."
 (def digest-go-to-digest-button "go_to_digest")
 (def digest-read-post-button "read_post")

@@ -253,7 +254,10 @@
         boards (map posts-with-board-name (:boards digest))
         posts (mapcat :posts boards)
         digest-url (s/join "/" [config/web-url (:org-slug digest) "all-posts"])
-        subtitle (format digest-message  (:org-name digest))]
+        first-name (:first-name digest)
+        subtitle (if (s/blank? first-name)
+                    (format digest-message-no-name (:org-name digest))
+                    (format digest-message first-name (:org-name digest)))]
     [:td {:class "small-12 large-12 columns" :valign "middle" :align "center"}
       (spacer 40)
       (when logo? (org-logo {:org-name (:org-name digest)


Fixes repl bouncing, #596.

Fixes repl bouncing, #596.

--- src/onyx/test_helper.clj
+++ src/onyx/test_helper.clj
@@ -163,6 +163,8 @@
        (s/with-fn-validation ~@body)
        (catch InterruptedException e#
          (Thread/interrupted))
+       (catch ThreadDeath e#
+         (Thread/interrupted))
        (finally
          (component/stop ~symbol-name)))))


use "are" macro in test

use "are" macro in test

--- test/org/zalando/stups/friboo/user_test.clj
+++ test/org/zalando/stups/friboo/user_test.clj
@@ -5,18 +5,17 @@
   (:import (clojure.lang ExceptionInfo)))

 (deftest test-trim-slashes
-  ; first = input; second = expected output
-  (doseq [test-pair {"employees"        "employees"
-                     "/employees"       "employees"
-                     "employees/"       "employees"
-                     "/employees/"      "employees"
-                     "//employees//"    "employees"
-                     "/"                "/"
-                     "employees/tech"   "employees/tech"
-                     "/employees/tech"  "employees/tech"
-                     "employees/tech/"  "employees/tech"
-                     "/employees/tech/" "employees/tech"}]
-    (is (= (second test-pair) (trim-realm (first test-pair))))))
+  (are [input expected-output] (= (trim-realm input) expected-output)
+                               "employees" "employees"
+                               "/employees" "employees"
+                               "employees/" "employees"
+                               "/employees/" "employees"
+                               "//employees//" "employees"
+                               "/" "/"
+                               "employees/tech" "employees/tech"
+                               "/employees/tech" "employees/tech"
+                               "employees/tech/" "employees/tech"
+                               "/employees/tech/" "employees/tech"))

 (deftest test-trim-slashes-resilience-empty
   (is (= "" (trim-realm ""))))


Improve readability of inactive node modification warnings.

--- src/overtone/sc/node.clj
+++ src/overtone/sc/node.clj
@@ -15,15 +15,21 @@
   "The default error behaviour triggered when a user attempts to either
   control or kill an inactive node."
   [node err-msg]
-  (condp = *inactive-node-modification-error*
-    :silent    nil ;;do nothing
-    :warning   (println "Warning - " err-msg node " " (with-out-str (print node)))
-    :exception (throw (Exception. (str "Error - " err-msg " " (with-out-str (print node)))))
-    (throw
-     (IllegalArgumentException.
-      (str "Unexpected value for *inactive-node-modification-error*: "
-           *inactive-node-modification-error*
-           "Expected one of :silent, :warning, :exception.")))))
+  (let [full-err-msg (str "inactive node modification attempted for node "
+                          (with-out-str (pr node))
+                          " with state "
+                          @(:status node)
+                          (when-not (empty? err-msg)
+                            (str " whilst " err-msg)))]
+    (condp = *inactive-node-modification-error*
+      :silent    nil ;;do nothing
+      :warning   (println (str "Warning - " full-err-msg))
+      :exception (throw (Exception. (str "Error - " full-err-msg)))
+      (throw
+       (IllegalArgumentException.
+        (str "Unexpected value for *inactive-node-modification-error*: "
+             *inactive-node-modification-error*
+             ". Expected one of :silent, :warning, :exception."))))))

 (defonce ^{:private true} __PROTOCOLS__

@@ -211,7 +217,7 @@
       (node-paused? n)))

 (defn- ensure-node-active!
-  ([node] (ensure-node-active! "Trying to modify an inactive node."))
+  ([node] (ensure-node-active! ""))
   ([node err-msg]
      (when (node? node)
        (node-block-until-ready node))
@@ -227,7 +233,7 @@
   for /n_end which will call node-destroyed."
   [node]
   {:pre [(server-connected?)]}
-  (ensure-node-active! node "Trying to free a synth node that has been destroyed")
+  (ensure-node-active! node "freeing node.")
   (snd "/n_free" (to-sc-id node))
   node)

@@ -356,7 +362,7 @@
   "Pause a running synth node."
   [node]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to pause a node that has been destroyed.")
+  (ensure-node-active! node "pausing node")
   (snd "/n_run" (to-sc-id node) 0)
   node)

@@ -364,7 +370,7 @@
   "Start a paused synth node."
   [node]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to start a node that has been destroyed.")
+  (ensure-node-active! node "starting node")
   (snd "/n_run" (to-sc-id node) 1)
   node)

@@ -372,7 +378,7 @@
   "Place a node :before or :after another node."
   [node position target]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to relocate a node that has been destroyed.")
+  (ensure-node-active! node "relocating node")
   (let [node-id   (to-sc-id node)
         target-id (to-sc-id target)]
     (cond
@@ -384,7 +390,7 @@
   "Set control values for a node."
   [node name-values]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to control a node that has been destroyed.")
+  (ensure-node-active! node "controlling node")
   (apply snd "/n_set" (to-sc-id node) (floatify (stringify (idify name-values))))
   node)

@@ -395,7 +401,7 @@
   {:freq 440.0 :attack 0.2}"
   [node names]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to get control values of a node that has been destroyed.")
+  (ensure-node-active! node "getting node control values")
   (let [res   (recv "/n_set")
         cvals (do (apply snd "/s_get" (to-sc-id node) (stringify names))
                   (:args (deref! res (str "attempting to get control values " name " for node " (with-out-str (pr node))))))]
@@ -407,7 +413,7 @@
   all nodes in the group."
   [node ctl-start ctl-vals]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to control a node that has been destroyed.")
+  (ensure-node-active! node "controlling a range of node values")
   (let [node-id (to-sc-id node)]
     (apply snd "/n_setn" node-id ctl-start (count ctl-vals) ctl-vals))
   node)
@@ -417,7 +423,7 @@
   Returns a vector of values."
   [node name-index n]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to access a node that has been destroyed.")
+  (ensure-node-active! node "reading a range of node values")
   (let [res   (recv "/n_setn")
         cvals (do (snd "/s_getn" (to-sc-id node) (to-str name-index) n)
                   (:args (deref! res (str "attempting to get " n " control values from arguement " name-index " for node " (with-out-str (pr node))))))]
@@ -427,7 +433,7 @@
   "Connect a node's controls to a control bus."
   [node names-busses]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to map the controls of a node that has been destroyed.")
+  (ensure-node-active! node "mapping controls to a bus for node")

   (let [node-id      (to-sc-id node)
         names-busses (-> names-busses stringify idify)]
@@ -439,7 +445,7 @@
   starting at the given control name."
   [node start-control start-bus n]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to map the controls of a node that has been destroyed.")
+  (ensure-node-active! node "mapping a range of conrol values to control busses for node")
   (assert (isa? (type start-bus) :overtone.sc.bus/bus) "Invalid start-bus")
   (let [node-id (to-sc-id node)]
     (snd "/n_mapn" node-id (first (stringify [start-control])) (to-sc-id start-bus) n))
@@ -451,16 +457,16 @@
   current control values for synths."
   [node with-args?]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to view a node that has been destroyed.")
+  (ensure-node-active! node "viewing the subtree of node")
   (snd "/g_dumpTree" (to-sc-id node) with-args?)
   node)

 (defn- group-prepend-node*
-  "Add a synth node to the end of a group list."
+  "Add a synth node to the start of a group list."
   [group node]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to move a node that has been destroyed.")
-  (ensure-node-active! group "Attempting to use a node that has been destroyed.")
+  (ensure-node-active! node "moving node")
+  (ensure-node-active! group "using node as the target for a move")
   (let [group-id (to-sc-id group)
         node-id  (to-sc-id node)]
     (snd "/g_head" group-id node-id))
@@ -470,8 +476,8 @@
   "Add a synth node to the end of a group list."
   [group node]
   (ensure-connected!)
-  (ensure-node-active! node "Attempting to move a node that has been destroyed.")
-  (ensure-node-active! group "Attempting to move a node that has been destroyed.")
+  (ensure-node-active! node "moving node")
+  (ensure-node-active! group "using node as the target for a move")
   (let [group-id (to-sc-id group)
         node-id  (to-sc-id node)]
     (snd "/g_tail" group-id node-id))
@@ -481,7 +487,7 @@
   "Free all child synth nodes in a group."
   [group]
   (ensure-connected!)
-  (ensure-node-active! group "Attempting to clear a node that has been destroyed.")
+  (ensure-node-active! group "clearing node")
   (snd "/g_freeAll" (to-sc-id group))
   group)

@@ -490,7 +496,7 @@
   groups."
   [group]
   (ensure-connected!)
-  (ensure-node-active! group "Attempting to deep clear a node that has been destroyed.")
+  (ensure-node-active! group "deep clearing node")
   (snd "/g_deepFree" (to-sc-id group))
   group)

@@ -505,7 +511,7 @@
    *block-node-until-ready?* to false."
   [node]
   (when *block-node-until-ready?*
-    (deref! (:loaded? node) (str "blocking until the following node has completed loading: " (with-out-str (pr node))) )))
+    (deref! (:loaded? node) 20 (str "blocking until the following node has completed loading: " (with-out-str (pr node))) )))

 (extend java.lang.Long
   ISynthNode
@@ -685,7 +691,7 @@
   ([] (group-node-tree* 0))
   ([node & [ctls?]]
      (ensure-connected!)
-     (ensure-node-active! node "Attempting to view a node that has been destroyed.")
+     (ensure-node-active! node "viewing node")
      (let [ctls? (if (or (= 1 ctls?) (= true ctls?)) 1 0)
            id    (to-sc-id node)]
        (let [reply-p (recv "/g_queryTree.reply")


add docstring for ugen

add docstring for ugen

--- src/overtone/sc/ugen.clj
+++ src/overtone/sc/ugen.clj
@@ -509,6 +509,7 @@
 (def *constants* nil)

 (defn ugen [spec rate special args]
+  "Create a SCUGen with the specified spec, rate, special and args"
   ;;(check-ugen-args spec rate special args)
   (let [rate (or (get RATES rate) rate)
         ug (SCUGen.


Fix quoting ?state in the App query

Fix quoting ?state in the App query

--- src/web/app.cljs
+++ src/web/app.cljs
@@ -19,13 +19,13 @@
   (query [this]
     `[;; CUSTARD data
       ({:state ~(om/get-query StateChooserItem)}
-       {:state ?state})
+       {:state ~'?state})
       {:states ~(om/get-query StateChooserItem)}
-      ({:project ~(om/get-query Project)} {:state ?state})
-      ({:requirements ~(om/get-query Node)} {:state ?state})
-      ({:components ~(om/get-query Node)} {:state ?state})
-      ({:work-items ~(om/get-query Node)} {:state ?state})
-      ({:tags ~(om/get-query Node)} {:state ?state})
+      ({:project ~(om/get-query Project)} {:state ~'?state})
+      ({:requirements ~(om/get-query Node)} {:state ~'?state})
+      ({:components ~(om/get-query Node)} {:state ~'?state})
+      ({:work-items ~(om/get-query Node)} {:state ~'?state})
+      ({:tags ~(om/get-query Node)} {:state ~'?state})

       ;; UI state
       :view])


Extract basic names with simple regex

Extract basic names with simple regex

--- src/parse_names/core.clj
+++ src/parse_names/core.clj
@@ -37,3 +37,13 @@

 (def all-names
   (into (sorted-set) (edn/read-string (slurp (io/resource "all-names.edn")))))
+
+(defn extract-names [text]
+  (let [matches (re-seq name-regex text)]
+    (reduce (fn [acc match]
+              (let [[fn ln] (str/split match #" ")]
+                (if (contains? all-names (str/lower-case fn))
+                  (conj acc [fn ln])
+                  acc)))
+            []
+            matches)))


pprint conv object for debugging

pprint conv object for debugging

--- src/polismath/poller.clj
+++ src/polismath/poller.clj
@@ -87,7 +87,9 @@
                     (try
                       (do
                         (println "zid: " zid)
-                        (conv-update (or (convs zid) {:rating-mat (named-matrix)}) votes))
+                        (let [foo (conv-update (or (convs zid) {:rating-mat (named-matrix)}) votes)]
+                          (pprint foo)
+                          foo))
                       (catch Exception e
                         (do
                           (println "exception when processing zid: " zid)


Correct typo

Correct typo

--- src/re_demo/welcome.cljs
+++ src/re_demo/welcome.cljs
@@ -24,7 +24,7 @@
               [h-box
                :gap "100px"
                :children [[v-box
-                           :children [[p "The demo app is build using re-com and serves as:"
+                           :children [[p "The demo app itself is built using re-com and serves as:"
                                        [:ul
                                         [:li "a visual showcase of the components"]
                                         [:li "documentation for the components (parameters etc.)"]


Compile :main even if not explicitly listed in :namespaces.

--- src/leiningen/compile.clj
+++ src/leiningen/compile.clj
@@ -13,12 +13,14 @@
   "Returns a seq of the namespaces that are compilable, regardless of whether
   their class files are present and up-to-date."
   [project]
-  ;; TODO: Compile :main ns if needed
-  (cond
-   (coll? (:namespaces project))
-   (:namespaces project)
-   (= :all (:namespaces project))
-   (find-namespaces-in-dir (file (:source-path project)))))
+  (let [nses (set (cond
+                   (coll? (:namespaces project))
+                   (:namespaces project)
+                   (= :all (:namespaces project))
+                   (find-namespaces-in-dir (file (:source-path project)))))]
+    (if (:main project)
+      (conj nses (:main project))
+      nses)))

 (defn stale-namespaces
   "Given a seq of namespaces that are both compilable and that hav missing or


add required middleware

add required middleware

--- src/mirror/middleware.clj
+++ src/mirror/middleware.clj
@@ -3,9 +3,12 @@
             [mirror.ws :as ws]
             [aleph.http :as http]
             [manifold.stream :as s]
+            [ring.middleware.params :refer (wrap-params)]
+            [ring.middleware.keyword-params :refer (wrap-keyword-params)]
             [ring.middleware.file :refer (wrap-file)]
             [ring.middleware.resource :refer (wrap-resource)]
-            [ring.util.response :refer (response header redirect status)]))
+            [ring.util.response :refer (response header redirect status)]
+            [ring-image-crop.core :refer (wrap-image-crop)]))

 (defn wrap-pages [h pages-path static-path]
   (fn [req]
@@ -26,5 +29,7 @@
       (wrap-pages pages-path static-path)
       (wrap-file static-path)
       (wrap-image-crop static-path)
+      (wrap-keyword-params)
+      (wrap-params)
       (wrap-resource "/")))


linking events and rsvps to the time tree

--- src/neo4j_meetup/core.clj
+++ src/neo4j_meetup/core.clj
@@ -2,6 +2,8 @@
   (:require [clj-http.client :as client])
   (:require [clojure.data.json :as json])
   (:require [environ.core :as e])
+  (:require [clj-time.core :as t])
+  (:require [clj-time.coerce :as c])
   (:require [clojurewerkz.neocons.rest :as nr]
             [clojurewerkz.neocons.rest.transaction :as tx]))

@@ -130,12 +132,11 @@
         FOREACH(day2 in [days[i+1]] |
           CREATE UNIQUE (day1)-[:NEXT]->(day2))))" {:start 2011 :end 2014}))

-
-(comment (map :row
-              (:data (tx-api-single "MATCH (n:MeetupProfile)
-                            RETURN n.name
-                            LIMIT 10"))))
-
+(defn as-timetree [timestamp]
+  (let [event-date (c/from-long timestamp)]
+    { :year (t/year event-date)
+      :month (t/month event-date)
+      :day (t/day event-date) }))

 (defn create-member [member]
   (let [social-media (:other_services member)
@@ -144,6 +145,11 @@
                     MERGE (m:MeetupProfile {id: {person}.id})
                     SET m = {person}
                     MERGE (p)-[:HAS_MEETUP_PROFILE]->(m)
+                    WITH p, m
+                    MATCH (year:Year {year: {timetree}.year })
+                    MATCH (year)-[:HAS_MONTH]->(month {month: {timetree}.month })
+                    MATCH (month)-[:HAS_DAY]->(day {day: {timetree}.day })
+                    CREATE (m)-[:JOINED_ON]->(day)
                     FOREACH(topic IN {topics} |
                       MERGE (t:Topic {id: topic.id})
                       SET t = topic
@@ -156,15 +162,17 @@
                       "MERGE (linked:LinkedIn {id: {socialmedia}.linkedin.identifier })
                        MERGE (p)-[:HAS_LINKEDIN_ACCOUNT]->(linked) "
                       "")
-                    "RETURN ID(p)")]
-    (tx/statement query
-                  {:person {
-                            :id (:id member)
-                            :name (:name member)
-                            :bio (:bio member)
-                            }
-                   :socialmedia social-media
-                   :topics (:topics member)})))
+                    "RETURN ID(p)")
+        params {:person {
+                         :id (:id member)
+                         :name (:name member)
+                         :bio (:bio member)
+                         :joined (:joined member)
+                         }
+                :timetree (as-timetree (:joined member))
+                :socialmedia social-media
+                :topics (:topics member)}]
+    (tx/statement query params)))

 (defn create-event [event]
@@ -173,12 +181,18 @@
                  MERGE (e:Event {id: {event}.id})
                  SET e = {event}
                  MERGE (g)-[:HOSTED_EVENT]->(e)
+                 WITH e, g
+                 MATCH (year:Year {year: {timetree}.year })
+                 MATCH (year)-[:HAS_MONTH]->(month {month: {timetree}.month })
+                 MATCH (month)-[:HAS_DAY]->(day {day: {timetree}.day })
+                 CREATE (m)-[:JOINED_ON]->(day)
                  MERGE (v:Venue {id: {venue}.id})
                  SET v = {venue}
                  MERGE (e)-[:HELD_AT]->(v)
                  RETURN ID(g)"
                 {:group (:group event)
                  :venue (:venue event)
+                 :timetree (as-timetree (:time event))
                  :event { :id (:id event)
                          :name (:name event)
                          :description (:description event)
@@ -192,13 +206,21 @@
                    SET rsvp.response = response.response,
                        rsvp.guests = response.guests,
                        rsvp.time = response.time
-                   MERGE (m)-[:RSVPD]->(rsvp)-[:TO]->(e))
+                   MERGE (m)-[:RSVPD]->(rsvp)-[:TO]->(e)
+                   MERGE (year:Year {year: response.timetree.year })
+                   MERGE (year)-[:HAS_MONTH]->(month {month: response.timetree.month })
+                   MERGE (month)-[:HAS_DAY]->(day {day: response.timetree.day })
+                   MERGE (rsvp)-[:HAPPENED_ON]->(day))
                  FOREACH(response IN {responses}[..-1] |
                    CREATE (rsvp:RSVP {id: {id}})
                    SET rsvp.response = response.response,
                        rsvp.guests = response.guests,
                        rsvp.time = response.time
-                   MERGE (m)-[:INITIALLY_RSVPD]->(rsvp)-[:TO]->(e))
+                   MERGE (m)-[:INITIALLY_RSVPD]->(rsvp)-[:TO]->(e)
+                   MERGE (year:Year {year: response.timetree.year })
+                   MERGE (year)-[:HAS_MONTH]->(month {month: response.timetree.month })
+                   MERGE (month)-[:HAS_DAY]->(day {day: response.timetree.day })
+                   MERGE (rsvp)-[:HAPPENED_ON]->(day))
                  WITH m, e
                  MATCH (m)-[:INITIALLY_RSVPD|:RSVPD]->(rsvp)-[:TO]->(e)
                  WITH rsvp
@@ -222,10 +244,22 @@
 (defn responses [rsvp]
   (if (changed-mind? rsvp)
     (if (= "yes" (:response rsvp))
-      [{:response (:response rsvp) :time (:created rsvp) :guests (:guests rsvp)}]
-      [{:response "yes" :time (:created rsvp) :guests (:guests rsvp)}
-       {:response (:response rsvp) :time (:mtime rsvp) :guests 0}])
-    [{:response (:response rsvp) :time (:created rsvp) :guests (:guests rsvp)}]))
+      [{:response (:response rsvp)
+        :time (:created rsvp)
+        :timetree (as-timetree (:created rsvp))
+        :guests (:guests rsvp)}]
+      [{:response "yes"
+        :time (:created rsvp)
+        :timetree (as-timetree (:created rsvp))
+        :guests (:guests rsvp)}
+       {:response (:response rsvp)
+        :time (:mtime rsvp)
+        :timetree (as-timetree (:mtime rsvp))
+        :guests 0}])
+    [{:response (:response rsvp)
+      :time (:created rsvp)
+      :timetree (as-timetree (:created rsvp))
+      :guests (:guests rsvp)}]))

 (defn rsvps-with-responses [rsvps]
   (map #(assoc % :responses (responses %)) rsvps))
@@ -235,20 +269,14 @@
        (filter #(= (str event-id) (->> % :event :id)))
        (filter #(not (= (:created %) (:mtime %))))))

-(def x
-  (changed-mind 170427882 (load "data/rsvps-2014-04-19.json")))
-
-(def y
-  (changed-mind 153596532 (load "data/rsvps-2014-04-19.json")))
-
 (defn load-into-neo4j []
   (create-time-tree 2011 2014)
-  (tx-api create-member  (load "data/members.json"))
-  (tx-api create-event  (load "data/events.json"))
-  (tx-api create-rsvp (rsvps-with-responses (load "data/rsvps-2014-04-19.json"))))
+  (tx-api create-member  (load "data/members-2014-04-22.json"))
+  (tx-api create-event  (load "data/events-2014-04-22.json"))
+  (tx-api create-rsvp (rsvps-with-responses (load "data/rsvps-2014-04-22.json"))))

 (defn main []
-  (save "data/members.json" (get-all members))
-  (save "data/events.json" (get-all events))
-  (save "data/rsvps.json" (mapcat #(get-all (partial rsvps %))
-                                  (map :id (load "data/events.json")))))
+  (save "data/members-2014-04-22.json" (get-all members))
+  (save "data/events-2014-04-22.json" (get-all events))
+  (save "data/rsvps-2014-04-22.json"
+        (mapcat #(get-all (partial rsvps %)) (map :id (load "data/events-2014-04-22.json")))))


Reflection.

Reflection.

--- src/onyx/plugin/kafka.clj
+++ src/onyx/plugin/kafka.clj
@@ -131,13 +131,13 @@
   (metadata [this]
     {:consumer consumer
      :beginning-offsets (into {}
-                              (map (fn [[topic-partition offset]]
+                              (map (fn [[^TopicPartition topic-partition offset]]
                                      [{:topic (.topic topic-partition)
                                        :partition (.partition topic-partition)}
                                       offset])
                                    (.beginningOffsets consumer (.assignment consumer))))
      :end-offsets (into {}
-                        (map (fn [[topic-partition offset]]
+                        (map (fn [[^TopicPartition topic-partition offset]]
                                [{:topic (.topic topic-partition)
                                  :partition (.partition topic-partition)}
                                 offset])


Forgot to update the function names in docs.

--- src/riemann/influxdb.clj
+++ src/riemann/influxdb.clj
@@ -77,9 +77,9 @@
   ; For giving series name as the concatenation of :host and :service fields
   ; with dot separator.

-  (influxdb {:host   \"play.influxdb.org\"
-             :port   8086
-             :series #(str (:host %) \".\" (:service %))})
+  (influxdb-8 {:host   \"play.influxdb.org\"
+               :port   8086
+               :series #(str (:host %) \".\" (:service %))})

   0.8 Options:

@@ -129,10 +129,10 @@
   "Returns a function which accepts an event, or sequence of events, and writes
   them to InfluxDB. Compatible with the 0.9.x series.

-  (influxdb {:host \"influxdb.example.com\"
-             :db \"my_db\"
-             :retention \"raw\"
-             :tag-fields #{:host :sys :env}})
+  (influxdb-9 {:host \"influxdb.example.com\"
+               :db \"my_db\"
+               :retention \"raw\"
+               :tag-fields #{:host :sys :env}})

   0.9 Options:


Remove all *warn-on-reflection* warning in the influxdb stream (#829)

--- src/riemann/influxdb.clj
+++ src/riemann/influxdb.clj
@@ -7,7 +7,7 @@
    (javax.net.ssl SSLContext X509TrustManager HostnameVerifier)
    (java.security SecureRandom)
    (java.security.cert X509Certificate)
-   (org.influxdb InfluxDBFactory InfluxDB$ConsistencyLevel)
+   (org.influxdb InfluxDB InfluxDBFactory InfluxDB$ConsistencyLevel)
    (org.influxdb.dto BatchPoints Point)))

 (defn nil-or-empty-str
@@ -178,12 +178,12 @@

 (defn write-batch-point
   "Write to influxdb the `batch-point` using the `connection`"
-  [connection batch-point]
+  [^InfluxDB connection batch-point]
   (.write connection batch-point))

 (defn get-batchpoints
-  "Create a `org.influxdb.dto.BatchPoints` for each element in the `event` list.
-  `event` is a list where each element is a list of events.
+  "Create a `org.influxdb.dto.BatchPoints` for each element in the `events` list.
+  `events` is a list where each element is a list of events.
   Each element contains events with the same `:db`, `:retention` and `:consistency` keys.
   These options are used to create the BatchPoints.
   `opts` are the global influxdb stream options."
@@ -194,13 +194,13 @@
        (let [event (first events)
              opts (merge opts ;; we can have per event :db :retention :consistency
                          (select-keys event [:db :retention :consistency]))
-             batch-point (get-batchpoint opts)
+             ^BatchPoints batch-point (get-batchpoint opts)
              _ (doseq [event events] (.point batch-point (event->point event opts)))]
          batch-point)))
    events))

 (defn partition-events
-  "`events` is a list of events
+  "`events` is a list of events.
   partition `events` depending of the `db`, `retention` and `consistency` keys
   returns a list, each element being a list of events (the result of the partitioning)."
   [events]
@@ -248,7 +248,7 @@
       [events]
       (let [events (->> (if (sequential? events) events (list events))
                         (keep #(event->point-9 % opts)))
-            batch-point (get-batchpoint opts)
+            ^BatchPoints batch-point (get-batchpoint opts)
             _ (doseq [event events] (.point batch-point event))]
         (write-batch-point connection batch-point)
         batch-point))))


Make sure a synth's param list consists of symbols not strings

--- src/overtone/sc/synth.clj
+++ src/overtone/sc/synth.clj
@@ -418,7 +418,7 @@
         params          (first s-form)
         params          (parse-params params)
         ugen-form       (second s-form)
-        param-names     (list (vec (map :name params)))
+        param-names     (list (vec (map #(symbol (:name %)) params)))
         md              (assoc (meta s-name)
                           :name s-name
                           :type ::synth


add docstrings for infinity 'constants'

add docstrings for infinity 'constants'

--- src/overtone/sc/ugens.clj
+++ src/overtone/sc/ugens.clj
@@ -94,8 +94,13 @@
 (def WPHASE      5)
 (def MKL         6)

-(def INFINITE    Float/POSITIVE_INFINITY)
-(def INF         Float/POSITIVE_INFINITY)
+(def INFINITE
+  "Positive infinity - abbreviation for Float/POSITIVE_INFINITY"
+  Float/POSITIVE_INFINITY)
+
+(def INF
+  "Positive infinity - abbreviation for Float/POSITIVE_INFINITY"
+  Float/POSITIVE_INFINITY)

 (defmacro with-overloaded-ugens


Spawn a notification if last build wasn't finished

--- src-cljs/frontend/controllers/api.cljs
+++ src-cljs/frontend/controllers/api.cljs
@@ -228,10 +228,13 @@

 (defmethod post-api-event! [:build-observables :success]
   [target message status args previous-state current-state]
-  (let [build (get-in current-state state/build-path)]
+  (let [build (get-in current-state state/build-path)
+        previous-build (get-in previous-state state/build-path)]
     (frontend.favicon/set-color! (build-model/favicon-color build))
-    (when (build-model/finished? build)
-      (when (and (notifications/notifications-granted?)
+    (when (and (build-model/finished? build)
+               (empty? (get-in current-state state/tests-path)))
+      (when (and (not (build-model/finished? previous-build))
+                 (notifications/notifications-granted?)
                  (ld/feature-on? "web-notifications")
                  ;; TODO for V2 notifications we should consider reading from localstorage directly because
                  ;; storing it in state gets it out of sync with localstorage — or maybe this is reasonable


Remove default method for specs-spec

Remove default method for specs-spec

--- src/spectrace/specs.cljc
+++ src/spectrace/specs.cljc
@@ -9,7 +9,6 @@
 (defmulti specs-spec
   (fn [form]
     (when (seq? form) (first form))))
-(defmethod specs-spec :default [_] any?)

 (s/def ::spec (s/multi-spec specs-spec :s))


Use map for keyword->string attribute normalization

--- src/rum/server_render.clj
+++ src/rum/server_render.clj
@@ -48,15 +48,138 @@
     "meta" "param" "source" "track" "wbr"})

-(def attr-mapping
-  { :class-name      "class"
-    :className       "class"
-    :html-for        "for"
-    :htmlFor         "for"
-    :default-value   "value"
-    :defaultValue    "value"
+
+(def normalized-attrs
+  ;; https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js
+  { :accept-charset "accept-charset"
+    :access-key "accesskey"
+    :allow-full-screen "allowfullscreen"
+    :allow-transparency "allowtransparency"
+    :auto-complete "autocomplete"
+    :auto-play "autoplay"
+    :cell-padding "cellpadding"
+    :cell-spacing "cellspacing"
+    :char-set "charset"
+    :class-id "classid"
+    :class-name "class"
+    :col-span "colspan"
+    :content-editable "contenteditable"
+    :context-menu "contextmenu"
+    :cross-origin "crossorigin"
+    :date-time "datetime"
     :default-checked "checked"
-    :defaultChecked  "checked" })
+    :default-value "value"
+    :enc-type "enctype"
+    :form-action "formaction"
+    :form-enc-type "formenctype"
+    :form-method "formmethod"
+    :form-no-validate "formnovalidate"
+    :form-target "formtarget"
+    :frame-border "frameborder"
+    :href-lang "hreflang"
+    :html-for "for"
+    :http-equiv "http-equiv"
+    :input-mode "inputmode"
+    :key-params "keyparams"
+    :key-type "keytype"
+    :margin-height "marginheight"
+    :margin-width "marginwidth"
+    :max-length "maxlength"
+    :media-group "mediagroup"
+    :min-length "minlength"
+    :no-validate "novalidate"
+    :radio-group "radiogroup"
+    :read-only "readonly"
+    :row-span "rowspan"
+    :spell-check "spellcheck"
+    :src-doc "srcdoc"
+    :src-lang "srclang"
+    :src-set "srcset"
+    :tab-index "tabindex"
+    :use-map "usemap"
+    :auto-capitalize "autocapitalize"
+    :auto-correct "autocorrect"
+    :auto-save "autosave"
+    :item-prop "itemprop"
+    :item-scope "itemscope"
+    :item-type "itemtype"
+    :item-id "itemid"
+    :item-ref "itemref"
+
+    ;; https://github.com/facebook/react/blob/master/src/renderers/dom/shared/SVGDOMPropertyConfig.js
+    :allow-reorder "allowReorder"
+    :attribute-name "attributeName"
+    :attribute-type "attributeType"
+    :auto-reverse "autoReverse"
+    :base-frequency "baseFrequency"
+    :base-profile "baseProfile"
+    :calc-mode "calcMode"
+    :clip-path-units "clipPathUnits"
+    :content-script-type "contentScriptType"
+    :content-style-type "contentStyleType"
+    :diffuse-constant "diffuseConstant"
+    :edge-mode "edgeMode"
+    :external-resources-required "externalResourcesRequired"
+    :filter-res "filterRes"
+    :filter-units "filterUnits"
+    :glyph-ref "glyphRef"
+    :gradient-transform "gradientTransform"
+    :gradient-units "gradientUnits"
+    :kernel-matrix "kernelMatrix"
+    :kernel-unit-length "kernelUnitLength"
+    :key-points "keyPoints"
+    :key-splines "keySplines"
+    :key-times "keyTimes"
+    :length-adjust "lengthAdjust"
+    :limiting-cone-angle "limitingConeAngle"
+    :marker-height "markerHeight"
+    :marker-units "markerUnits"
+    :marker-width "markerWidth"
+    :mask-content-units "maskContentUnits"
+    :mask-units "maskUnits"
+    :num-octaves "numOctaves"
+    :path-length "pathLength"
+    :pattern-content-units "patternContentUnits"
+    :pattern-transform "patternTransform"
+    :pattern-units "patternUnits"
+    :points-at-x "pointsAtX"
+    :points-at-y "pointsAtY"
+    :points-at-z "pointsAtZ"
+    :preserve-alpha "preserveAlpha"
+    :preserve-aspect-ratio "preserveAspectRatio"
+    :primitive-units "primitiveUnits"
+    :ref-x "refX"
+    :ref-y "refY"
+    :repeat-count "repeatCount"
+    :repeat-dur "repeatDur"
+    :required-extensions "requiredExtensions"
+    :required-features "requiredFeatures"
+    :specular-constant "specularConstant"
+    :specular-exponent "specularExponent"
+    :spread-method "spreadMethod"
+    :start-offset "startOffset"
+    :std-deviation "stdDeviation"
+    :stitch-tiles "stitchTiles"
+    :surface-scale "surfaceScale"
+    :system-language "systemLanguage"
+    :table-values "tableValues"
+    :target-x "targetX"
+    :target-y "targetY"
+    :view-box "viewBox"
+    :view-target "viewTarget"
+    :x-channel-selector "xChannelSelector"
+    :xlink-actuate "xlink:actuate"
+    :xlink-arcrole "xlink:arcrole"
+    :xlink-href "xlink:href"
+    :xlink-role "xlink:role"
+    :xlink-show "xlink:show"
+    :xlink-title "xlink:title"
+    :xlink-type "xlink:type"
+    :xml-base "xml:base"
+    :xml-lang "xml:lang"
+    :xml-space "xml:space"
+    :y-channel-selector "yChannelSelector"
+    :zoom-and-pan "zoomAndPan" })

 (defn get-class [attrs]
@@ -72,13 +195,8 @@

 (defn normalize-attr-key ^String [key]
-  (let [^String str (or (attr-mapping key)
-                        (str/lower-case (to-str key)))]
-    (if (or (.startsWith str "data-")
-            (.startsWith str "aria-")
-            (.startsWith str "-"))
-      str
-      (str/replace str "-" ""))))
+  (or (normalized-attrs key)
+      (name key)))

 (defn escape-html [^String s]
@@ -227,7 +345,7 @@
       (not value)      :nop
       (true? value)    (append! sb " " attr "=\"\"")
       (.startsWith attr "on")            :nop
-      (= "dangerouslysetinnerhtml" attr) :nop
+      (= "dangerouslySetInnerHTML" attr) :nop
       :else            (append! sb " " attr "=\"" (to-str value) "\""))))


fix incorrect argument names in dispatch-message

--- src/subrosa/commands.clj
+++ src/subrosa/commands.clj
@@ -7,9 +7,9 @@

 (defmulti dispatch-command (fn [cmd & _] cmd))

-(defn dispatch-message [message socket]
+(defn dispatch-message [message channel]
   (let [[cmd args] (seq (.split message " " 2))]
-    (dispatch-command cmd socket (or args ""))))
+    (dispatch-command cmd channel (or args ""))))

 (defn fix-args
   [require-auth? fn-tail]


Move added metadata where it belongs

Move added metadata where it belongs

--- src/superstring/core.clj
+++ src/superstring/core.clj
@@ -657,17 +657,17 @@

 (defn char-at
   "Get the character in s at index i."
+  {:added "1.1"}
   [^String s i]
   {:pre [(string? s) (integer? i) (< i (length s))]
-   :post (instance? Character %)
-   :added "1.1"}
+   :post (instance? Character %)}
   (.charAt s i))

 (defn re-quote
   "Create a string matching s exactly, and nothing else, for use in
   regular expressions."
-  [^String s]
-  {:pre [(string? s)]
-   :post (string? %)
-   :added "1.1"}
+  {:added "1.1"}
+  [^String s]
+  {:pre [(string? s)]
+   :post (string? %)}
   (java.util.regex.Pattern/quote s))


`as-bool` should throw on incoercible arg

--- src/taoensso/carmine.clj
+++ src/taoensso/carmine.clj
@@ -88,10 +88,13 @@
 ;;; versions that auto-serialized simple number types
 (defn as-long   [x] (when x (if (number? x) (long   x) (Long/parseLong     x))))
 (defn as-double [x] (when x (if (number? x) (double x) (Double/parseDouble x))))
-(defn as-bool   [x] (cond (or (true? x) (false? x))            x
-                          (or (= x "false") (= x "0") (= x 0)) false
-                          (or (= x "true")  (= x "1") (= x 1)) true
-                          :else nil))
+(defn as-bool   [x] (when x
+                      (cond (or (true? x) (false? x))            x
+                            (or (= x "false") (= x "0") (= x 0)) false
+                            (or (= x "true")  (= x "1") (= x 1)) true
+                            :else
+                            (throw (Exception. (str "Couldn't coerce as bool: "
+                                                    x))))))

 (defmacro parse-long     [& body] `(with-parser as-long    ~@body))
 (defmacro parse-double   [& body] `(with-parser as-double  ~@body))


unnest comment-counts-wrt-atoms

unnest comment-counts-wrt-atoms

--- src/atom_finder/questions/comment_counts.clj
+++ src/atom_finder/questions/comment_counts.clj
@@ -10,6 +10,7 @@
    [schema.core :as s]
    [clojure.data.csv :as csv]
    [clojure.string :as str]
+   [clj-cdt.clj-cdt :refer :all]
    )
   (:import
    [org.eclipse.cdt.core.dom.ast IASTNode]
@@ -103,30 +104,20 @@
     ))

 ;; 33 hours
-'((->> "~/opt/src/atom-finder"
+(defn comment-counts-wrt-atoms [edn-file]
+  (->> "~/opt/src/atom-finder"
        expand-home
-       list-dirs
-       (map str)
-       (mapcat (fn [dir]
-                 (->> dir
-                    (pmap-dir-trees atoms-by-comments&function)
-                    (mapcat (fn [file-nodes]
-                           (->> file-nodes
-                                (map #(assoc %
-                                             ;:atom (or (:atom %) (->> % :node typename))
-                                             ;:proj (str/replace dir #".*\/" "")
-                                             :file (->> % :file atom-finder.questions.all-nodes/atom-finder-relative-path)
-                                             ;:line (->> % :node start-line)
-                                             ))
-                                     (map (partial-right dissoc :node))
-                                     frequencies
-                                     )))
-                    )))
-       ;(take 2)
-       ;frequencies
+       (pmap-dir-trees atoms-by-comments&function)
+       ;;(take 2)
+       (mapcat (fn [file-nodes]
+                 (->> file-nodes
+                      (map #(assoc % :file (->> % :file atom-finder-relative-path)))
+                      (map (partial-right dissoc :node))
+                      frequencies
+                      )))
        (map prn)
        dorun
-       (log-to "tmp/comment-counts_2018-10-05_01_filter-better-extensions.edn")
+       (log-to edn-file)
        time-mins
    ))

@@ -153,3 +144,8 @@
        (log-to "tmp/comment-counts_2018-01-26_01_proximity-1-line.edn")
        time-mins
    ))
+
+(defn main-comment-counts []
+  (let [edn-file "tmp/comment-counts_2018-10-05_01_filter-better-extensions.edn"]
+    (comment-counts-wrt-atoms edn-file)
+    ))


added one comment

added one comment

--- src/thehex/oauth/lib.clj
+++ src/thehex/oauth/lib.clj
@@ -164,7 +164,7 @@
                     (log/info "Populated tokens. Stopping server and exiting.")
                     (stop-server!)
                     (System/exit 0)))]
-    (<!! go-chan) ;; TODO: is this needed?
+    (<!! go-chan) ;; needed to wait until go channel is finished
     ))

 (defn refresh-tokens!


bugfix in beeminder sync

bugfix in beeminder sync

--- src/tictag/beeminder.clj
+++ src/tictag/beeminder.clj
@@ -82,7 +82,8 @@
                                                                  (existing-map daystamp))]]
                                           {:id       id
                                            :daystamp daystamp
-                                           :value    (when (not= (int old-value) value)
+                                           :value    (when (or (not old-value)
+                                                               (not= (int old-value) value))
                                                        value)}))
             ;; we delete anything that
             ;; a) has a day that doesn't appear in our new datapoints, or


re-use direction->tile to simplify slide-direction

--- src/tile_game/board.cljc
+++ src/tile_game/board.cljc
@@ -76,10 +76,9 @@
       board)))

 (defn slide-direction [board direction]
-  (let [new-pos (direction->coords board direction)]
-    (if (bounded-coords? board new-pos)
-      (slide-tile board (coords->tile board new-pos))
-      board)))
+  (if-let [tile (direction->tile board direction)]
+    (slide-tile board tile)
+    board))

 (defn slide [board arg]
   (if (direction? arg)


CMR-1746: Removed an unnecessary code block.


note on sample test

note on sample test

--- test/flambo/api_test.clj
+++ test/flambo/api_test.clj
@@ -156,8 +156,9 @@
                             ["key2" [[3] nil]]] :in-any-order))

      (fact
-      "sample returns a fraction of the RDD, with/without replacement,
-        using a given random number generator seed"
+      "sample returns a fraction of the RDD, with/without replacement, Using a
+        given random number generator seed, Sampling does not guarantee size but
+        using same seed should return same result."
       (-> (f/parallelize c [0 1 2 3 4 5 6 7 8 9])
           (f/sample false 0.3 666)
           f/collect


Updated project.clj for ring-devel

Updated project.clj for ring-devel

--- ring-devel/project.clj
+++ ring-devel/project.clj
@@ -1,7 +1,7 @@
-(defproject ring/ring-devel "0.2.5"
+(defproject ring/ring-devel "0.3.0-beta1"
   :description "Ring development and debugging libraries."
   :url "http://github.com/mmcgrana/ring"
-  :dependencies [[ring/ring-core "0.2.5"]
-                 [hiccup "0.2.6"]
-                 [clj-stacktrace "0.1.0"]]
-  :dev-dependencies [[lein-clojars "0.5.0"]])
+  :dependencies [[ring/ring-core "0.3.0-beta1"]
+                 [hiccup "0.3.0"]
+                 [clj-stacktrace "0.2.0"]]
+  :dev-dependencies [[lein-clojars "0.6.0"]])


clean some things with projects.clj

clean some things with projects.clj

--- src/clj/collect_earth_online/db/projects.clj
+++ src/clj/collect_earth_online/db/projects.clj
@@ -15,12 +15,16 @@
             [collect-earth-online.logging  :refer [log]]
             [collect-earth-online.views    :refer [data-response]]))

+;;;
 ;;; Constants
+;;;

 (def tmp-dir  (System/getProperty "java.io.tmpdir"))
 (def path-env (System/getenv "PATH"))

-;;; Auth Functions
+;;;
+;;; Auth functions
+;;;

 (defn- check-auth-common [user-id project-id token-key sql-query]
   (or (and token-key
@@ -33,7 +37,9 @@
 (defn is-proj-admin? [user-id project-id token-key]
   (check-auth-common user-id project-id token-key "can_user_edit_project"))

-;;; Data Functions
+;;;
+;;; Get data functions
+;;;

 (def default-options {:showGEEScript       false
                       :showPlotInformation false
@@ -135,7 +141,10 @@
                     :closedDate      (str (:closed_date stats))
                     :userStats       (tc/jsonb->clj (:user_stats stats))})))

-;;; Create/Update Common
+
+;;;
+;;; Create project helper functions
+;;;

 (defn- get-first-public-imagery []
   (sql-primitive (call-sql "select_first_public_imagery")))
@@ -145,9 +154,7 @@
   (doseq [imagery imagery-list]
     (call-sql "insert_project_imagery" project-id imagery)))

-;;;
-;;; Create project helper functions
-;;;
+;; Errors

 (defn- init-throw [message]
   (throw (ex-info message {:causes [message]})))
@@ -202,7 +209,7 @@
                      "."))))

 ;;;
-;;; Spacial plots
+;;; Spacial plots generator
 ;;;

 ;; Geo JSON
@@ -353,10 +360,10 @@
                      pc)))))

 ;;;
-;;; External files
-;;;
-
-(defn find-file-by-ext [folder-name ext]
+;;; External files generator
+;;;
+
+(defn- find-file-by-ext [folder-name ext]
   (->> (io/file folder-name)
        (file-seq)
        (map #(.getName %))
@@ -364,12 +371,12 @@
        (filter #(= ext (peek (str/split % #"\."))))
        (first)))

-(defn format-simple
+(defn- format-simple
   "Use any char after % for format."
   [f-str & args]
   (apply format (str/replace f-str #"(%[^ ])" "%s") args))

-(defn parse-as-sh-cmd
+(defn- parse-as-sh-cmd
   "Split string into an array for use with clojure.java.shell/sh."
   [s]
   (loop [chars (seq s)
@@ -382,7 +389,7 @@
         (recur (->> chars (drop-while #(not= \` %)))
                (->> chars (take-while #(not= \` %)) (apply str) (str/trim) (#(str/split % #" ")) (remove str/blank?) (into acc)))))))

-(defn sh-wrapper [dir env & commands]
+(defn- sh-wrapper [dir env & commands]
   (sh/with-sh-dir dir
     (sh/with-sh-env (merge {:PATH path-env} env)
       (doseq [cmd commands]
@@ -390,7 +397,7 @@
           (when-not (= 0 exit)
             (init-throw err)))))))

-(defn sh-wrapper-stdout [dir env cmd]
+(defn- sh-wrapper-stdout [dir env cmd]
   (sh/with-sh-dir dir
     (sh/with-sh-env (merge {:PATH path-env} env)
       (let [{:keys [exit err out]} (apply sh/sh (parse-as-sh-cmd cmd))]
@@ -485,7 +492,7 @@

                           (check-headers headers must-include)

-                          ;; FIXME, check for duplicates
+                          ;; FIXME, check for duplicates. here using group-by or in PG if we handle those errors correctly.
                           #_(when duplicates?
                               (init-throw (str "The " design-type " file contains duplicate primary keys.")))
                           body)
@@ -543,7 +550,7 @@
          ext-plots)))

 ;;;
-;;; Create project helper functions
+;;; Create project
 ;;;

 (defn- create-project-samples! [project-id
@@ -933,7 +940,7 @@
              [(str prefix (name key)) val])
            in-map))

-(defn map->csv [row-map key-set default]
+(defn- map->csv [row-map key-set default]
   (reduce (fn [acc cur]
             (conj acc (csv-quotes (get row-map cur default))))
           []


fix doc

fix doc

--- src/clojure/zensols/nlparse/feature/lang.clj
+++ src/clojure/zensols/nlparse/feature/lang.clj
@@ -79,20 +79,20 @@

   * **:pos-first-tag** The first POS tag.
   * **:pos-last-tag** The last POS tag.
-  * **:pos-tag-count-adjective*: The number of adjectives found.
-  * **:pos-tag-ratio-adjective*: The ratio of adjectives to other POS tags.
-  * **:pos-tag-count-adverb*: The number of adverbs found.
-  * **:pos-tag-ratio-adverb*: The ratio of adverbs to other POS tags.
-  * **:pos-tag-count-noun*: The number of nouns found.
-  * **:pos-tag-ratio-noun*: The ratio of nouns to other POS tags.
-  * **:pos-tag-count-verb*: The number of verbs found.
-  * **:pos-tag-ratio-verb*: The ratio of verbs to other POS tags.
-  * **:pos-tag-count-wh*: The number of what/when/where type questions POS
+  * **:pos-tag-count-adjective**: The number of adjectives found.
+  * **:pos-tag-ratio-adjective**: The ratio of adjectives to other POS tags.
+  * **:pos-tag-count-adverb**: The number of adverbs found.
+  * **:pos-tag-ratio-adverb**: The ratio of adverbs to other POS tags.
+  * **:pos-tag-count-noun**: The number of nouns found.
+  * **:pos-tag-ratio-noun**: The ratio of nouns to other POS tags.
+  * **:pos-tag-count-verb**: The number of verbs found.
+  * **:pos-tag-ratio-verb**: The ratio of verbs to other POS tags.
+  * **:pos-tag-count-wh**: The number of what/when/where type questions POS
   tags.
-  * **:pos-tag-ratio-wh*: The ratio of what/when/where type question POS tags
+  * **:pos-tag-ratio-wh**: The ratio of what/when/where type question POS tags
   to other POS tags.
-  * **:pos-tag-count-adjective*: The number of adjectives found.
-  * **:pos-tag-ratio-adjective*: The ratio of adjectives to other POS tags."
+  * **:pos-tag-count-adjective**: The number of adjectives found.
+  * **:pos-tag-ratio-adjective**: The ratio of adjectives to other POS tags."
   [tokens]
   (let [pos-tag-types (pt/pos-tag-types)
         tc (count tokens)]


Output is majority on string stack; use more-standard genetic operators

--- src/clojush/problems/classification/penn.clj
+++ src/clojush/problems/classification/penn.clj
@@ -81,10 +81,17 @@
                                                   :input
                                                   with-inputs))))
                             (assoc (make-push-state) :input inputs))
-            top-string (top-item :string state)]
-        (if (string? top-string)
-          (if (= top-string target) 0 1)
-          10000)))))
+        ;    top-string (top-item :string state)]
+        ;(if (string? top-string)
+        ;  (if (= top-string target) 0 1)
+        ;  10000)))))
+            [most second-most] (take 2 (reverse (sort-by val (frequencies (:string state)))))
+            answer (if (or (not most)
+                           (= (second most) (second second-most)))
+                     nil
+                     (first most))]
+        (if (= answer target) 0 1)))))
+

 (defn penn-report
   "Customized generational report."
@@ -143,17 +150,17 @@
    :population-size 1000
    :max-generations 300
    :parent-selection :lexicase
-   ;:genetic-operator-probabilities {:alternation 0.4 ;*** 0.2
-   ;                                 :uniform-mutation 0.4 ;*** 0.2
-   ;                                 :uniform-close-mutation 0.1
-   ;                                 ;*** [:alternation :uniform-mutation] 0.4
-   ;                                 :genesis 0.1 ;***
-   ;                                 }
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    ;:genesis 0.1 ;***
+                                    }
    ;:genetic-operator-probabilities {:uniform-addition-and-deletion 0.45
    ;                                 :uniform-combination-and-deletion 0.45
    ;                                 :genesis 0.1}
-   :genetic-operator-probabilities {:uniform-addition-and-deletion 0.9
-                                    :uniform-combination-and-deletion 0.1}
+   ;:genetic-operator-probabilities {:uniform-addition-and-deletion 0.9
+   ;                                 :uniform-combination-and-deletion 0.1}
    :uniform-addition-and-deletion-rate [0.1 0.01] ;[1/16 1/32 1/64 1/128]
    :uniform-combination-and-deletion-rate 1 ;[1 1/2 1/4 1/8]
    :alternation-rate 0.01


Remove whitespaces.

Remove whitespaces.

--- src/uxbox/data/auth.cljs
+++ src/uxbox/data/auth.cljs
@@ -156,7 +156,6 @@
            (rx/ignore)
            (rx/catch rp/client-error? on-error)))))

-
 (defn validate-recovery-token
   [data]
   (ValidateRecoveryToken. data))


Refactor reset-input fn

Refactor reset-input fn


cleanup rotation code

cleanup rotation code


Silence sl4fj warnings by adding slf4j-nop dep to worker pod deps

--- boot/worker/project.clj
+++ boot/worker/project.clj
@@ -18,6 +18,8 @@
   :dependencies [[org.clojure/clojure         "1.6.0"  :scope "provided"]
                  [boot/base                   ~version :scope "provided"]
                  [boot/aether                 ~version]
+                 ;; Suppress warnings from SLF4J via pomegranate via aether
+                 [org.slf4j/slf4j-nop         "1.7.22"]
                  ;; see https://github.com/boot-clj/boot/issues/82
                  [net.cgrand/parsley          "0.9.3" :exclusions [org.clojure/clojure]]
                  [mvxcvi/puget                "1.0.1"]


fix reflection warnings and improve logging

--- dada-core/src/main/clojure/org/dada/core/jms/POJOInvoker.clj
+++ dada-core/src/main/clojure/org/dada/core/jms/POJOInvoker.clj
@@ -1,5 +1,6 @@
 (ns org.dada.core.jms.POJOInvoker
     (:import
+     [java.lang.reflect Method]
      [javax.jms MessageProducer ObjectMessage Session]
      [org.dada.jms AbstractClient Invocation MethodMapper Results]
      )
@@ -22,12 +23,12 @@
 (defn -invoke [#^org.dada.core.jms.POJOInvoker this target #^Session session #^ObjectMessage request #^MessageProducer producer]
   (AbstractClient/setCurrentSession session) ;; allows object being deserialised to find current session
   ;; TODO: handle URI ClassLoading stuff here...
-  (let [[mapper] (.state this)
+  (let [[#^MethodMapper mapper] (.state this)
 	#^Invocation invocation (.getObject request)
 	;; TODO - handle Exceptions later
-	method (.getMethod mapper (.getMethodIndex invocation))
+	#^Method method (.getMethod mapper (.getMethodIndex invocation))
 	args (.getArgs invocation)
-	dummy (println "invoking: " method (map identity args))
+	dummy (println "POJO INCOMING:" (str "sessionManager." (.getName method) "(" (apply str (interpose ", " args)) ")"))
 	results (.invoke method target args) ;TODO: introspection - slow
 	reply-to (.getJMSReplyTo request)
 	correlation-id (.getJMSCorrelationID request)]
@@ -35,7 +36,7 @@
       (let [#^ObjectMessage response (.createObjectMessage session)]
 	(.setJMSCorrelationID response correlation-id)
 	(.setObject response (Results. false results))
-	(println "POJO OUTGOING:" response)
+	(println "POJO OUTGOING:" results)
 	(.send producer reply-to response)
 	))
     ))


Add modulatable dubstep inst

Add modulatable dubstep inst

--- test/example/dubstep.clj
+++ test/example/dubstep.clj
@@ -65,3 +65,49 @@
        snare (clip2 snare 1)]

    (clip2 (+ wob kick snare) 1)))
+
+;; An inst that lets you modulate the speed, wobble and note of the dubstep synth
+(definst dubstep [bpm 120 wobble 1 note 50]
+ (let [trig (impulse:kr (/ bpm 120))
+       freq (midicps (lag (demand trig 0 (dxrand [note] INF)) 0.25))
+       swr (demand trig 0 (dseq [wobble] INF))
+       sweep (lin-exp (lf-tri swr) -1 1 40 3000)
+       wob (apply + (saw (* freq [0.99 1.01])))
+       wob (lpf wob sweep)
+       wob (* 0.8 (normalizer wob))
+       wob (+ wob (bpf wob 1500 2))
+       wob (+ wob (* 0.2 (g-verb wob 9 0.7 0.7)))
+
+       kickenv (decay (t2a (demand (impulse:kr (/ bpm 30)) 0 (dseq [1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0] INF))) 0.7)
+       kick (* (* kickenv 7) (sin-osc (+ 40 (* kickenv kickenv kickenv 200))))
+       kick (clip2 kick 1)
+
+       snare (* 3 (pink-noise [1 1]) (apply + (* (decay (impulse (/ bpm 240) 0.5) [0.4 2]) [1 0.05])))
+       snare (+ snare (bpf (* 4 snare) 2000))
+       snare (clip2 snare 1)]
+
+   (clip2 (+ wob kick snare) 1)))
+
+(comment
+  ;;Control the dubstep synth with the following:
+  (dubstep)
+  (ctl dubstep :wobble 8)
+  (ctl dubstep :note 40)
+  (stop))
+
+
+(comment
+  ;;For connecting with a monome to control the wobble and note
+  (require '(polynome [core :as poly]))
+  (def m (poly/init "/dev/tty.usbserial-m64-0790"))
+  (poly/on-press m (fn [x y s]
+                   (do
+                     (let [wobble (inc y)
+                           note (nth notes x)]
+                       (println "wobble:" wobble)
+                       (println "note:" note)
+                       (poly/clear m)
+                       (poly/led-on m x y)
+                       (ctl dubstep :wobble wobble)
+                       (ctl dubstep :note note)))))
+  (poly/disconnect m))


Builds not on branch whitelist appear as "skipped" (#1481)

--- src-cljs/frontend/models/build.cljs
+++ src-cljs/frontend/models/build.cljs
@@ -129,6 +129,7 @@
   (case (:dont_build build)
     "ci-skip"            "skipped"
     "branch-blacklisted" "skipped"
+    "branch-not-whitelisted" "skipped"
     "org-not-paid"       "not paid"
     "user-not-paid"      "not paid"
     "not run"))


refactored forums scraper

refactored forums scraper

--- src/bonews_rest/scraper/forums.clj
+++ src/bonews_rest/scraper/forums.clj
@@ -3,6 +3,8 @@
             [net.cgrand.enlive-html :as html]))

 (def bugs-subforum-url "http://bo-ne.ws/forum/list.php?25")
+(def link-href [[:a (html/attr? :href)]])
+(def link-label [:h4 [:a (html/attr? :href)]])

 (defn url-by-page
   "Construct URL for a single page of a subforum"
@@ -17,41 +19,64 @@

 (defn get-thread-num-replies
   [col]
-  (Integer/parseInt (first (:content col))))
+  (-> col
+      fnext
+      (:content)
+      first
+      Integer/parseInt))

 (defn get-thread-last-update
   [col]
-  (first (:content col)))
+  (-> col
+      last
+      (:content)
+      first))

 (defn get-author-url
   [col]
-  (let [title-node (html/select col [[:a (html/attr? :href)]])]
-  (:href (:attrs (last title-node)))))
+  (-> col
+      first
+      (html/select link-href)
+      last
+      (:attrs)
+      (:href)))

 (defn get-thread-author
   [col]
-  (let [title-node (html/select col [[:a (html/attr? :href)]])]
-  (first (:content (last title-node)))))
+  (-> col
+      first
+      (html/select link-href)
+      last
+      (:content)
+      first))

 (defn get-thread-title
   [col]
-  (let [title-node (html/select col [:h4 [:a (html/attr? :href)]])]
-  (first (:content (first title-node)))))
+  (-> col
+      first
+      (html/select link-label)
+      first
+      (:content)
+      first))

 (defn get-thread-url
   [col]
-  (let [title-node (html/select col [:h4 [:a (html/attr? :href)]])]
-  (:href (:attrs (first title-node)))))
+  (-> col
+      first
+      (html/select link-label)
+      first
+      (:attrs)
+      (:href)))

 (defn get-cols
   [row]
   (let [cols (rest (html/select row [:td]))]
-    {:thread-url            (get-thread-url (first cols))
-     :thread-title          (get-thread-title (first cols))
-     :thread-num-replies    (get-thread-num-replies (fnext cols))
-     :thread-last-update    (get-thread-last-update (last cols))
-     :author                (get-thread-author (first cols))
-     :author-url            (get-author-url (first cols))}))
+    {:thread-url            (get-thread-url cols)
+     :thread-title          (get-thread-title cols)
+     :thread-num-replies    (get-thread-num-replies cols)
+     :thread-last-update    (get-thread-last-update cols)
+     :author                (get-thread-author cols)
+     :author-url            (get-author-url cols)}))

 (defn get-rows
   [table]


Add additional helpers and events for form handling.

--- src/uxbox/data/forms.cljs
+++ src/uxbox/data/forms.cljs
@@ -7,6 +7,7 @@
 (ns uxbox.data.forms
   (:require [beicon.core :as rx]
             [promesa.core :as p]
+            [lentes.core :as l]
             [uxbox.repo :as rp]
             [uxbox.rstore :as rs]
             [uxbox.state :as st]
@@ -31,10 +32,58 @@
 (defrecord AssignFieldValue [type field value]
   rs/UpdateEvent
   (-apply-update [_ state]
-    (assoc-in state [:forms type field] value)))
+    (-> state
+        (assoc-in [:forms type field] value)
+        (update-in [:errors type] dissoc field))))

 (defn assign-field-value
   [type field value]
   (AssignFieldValue. type field value))

+;; --- Clean Errors

+(defrecord CleanErrors [type]
+  rs/UpdateEvent
+  (-apply-update [_ state]
+    (assoc-in state [:errors type] nil)))
+
+(defn clean-errors
+  [type]
+  (CleanErrors. type))
+
+;; --- Clean Form
+
+(defrecord CleanForm [type]
+  rs/UpdateEvent
+  (-apply-update [_ state]
+    (assoc-in state [:form type] nil)))
+
+(defn clean-form
+  [type]
+  (CleanForm. type))
+
+;; --- Clean
+
+(defrecord Clean [type]
+  rs/WatchEvent
+  (-apply-watch [_ state s]
+    (rx/of (clean-form type)
+           (clean-errors type))))
+
+(defn clean
+  [type]
+  (Clean. type))
+
+;; --- Helpers
+
+(defn focus-form-data
+  [type]
+  (-> (l/in [:forms type])
+      (l/focus-atom st/state)))
+
+(defn focus-form-errors
+  [type]
+  (-> (l/in [:errors type])
+      (l/focus-atom st/state)))
+
+


Improved video types for better playback compatability

--- src/video_server/html.clj
+++ src/video_server/html.clj
@@ -15,7 +15,7 @@
             [video-server.library :refer [video-for-key]]
             [video-server.title :refer [best-containers best-image best-video episode-title full-title has-episodes? has-parts?
                                         has-seasons? season-desc season-titles]]
-            [video-server.video :refer [rank-containers]])
+            [video-server.video :refer [rank-containers web-playback?]])
   (:import (java.net URLEncoder)
            (java.util Locale)))

@@ -62,18 +62,24 @@
     (when (:imdb-id info) (video-link (str "http://www.imdb.com/title/" (:imdb-id info)) "IMDb"))
     (when (:netflix-id info) (video-link (str "http://dvd.netflix.com/Movie/" (:netflix-id info)) "Netflix"))))

+(defn- video-type
+  "Conditionally promotes the video type for better web playability."
+  [container]
+  (if (and (web-playback? container) (= (:mimetype container) "video/x-matroska")) "video/mp4" (:mimetype container)))
+
 (defn video-tag
-  "Returns the video tag for the specified video and container."
+  "Returns the video tag for the specified video and containers."
   [video containers]
-  (html [:video {:controls nil :preload "metadata"}
-         (for [container containers]
-           [:source {:src (:url container) :type (if (> (count containers) 1) (:mimetype container) "video/mp4")}])
-         (for [subtitle (filter #(= (:mimetype %) "text/vtt") (:subtitles video))]
-           [:track (merge {:kind "subtitles"
-                           :label (:title subtitle)
-                           :src (:url subtitle)
-                           :srclang (lang-two-letter (:language subtitle))}
-                          (when (or (:default subtitle) (:forced subtitle)) {:default nil}))])]))
+  (let [web (some #{"video/mp4" "video/webm" "video/ogg"} (map :mimetype containers))]
+    (html [:video {:controls nil :preload "metadata"}
+           (for [container containers]
+             [:source {:src (:url container) :type (if-not web (video-type container) (:mimetype container))}])
+           (for [subtitle (filter #(= (:mimetype %) "text/vtt") (:subtitles video))]
+             [:track (merge {:kind "subtitles"
+                             :label (:title subtitle)
+                             :src (:url subtitle)
+                             :srclang (lang-two-letter (:language subtitle))}
+                            (when (or (:default subtitle) (:forced subtitle)) {:default nil}))])])))

 (defn title-url
   "Returns the URL for the given title."


Unless it's production, don't send a message to hipchat.

--- src/circle/backend/build/email.clj
+++ src/circle/backend/build/email.clj
@@ -5,6 +5,7 @@
   (:use [circle.util.predicates :only (ref?)])
   (:require [clipchat.rooms])
   (:require [circle.model.build :as build])
+  (:require [circle.env :as env])
   (:require [circle.model.project :as project])
   (:import org.bson.types.ObjectId))

@@ -30,10 +31,17 @@
 (defn build-url [build]
   (ruby/send (ruby/->instance :Build @build) :absolute_url))

+(def test-hipchat-api-token "1366c4127cb0dad8d28e13dbe62645")
+(def test-hipchat-room "Test channel")
+
 (defn send-hipchat-message [project message & {:keys [color]
                                                :or {color :yellow}}]
-  (let [token (-> project :hipchat_api_token)
-        room (-> project :hipchat_room)]
+  (let [token (if (env/production?)
+                (-> project :hipchat_api_token)
+                test-hipchat-api-token)
+        room (if (env/production?)
+               (-> project :hipchat_room)
+               test-hipchat-room)]
     (when (and token room)
       (clipchat.rooms/message
        token


Catch all exceptions

Catch all exceptions

don't let exceptions bubble out of ec2-meta

--- src/clj/runbld/hosting/aws_ec2.clj
+++ src/clj/runbld/hosting/aws_ec2.clj
@@ -3,6 +3,7 @@
    [clj-http.client :as http]
    [robert.bruce :refer [try-try-again]]
    [runbld.hosting :refer [HostingProvider] :as hosting]
+   [runbld.io :as rio]
    [runbld.schema :refer :all]
    [schema.core :as s]
    [slingshot.slingshot :refer [try+ throw+]]))
@@ -18,20 +19,23 @@
   ([]
    (ec2-meta "/"))
   ([postfix]
-   (try-try-again
-    {:sleep 500
-     :tries 20}
-    #(try+
-      (:body
-       (http/get (str "http://169.254.169.254/latest/meta-data" postfix)
-                 {:socket-timeout 500 :conn-timeout 500}))
-      (catch java.net.SocketTimeoutException _)
-      (catch org.apache.http.conn.ConnectTimeoutException _)
-      (catch org.apache.http.NoHttpResponseException _)
-      (catch java.net.ConnectException _)
-      ;; Non-AWS Windows
-      (catch java.net.SocketException _)
-      (catch java.net.UnknownHostException _)))))
+   (try
+     (try-try-again
+      {:sleep 500
+       :tries 20}
+      #(try+
+        (:body
+         (http/get (str "http://169.254.169.254/latest/meta-data" postfix)
+                   {:socket-timeout 500 :conn-timeout 500}))
+        (catch java.net.SocketTimeoutException _)
+        (catch org.apache.http.conn.ConnectTimeoutException _)
+        (catch org.apache.http.NoHttpResponseException _)
+        (catch java.net.ConnectException _)
+        ;; Non-AWS Windows
+        (catch java.net.SocketException _)
+        (catch java.net.UnknownHostException _)))
+     (catch Exception e
+       (rio/log "Warning: Got exception during ec2-meta." (.getMessage e))))))

 (s/defn this-host? :- s/Bool
   "Is this host in AWS EC2?"


shrink the budget monitor header

shrink the budget monitor header

--- src/clj_money/web/money_shared.clj
+++ src/clj_money/web/money_shared.clj
@@ -46,7 +46,7 @@
   [monitor]
   [:div.panel.panel-default
    [:div.panel-heading
-    [:h4 (:caption monitor)]]
+    [:strong (:caption monitor)]]
    [:div.panel-body
     (when (:message monitor)
       [:span.note (:message monitor)])


Fix how builders are refreshed

Fix how builders are refreshed

--- src/clojure/nightcode/builders.clj
+++ src/clojure/nightcode/builders.clj
@@ -32,7 +32,7 @@
     (dialogs/show-simple-dialog! (utils/get-string :sandbox_apology))
     (when-let [d (dialogs/show-open-dialog! (utils/read-pref :android-sdk))]
       (utils/write-pref! :android-sdk (.getCanonicalPath d))
-      (show-builder! @ui/tree-selection))))
+      (show-builder! (ui/get-project-path @ui/tree-selection)))))

 (defn set-robovm!
   [& _]
@@ -40,7 +40,7 @@
     (dialogs/show-simple-dialog! (utils/get-string :sandbox_apology))
     (when-let [d (dialogs/show-open-dialog! (utils/read-pref :android-sdk))]
       (utils/write-pref! :robovm (.getCanonicalPath d))
-      (show-builder! @ui/tree-selection))))
+      (show-builder! (ui/get-project-path @ui/tree-selection)))))

 (defn eval-in-repl!
   [console path timestamp]
@@ -219,7 +219,7 @@
                (fn [_ _ _ new-state]
                  (when (nil? new-state)
                    (reset! last-reload nil))
-                 (-> @ui/tree-selection ui/get-project-path show-builder!)))
+                 (show-builder! (ui/get-project-path @ui/tree-selection))))
     ; return a map describing the builder
     {:view build-pane
      :close-fn! (:stop actions)


Updated factorial problem to version we've been using for experiments in papers

--- src/clojush/examples/factorial.clj
+++ src/clojush/examples/factorial.clj
@@ -5,14 +5,8 @@
 (ns clojush.examples.factorial
   (:use [clojush.pushgp.pushgp]
         [clojush.pushstate]
-        [clojush.random]
         [clojush.interpreter]
         [clojure.math.numeric-tower]))
-
-;;;;;;;;;;;;
-;; Integer symbolic regression of factorial, using an input instruction and
-;; lots of other instructions, a fairly large population (5000), and trivial
-;; geography. Hard but solvable.

 (define-registered
   in
@@ -29,7 +23,7 @@
 (def argmap
   {:error-function (fn [program]
                      (doall
-                       (for [input (range 1 6)]
+                       (for [input (range 1 11)]
                          (let [state (run-push program
                                                (push-item input :auxiliary
                                                           (push-item input :integer
@@ -38,13 +32,52 @@
                            (if (number? top-int)
                              (abs (- top-int (factorial input)))
                              1000000000))))) ;; big penalty, since errors can be big
-   :atom-generators (concat (registered-for-type :integer)
-                            (registered-for-type :exec)
-                            (registered-for-type :boolean)
-                            (list (fn [] (lrand-int 100))
-                                  'in))
-   :max-points 100
+   :atom-generators '(0
+                       1
+                       in
+                       boolean_and
+                       boolean_dup
+                       boolean_eq
+                       boolean_frominteger
+                       boolean_not
+                       boolean_or
+                       boolean_pop
+                       boolean_rot
+                       boolean_swap
+                       exec_dup
+                       exec_eq
+                       exec_if
+                       exec_k
+                       exec_noop
+                       exec_pop
+                       exec_rot
+                       exec_s
+                       exec_swap
+                       exec_when
+                       exec_y
+                       integer_add
+                       integer_div
+                       integer_dup
+                       integer_eq
+                       integer_fromboolean
+                       integer_gt
+                       integer_lt
+                       integer_mod
+                       integer_mult
+                       integer_pop
+                       integer_rot
+                       integer_sub
+                       integer_swap
+                       )
+   :population-size 1000
+   :max-generations 500
+   :max-points 500
    :max-points-in-initial-program 100
-   :population-size 5000
-   :trivial-geography-radius 10
-   })+   :evalpush-limit 1000
+   :use-lexicase-selection true
+   :mutation-probability 0.45
+   :crossover-probability 0.45
+   :simplification-probability 0
+   :ultra-probability 0
+   :print-history false
+   })


Fix tricky threading bug by changing order of operations.

--- src/zaffre/glterminal.clj
+++ src/zaffre/glterminal.clj
@@ -365,8 +365,8 @@
            (do
              (log/info "Destroying display")
              (with-gl-context gl-lock
-               (Display/destroy)
-               (reset! gl-lock false))
+               (reset! gl-lock false)
+               (Display/destroy))
              (log/info "Exiting"))
            (do
              (Thread/sleep 1)


Make readonly stay readonly if navigating back

--- src/braid/core/client/core/events.cljs
+++ src/braid/core/client/core/events.cljs
@@ -509,14 +509,14 @@
       (nil? group-id)
       {:db (assoc state :open-group-id nil :page page-id)}

+      (get-in state [:groups group-id :readonly])
+      {:db (assoc state :open-group-id group-id :page {:type :readonly})}
+
       (some? (get-in state [:groups group-id]))
       {:db (assoc state :open-group-id group-id :page page-id)}

-      (and group-id (not (get-in state [:groups group-id])))
-      {:dispatch [:core/load-readonly-group group-id]}
-
       :else
-      {:dispatch [:redirect-from-root]})))
+      {:dispatch [:core/load-readonly-group group-id]})))

 (reg-event-fx
   :redirect-from-root


Fix buffer size bug

Fix buffer size bug

--- src/clj/com/climate/claypoole/lazy.clj
+++ src/clj/com/climate/claypoole/lazy.clj
@@ -44,7 +44,7 @@
                                       (with-meta #(apply f a)
                                                  {:args a}))))
          ;; force buffer-size futures to start work in the pool
-         (forceahead buffer-size)
+         (forceahead (or buffer-size (impl/get-pool-size pool) 0))
          ;; read the results from the futures
          (map deref)
          (pool-closer shutdown? pool))))
@@ -56,7 +56,7 @@
   Unlike core pmap, it doesn't assume the buffer size is nprocessors + 2;
   instead, it tries to fill the pool."
   [pool f & colls]
-  (apply pmap-manual pool (impl/get-pool-size pool) f colls))
+  (apply pmap-manual pool nil f colls))

 (defn upmap-manual
   "Like pmap-manual, but with results returned in the order they completed.
@@ -66,6 +66,7 @@
   background."
   [pool buffer-size f & colls]
   (let [[shutdown? pool] (impl/->threadpool pool)
+        buffer-size (or buffer-size (impl/get-pool-size pool) 0)
         result-q (LinkedBlockingQueue. (int buffer-size))
         run-one (fn [a]
                   (let [p (promise)]
@@ -126,6 +127,8 @@
   [pool & exprs]
   `(upcalls ~pool ~@(for [e exprs] `(fn [] ~e))))

+;; TODO add pfor-manual upfor-manual?
+
 (defmacro pfor
   "A parallel version of for. It is like for, except it takes a threadpool and
   is parallel. For more detail on its parallelism and on its threadpool


Consistently use keywords in function position wherever possible

--- src/cljs/react_cljs_blogpost/core.cljs
+++ src/cljs/react_cljs_blogpost/core.cljs
@@ -18,18 +18,18 @@
 (defn generate-cards [] (mapv generate-card (generate-symbols)))

 ;couple of helpful predicate functions
-(defn is-matched [card] (= (get @card :matched) true))
-(defn is-visible [card] (= (get @card :visible) true))
+(defn is-matched [card] (= (:matched @card) true))
+(defn is-visible [card] (= (:visible @card) true))
 (defn is-revealed [card] (is-visible card))

-(defn revealed-cards-count [] (count (filter is-visible (@state :cards))))
-(defn matched-cards-count [] (count (filter is-matched (@state :cards))))
+(defn revealed-cards-count [] (count (filter is-visible (:cards @state))))
+(defn matched-cards-count [] (count (filter is-matched (:cards @state))))

 ; side effecting functions used for hiding/marking revealed cards
-(defn hide-nonmatch! [] (mapv #(swap! % assoc :visible false) (@state :cards)) (swap! state assoc :last-symbol ""))
+(defn hide-nonmatch! [] (mapv #(swap! % assoc :visible false) (:cards @state)) (swap! state assoc :last-symbol ""))
 (defn mark-match! [symbol] (mapv
                              #(swap! % assoc :matched true)
-                             (filterv #(= (get @% :symbol) symbol) (@state :cards))))
+                             (filterv #(= (:symbol @%) symbol) (:cards @state))))

 (defn reveal-card! [card-state] (swap! card-state assoc :visible true))
 (defn start-game [] (swap! state assoc :cards (generate-cards)))
@@ -46,12 +46,12 @@

             ;if 2 of cards are revealed, we have to check parity
             (if (and (= (revealed-cards-count) 2)
-                     (= (get @state :last-symbol)
-                        (get @card-state :symbol)))
-              (mark-match! (get @card-state :symbol)))
+                     (= (:last-symbol @state)
+                        (:symbol @card-state)))
+              (mark-match! (:symbol @card-state)))

             ;let's remember last symbol to make comparison in subsequent steps
-            (swap! state assoc :last-symbol (@card-state :symbol)))]
+            (swap! state assoc :last-symbol (:symbol @card-state)))]

     [:div.card
      {:onClick handle-card-click!
@@ -64,7 +64,7 @@
       {:class (if (@card-state :visible)
                 "card-value"
                 "card-value-hidden")}
-      (@card-state :symbol)]]))
+      (:symbol @card-state)]]))

 (defn home-page []
   [:div.pexeso
@@ -78,7 +78,7 @@
    [:button.button {:onClick start-game} "Restart game"]

    [:div.board
-    (doall (for [card-state (@state :cards)]
+    (doall (for [card-state (:cards @state)]
              (card card-state)))]])

 (defn current-page []
@@ -107,4 +107,4 @@

 (defn init! []
   (hook-browser-navigation!)
-  (mount-root))
+  (mount-root))


Implemented clear-factors for factor-analysis

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

--- src/conexp/contrib/factor_analysis.clj
+++ src/conexp/contrib/factor_analysis.clj
@@ -7,7 +7,8 @@
 ;; You must not remove this notice, or any other, from this software.

 (ns conexp.contrib.factor-analysis
-  (:use conexp.main))
+  (:use conexp.main)
+  (:import [java.util HashMap]))

 (ns-doc "Implements factorization algorithms for contexts.")

@@ -20,22 +21,47 @@

 ;;; Boolean

-(defn clear-factors
+(defn- clear-factors
   "From the given factors remove all which are not needed."
   [factors]
-  ;; WRITE ME!
-  factors)
+  (let [^HashMap marked (HashMap.)]
+    (doseq [factor-tail (tails factors),
+            :let [[A_i B_i] (first factor-tail)]
+            [A_j B_j] (rest factor-tail)]
+      (let [S (intersection (cross-product A_i B_i)
+                            (cross-product A_j B_j))]
+        (when-not (empty? S)
+          (.put marked [A_i B_i]
+                (into (.get marked [A_i B_i])
+                      S))
+          (.put marked [A_j B_j]
+                (into (.get marked [A_j B_j])
+                      S)))))
+    (filter (fn [[A B]]
+              (not= (cross-product A B)
+                    (set (.get marked [A B]))))
+            factors)))
+
+(defn- object-concepts
+  "Returns the object concepts of context."
+  [context]
+  (set-of [g-prime-prime, g-prime]
+          [g (objects context)
+           :let [g-prime (object-derivation context #{g}),
+                 g-prime-prime (attribute-derivation context g-prime)]]))
+
+(defn- attribute-concepts
+  "Returns the attribute concepts of context."
+  [context]
+  (set-of [m-prime, m-prime-prime]
+          [m (attributes context)
+           :let [m-prime (attribute-derivation context #{m}),
+                 m-prime-prime (object-derivation context m-prime)]]))

 (defmethod factorize-context :boolean-full
   [_ context]
-  (let [F (intersection (set-of [g-prime-prime, g-prime]
-                                [g (objects context)
-                                 :let [g-prime (object-derivation context #{g}),
-                                       g-prime-prime (attribute-derivation context g-prime)]])
-                        (set-of [m-prime, m-prime-prime]
-                                [m (attributes context)
-                                 :let [m-prime (attribute-derivation context #{m}),
-                                       m-prime-prime (object-derivation context m-prime)]])),
+  (let [F (intersection (object-concepts context)
+                        (attribute-concepts context)),
         S (difference (set (concepts context)) F),
         U (difference (incidence context)
                       (set-of [i j] [[C D] F, i C, j D]))]


Pre-install clojure 1.11.1 in lein images

--- src/docker_clojure/dockerfile/lein.clj
+++ src/docker_clojure/dockerfile/lein.clj
@@ -59,8 +59,8 @@
            "ENV PATH=$PATH:$LEIN_INSTALL"
            "ENV LEIN_ROOT 1"
            ""
-           "# Install clojure 1.10.3 so users don't have to download it every time"
-           "RUN echo '(defproject dummy \"\" :dependencies [[org.clojure/clojure \"1.10.3\"]])' > project.clj \\"
+           "# Install clojure 1.11.1 so users don't have to download it every time"
+           "RUN echo '(defproject dummy \"\" :dependencies [[org.clojure/clojure \"1.11.1\"]])' > project.clj \\"
            "  && lein deps && rm project.clj"])

         (->> (remove nil?)))))


Mujir | getTaskByID can be invoked from java api

--- src/aggregatequeryservice/dblog.clj
+++ src/aggregatequeryservice/dblog.clj
@@ -35,7 +35,7 @@
   (let [db-spec {:datasource datasource}]
     (get-all-tasks* db-spec)))

-(defn -getTaskById [datasource task-id]
+(defn -getTaskById [this datasource task-id]
   (get-task-by-id datasource task-id))

 (defn -getAllTasks [this datasource]