WIP/nb: removed multi-based CAS utils

WIP/nb: removed multi-based CAS utils

Benchmarking showed a small->negligible perf difference between
the 2nd-gen Lua-based and multi-based cases for both small and
large old-vals.

The Lua-based approach has the additional advantages of being
more flexible, and *much* faster in the high-contention hash
case (which may be quite common).

Offering both pairs of approaches seems excessive, so going to
double down on the Lua.

--- src/taoensso/carmine.clj
+++ src/taoensso/carmine.clj
@@ -562,7 +562,7 @@
   (wcar {} (hset-cas "cas-k" "field" [:foo] [:bar]))
   (wcar {} (hget "cas-k" "field")))

-(def set-lua-swap "Experimental Lua-based key swap."
+(def set-swap "Experimental Lua-based key swap."
   (let [script               (encore/slurp-resource "lua/cas-set.lua")
         cas-get (let [script (encore/slurp-resource "lua/cas-get.lua")]
                   (fn [k] (lua script {:k k} {})))]
@@ -585,7 +585,7 @@
               (recur (inc idx))
               (return abort-val))))))))

-(def hset-lua-swap "Experimental Lua-based field swap."
+(def hset-swap "Experimental Lua-based field swap."
   (let [script                (encore/slurp-resource "lua/cas-hset.lua")
         cas-hget (let [script (encore/slurp-resource "lua/cas-hget.lua")]
                    (fn [k] (lua script {:k k} {})))]
@@ -611,42 +611,6 @@

 (comment (encore/qb 100 (wcar {} (set-lua-swap "swap-k" (fn [?old _] ?old)))))

-(defn set-multi-swap "Experimental multi-based key swap."
-  [k f & [nmax-attempts abort-val]]
-  (loop [idx 1]
-    ;; (println idx)
-    (parse-suppress (watch k))
-    (let [[old-val ex] (parse nil (with-replies (get k) (exists k)))
-          nx?          (= ex 0)
-          [new-val return-val] (encore/swapped* (f old-val nx?))
-          cas-success? (parse nil
-                         (with-replies
-                           (parse-suppress (multi) (set k new-val))
-                           (exec)))]
-      (if cas-success?
-        (return return-val)
-        (if (or (nil? nmax-attempts) (< idx (long nmax-attempts)))
-          (recur (inc idx))
-          (return abort-val))))))
-
-(defn hset-multi-swap "Experimental multi-based field swap."
-  [k f field & [nmax-attempts abort-val]]
-  (loop [idx 1]
-    ;; (println idx)
-    (parse-suppress (watch k)) ; Watches entire hash key
-    (let [[old-val ex] (parse nil (with-replies (hget k field) (hexists k field)))
-          nx?          (= ex 0)
-          [new-val return-val] (encore/swapped* (f old-val nx?))
-          cas-success? (parse nil
-                         (with-replies
-                           (parse-suppress (multi) (hset k field new-val))
-                           (exec)))]
-      (if cas-success?
-        (return return-val)
-        (if (or (nil? nmax-attempts) (< idx (long nmax-attempts)))
-          (recur (inc idx))
-          (return abort-val))))))
-
 ;;;; Deprecated

 (def compare-and-set cas-set) ; DEPRECATED alias


Fix bug with 7 field record

Fix bug with 7 field record

--- src/active/clojure/record_runtime.cljc
+++ src/active/clojure/record_runtime.cljc
@@ -106,7 +106,7 @@
   ([^RecordTypeDescriptor rtd v0 v1 v2 v3 v4 v5]
    (really-make-record rtd v0 v1 v2 v3 v4 v5))
   ([^RecordTypeDescriptor rtd v0 v1 v2 v3 v4 v5 v6]
-   (really-make-record rtd v0 v1 v2 v3 v4 v5))
+   (really-make-record rtd v0 v1 v2 v3 v4 v5 v6))
   ([^RecordTypeDescriptor rtd v0 v1 v2 v3 v4 v5 v6 v7]
    (really-make-record rtd v0 v1 v2 v3 v4 v5 v6 v7))
   ([^RecordTypeDescriptor rtd v0 v1 v2 v3 v4 v5 v6 v7 v8]


#23 - Added rel=canonical links to the html pages. Also parameterized the canonical and baseurl values for part of #28.

--- src/biblecli/commands/staticpages.cljs
+++ src/biblecli/commands/staticpages.cljs
@@ -13,13 +13,13 @@
 ;;;;   limitations under the License.

 (ns biblecli.commands.staticpages
-  (:require-macros [hiccups.core :as hiccups :refer [html]])
+  (:require-macros [hiccups.core :refer [html]])
   (:require
     [biblecli.main.utility :as u]
     [cljs.nodejs :refer [require]]
     [clojure.string :as s]
     [common.normalizer.core :refer [parse]]
-    [hiccups.runtime :as hiccupsrt]))
+    [hiccups.runtime]))

 (def node-fs (require "fs"))
 (def node-path (require "path"))
@@ -231,7 +231,12 @@
 ga('create', 'UA-75078401-1', 'auto');
 ga('send', 'pageview');")

-(defn robots [] "Sitemap: https://kingjames.bible/sitemap.xml")
+(defn join-url [base rel]
+  (if (.endsWith base "/")
+    (str base rel)
+    (str base "/" rel)))
+
+(defn robots [baseurl] (str "Sitemap: " (join-url baseurl "sitemap.xml")))

 (defn book-name [book-id]
   (let [m {
@@ -332,7 +337,7 @@
       (map (fn [ch]
         (list [:a {:href (rel-url (:id b) (:num ch) (count (:chapters b)))} (:num ch)] " "))))])

-(defn toc [m]
+(defn toc [m baseurl canonical]
   (str "<!DOCTYPE html>"
     (html
       [:html {:lang "en"}
@@ -340,13 +345,14 @@
           [:title "The King James Bible"]
           [:meta {:name "description" :content "The King James Bible, the Holy Bible in English - Table of Contents"}]
           [:meta {:name "viewport" :content "width=device-width, initial-scale=1"}]
-          [:link {:rel "stylesheet" :type "text/css" :href "styles.css"}]]
+          [:link {:rel "stylesheet" :type "text/css" :href "styles.css"}]
+          [:link {:rel "canonical" :href canonical}]]
         [:body
           [:div.content
             [:h1 "The King James Bible"]

             [:div#votd.votd]
-            [:script "(function(w,d,t,u,v,i,n,l){w['VotdObject']=v;w[v]=w[v]||{};w[v].i=i;n=d.createElement(t),l=d.getElementsByTagName(t)[0];n.async=1;n.src=u;l.parentNode.insertBefore(n,l)})(window,document,'script','https://kingjames.bible/votd/votd.js','votd','votd');"]
+            [:script "(function(w,d,t,u,v,i,n,l){w['VotdObject']=v;w[v]=w[v]||{};w[v].i=i;n=d.createElement(t),l=d.getElementsByTagName(t)[0];n.async=1;n.src=u;l.parentNode.insertBefore(n,l)})(window,document,'script','votd/votd.js','votd','votd');"]

             [:h2 "The Old Testament"]
             (->> m
@@ -358,7 +364,7 @@
               (drop 39)
               (map toc-book))

-            [:div.about [:a {:href "https://github.com/pstephens/kingjames.bible/blob/master/README.md"} "About https://kingjames.bible"]]]
+            [:div.about [:a {:href "https://github.com/pstephens/kingjames.bible/blob/master/README.md"} "About " baseurl ]]]
           [:script {:type "text/javascript" :src "hiliter.js"}]]])))

 (defn chapters [m]
@@ -460,8 +466,10 @@
   [{book-id :book-id
     verses :verses
     :as ch}
-    prev-ch
-    next-ch]
+   prev-ch
+   next-ch
+   baseurl
+   canonical]
   (str
     "<!DOCTYPE html>"
     (html
@@ -470,7 +478,8 @@
           [:title (str (chapter-name ch) " - The King James Bible")]
           [:meta {:name "description" :content (str "The King James Bible, the Holy Bible in English - " (chapter-name ch))}]
           [:meta {:name "viewport" :content "width=device-width, initial-scale=1"}]
-          [:link {:rel "stylesheet" :type "text/css" :href "styles.css"}]]
+          [:link {:rel "stylesheet" :type "text/css" :href "styles.css"}]
+          [:link {:rel "canonical" :href (join-url canonical (rel-url ch))}]]
         [:body
           [:div.content
             [:div.menu
@@ -483,7 +492,7 @@
             [:h1.chap
               (chapter-name ch)]
             (map-indexed #(verse %1 ch %2) verses)
-            [:div.about [:a {:href "https://github.com/pstephens/kingjames.bible/blob/master/README.md"} "About https://kingjames.bible"]]
+            [:div.about [:a {:href "https://github.com/pstephens/kingjames.bible/blob/master/README.md"} "About " baseurl]]
             [:script {:type "text/javascript" :src "hiliter.js"}]]]])))

 (defn next-chapter [all-chapters i]
@@ -492,10 +501,10 @@
 (defn prev-chapter [all-chapters i]
   (get all-chapters (dec i)))

-(defn sitemap-line [rel-url freq priority]
+(defn sitemap-line [rel-url freq priority baseurl]
   (str
-    "<url><loc>https://kingjames.bible/"
-    rel-url
+    "<url><loc>"
+    (join-url baseurl rel-url)
     "</loc><changefreq>"
     freq
     "</changefreq><priority>"
@@ -503,14 +512,14 @@
     "</priority></url>
 "))

-(defn sitemap [chapters]
+(defn sitemap [chapters baseurl]
   (apply str
     (flatten [
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
 <urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">
 "
-(sitemap-line "" "daily" "0.8")
-(map #(sitemap-line (rel-url %) "monthly" "1.0") chapters)
+(sitemap-line "" "daily" "0.8" baseurl)
+(map #(sitemap-line (rel-url %) "monthly" "1.0" baseurl) chapters)
 "</urlset>"])))

 (defn write! [dir filename content]
@@ -520,14 +529,18 @@

 (defn static
   {:summary "Generate static HTML, CSS, JavaScript, and other resources for the books of the bible."
-   :doc "usage: biblecli static [--parser <parser>] [--input <input-path>] <output-path>
+   :doc "usage: biblecli static [--parser <parser>] [--input <input-path>] [-canonical <url>] [-baseurl <url>] <output-path>
    --parser <parser>      Parser. Defaults to '{{default-parser}}'.
    --input <input-path>   Input path. Defaults to '{{default-parser-input}}'.
+   --canonical <url>      The canonical url. Defaults to https://kingjames.bible.
+   --baseurl <url>        The base url. Defaults to https://beta.kingjames.bible.
    <output-path>          Output directory to place the resource files."
-   :cmdline-opts {:string ["parser" "input"]
+   :cmdline-opts {:string ["parser" "input" "baseurl" "canonical"]
                   :default {:parser nil
-                            :input nil}}}
-  [{parser :parser input :input output-dir :_}]
+                            :input nil
+                            :baseurl "https://beta.kingjames.bible"
+                            :canonical "https://kingjames.bible"}}}
+  [{parser :parser input :input output-dir :_ baseurl :baseurl canonical :canonical}]
   (if (not= (count output-dir) 1)
     (throw "Must have exactly one <output-path> parameter."))
   (let [parser (or parser (u/default-parser))
@@ -537,15 +550,18 @@
         output-dir (first output-dir)]
     (write! output-dir "styles.css" (style))
     (write! output-dir "hiliter.js" (js))
-    (write! output-dir "robots.txt" (robots))
-    (write! output-dir "sitemap.xml" (sitemap all-chapters))
-    (write! output-dir "7ce12f75-f371-4e85-a3e9-b7749a65f140.html" (toc m))
+    (write! output-dir "robots.txt" (robots baseurl))
+    (write! output-dir "sitemap.xml" (sitemap all-chapters baseurl))
+    (write! output-dir "7ce12f75-f371-4e85-a3e9-b7749a65f140.html" (toc m baseurl canonical))
     (dorun
       (map-indexed
         #(write!
           output-dir
           (rel-url %2)
-          (chapter %2
+          (chapter
+            %2
             (prev-chapter all-chapters %1)
-            (next-chapter all-chapters %1)))
+            (next-chapter all-chapters %1)
+            baseurl
+            canonical))
         all-chapters))))


Add defaults for port and envelope sender.

--- src/clj/com/draines/postal/message.clj
+++ src/clj/com/draines/postal/message.clj
@@ -30,10 +30,11 @@
   jmsg)

 (defn make-jmessage [msg]
-  (let [{:keys [from to cc bcc date subject body host]} msg
+  (let [{:keys [sender from to cc bcc date subject body host port]} msg
         props (doto (java.util.Properties.)
                 (.put "mail.smtp.host" (or host "not.provided"))
-                (.put "mail.from" from))
+                (.put "mail.smtp.port" (or port "25"))
+                (.put "mail.smtp.from" (or sender from)))
         session (Session/getInstance props)
         jmsg (MimeMessage. (:Session msg))]
     (add-recipients! jmsg Message$RecipientType/TO to)


Fail silently on invalid sender.

Fail silently on invalid sender.

--- src/clj/com/draines/postal/message.clj
+++ src/clj/com/draines/postal/message.clj
@@ -15,6 +15,11 @@
 (defn sender [msg]
   (or (:sender msg) (:from msg)))

+(defn make-address [addr]
+  (try
+    (InternetAddress. addr)
+    (catch Exception _)))
+
 (defn message->str [msg]
   (with-open [out (java.io.ByteArrayOutputStream.)]
     (let [jmsg (if (instance? MimeMessage msg) msg (make-jmessage msg))]
@@ -22,9 +27,10 @@
       (str out))))

 (defn add-recipient! [jmsg rtype addr]
-  (try
-    (doto jmsg (.addRecipient rtype (InternetAddress. addr)))
-    (catch AddressException _)))
+  (if-let [addr (make-address addr)]
+    (doto jmsg
+      (.addRecipient rtype addr))
+    jmsg))

 (defn add-recipients! [jmsg rtype addrs]
   (when addrs
@@ -81,10 +87,10 @@
          (add-recipients! Message$RecipientType/TO (:to msg))
          (add-recipients! Message$RecipientType/CC (:cc msg))
          (add-recipients! Message$RecipientType/BCC (:bcc msg))
-         (add-extra! (drop-keys msg standard))
-         (.setFrom (InternetAddress. (:from msg)))
+         (.setFrom (make-address (:from msg)))
          (.setSubject (:subject msg))
          (.setSentDate (or (:date msg) (make-date)))
+         (add-extra! (drop-keys msg standard))
          (add-body! (:body msg))))))

 (defn make-fixture [from to & {:keys [tag]}]
@@ -158,8 +164,9 @@
     (is (re-find #"User-Agent: Lorem Ipsum" (message->str m)))))

 (deftest test-bad-addrs
-  (let [m {:from "foo@bar.dom"
+  (let [m {:from "foo @bar.dom"
            :to "badddz@@@bar.dom"
            :subject "Test"
            :body "Bad recipient!"}]
-    (is (not (re-find #"badddz" (message->str m))))))
+    (is (not (re-find #"badddz" (message->str m))))
+    (is (not (re-find #"foo @bar" (message->str m))))))


don't use earmuffs

don't use earmuffs

--- src/cljs/clj_money/views/accounts.cljs
+++ src/cljs/clj_money/views/accounts.cljs
@@ -28,8 +28,8 @@
                                      typeahead-input
                                      required]]))

-(def ^:private *accounts* (r/atom []))
-(def ^:private *commodities* (r/atom []))
+(def ^:private accounts (r/atom []))
+(def ^:private commodities (r/atom []))

 (defn- delete
   [account]
@@ -40,7 +40,7 @@

 (defn- find-account
   ([account-id]
-   (some #(= account-id (:id %)) @*accounts*)))
+   (some #(= account-id (:id %)) @accounts)))

 (defn- account-expanded?
   [account]
@@ -53,7 +53,7 @@

 (defn- toggle-account
   [account]
-  (swap! *accounts* (fn [accounts]
+  (swap! accounts (fn [accounts]
                       (map (fn [a]
                              (cond
                                (= (:id account) (:id a))
@@ -123,17 +123,17 @@
      [:th "Name"]
      [:th (util/space)]]]
    [:tbody
-    (if (seq @*accounts*)
-      (doall (mapcat #(account-type-rows %) (nest @*accounts*)))
+    (if (seq @accounts)
+      (doall (mapcat #(account-type-rows %) (nest @accounts)))
       [:tr
        [:td {:colSpan 2} [:span.inline-status "Loading..."]]])]])

 (defn- accounts-page []
   (accounts/get-all (:id @state/current-entity)
-                    #(reset! *accounts* (-> % nest unnest))
+                    #(reset! accounts (-> % nest unnest))
                     notify/danger)
   (commodities/get-all (:id @state/current-entity)
-                       #(reset! *commodities* %)
+                       #(reset! commodities %)
                        notify/danger)
   (with-layout
     [:section
@@ -143,7 +143,7 @@

 (defn- accounts-source
   [text]
-  (->> @*accounts*
+  (->> @accounts
        (filter #(not= -1 (-> (:path %)
                              (.toLowerCase)
                              (.indexOf text))))
@@ -151,7 +151,7 @@

 (defn- commodities-source
   [text]
-  (->> @*commodities*
+  (->> @commodities
        (filter #(not= -1 (-> (:name %)
                              (.toLowerCase)
                              (.indexOf text))))
@@ -172,7 +172,7 @@
      :parent-id
      {:data-source accounts-source
       :input-placeholder "Select an account"
-      :in-fn (model-in-fn *accounts* :path)
+      :in-fn (model-in-fn accounts :path)
       :out-fn (fn [v] (if (iterable? v) (first v) v))
       :result-fn first})
    (select-input :type account-types {:visible? #(nil? (:parent-id %))})
@@ -181,7 +181,7 @@
      :commodity-id
      {:data-source commodities-source
       :input-placeholder "Select a commodity"
-      :in-fn (model-in-fn *commodities* :name)
+      :in-fn (model-in-fn commodities :name)
       :out-fn (fn [v] (if (iterable? v) (first v) v))
       :result-fn first})])

@@ -196,7 +196,7 @@

 (defn- new-account []
   (accounts/get-all (:id @state/current-entity)
-                    #(reset! *accounts* (-> % nest unnest))
+                    #(reset! accounts (-> % nest unnest))
                     notify/danger)

   (let [account (r/atom {:entity-id (:id @state/current-entity)})]
@@ -326,7 +326,7 @@
      :other-account-id
      {:data-source accounts-source
       :input-placeholder "Select the other account"
-      :in-fn (model-in-fn *accounts* :path)
+      :in-fn (model-in-fn accounts :path)
       :out-fn (fn [v] (if (iterable? v) (first v) v))
       :result-fn (fn [[path id]] path)})])

@@ -338,7 +338,7 @@

 (defn- find-account-by-path
   [path]
-  (->> @*accounts*
+  (->> @accounts
        (filter #(= (:path %) path))
        first
        :id))
@@ -399,7 +399,7 @@
                  :transaction (r/atom nil)
                  :items (r/atom nil)}]
     (accounts/get-all (:id @state/current-entity)
-                      #(reset! *accounts* (-> % nest unnest))
+                      #(reset! accounts (-> % nest unnest))
                       notify/danger)
     (accounts/get-one id
                       (fn [a]


Doubled max points

Doubled max points

--- src/clojush/problems/boolean/mux_6.clj
+++ src/clojush/problems/boolean/mux_6.clj
@@ -73,7 +73,7 @@
                               d0 d1 d2 d3
                               ;boolean_dup boolean_swap boolean_pop boolean_rot
                               )
-   :max-points 400
+   :max-points 800
    :max-genome-size-in-initial-program 200
    :genetic-operator-probabilities {:uniform-close-mutation 0.1
                                     :alternation 0.45


Another fix to promise check

Another fix to promise check

--- src/com/wsscode/common/async_cljs.cljs
+++ src/com/wsscode/common/async_cljs.cljs
@@ -8,7 +8,9 @@
   (satisfies? async.prot/ReadPort c))

 (defn promise? [x]
-  (and (object? x) (fn? (gobj/get x "then"))))
+  (try
+    (fn? (gobj/get x "then"))
+    (catch :default _ false)))

 (defn promise->chan [p]
   (let [c (async/promise-chan)]


Change to use new open-browser? key from ring-server library

--- src/leiningen/ring/server_headless.clj
+++ src/leiningen/ring/server_headless.clj
@@ -4,6 +4,6 @@
 (defn server-headless
   "Start a Ring server without opening a browser."
   ([project]
-     (server-task project {:headless? true}))
+     (server-task project {:open-browser? false}))
   ([project port]
-     (server-task project {:port (Integer. port), :headless? true})))
+     (server-task project {:port (Integer. port), :open-browser? false})))


Throw early if publications are closed. This should be picked up by peer heartbeating, but we should try to be safer and throw early.

--- src/onyx/messaging/aeron/publisher.clj
+++ src/onyx/messaging/aeron/publisher.clj
@@ -17,6 +17,10 @@
            [java.util.concurrent.atomic AtomicLong]
            [org.agrona.concurrent UnsafeBuffer]
            [org.agrona ErrorHandler]))
+
+(defn assert-not-closed [ret]
+  (if (= ret (Publication/CLOSED))
+    (throw (Exception. "Offered to a closed publication. Rebooting."))))

 (deftype Publisher [peer-config src-peer-id dst-task-id slot-id site
                     ^UnsafeBuffer buffer ^UnsafeBuffer control-buffer base-encoder segment-encoder
@@ -109,6 +113,7 @@
     (let [msg (ready replica-version src-peer-id short-id)
           len (sz/serialize control-buffer 0 msg)
           ret (.offer ^Publication publication control-buffer 0 len)]
+      (assert-not-closed ret)
       (debug "Offered ready message:" [ret msg :session-id (.sessionId publication) :site site])
       ret))
   (segment-encoder [this]
@@ -121,6 +126,7 @@
           len (sz/serialize control-buffer 0 msg)
           ret (.offer ^Publication publication control-buffer 0 len)]
       (debug "Pub offer heartbeat" (autil/channel (:address site) (:port site)) ret msg)
+      (assert-not-closed ret)
       ret))
   (poll-heartbeats! [this]
     (endpoint-status/poll! status-mon)
@@ -136,7 +142,9 @@

           (>= (endpoint-status/min-endpoint-epoch status-mon) endpoint-epoch)
           (let [ret (.offer ^Publication publication ^UnsafeBuffer buf 0 length)]
-            (when (pos? ret) (.addAndGet written-bytes length))
+            (if (pos? ret)
+              (.addAndGet written-bytes length)
+              (assert-not-closed ret))
             ret)

           :else


Change the deployment resource path

Change the deployment resource path

--- src/exploud/web.clj
+++ src/exploud/web.clj
@@ -50,7 +50,7 @@
    (GET "/tasks/:task-id"
         [task-id] (store/get-task task-id))

-   (POST "/:application/deploy"
+   (POST "/applications/:application/deploy"
          [application environment ami] (exp/deploy default-region application {:ami ami
                                                                                :environment environment
                                                                                :user default-user})))


Allow full stops and commas in strings.

Allow full stops and commas in strings.

--- src/isla/parser.clj
+++ src/isla/parser.clj
@@ -79,7 +79,7 @@
                      (fn [x] [(Integer/parseInt (first tokens))])))

 (defn -string [tokens]
-  (one-token-pattern tokens #"'[A-Za-z0-9 ]+'" :string
+  (one-token-pattern tokens #"'[A-Za-z0-9 \.,]+'" :string
                      (fn [x] [(str/replace (first tokens) "'" "")])))

 ;; helpers


Remove printing so we can try some REPL magic

--- src/korhal/core.clj
+++ src/korhal/core.clj
@@ -50,27 +50,21 @@

 (defn korhal-gameUpdate [this]

-  (println "updating")
-
   ;; spawn a drone
   (doseq [unit (.getMyUnits (:api @this))]
-    (do (println "bacon")
-        #_(when (= (.getTypeID unit) (.getID jnibwapi.types.UnitType$UnitTypes/Zerg_Larva))
-          (when (and (>= (.. (:api @this) getSelf getMinerals) 50) (not (:morphed-drone this)))
-            (println "morphing a drone")
-            (.morph (:api @this) (.getID unit) (.getID jnibwapi.types.UnitType$UnitTypes/Zerg_Drone))
-            (swap-keys (.state this) :morphed-drone true)))))
+    (when (= (.getTypeID unit) (.getID jnibwapi.types.UnitType$UnitTypes/Zerg_Larva))
+      (when (and (>= (.. (:api @this) getSelf getMinerals) 50) (not (:morphed-drone this)))
+        (println "morphing a drone")
+        (.morph (:api @this) (.getID unit) (.getID jnibwapi.types.UnitType$UnitTypes/Zerg_Drone))
+        (swap-keys (.state this) :morphed-drone true))))

   ;; collect minerals
   (for [unit (.getMyUnits (:api @this))]
     (when (= (.getTypeID unit) (.getID jnibwapi.types.UnitType$UnitTypes/Zerg_Drone))
       (when (and (.isIdle unit) (not (= (.getID unit) (:pool-drone @this))))
-        (println "collecting minerals")
         (let [mineral? (fn [unit] (= (.getTypeID unit) (.getID jnibwapi.types.UnitType$UnitTypes/Resource_Mineral_Field)))
               mineral (first (filter mineral? (.getNeutralUnits (:api @this))))]
-        (.rightClick (.getID unit) (.getID mineral))))))
-
-  (println "end of update"))
+        (.rightClick (.getID unit) (.getID mineral)))))))


add optional keywords :from-language and :show-notes

--- src/babel/italiano/grammar.cljc
+++ src/babel/italiano/grammar.cljc
@@ -737,7 +737,7 @@
      :lexicon lexicon
      :lookup (fn [arg]
                (analyze arg parse-lexicon))
-     :morph fo
+     :morph (fn [expression & {:keys [from-language show-notes]}] (fo expression))
      :morph-ps fo-ps

      :rules rules


update app-db spec not allowing nil keys

--- src/mobile_patient/db.cljs
+++ src/mobile_patient/db.cljs
@@ -19,13 +19,14 @@
   (s/map-of string? ::practitioner-model/practitioner-spec))

 (s/def ::app-db
-  (s/keys :req-un [::user-id
-                   ::patient-id
-                   ::users
-                   ::patients
-                   ::practitioners
-                   ]
-          :opt-un []))
+  (s/and (s/keys :req-un [::user-id
+                          ::patient-id
+                          ::users
+                          ::patients
+                          ::practitioners
+                          ]
+                 :opt-un [])
+         #(not (contains? % nil))))

 ;; initial state of app-db
 (def app-db {:spinner {}


Add tests for subst2.

Add tests for subst2.

--- test/little_clojurer/chapter3_test.clj
+++ test/little_clojurer/chapter3_test.clj
@@ -37,7 +37,10 @@

 (deftest subst2-test
   (testing
-    (is true)))
+    (is (= '(:a :x :c) (subst2 :x :b :c '(:a :b :c))))
+    (is (= '() (subst2 :x :b :c '())))
+    (is (= '(:a :b :b :x :b) (subst2 :x :x :c '(:a :b :b :c :b))))
+    (is (= '(:a :x :b :c :b) (subst2 :x :b :c '(:a :b :b :c :b))))))

 (deftest multirember-test


list all file content in repo revision

list all file content in repo revision

--- src/atom_finder/questions/code_age.clj
+++ src/atom_finder/questions/code_age.clj
@@ -18,8 +18,10 @@
    [schema.core :as s]
    )
   (:import
-   [org.eclipse.jgit.api Git]
-   [org.eclipse.jgit.treewalk CanonicalTreeParser]))
+   [org.eclipse.jgit
+    api.Git lib.Repository lib.ObjectId
+    revwalk.RevCommit revwalk.RevWalk
+    treewalk.CanonicalTreeParser treewalk.TreeWalk]))

 ;; https://stackoverflow.com/questions/7744656/how-do-i-filter-elements-from-a-sequence-based-on-indexes
 (defn filter-by-index [coll idxs]
@@ -49,27 +51,41 @@
        (partition-by #(-<> % .getCommitTime long sec->java-time year-month))
        (map last)))

+;; https://stackoverflow.com/questions/1685228/how-to-cat-a-file-in-jgit
+(s/defn treewalk->filestr
+  [repo :- Repository tree-walk :- TreeWalk]
+  (-<>> tree-walk (.getObjectId <> 0) (.open repo) .getBytes String.))
+
+(s/defn treewalk->file :- {:path s/Str :content s/Str}
+  [repo :- Repository tree-walk :- TreeWalk]
+  {:path    (->> tree-walk .getPathString)
+   :content (->> tree-walk (treewalk->filestr repo))})
+
 ;; https://stackoverflow.com/questions/19941597/use-jgit-treewalk-to-list-files-and-folders
-(s/defn list-repository-contents [git-repo :- Git commit]
+(def RevFile {:path s/Str :rev-str s/Str :content s/Str})
+(s/defn repo-files :- [RevFile]
+  "Return the content of every file in repository at given commit"
+  [git-repo :- Git commit :- RevCommit]
   (let [repository (.getRepository git-repo)
-        ;head (.getRef repository "HEAD") ;TODO NOT HEAD
-        walk (org.eclipse.jgit.revwalk.RevWalk. repository) ; probably can be the commit
-        ;commit (.parseCommit walk (.getObjectId head))
+        walk (org.eclipse.jgit.revwalk.RevWalk. repository)
         tree   (.getTree commit)
-        treeWalk (org.eclipse.jgit.treewalk.TreeWalk. repository)
+        tree-walk (org.eclipse.jgit.treewalk.TreeWalk. repository)
         ]

-    (.addTree treeWalk tree)
-    (.setRecursive treeWalk true)
+    (.addTree tree-walk tree)
+    (.setRecursive tree-walk true)

-    (take-while identity (repeatedly #(and (.next treeWalk) (.getPathString treeWalk))))))
+    (take-while identity
+                (repeatedly #(and (.next tree-walk)
+                                  (assoc (treewalk->file repository tree-walk)
+                                         :rev-str (->> commit .getId ObjectId/toString)))))))

-'(-<>>
+'((-<>>
  gcc-repo
  first-monthly-commits
  first
- (list-repository-contents gcc-repo)
- (take 10)
+ (repo-files gcc-repo)
+ (take 2)
  pprint
  time-mins
- )
+ ))


Start displaying some run history.

Start displaying some run history.

--- src/cljs/alert_viewer/core.cljs
+++ src/cljs/alert_viewer/core.cljs
@@ -8,6 +8,7 @@
 (enable-console-print!)

 (defonce app-state (atom {:text "Alert Viewer"
+                          :history nil
                           :stats nil
                           :alerts nil}))

@@ -16,6 +17,7 @@
        {:response-format :json
         :keywords? true
         :handler callback}))
+

 (defn ajax-post [url params callback]
@@ -42,21 +44,32 @@
              #(swap! app-state assoc :alerts
                      (get-in % [:aggregations :current-alerts :buckets]))))

+
+(defn alert-history [id cb]
+  (ajax-post "http://localhost:9250/.watch_history*/_search"
+             {:filter {:term {:watch_id id}}}
+             cb))
+
 (def app-root (. js/document (getElementById "app")) )

 (declare build-main)

-(defcomponent alert-detail [{{{:keys [last_checked last_met_condition]}
-                              :_status} :_source
-                              :keys [_id]} _]
+(defcomponent alert-history-item [{{{:keys [execution_time]} :result} :_source}
+                                  _]
+  (render [_]
+    (dom/tr
+     (dom/td (tfmt/unparse
+              (tfmt/formatter "MM/dd/YYYY hh:mm:ss a")
+              (tfmt/parse (tfmt/formatters :date-time)  execution_time))))))
+
+(defcomponent alert-detail [{:keys [history]} _]
   (render [_]
     (dom/div
      (dom/h2 {:class "subheader"} "Alert Detail")
-     (dom/p _id)
-     (dom/p last_checked)
-     (dom/p last_met_condition)
+     (dom/table
+      (om/build-all alert-history-item history))
      (dom/a {:href "#"
              :onClick #(build-main)} "Back"))))

@@ -65,7 +78,14 @@
   (render [_]
     (dom/li
      (dom/a {:href "#"
-             :onClick #(om/root alert-detail alert {:target app-root})}
+             :onClick #(alert-history
+                        key
+                        (fn [r]
+                          (swap! app-state assoc :history
+                                 (get-in r [:hits :hits]))
+                          (om/root alert-detail
+                                   {:history (get-in r [:hits :hits])}
+                                   {:target app-root})))}
             key))))

 (defcomponent stats-summary [{:keys [watcher_state]} _]
@@ -90,7 +110,6 @@
 (defn build-main []
   (om/root alert-list app-state {:target app-root}))

-
 (defn main []
   (current-alerts)
   (build-main))


Add log message for slack

Add log message for slack

--- src/clj/runbld/notifications/slack.clj
+++ src/clj/runbld/notifications/slack.clj
@@ -20,6 +20,7 @@
         js    (mustache/render-string tmpl (assoc ctx :color color))
         hook  (-> opts :slack :hook)]
     (when hook
+      ((opts :logger) "SLACK:" hook)
       (http/post hook
                  {:body js}))))


switch from uk units (miles) to ca (km)

switch from uk units (miles) to ca (km)

--- src/cljs/clj_tgcom/content.cljs
+++ src/cljs/clj_tgcom/content.cljs
@@ -61,7 +61,7 @@
      [:iframe {:src "https://free.timeanddate.com/clock/i4mcy0p7/n2020/tlde3/fn13/tt0/th1/ta1"
                :height "18"}]]
     [:div {:class "weather"}
-     [:iframe {:src "https://forecast.io/embed/#lat=48.5200&lon=9.0556&name=Tübingen&units=uk"
+     [:iframe {:src "https://forecast.io/embed/#lat=48.5200&lon=9.0556&name=Tübingen&units=ca"
                :id "forcast_embed"
                :type "text/html"
                :height "245"


Copy changes

Copy changes

--- src/cljs/new_website/static_views.cljs
+++ src/cljs/new_website/static_views.cljs
@@ -231,12 +231,16 @@
    (dom/div
     {:class "content-header statement"}
     (dom/p "Hi, I'm Conrad.")
-    (dom/p (str  "I'm recent Stanford physics graduate and a software engineer "
+    (dom/p (str  "I'm a recent Stanford physics graduate and a software engineer "
                  "working at Zanbato in Mountain View to build efficient "
                  "private markets."))
-    (dom/p (str "To see some of what I've been working on, take a look around "
-                "or head over to my GitHub. Alternatively, if you want to get "
-                "in touch, send me an email and I'll get back to you quickly."))
+    (dom/p
+      (dom/span
+        (str "To see some of what I've been working on, take a look around "
+             "or head over to my GitHub. Alternatively, if you want to get "
+             "in touch, send me an email or "))
+      (dom/a {:href "#/todo"} "let me know when you're free")
+      (dom/span " and I'll get back to you quickly."))
     (dom/p "Thanks for visiting."))))

 (defcomponent contact-view [state _]


Comments

Comments

--- src/cljs/clojure_rest/core.cljs
+++ src/cljs/clojure_rest/core.cljs
@@ -155,12 +155,17 @@
         on-click (fn []
                    (doall
                      (map #(swap! % update-in [::show-details] not) card-refs))
-                 )
-        ; !!! The following handler works when given @cards
-        ; But no refresh occurs! And the screen is blocked
-        ; This is probably because the cursors must be re-created
-        ; on-click2 (fn [] (swap! card-refs #(map toggle %)))
-        ]
+                 )]
+    ; !!! The following handler works when given @cards
+    ; But no refresh occurs! And the screen is blocked
+    ; Even if the cursors are re-created...
+    ; on-click2 (fn [] (swap! card-refs #(map toggle %)))
+    ;
+    ; Cursors are hard to make work:
+    ; => Use props and messages, but then you must provide call-backs
+    ; => But the worst is that you have to give the path accross functions
+    ; => INSTEAD try to create the component high (easy callback)
+    ; => And then compose them into views
     [:button.header-button
      {:on-click on-click :type "button"} "Expand all"]
   ))


added and action to the list page

added and action to the list page

--- src/cljs/secret_shame/core.cljs
+++ src/cljs/secret_shame/core.cljs
@@ -1,11 +1,20 @@
 (ns secret-shame.core
+  (:import [goog.net XhrIo]
+           goog.History
+           goog.history.EventType
+           goog.net.EventType
+           [goog.events EventType]
+           )
   (:require-macros [cljs.core.async.macros :refer [go alt!]])
   (:require [goog.events :as events]
             [goog.dom :as gdom]
+
+            [clojure.string :refer [join split] :as str]
+            [cljs.reader :as reader :refer [read-string]]
             [cljs.core.async :refer [put! <! >! chan timeout]]
             [reagent.core :refer [atom] :as reagent]
-            ;; [om.core :as om :include-macros true]
-            ;; [om.dom :as dom :include-macros true]
+            [secretary.core :as secretary
+             :include-macros true :refer [defroute]]
             [cljs-http.client :as http]))

 (enable-console-print!)
@@ -21,11 +30,36 @@

     c))

-(defn widget "a widget"
+(defn widget-view "widget pane"
+  [id]
+
+  [:div.col.col-xs-12.col-md-12.bootcards-cards
+   [:div.panel.panel-default
+    [:div.panel-heading.clearfix
+     [:h3.panel-title.pull-left "Widget Card Title"]
+     [:a.btn.btn-primary.pull-right {:href "#"}
+      [:i.fa.fa-pencil] "Edit"]]
+    [:div.list-group
+     [:div.list-group.item
+      [:p.list-group-item-text "Name"]
+      [:h4.list-group-item-heading "Jean Leflambeur"]]
+     [:div.list-group.item
+      [:p.list-group-item-text "Occupation"]
+      [:h4.list-group-item-heading "Thief"]]
+     [:div.list-group.item
+      [:p.list-group-item-text
+       "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam
+      mauris tellus, vehicula ut tellus id, suscipit dapibus tortor.
+      Integer viverra turpis ac fringilla hendrerit. Sed faucibus
+      posuere felis et pe."]]]
+    [:div.panel-footer
+     [:small "Take a card, any card"]]]])
+
+(defn widget-item "a widget"
   [{:keys [name] :as x}]
   ;; (println "widget " x)
   ;; :li.widget
-  [:a.widget.list-group-item {:href "#"}
+  [:a.widget.list-group-item {:href (str "#/" (last (split name #" ")))}
    [:h4..list-group-item-heading "widget card"]
    [:label.list-group-item-text name]
    ;; [:span.glyphicon.glyphicon-chevron-right.pull-right]
@@ -37,7 +71,7 @@
      [:h3 "widget-list"]
      [:ul.list-group
          (for [item  @state]
-           ^{:key (str "widget" (rand-int 100))} [widget item])]])
+           ^{:key (str "widget" (rand-int 100))} [widget-item item])]])

 (defn widget-box []
   [:div.widget-box.panel.panel-default
@@ -48,6 +82,16 @@
   [:div.col.col-xs-12.col-md-12.bootcards-list {:id "main-page"}
    [:h1 "main-page"]
    [widget-box]])
+
+(defroute widget-route "/:id" [id]
+  (.log js/console  "widget-route" id)
+  (let [widget-id (read-string id)]
+    (reagent/render-component [widget-view widget-id] (gdom/getElement "content"))))
+
+(let [h (History.)]
+  (goog.events/listen h goog.history.EventType.NAVIGATE #(secretary/dispatch! (.-token %)))
+  (doto h
+    (.setEnabled true)))

 (reagent/render-component [main-page] (gdom/getElement "content"))


added another inspect-fn with clojuresque parameter order.

--- src/clojure/sparkling/debug.clj
+++ src/clojure/sparkling/debug.clj
@@ -3,7 +3,9 @@
             [clojure.tools.logging :refer :all])
   )

-(defn inspect [rdd name]
+
+
+(defn inspect-rdd [name rdd]
   (let [cached (-> rdd
                    (s/cache )
                    (s/rdd-name  name))]
@@ -14,4 +16,8 @@
       (info "#items@" name ": " c)
       (when-not (zero? c)
         (info "first items@" name ": " (s/first cached))))
-    cached))+    cached))
+
+
+(defn inspect [rdd name]
+  (inspect-rdd name rdd))


More commenting

More commenting

--- src/cylon/oauth/impl/client.clj
+++ src/cylon/oauth/impl/client.clj
@@ -177,14 +177,18 @@
           state (str (java.util.UUID/randomUUID))]

       (expect-state this state)
+      ;; 4.1.1.  Authorization Request
       (cookies-response-with-session
        (let [loc (str
                   (:authorize-uri this)
-                  (as-query-string {"client_id" (:client-id this)
-                                    "state" state
+                  (as-query-string {"response_type" "code" ; REQUIRED
+                                    "client_id" (:client-id this) ; REQUIRED
+                                    ; "redirect_uri" nil ; OPTIONAL (TODO)
                                     "scope" (encode-scope
-                                             (union (as-set scopes)
-                                                    #{:openid :profile :email}))}))]
+                                             (union (as-set scopes) ; OPTIONAL
+                                                    #{:openid :profile :email}))
+                                    "state" state ; RECOMMENDED to prevent CSRF
+                                    }))]
          (debugf "Redirecting to %s" loc)
          (redirect loc))


[error handling] move try catch so we can see specific layer that failed.

--- keras/src/think/cortex/keras/core.clj
+++ keras/src/think/cortex/keras/core.clj
@@ -103,11 +103,13 @@
     ;;TODO models with a single channel input and figure out planar vs. interleaved
     (vec
      (flatten (concat (desc/input width height n-channels)
-                      (try
-                        (mapv model-item->desc model-vector)
-                        (catch Exception e
-                          (do (println "caught exception: " (.getMessage ^Exception e)
-                                        "processing: " model-vector)))))))))
+                      (mapv (fn [mod-item]
+                              (try
+                                (model-item->desc mod-item)
+                                (catch Exception e
+                                  (do (println "caught exception: " (.getMessage ^Exception e)
+                                               "processing: " mod-item)))))
+                            model-vector))))))

 (defn hdf5-child-map
   [node]


update cider nrepl to 0.13.0 from snapshot

--- src/leiningen/new/re_frame/project.clj
+++ src/leiningen/new/re_frame/project.clj
@@ -47,7 +47,7 @@

     :plugins      [[lein-figwheel "0.5.4-3"]{{#test?}}
                    [lein-doo "0.1.6"]{{/test?}}{{#cider?}}
-                   [cider/cider-nrepl "0.13.0-SNAPSHOT"]{{/cider?}}]
+                   [cider/cider-nrepl "0.13.0"]{{/cider?}}]
     }}

   :cljsbuild


Use pipeline2 for downgrading DAISY3 to DAISY202

--- src/mdr2/encode.clj
+++ src/mdr2/encode.clj
@@ -2,11 +2,13 @@
   "Create DAISY Talking Books for recorded productions"
   (:require [clojure.java.io :refer [file]]
             [clojure.java.shell :refer [sh]]
+            [clojure.tools.logging :as log]
             [me.raynes.fs :as fs]
             [mdr2.production :as prod]
             [mdr2.production.path :as path]
             [mdr2.dtb :as dtb]
-            [mdr2.pipeline1 :as pipeline]))
+            [mdr2.pipeline1 :as pipeline]
+            [mdr2.pipeline2.scripts :as pipeline2]))

 ;; according to wikipedia it should be 737280000 (see
 ;; http://en.wikipedia.org/wiki/CD-ROM#Capacity) but according to k3b
@@ -87,6 +89,10 @@
   (fs/delete-dir (path/encoded-path production))
   (fs/delete-dir (path/iso-path production)))

+(defn downgrade
+  [production]
+  (pipeline2/daisy3-to-daisy202))
+
 (defn encode
   [production]
   (if-let [bitrate (ideal-bitrate production)]


Trivial field rename

Trivial field rename

Signed-off-by: Gregory Haskins <640d9fe47775e6723f0355b7315e38f7d98d3539@gmail.com>

--- src/obcc/dar/ls.clj
+++ src/obcc/dar/ls.clj
@@ -40,7 +40,7 @@
         (println (doric/table [{:name :size} {:name :sha1 :title "SHA1"} {:name :path}] (:entries payload)))
         (println "Digital Signature:  none")
         (println "Raw Data Size:     " (->> payload :entries (map :size) (reduce +)) "bytes")
-        (println "Compressed Size:   " (.length file) "bytes")
+        (println "Archive Size:      " (.length file) "bytes")
         (println "Compression Alg:   " (->> payload :compression :description))
         (println "Chaincode SHA-256: " (sha256 file)))


Tweak util/ast to allow custom environments

I need to be able to analyze new forms given the parent context,
behavior which is not supported by util/ast prior to this change.

--- src/oxcart/util.clj
+++ src/oxcart/util.clj
@@ -15,14 +15,18 @@
                      macroexpand]
              :as ana]))

-(defn ast [form]
-  (binding [ana/macroexpand-1 ana.jvm/macroexpand-1
-            ana/create-var    ana.jvm/create-var
-            ana/parse         ana.jvm/parse
-            ana/var?          var?]
-    (-> (binding [macroexpand-1 ana.jvm/macroexpand-1]
-          (macroexpand form (ana.jvm/empty-env)))
-        (ana.jvm/analyze (ana.jvm/empty-env)))))
+(defn ast
+  ([form]
+     (ast form (ana.jvm/empty-env)))
+
+  ([form env]
+     (binding [ana/macroexpand-1 ana.jvm/macroexpand-1
+               ana/create-var    ana.jvm/create-var
+               ana/parse         ana.jvm/parse
+               ana/var?          var?]
+       (-> (binding [macroexpand-1 ana.jvm/macroexpand-1]
+             (macroexpand form env))
+           (ana.jvm/analyze env)))))

 (defmacro ast' [mform]


Added nvim api functions.

Added nvim api functions.

--- src/neovim_client/nvim.clj
+++ src/neovim_client/nvim.clj
@@ -1,5 +1,6 @@
 (ns neovim-client.nvim
-  (:require [neovim-client.message :refer [->request-msg]]
+  (:require [clojure.string :as str]
+            [neovim-client.message :refer [->request-msg]]
             [neovim-client.rpc :as rpc]))

 ;; ***** Public *****
@@ -40,10 +41,27 @@
   [buffer line-num line]
   (rpc/send-message! (->request-msg "buffer_set_line" [buffer line-num line])))

+(defn buffer-get-line
+  [buffer line-num]
+  (rpc/send-message! (->request-msg "buffer_get_line" [buffer line-num])))
+
 ;; ***** Experimental *****

-(defn hsplit! [] (run-command! "split"))
-(defn vsplit! [] (run-command! "vsplit"))
+(defn buffer-get-text
+  [buffer]
+  (let [buf-size (get-buffer-line-count buffer)
+        lines (map (partial buffer-get-line buffer) (range buf-size))]
+    (str/join "\n" lines)))
+
+;; TODO - make it wipe out text in the buffer after the last line of new text.
+(defn buffer-set-text!
+  [buffer text]
+  (let [lines (str/split text #"\n")]
+    (doseq [n (range (count lines))]
+      (buffer-set-line! buffer n (nth lines n)))))
+
+(defn hsplit! [] (run-command! "new"))
+(defn vsplit! [] (run-command! "vnew"))

 ;; TODO
 ;; the rest of the functions in (get_api_info)


when-valid macro exercise

when-valid macro exercise

--- true-ale/src/true_ale/core.clj
+++ true-ale/src/true_ale/core.clj
@@ -40,3 +40,31 @@
   `(let [~errors-name (validate ~to-validate ~validations)]
      (if (empty? ~errors-name)
        ~@then-else)))
+
+(if-valid order-details
+          order-details-validations
+          my-error-name
+          (println :success)
+          (println :failure my-error-name))
+
+;; Exercises
+;;
+;; 1. Write the macro when-valid so that it behaves similarly to when.
+(def order-details-validation
+  ["Please enter a name" not-empty])
+
+(defmacro when-valid
+  "Run body when valid"
+  [to-validate validations & then]
+  `(if (empty? (validate ~to-validate ~validations))
+     (do
+       ~@then)))
+
+(def valid-order-details
+  {:name "Foo"
+   :email "matt@example.com"})
+
+(when-valid valid-order-details
+            order-details-validations
+            (println "It's a success!")
+            (println "render success"))


Add a function to cut a circle from an image

The function assumes a square image, and cuts a circle, leaving the background
transparent.

--- src/fivetonine/collage/core.clj
+++ src/fivetonine/collage/core.clj
@@ -21,6 +21,8 @@
   (:require [fivetonine.collage.util :as util])
   (:import java.awt.image.BufferedImage)
   (:import java.awt.geom.AffineTransform)
+  (:import java.awt.AlphaComposite)
+  (:import java.awt.Color)
   (:import java.awt.RenderingHints))

 (declare resize*)
@@ -209,6 +211,36 @@
       (.dispose))
     base))

+(defn circle
+  "Crop a circle from an image, leaving a transparent background. This function
+  does not compose well with other functions that cut from the image, as its
+  implementation doesn't really cut - it paints parts of the image onto a
+  circle. If you need to compose circles with other shapes, create the circle
+  first.
+
+  Why must this function be so limited? Using a clip path yields a much too
+  jagged circle. Instead we paint a beautifully anti-aliased circle, and then
+  composit the image on top. This yields a pleasantly anti-aliased circle image
+  with the drawback that if you apply the transformation to a transparent image,
+  you will see the parts of the white circle the image doesn't cover."
+  [^BufferedImage image]
+  (let [width (.getWidth image)
+        circle (BufferedImage. width width BufferedImage/TYPE_INT_ARGB)]
+    (doto (.createGraphics circle)
+      (.setComposite AlphaComposite/Clear)
+      (.fillRect 0 0 width width)
+      ;; Fake soft-clipping by first drawing the desired clip shape in fully
+      ;; opaque white antialiasing enabled
+      (.setComposite AlphaComposite/Src)
+      (.setRenderingHint RenderingHints/KEY_ANTIALIASING RenderingHints/VALUE_ANTIALIAS_ON)
+      (.setColor (Color/WHITE))
+      (.fill (java.awt.geom.Ellipse2D$Float. 0 0 width width))
+      ;; Then composit the image on top
+      (.setComposite AlphaComposite/SrcAtop)
+      (.drawImage image 0 0 nil)
+      .dispose)
+    circle))
+
 (defmacro with-image
   "A helper for applying multiple operations to an image.


SSL connection for local jetty.

SSL connection for local jetty.

--- src/forces_assemble/handler.clj
+++ src/forces_assemble/handler.clj
@@ -1,7 +1,7 @@
 (ns forces-assemble.handler
   (:require [compojure.core :refer :all]
             [compojure.route :as route]
-            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
+            [ring.middleware.defaults :refer [wrap-defaults secure-api-defaults site-defaults]]
             [ring.adapter.jetty :as jetty]
             [environ.core :refer [env]]
             [monger.core :as mg]
@@ -111,7 +111,7 @@
   (route/not-found "Not Found"))

 (def app
-  (wrap-defaults app-routes site-defaults))
+  (wrap-defaults app-routes secure-api-defaults))

 (def handler
   (-> app-routes
@@ -119,4 +119,10 @@

 (defn def-server []
   (def server
-    (jetty/run-jetty #'handler {:port 8000 :join? false})))
+    (jetty/run-jetty #'app
+                     {:port 8000
+                      :join? false
+                      :ssl? true
+                      :ssl-port 8443
+                      :keystore (str (env :home) "/jetty.keystore")
+                      :key-password (env :jetty-keystore-password)})))


Fixes the position of type hints.

Fixes the position of type hints.

--- src/leiningen/voom/long_sha.clj
+++ src/leiningen/voom/long_sha.clj
@@ -4,10 +4,10 @@
 (set! *warn-on-reflection* true)
 (set! *unchecked-math* true)

-(defn ^:private ^long nibbles [^long num]
+(defn ^:private nibbles ^long [^long num]
   (-> num (bit-shift-right 60) (bit-and 0xf)))

-(defn ^long mask [^long num]
+(defn mask ^long [^long num]
   (bit-shift-right
    0xfffffffffffffff
    (* 4 (- 15 (nibbles num)))))


Indentation fix

Indentation fix

--- src/time_tracker/projects/handlers.clj
+++ src/time_tracker/projects/handlers.clj
@@ -36,7 +36,7 @@
 (defmethod projects-single-rest-raw :delete
   [{:keys [route-params credentials]}]
   (if (projects.db/delete-if-authorized! (Integer/parseInt (:id route-params))
-                                                 (:sub credentials))
+                                         (:sub credentials))
     (-> (res/response nil)
         (res/status 204))
     util/forbidden-response))


Hot fix: auth related

Hot fix: auth related

--- backend/src/akvo/lumen/lib/auth.clj
+++ backend/src/akvo/lumen/lib/auth.clj
@@ -61,7 +61,7 @@
                                                              true))))
                                                       (mapv :id))]
                                {:auth-datasets auth-datasets})
-                             {})]
+                             {:auth-datasets (mapv dss :id)})]
         (handler (assoc request
                         :db-query-service
                         (new-dbqs (p/connection tenant-manager tenant)


ensure budgets/find-by-date returns nil on no match

--- test/clj_money/models/budgets_test.clj
+++ test/clj_money/models/budgets_test.clj
@@ -153,6 +153,15 @@
         "The returned value reflects the update")
     (is (= "edited" (:name retrieved))
         "The retrieved value reflects the updated")))
+
+(deftest find-a-budget-by-date
+  (let [context (serialization/realize storage-spec update-context)]
+    (testing "when no budget matches"
+      (is (nil? (budgets/find-by-date storage-spec (t/local-date 2016 1 1)))))
+    (testing "when a budget is mached"
+      (is (= "2017"
+             (:name (budgets/find-by-date storage-spec
+                                          (t/local-date 2017 1 1))))))))

 ;; Items
 (def budget-item-context


Fix wrong value assertion.

Fix wrong value assertion.


Added test for create-job called with wrong metadata

--- test/emender_jenkins/rest_api_test.clj
+++ test/emender_jenkins/rest_api_test.clj
@@ -485,6 +485,9 @@
 (def create-job-postdata-bad-job-name-2
     "{\"name\":\"test-Test_Product-1.0-Test_Book-en-US\", \"ssh_url_to_repo\":\"https://url-to-repo.git\", \"branch\":\"master\"}")

+(def create-job-postdata-invalid-metadata-1
+    "{\"ssh_url_to_repo\":\"https://url-to-repo.git\", \"branch\":\"master\"}")
+
 (def default-request
     {:configuration
         {:jobs
@@ -535,6 +538,20 @@
                                                            :headers {"Content-Type" "application/json"}
                                                            :body "{\"status\":\"error\",\"jobName\":\"test-Test_Product-1.0-Test_Book-en-US\",\"command\":\"create_job\",\"message\":\"The name of job is wrong\"}"})))))

+(deftest test-create-job-invalid-metadata-1
+    "Check the function emender-jenkins.rest-api/create-job."
+    (testing "the function emender-jenkins.rest-api/create-job."
+        (with-redefs [jenkins-api/create-job (fn [jenkins-url jenkins-auth include-jenkins-reply? job-name git-repo branch credentials-id metadata-directory metadata]
+                                                 (jenkins-api/ok-response-structure job-name "create_job" include-jenkins-reply? "created"))
+                      jenkins-api/start-job  (fn [jenkins-url jenkins-auth include-jenkins-reply? job-name]
+                                                 (jenkins-api/ok-response-structure job-name "build" include-jenkins-reply? "added to queue"))
+                      read-request-body      (fn [request] create-job-postdata-invalid-metadata-1)
+                      reload-job-list        (fn [response request] response)
+                      send-response          (fn [response request] response)]
+                      (is (= (create-job default-request) {:status  400
+                                                           :headers {"Content-Type" "application/json"}
+                                                           :body "{\"status\":\"error\",\"command\":\"create_job\",\"message\":\"invalid or missing input\"}"})))))
+
 (deftest test-create-job-NPE
     "Check the function emender-jenkins.rest-api/create-job."
     (testing "the function emender-jenkins.rest-api/create-job."


Fixed remaining conflict artifact

Fixed remaining conflict artifact

--- test/forma/postprocess/select_test.clj
+++ test/forma/postprocess/select_test.clj
@@ -143,7 +143,7 @@
                                                   ["MYS" 830 0.7]
                                                   ["MYS" 831 0.9]
                                                   ["nil" 0 0]])))
-=======
+
 ;; TODO: put in ! instead of nil value
 ;; predicate macro in agg-tap


renamed  to

renamed  to

--- test/push/design_spikes/dsl_macros.clj
+++ test/push/design_spikes/dsl_macros.clj
@@ -52,7 +52,7 @@
 ;    save the entire stack to the `local`
 ;    raise an Exception if it's undefined

-; + `place [stackname args kwd]`
+; + `put-onto [stackname kwd]`
 ;    push the local `kwd` on the named stack
 ;    raise an Exception if it's undefined

@@ -137,7 +137,7 @@

-(defn place
+(defn put-onto
   "pushes a named scratch value onto a given stack"
   [[interpreter scratch] stack kwd]
   (let [item (kwd scratch)
@@ -145,11 +145,11 @@
   (vector updated scratch)))

-(fact "`place` will push the saved scratch value to the indicated stack in the interpreter"
+(fact "`put-onto` will push the saved scratch value to the indicated stack in the interpreter"
   (let [integer-added (-> [six-ints {}]
                           (consume-top-of :integer :as :int1)
                           (consume-top-of :integer :as :int2)
-                          (place :boolean :int1))]
+                          (put-onto :boolean :int1))]
     (get-stack-from-dslblob integer-added :boolean) => '(6)))

@@ -374,7 +374,7 @@
     (consume-top-of :integer :as :int1)
     (consume-top-of :integer :as :int2)
     (calculate [:int1 :int2] #(+ %1 %2) :as :sum)
-    (place :integer :sum)))
+    (put-onto :integer :sum)))

 (fact "that int-adder thing actually does the thing"
   (get-stack (int-adder six-ints) :integer) => '(11 4 3 2 1))
@@ -399,7 +399,7 @@
     (count-of :float :as :how-many)
     (calculate [:index :how-many] #(mod %1 %2) :as :which)
     (remember-nth :float :at :which :as :dup-me)
-    (place :float :dup-me)
+    (put-onto :float :dup-me)
     ))

 (fact "that float-yankduper thing actually does the thing"
@@ -465,7 +465,7 @@
       #(if (zero? %1)
           (list)
           (list %2 %3 :code_quote %4 :code_do*range)) :as :continuation)
-    (place :exec :continuation)
+    (put-onto :exec :continuation)
     ))

@@ -503,7 +503,7 @@
       'consume-stack {(second step) 0}
       'consume-top-of {(second step) 1}
       'count-of {(second step) 0}
-      'place {(second step) 0}
+      'put-onto {(second step) 0}
       'remember-nth {(second step) 1}
       'remember-stack {(second step) 0}
       'remember-top {(second step) 1}
@@ -526,7 +526,7 @@
       (consume-top-of :baz)
       (consume-top-of :qux :as :int1)
       (count-of :quux)
-      (place :corge :ugh)
+      (put-onto :corge :ugh)
       (calculate [] #(8) :as :ugh)
       (remember-nth :grault :as ugh :at 6)
       (remember-stack :garply :as :ugh)
@@ -548,7 +548,7 @@
       (consume-nth :bar)     ; +1
       (remember-stack :bar :as :ugh)    ; +0

-      (place :baz :ugh)      ; +0
+      (put-onto :baz :ugh)      ; +0
       (remember-top :baz :as :ugh)      ; +1

       (replace-stack :fred :ugh)        ; +0
@@ -568,5 +568,5 @@
       #(if (zero? %1)
           (list)
           (list %2 %3 :code_quote %4 :code_do*range)) :as :continuation)
-    (place :exec :continuation)
+    (put-onto :exec :continuation)
   )) => {:code 1, :exec 0, :integer 2})


place failed messages on separate retry-queue

--- src/polismath/conv_man.clj
+++ src/polismath/conv_man.clj
@@ -40,6 +40,7 @@
       (utils/hash-map-subset #{
                                :base-clusters
                                :group-clusters
+                               :subgroup-clusters
                                :in-conv
                                :lastVoteTimestamp
                                :lastModTimestamp
@@ -311,8 +312,10 @@
           conv (load-or-init conv-man zid :recompute (:recompute config))
           _ (log/info "Conversation loaded for conv zid:" zid)
           ;; XXX Need to set up message chan buffer as a env var
-          message-chan (chan 100000)]
-      (swap! conversations assoc zid {:conv conv :message-chan message-chan})
+          message-chan (chan 100000)
+          ;; We use a separate cchannel for messages that we've tryied to process but that havent worked for one reason or another
+          retry-chan   (chan 10)] ; only relaly need buffer 1 here?
+      (swap! conversations assoc zid {:conv conv :message-chan message-chan :retry-chan retry-chan})
       ;; Just call again to make sure the message gets on the chan :-)
       (queue-message-batch! conv-man message-type zid message-batch)
       ;; However, we don't use the conversations atom conv state, but keep track of it explicitly in the loop,
@@ -320,10 +323,11 @@
       ;; just a convenience.
       (go-loop [conv conv]
         (let [first-msg (<! message-chan)
+              retry-msgs (async/poll! retry-chan)
               _ (log/info "Message chan put in queue-message-batch! for zid:" zid)
-              msgs (concat [first-msg] (take-all! message-chan))
+              msgs (vec (concat retry-msgs [first-msg] (take-all! message-chan)))
               {:as split-msgs :keys [votes moderation]} (split-batches msgs)
-              error-handler (build-update-error-handler conv-man message-chan conv)
+              error-handler (build-update-error-handler conv-man retry-chan conv)
               _ (log/info "About to run updaters")
               ;; TODO Oh... is this how we're failing to get moderation affecting repness? We're presently only updating mongo
               ;; (via `update`) if there are also votes. (see below)


Retrun main handler from a second-order function

--- clstreams/src/clstreams/webapi.clj
+++ clstreams/src/clstreams/webapi.clj
@@ -5,12 +5,13 @@
             [clstreams.kstreams :as ks])
   (:import org.apache.kafka.streams.state.QueryableStoreTypes))

-(defn main-handler [{{kstreams :kstreams} :pipeline} request]
-  (let [store (.store kstreams "Counts" (QueryableStoreTypes/keyValueStore))]
-    (response (str (.get store "kafka")))))
+(defn make-main-handler [{{kstreams :kstreams} :pipeline}]
+  (fn [request]
+    (let [store (.store kstreams "Counts" (QueryableStoreTypes/keyValueStore))]
+      (response (str (.get store "kafka"))))))

 (defn make-app [component]
-  (-> (partial main-handler component)
+  (-> (make-main-handler component)
       wrap-json-body
       wrap-json-response))


Decode keys of all values

Decode keys of all values

--- src/simpledb/db.clj
+++ src/simpledb/db.clj
@@ -68,17 +68,17 @@
     (apply-to-keys convert-underscores)))

 (defn get-everything [db-spec table]
-  (jdbc/query db-spec (->
-                        (select :*)
-                        (from table)
-                        sql/format)))
+  (map decode-keys (jdbc/query db-spec (->
+                                         (select :*)
+                                         (from table)
+                                         sql/format))))

 (defn get-values [db-spec table id]
   (map decode-keys (jdbc/query db-spec (->
-                        (select :*)
-                        (from table)
-                        (where [:= :id id])
-                        sql/format))))
+                                         (select :*)
+                                         (from table)
+                                         (where [:= :id id])
+                                         sql/format))))

 (defn count-all-values [db-spec table]
   (jdbc/query db-spec (->
@@ -120,10 +120,10 @@

 (defn get-everything-user [db-spec table username]
   (map decode-keys (jdbc/query db-spec (->
-                        (select :*)
-                        (from table)
-                        (where [:= :username username])
-                        sql/format))))
+                                         (select :*)
+                                         (from table)
+                                         (where [:= :username username])
+                                         sql/format))))

 (deftype SimpleDB [db-spec table]
   clojure.lang.Counted


Add filter-nils

Add filter-nils

--- src/trak/utils.cljs
+++ src/trak/utils.cljs
@@ -33,3 +33,6 @@

 (defn ifnil? [possibly-nil default]
   (if (nil? possibly-nil) default possibly-nil))
+
+(defn filter-nils [some-sequence]
+  (filter (fn [item] (not= nil item)) some-sequence))


initial turns handling

initial turns handling

--- src/ttt/handler.clj
+++ src/ttt/handler.clj
@@ -10,12 +10,21 @@

 (cheshire.generate/add-encoder org.bson.types.ObjectId cheshire.generate/encode-str)

+(def empty-field [0,0,0,0,0,0,0,0,0])
+
 (defn generate
   "generates a unique token for the game"
   []
   (str (System/currentTimeMillis)))

-(def hotseat 0)
+(defn fail
+  "returns a serialized json with error description"
+  [error]
+  (case error
+    :wrong-turn (generate-string {:error "wrong turn"})
+    :invalid-state (generate-string {:error "invalid state"})
+    :not-found (generate-string {:error "resource not found"})
+    (generate-string {:error "unknown error"})))

 (let [conn (mg/connect)
       db   (mg/get-db conn "ttt")
@@ -30,29 +39,49 @@
   (defn new-game
     "Creates a new game"
     [body]
-    (let [type (get body "type")]
-      (if
-        (= type hotseat)
-          (generate-string
-             (mc/insert-and-return db coll {:token (generate) :type type}))
-        "Bad request")))
+    (let [{type "type" password "password"} body]
+      (case type
+        0 (generate-string
+                  (mc/insert-and-return db coll {:token (generate) :type type :field empty-field :state :first-player-turn}))
+        1 "shared key"
+        "asd Bad request")))

   (defn get-game
     "Returns a status of a game by id"
     [id]
     (generate-string
-        (mc/find-one db coll {:token id} [:token :state :field]) false)))
+        (mc/find-one db coll {:token id} [:token :state :field]) false))
+
+  (defn make-turn
+    "Make a turn"
+    [id, body]
+    (let [game (mc/find-one-as-map db coll {:token id})
+          {state :state field :field token :token} game
+          {player "player" position "position"} body]
+      (prn player)
+      (case state
+        "first-player-turn" (cond
+                               (= player 1) (generate-string (mc/save-and-return db coll (assoc game :state :second-player-turn)))
+                               :else (fail :wrong-turn))
+        "second-player-turn" (cond
+                               (= player 2) (generate-string (mc/save-and-return db coll (assoc game :state :first-player-turn)))
+                               :else (fail :wrong-turn))
+        "first-player-won" (generate-string game)
+        "second-player-won" (generate-string game)
+        "tie" (generate-string game)
+        (fail :invalid-state)))))

 (defroutes app-routes
   (context "/games" [] (defroutes games-routes
      (GET "/" [] (get-all-games))
      (POST "/" {body :body} (new-game body))
      (context "/:id" [id] (defroutes game-routes
-        (GET "/" [] (get-game id))))))
+        (GET "/" [] (get-game id))
+        (PUT "/" {body :body} (make-turn id body))))))

   (GET "/" [] (response/file-response "index.html" {:root "resources/public"}))
   (route/resources "/")
-  (route/not-found "Not Found"))
+  (route/not-found (fail :not-found)))

 (def app
   (-> (handler/api app-routes)


added link to card for followup investigation of non-protein targets

--- kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/drugbank/drugbank_rules.clj
+++ kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/drugbank/drugbank_rules.clj
@@ -71,6 +71,7 @@
     ;; links to a protein bio-entity
     ;; of 12,704 target records, all but 225 have an associated polypeptide record
     ;; we should look into those 225 targets at some point as they are currently excluded
+    ;; There is card for this: https://trello.com/c/JulbRanl
     (_/target_record obo/BFO_0000051 _/polypeptide_record)
     (_/polypeptide_record kiao/hasTemplate iaodrugbank/PolypeptideSchema1)
     (_/polypeptide_record obo/BFO_0000051 _/polypeptide_id_field)


CMR-1354 Add temporal sort back in

CMR-1354 Add temporal sort back in

--- search-app/src/cmr/search/data/query_to_elastic.clj
+++ search-app/src/cmr/search/data/query_to_elastic.clj
@@ -360,7 +360,7 @@
         sub-sort-fields (if (:all-revisions? query)
                           collection-all-revision-sub-sort-fields
                           collection-latest-sub-sort-fields)]
-    (concat (or specified-sort keyword-sort default-sort) sub-sort-fields)))
+    (concat (or specified-sort keyword-sort temporal-sort default-sort) sub-sort-fields)))

 (extend-protocol c2s/ComplexQueryToSimple
   cmr.search.models.query.CollectionQueryCondition


Add missing require's on tests main function.

--- test/user.clj
+++ test/user.clj
@@ -26,6 +26,9 @@

 (defn -main
   [& args]
+  (require 'suricatta.core-test)
+  (require 'suricatta.extend-test)
+  (require 'suricatta.dsl-test)
   (let [{:keys [fail]} (run-test)]
     (if (pos? fail)
       (System/exit fail)


Removing test-save-quote from file.clj

Removing test-save-quote from file.clj

--- quote-generator-prototype/src/quote_generator_prototype/database/file.clj
+++ quote-generator-prototype/src/quote_generator_prototype/database/file.clj
@@ -45,10 +45,4 @@
     (spit (str "./quotes/" uuid ".edn") (pr-str edn-quote))
     uuid))

-(defn test-save-qoute
-  []
-  (save-quote (json/generate-string {:products []
-                                     :client "Unknown"
-                                     :preparer "tomjkidd@gmail.com"
-                                     :approved false
-                                     :id nil})))
+


Undo error-prone post validation

Undo error-prone post validation

--- src/swartz/controllers.clj
+++ src/swartz/controllers.clj
@@ -57,21 +57,13 @@
         user (first (users/find-by-username users/db (:current identity)))
         title (:title params)
         url (:url params)
-        content (:content params)]
-    (if (empty? title)
-      (assoc-in (redirect "/posts/new")
-                [:session :_flash]
-                "Please enter a title.")
-      (if (and (empty? url) (empty? content))
-        (assoc-in (redirect "/posts/new")
-                  [:session :_flash]
-                  "Please enter a URL or content.")
-        (let [post (posts/create<! posts/db
-                                   title
-                                   url
-                                   content
-                                   (:id user))]
-          (redirect (str "/posts/" (:id post))))))))
+        content (:content params)
+        post (posts/create<! posts/db
+                             (:title params)
+                             (:url params)
+                             (:content params)
+                             (:id user))]
+    (redirect (str "/posts/" (:id post)))))

 (defn get-post [req]
   (let [post-id (Integer/parseInt (:id (:params req)))


fix failing cljs tests

fix failing cljs tests

--- src/test/om_css/tests.cljs
+++ src/test/om_css/tests.cljs
@@ -7,22 +7,22 @@
    :ns-name "ns.core"})

 (deftest test-format-class-name
-  (are [cn res] (= (utils/format-class-name component-info cn) res)
+  (are [cn res] (= (utils/format-class-name cn component-info) res)
     :foo "ns_core_Foo_foo"
     "foo" "ns_core_Foo_foo")
   (is (= (utils/format-class-name
+           :foo
            {:ns-name "ns.core"
-            :component-name "ns.core/Foo"}
-           :foo)
+            :component-name "ns.core/Foo"})
         "ns_core_Foo_foo")))

 (deftest test-format-class-names
-  (are [cns res] (= (utils/format-class-names component-info cns) res)
-    "ns_core_Foo_foo" "ns_core_Foo_foo"
-    :foo "ns_core_Foo_foo"
-    [:foo] "ns_core_Foo_foo"
-    [:foo :bar] "ns_core_Foo_foo ns_core_Foo_bar"
-    ["ns_core_Foo_foo"] "ns_core_Foo_foo"
-    ["ns_core_Foo_foo"] "ns_core_Foo_foo"
-    ["ns_core_Foo_foo" "ns_core_Foo_bar"] "ns_core_Foo_foo ns_core_Foo_bar"
-    ["ns_core_Foo_foo" :bar] "ns_core_Foo_foo ns_core_Foo_bar"))
+  (are [cns classes-seen res] (= (utils/format-class-names cns component-info classes-seen) res)
+    "ns_core_Foo_foo" #{} "ns_core_Foo_foo"
+    :foo #{:foo} "ns_core_Foo_foo"
+    [:foo] #{:foo} "ns_core_Foo_foo"
+    [:foo :bar] #{:foo :bar} "ns_core_Foo_foo ns_core_Foo_bar"
+    ["ns_core_Foo_foo"] nil "ns_core_Foo_foo"
+    ["ns_core_Foo_foo"] nil "ns_core_Foo_foo"
+    ["ns_core_Foo_foo" "ns_core_Foo_bar"] nil "ns_core_Foo_foo ns_core_Foo_bar"
+    ["ns_core_Foo_foo" :bar] #{:bar} "ns_core_Foo_foo ns_core_Foo_bar"))


CMR-3281 simpifies code

CMR-3281 simpifies code

--- access-control-app/src/cmr/access_control/services/permitted_concept_id_search.clj
+++ access-control-app/src/cmr/access_control/services/permitted_concept_id_search.clj
@@ -106,12 +106,8 @@
         parsed-metadata (if (= concept-type :collection)
                           (umm-spec/parse-metadata (merge {:ignore-kms-keywords true} context) concept)
                           (umm-lib/parse-concept concept))
-        identifier (if (= concept-type :collection)
-                     :collection-identifier
-                     :granule-identifier)
-        applicable (if (= concept-type :collection)
-                     :collection-applicable
-                     :granule-applicable)]
+        identifier (keyword (str (name concept-type) "-identifier"))
+        applicable (keyword (str (name concept-type) "-applicable"))]
     (gc/and-conds
      [(common-qm/string-condition :provider (:provider-id concept))
       (gc/or-conds


goog-define docstring typo

goog-define docstring typo

--- src/main/clojure/cljs/core.cljc
+++ src/main/clojure/cljs/core.cljc
@@ -698,7 +698,7 @@
     (ns your-app.core)
     (goog-define DEBUG! false)
     ;; can be overridden with
-    :closure-defines {\"your-app.core.DEBUG_BANG_\" true}
+    :closure-defines {\"your_app.core.DEBUG_BANG_\" true}
     or
     :closure-defines {'your-app.core/DEBUG! true}"
   [sym default]


context null = 0

context null = 0

--- src/webapp/controllers.clj
+++ src/webapp/controllers.clj
@@ -104,7 +104,7 @@

 (defn microblog_publish_ctrl [request] (let [message (:message (:params request))] (do
     (log request "microblog_post" "publish" (:remote-addr request) {:message message})
-    (mb_post_return message "")
+    (mb_post_return "" message)
     message_submitted)))

 (defn post_ctrl [request] (friend/authenticated (json_posts)))


Highlight movies with high rating

Highlight movies with high rating

--- src/yorck_ratings/view.clj
+++ src/yorck_ratings/view.clj
@@ -12,11 +12,22 @@
      [:meta {:charset "utf-8"}]
      [:style "body {
                 font-size: 16px;
-                line-height: 1.5em;
+                line-height: 1.4rem;
               }
               ol { list-style: none; }
-              a { color: black; }"]]
+              li {
+                padding: .1rem;
+              }
+              a { color: black; }
+              .highlighted {
+                background-color: yellow;
+                margin-left: -.4rem;
+                margin-right: -.4rem;
+                padding-left: .4rem;
+                padding-right: .4rem;
+               }"]]
     [:body
      [:ol
       (for [movie movies]
-        [:li (movie-item movie)])]]))
+        [:li
+         [:span {:class (if (< (:rating movie) 7) "" "highlighted")} (movie-item movie)]])]]))


update to final urls

update to final urls

--- src/metabase/email/messages.clj
+++ src/metabase/email/messages.clj
@@ -105,10 +105,10 @@
                              (if (= "abandon" msg-type)
                                {:heading "We’d love your feedback."
                                 :callToAction "It looks like Metabase wasn’t quite a match for you. Would you mind taking a fast 5 question survey to help the Metabase team understand why and make things better in the future?"
-                                :link         "http://www.metabase.com/feedback/this-thing-sucks"}
+                                :link         "http://www.metabase.com/feedback/abandoned"}
                                {:heading "We hope you've been enjoying Metabase."
                                 :callToAction "Would you mind taking a fast 6 question survey to tell us how it’s going?"
-                                :link         "http://www.metabase.com/feedback/best-analytics-evar"}))
+                                :link         "http://www.metabase.com/feedback/active"}))
         message-body  (stencil/render-file "metabase/email/follow_up_email" context)]
     (email/send-message
       :subject      subject


improve missing instance error

improve missing instance error

--- src/main/shadow/cljs/devtools/server/runtime.clj
+++ src/main/shadow/cljs/devtools/server/runtime.clj
@@ -8,7 +8,10 @@
 (defn get-instance! []
   (let [inst @instance-ref]
     (when-not inst
-      (throw (ex-info "missing instance" {})))
+      (throw (ex-info
+               (str "shadow-cljs has not been started yet!\n"
+                    "In embedded mode you need to call (shadow.cljs.devtools.server/start!) to start it.\n"
+                    "If you have a shadow-cljs server or watch running then you are not connected to that process.") {})))
     inst))

 (defn set-instance! [app]


Correcting TODO in metadata db test.

Correcting TODO in metadata db test.

--- metadata-db-app/int_test/cmr/metadata_db/int_test/concepts/search_test.clj
+++ metadata-db-app/int_test/cmr/metadata_db/int_test/concepts/search_test.clj
@@ -170,7 +170,7 @@
             "small provider - short-name, version-id"
             [coll4-3] {:short-name "s4" :version-id "v5" :latest true}

-            ;; TODO - this should change when the "find latest" logic is updated in CMR-1416.
+            ;; TODO - this should change when the "find latest" logic is updated in CMR-1831
             "small provider - match multiple - version-id"
             [coll3 coll4-1] {:version-id "v3" :latest true}


make debugging work

make debugging work

--- streamparse/bootstrap/project/clj/stormlocal.clj
+++ streamparse/bootstrap/project/clj/stormlocal.clj
@@ -45,7 +45,7 @@
              ["-s" "--spec" "REQUIRED: Storm Topology spec clj file"]
              ["-j" "--jar" "REQUIRED: Storm Topology code jar file"]
              ["-c" "--config" "Storm Environment config FILE" :default "config.json"]
-             ["-d" "--debug" "Enable Storm Topology debugging" :default false]
+             ["-d" "--debug" "Enable Storm Topology debugging" :flag true :default false]
              ["-e" "--env" "Environment, e.g. prod or local" :default "local"]
              ["-t" "--time" "Amount of time to keep cluster running in milliseconds" :default 5000
                                                                                :parse-fn #(Integer/parseInt %)]


rm :description

rm :description

--- boot.clj
+++ boot.clj
@@ -1,9 +1,8 @@
 #boot/configuration
 {:boot {:coordinates #{[reply "0.2.0"]}
         :directories #{"test"}}
- :pom {:project tailrecursion/boot
-       :version "1.0.0-SNAPSHOT"
-       :description "Boot rules"}}
+ :pom {:project tailrecursion/boot-test
+       :version "1.0.0-SNAPSHOT"}}

 (ns user
   (:require [tailrecursion.boot.middleware.pom :refer [wrap-pom]]))


require

require

--- stock-ticker-demo/src/stock_ticker_demo/service.clj
+++ stock-ticker-demo/src/stock_ticker_demo/service.clj
@@ -3,7 +3,13 @@
             [io.pedestal.http.route :as route]
             [io.pedestal.http.body-params :as body-params]
             [io.pedestal.http.route.definition :refer [defroutes]]
-            [ring.util.response :as ring-resp]))
+            [ring.util.response :as ring-resp]
+            [io.pedestal.http.see :as sse]
+            [clojure.data.json :as json]
+            [stock-ticker-demo.price-feed :as price-feed]
+            [clojure.core.async :as async])
+  (:import [java.util Date]
+           [java.util.concurrent Executors]))

 (defn about-page
   [request]


Rendering for Cosmoscope.

Rendering for Cosmoscope.

--- from-repl.clj
+++ from-repl.clj
@@ -46,6 +46,7 @@

 (render-design-coding "CMC/Arduino")
 (render-design-coding "2D-Lab/Git")
+(render-design-coding "2D-Lab/Pixelation")

 (defn render-wt [dir]
     (let [home (System/getenv "HOME")
@@ -63,3 +64,15 @@
 (render-wt "React/01_introduction_to_React")
 (render-wt "WebServices/02_AJAX")
 (render-wt "WebServices/99_AJAX_React")
+
+(defn render-cosmo [dir]
+  (let [home (System/getenv "HOME")
+        dir (File. (format "%s/CASSIEL/cosmoscope/presentations/%s"
+                           home
+                           dir))
+          reveal-js (File. (format "%s/GITHUB/cassiel/reveal.js" home))]
+      (renderer/render-main (File. dir "presentation.clj")
+                            (File. dir "presentation.html")
+                            reveal-js))  )
+
+(render-cosmo "launch")


(TK-258) Remove anonymous function from reduce

The anonymous function is unnecessary, can instead pass the inner
function directly without wrapping it in an anonymous function.

This patch removes the unnecessary function.

Addresses: https://github.com/puppetlabs/trapperkeeper-authorization/pull/2#discussion_r37572401

--- src/puppetlabs/trapperkeeper/services/authorization/authorization_core.clj
+++ src/puppetlabs/trapperkeeper/services/authorization/authorization_core.clj
@@ -28,8 +28,8 @@
   [{:keys [allow deny]}]
   (let [allow (if (string? allow) [allow] allow)
         deny (if (string? deny) [deny] deny)]
-    (let [allow-acl (reduce #(acl/allow %1 %2) acl/empty-acl allow)
-          full-acl (reduce #(acl/deny %1 %2) allow-acl deny)]
+    (let [allow-acl (reduce acl/allow acl/empty-acl allow)
+          full-acl (reduce acl/deny allow-acl deny)]
       full-acl)))

 (schema/defn transform-config-rule :- rules/Rule


Addapt images create event to support on-complete callback.

--- src/uxbox/main/data/images.cljs
+++ src/uxbox/main/data/images.cljs
@@ -191,7 +191,11 @@

 (def allowed-file-types #{"image/jpeg" "image/png"})

-(defrecord CreateImages [id files]
+(defrecord CreateImages [id files on-uploaded]
+  rs/UpdateEvent
+  (-apply-update [_ state]
+    (assoc-in state [:dashboard :images :uploading] true))
+
   rs/WatchEvent
   (-apply-watch [_ state s]
     (letfn [(image-size [file]
@@ -199,6 +203,8 @@
                    (rx/map (partial vector file))))
             (allowed-file? [file]
               (contains? allowed-file-types (.-type file)))
+            (finalize-upload []
+              (assoc-in state [:dashboard :images :uploading] false))
             (prepare [[file [width height]]]
               {:collection id
                :mimetype (.-type file)
@@ -208,16 +214,23 @@
                :height height})]
       (->> (rx/from-coll (jscoll->vec files))
            (rx/filter allowed-file?)
-           (rx/flat-map image-size)
+           (rx/mapcat image-size)
            (rx/map prepare)
-           (rx/flat-map #(rp/req :create/image %))
-           (rx/map :payload)
+           (rx/mapcat #(rp/req :create/image %))
+           (rx/map :payload)
+           (rx/reduce conj [])
+           (rx/do #(rs/emit! finalize-upload))
+           (rx/do on-uploaded)
+           (rx/mapcat identity)
            (rx/map image-created)))))

 (defn create-images
-  [id files]
-  {:pre [(or (uuid? id) (nil? id))]}
-  (CreateImages. id files))
+  ([id files]
+   {:pre [(or (uuid? id) (nil? id))]}
+   (CreateImages. id files (constantly nil)))
+  ([id files on-uploaded]
+   {:pre [(or (uuid? id) (nil? id)) (fn? on-uploaded)]}
+   (CreateImages. id files on-uploaded)))

 ;; --- Image Updated


use original extension only for creating local temp file

--- src/vignette/util/thumbnail.clj
+++ src/vignette/util/thumbnail.clj
@@ -1,6 +1,7 @@
 (ns vignette.util.thumbnail
   (:require [cheshire.core :refer :all]
             [clojure.java.io :as io]
+            [clojure.string :refer [split]]
             [clojure.java.shell :refer [sh]]
             [pantomime.mime :refer [mime-type-of]]
             [slingshot.slingshot :refer [try+ throw+]]
@@ -109,10 +110,13 @@
              :response-code 404}
             "unable to get original for thumbnailing")))

+(defn- extract-extension [filename]
+  (last (split filename #"\.")))
+
 (defn original->local
   "Take the original and make it local."
   [original]
-  (let [temp-file (io/file (temp-filename nil (filename original)))]
+  (let [temp-file (io/file (temp-filename nil (extract-extension (filename original))))]
     (when (transfer! original temp-file)
       temp-file)))


Get version at runtime

Get version at runtime

--- pigpen-cascading/src/main/clojure/pigpen/cascading/core.clj
+++ pigpen-cascading/src/main/clojure/pigpen/cascading/core.clj
@@ -40,7 +40,11 @@
 (set! *warn-on-reflection* true)

 (AppProps/addApplicationFramework nil
-  (str "PigPen:0.3.1" ))
+  (str "PigPen:"
+       (or (some-> PigPenFunction
+             (.getPackage)
+             (.getImplementationVersion))
+           "unknown")))

 (defn cfields
   ^Fields [fields]


fix formatting

fix formatting

--- src/overtone/sc/machinery/ugen/metadata/unaryopugen.clj
+++ src/overtone/sc/machinery/ugen/metadata/unaryopugen.clj
@@ -200,12 +200,12 @@
    "tanh"        {:summary "Hyperbolic tangent function"
                   :doc "Outputs the hyperbolic tangent of input a.

-                  Acts similar to clip2 with a value of 1 in that it
-                  ensures that the output never exceeds +1 or
-                  -1. However, it differs from clip2 in that it massages
-                  the whole of the input rather than the values which
-                  exceed the limits such that the angles near the
-                  clipping ranges are rounder.
+                        Acts similar to clip2 with a value of 1 in that
+                        it ensures that the output never exceeds +1 or
+                        -1. However, it differs from clip2 in that it
+                        massages the whole of the input rather than the
+                        values which exceed the limits such that the
+                        angles near the clipping ranges are rounder.

                         i.e. 0 -> 0 and 1 -> 0.761594"}


[#7848] Fix crash on logout with opened transactions details

--- src/status_im/ui/screens/wallet/transactions/views.cljs
+++ src/status_im/ui/screens/wallet/transactions/views.cljs
@@ -61,7 +61,8 @@
     [list/touchable-item #(when-not hide-details? (re-frame/dispatch [:show-transaction-details hash]))
      [react/view {:accessibility-label :transaction-item}
       [list/item
-       [list/item-icon (transaction-type->icon (keyword type))]
+       (when type
+         [list/item-icon (transaction-type->icon (keyword type))])
        [list/item-content
         [react/view {:style styles/amount-time}
          [react/nested-text {:style           styles/tx-amount
@@ -124,10 +125,11 @@
      content]]])

 (defn- render-item-filter [{:keys [id label checked?]}]
-  [item-filter {:icon (transaction-type->icon id) :checked? checked? :path {:type id}}
-   [list/item-content
-    [list/item-primary-only {:accessibility-label :filter-name-text}
-     label]]])
+  (when id
+    [item-filter {:icon (transaction-type->icon id) :checked? checked? :path {:type id}}
+     [list/item-content
+      [list/item-primary-only {:accessibility-label :filter-name-text}
+       label]]]))

 (defn- wrap-filter-data [m]
   [{:title     (i18n/label :t/transactions-filter-type)
@@ -168,7 +170,8 @@
   (let [asset (tokens/asset-for all-tokens (ethereum/network->chain-keyword network) symbol)]
     [react/view {:style styles/details-header}
      [react/view {:style styles/details-header-icon}
-      [list/item-icon (transaction-type->icon type)]]
+      (when type
+        [list/item-icon (transaction-type->icon type)])]
      [react/view {:style styles/details-header-infos}
       [react/nested-text {:style styles/details-header-value}
        [{:accessibility-label :amount-text}


CMR-343: search granules by cloud-cover tests

--- test/cmr/system_int_test/search/granule_search_test.clj
+++ test/cmr/system_int_test/search/granule_search_test.clj
@@ -185,3 +185,34 @@
         (is (= 3 (count refs)))
         (is (= #{"SampleUR1" "SampleUR2" "sampleur3"}
                (set (map :name refs))))))))
+
+
+(deftest search-by-cloud-cover
+  (let [coll1 (d/ingest "CMR_PROV1" (dc/collection {}))
+        coll2 (d/ingest "CMR_PROV2" (dc/collection {}))
+        gran1 (d/ingest "CMR_PROV1" (dg/granule coll1 {:cloud-cover 0.8}))
+        gran2 (d/ingest "CMR_PROV1" (dg/granule coll1 {:cloud-cover 30.0}))
+        gran3 (d/ingest "CMR_PROV1" (dg/granule coll1 {:cloud-cover 120}))
+        gran4 (d/ingest "CMR_PROV2" (dg/granule coll2 {:cloud-cover -60.0}))
+        gran5 (d/ingest "CMR_PROV2" (dg/granule coll2 {:cloud-cover 0.0}))
+        gran6 (d/ingest "CMR_PROV2" (dg/granule coll2 {:granule-ur "sampleur3"}))]
+    (index/flush-elastic-index)
+    (testing "search granules with lower bound cloud-cover value"
+      (are [cc-search items] (d/refs-match? items (search/find-refs :granule cc-search))
+           {"cloud_cover[min]" 0.2} [gran1 gran2 gran3]))
+    (testing "search granules with upper bound cloud-cover value"
+      (are [cc-search items] (d/refs-match? items (search/find-refs :granule cc-search))
+           {"cloud_cover[max]" 0.7} [gran4 gran5]))
+    (testing "search by cloud-cover range values that would not cover all granules in store"
+      (are [cc-search items] (d/refs-match? items (search/find-refs :granule cc-search))
+           {"cloud_cover[min]" -70.0 "cloud_cover[max]" 31.0} [gran1 gran2 gran4 gran5]))
+    (testing "search by cloud-cover range values that would not cover all granules in store"
+      (are [cc-search items] (d/refs-match? items (search/find-refs :granule cc-search))
+           {"cloud_cover[min]" -70.0 "cloud_cover[max]" 120.0} [gran1 gran2 gran3 gran4 gran5]))
+    (testing "search by cloud-cover with min value greater than max value"
+      (let [{:keys [status errors]} (search/find-refs :granule {"cloud_cover[min]" 30 "cloud_cover[max]" 0})]
+        (is (= 422 status))
+        (is (re-find #"cloud_cover max value must greater than cloud_cover min value" (first errors)))))))
+
+
+


revert some boot file changes

revert some boot file changes

--- build.boot
+++ build.boot
@@ -1,15 +1,15 @@
 (set-env!
   :source-paths #{"src"}
   :resource-paths #{"src" "resources"}
-  :dependencies '[[boot/core "2.1.2" :scope "test"]
-                  [adzerk/bootlaces "0.1.11" :scope "test"]
-                  [jeluard/boot-notify "0.2.0" :scope "test"]
-                  [clj-time "0.9.0"]
-                  [markdown-clj "0.9.40"]
-                  [endophile "0.1.2"]
-                  [time-to-read "0.1.0"]
-                  [sitemap "0.2.4"]
-                  [clj-rss "0.1.9"]])
+  :dependencies '[[boot/core "2.1.2" :scope "provided"]
+                  [adzerk/bootlaces "0.1.9" :scope "test"]
+                  [jeluard/boot-notify "0.1.2" :scope "test"]
+                  [clj-time "0.9.0" :scope "test"]
+                  [markdown-clj "0.9.40" :scope "test"]
+                  [endophile "0.1.2" :scope "test"]
+                  [time-to-read "0.1.0" :scope "test"]
+                  [sitemap "0.2.4" :scope "test"]
+                  [clj-rss "0.1.9" :scope "test"]])

 (require '[adzerk.bootlaces :refer :all])

@@ -18,6 +18,7 @@
 (bootlaces! +version+)

 (task-options!
+  aot {:all true}
   pom {:project 'perun
        :version +version+
        :description "Static site generation build with Clojure and Boot"


Update build.boot comments

Update build.boot comments

--- build.boot
+++ build.boot
@@ -57,11 +57,9 @@
    p port       PORT int  "Port for web server"]
   (comp
     (watch)
-    ; Should be before cljs so the generated code is picked up
-    ; FIXME: Shouldn't matter, file is created in pre-wrap?
+    (less)
     (reload :on-jsload 'frontend.core/start!)
-    (less)
-    ; This starts a normal repls with piggieback middleware
+    ; This starts a repl server with piggieback middleware
     (cljs-repl)
     (cljs)
     (if speak (boot.task.built-in/speak) identity)


Bump version

Bump version

--- build.boot
+++ build.boot
@@ -11,7 +11,7 @@
          '[adzerk.boot-cljs   :refer [cljs]]
          '[pandeiro.boot-http :refer [serve]])

-(def +version+ "1.7.228-2")
+(def +version+ "1.7.228-3-SNAPSHOT")

 (task-options!
   pom {:project     'adzerk/boot-cljs


bump version

bump version

--- build.boot
+++ build.boot
@@ -13,7 +13,7 @@
 (require '[adzerk.bootlaces :refer :all])

-(def +version+ "0.1.1-SNAPSHOT")
+(def +version+ "0.1.2-SNAPSHOT")
 (bootlaces! +version+)

 (task-options!


Add boot task for installation to the local Maven repository

--- build.boot
+++ build.boot
@@ -81,6 +81,13 @@
    (watch)
    (test-cljs)))

+(deftask install-local
+  []
+  (comp
+   (pom)
+   (jar)
+   (install)))
+
 (deftask deploy-snapshot
   []
   (comp


CMR-2904: Remove accidentally committed line.

--- access-control-app/int_test/cmr/access_control/int_test/acl_search_test.clj
+++ access-control-app/int_test/cmr/access_control/int_test/acl_search_test.clj
@@ -13,14 +13,6 @@
               (fixtures/grant-all-group-fixture ["prov1guid" "prov2guid"]))
 (use-fixtures :once (fixtures/int-test-fixtures))

-
-(ac/search-for-acls {:system {:access-control-connection {:protocol "http"
-                                                          :port 5011
-                                                          :context ""
-                                                          :host "localhost"}}}
-                    {}
-                    {:http-options {:accept nil}
-                     :raw? true})

 (deftest invalid-search-test
   (testing "Accept header"


Bump version to 0.2.0.

Bump version to 0.2.0.

--- build.boot
+++ build.boot
@@ -4,7 +4,7 @@
   :src-paths    #{"src"}
   :rsc-paths    #{"resources"})

-(def +version+ "0.2.0-SNAPSHOT")
+(def +version+ "0.2.0")

 (task-options!
   pom  [:project 'clj.rb


update desc and scm urls

update desc and scm urls

--- build.boot
+++ build.boot
@@ -18,9 +18,9 @@
 (task-options!
  pom {:project     project
       :version     version
-      :description "FIXME: write description"
-      :url         "http://example/FIXME"
-      :scm         {:url "https://github.com/yourname/cljs-exe"}
+      :description "Run Clojurescript as a native binary"
+      :url         "https://github.com/ckampfe/cljs-exe"
+      :scm         {:url "https://github.com/ckampfe/cljs-exe"}
       :license     {"Eclipse Public License"
                     "http://www.eclipse.org/legal/epl-v10.html"}}
  push {:gpg-sign false})


adding dev task

adding dev task

--- build.boot
+++ build.boot
@@ -7,23 +7,18 @@
                  [hashobject/boot-s3 "0.1.0-SNAPSHOT"]
                  [clj-time "0.9.0"]
                  [pandeiro/boot-http "0.6.2"]
-                 [jeluard/boot-notify "0.1.2" :scope "test"]])
+                 [jeluard/boot-notify "0.1.2"]
+                 ;[deraen/boot-livereload "0.1.0-SNAPSHOT"]
+                 [pandeiro/boot-http "0.6.3-SNAPSHOT"]])

-(require '[io.perun.markdown :refer :all])
-(require '[io.perun.ttr :refer :all])
-(require '[io.perun.draft :refer :all])
-(require '[io.perun.permalink :refer :all])
-(require '[io.perun.sitemap :refer :all])
-(require '[io.perun.rss :refer :all])
-(require '[io.perun.render :refer :all])
-(require '[io.perun.collection :refer :all])
-(require '[blog.hashobject.views.index :as index-view])
-(require '[blog.hashobject.views.post :as post-view])
+(require '[io.perun :refer :all]
+         '[blog.hashobject.views.index :as index-view]
+         '[blog.hashobject.views.post :as post-view]
+         '[pandeiro.boot-http :refer [serve]]
+         '[hashobject.boot-s3 :refer :all]
+         '[jeluard.boot-notify :refer [notify]])

-(require '[hashobject.boot-s3 :refer :all])
-(require '[pandeiro.boot-http :refer :all])
-(require '[jeluard.boot-notify :refer [notify]])

 (task-options!
   pom {:project 'blog.hashobject.com
@@ -47,4 +42,11 @@
         (sitemap :filename "sitemap.xml")
         (rss :title "Hashobject" :description "Hashobject blog" :link "http://blog.hashobject.com")
         (s3-sync)
-        (notify)))+        (notify)))
+
+(deftask dev
+  []
+  (comp (watch)
+        (build)
+        ;(livereload :asset-path "public")
+        (serve :resource-root "public")))


Properly load data-readers for repl

Properly load data-readers for repl

--- build.boot
+++ build.boot
@@ -36,7 +36,8 @@
          '[me.raynes.conch.low-level :as conch]
          '[codox.boot :as boot-codox]

-         '[mikron.runtime.core :as mikron])
+         '[mikron.runtime.core :as mikron]
+         '[mikron.compiler.template])

 (import '[java.util Date])

@@ -57,6 +58,13 @@

 ;; Util

+(deftask with-data-readers []
+  (fn [next-task]
+    (fn [fileset]
+      (#'clojure.core/load-data-readers)
+      (binding [*data-readers* (.getRawRoot #'*data-readers*)]
+        (next-task fileset)))))
+
 (def windows?
   (.. (System/getProperty "os.name") (toLowerCase) (startsWith "windows")))

@@ -84,7 +92,7 @@
   "Adds the test files to the fileset."
   []
   (merge-env! :resource-paths #{"test/cljc" "test/cljs" "resources/test"})
-  identity)
+  (with-data-readers))

 (deftask benchmarking
   "Adds the benchmark files to the fileset."
@@ -99,7 +107,7 @@
                                 [com.google.protobuf/protobuf-java "3.2.0"]
                                 [com.taoensso/nippy "2.12.2"]
                                 [criterium "0.4.4"]])
-  identity)
+  (with-data-readers))

 (deftask dev
   "Dev task for proto-repl."


Use release version of boot-middleman

Use release version of boot-middleman

--- build.boot
+++ build.boot
@@ -1,7 +1,7 @@
 (set-env!
  :source-paths   #{"src/cljs" "src/cljx" "test"}
  :dependencies '[[adzerk/boot-cljs       "0.0-2727-0" :scope "test"]
-                 [adzerk/boot-cljs-repl  "0.1.8"      :scope "test"]
+                 [adzerk/boot-cljs-repl  "0.1.9"      :scope "test"]
                  [deraen/boot-cljx       "0.2.2"      :scope "test"]
                  [adzerk/boot-reload     "0.2.4"      :scope "test"]
                  [pandeiro/boot-http     "0.6.1"      :scope "test"]
@@ -9,7 +9,7 @@
                  [org.clojure/clojure    "1.6.0"      :scope "provided"]
                  [org.clojure/core.async "0.1.346.0-17112a-alpha" :scope "provided"]
                  [org.omcljs/om          "0.8.7"]
-                 [com.joshuadavey/boot-middleman "0.0.3-SNAPSHOT" :scope "test"]])
+                 [com.joshuadavey/boot-middleman "0.0.3" :scope "test"]])

 (require
  '[adzerk.boot-cljs      :refer [cljs]]


updated boot file

updated boot file

--- build.boot
+++ build.boot
@@ -1,60 +1,35 @@
 (set-env!
-<<<<<<< HEAD
-  :dependencies  '[[org.clojure/clojure       "1.7.0"]
-                   [org.clojure/clojurescript "1.7.48"]
-                   [adzerk/boot-cljs          "1.7.48-3"]
-                   [adzerk/boot-cljs-repl     "0.1.10-SNAPSHOT"]
-                   [adzerk/boot-reload        "0.3.2"]
-                   [pandeiro/boot-http        "0.6.3"]
-                   [hoplon/boot-hoplon        "0.1.7"]
-                   [hoplon/hoplon             "6.0.0-alpha10"]
-                   [hoplon/javelin            "3.8.2"]
-                   [jeluard/boot-notify       "0.2.0"]
-                   [boot/core                 "2.2.0"]
-                   [buddy                     "0.7.1"]
-                   [cljsjs/material           "1.0.4-0"]]
-
-  :source-paths   #{"src"}
-  :resource-paths #{"resources/assets"}
-  :target-path    "resources/public")
-=======
  :dependencies  '[[org.clojure/clojure       "1.7.0"]
-                  [org.clojure/clojurescript "1.7.48"]
+                  [org.clojure/clojurescript "1.7.170"]
                   [adzerk/bootlaces          "0.1.13" :scope "test"]
-                  [adzerk/boot-cljs          "1.7.48-6"]
-                  [adzerk/boot-cljs-repl     "0.1.10-SNAPSHOT"]
-                  [adzerk/boot-reload        "0.3.3-SNAPSHOT"]
-                  [boot/core                 "2.2.0"]
+                  [adzerk/boot-cljs          "1.7.170-3"]
+                  [adzerk/boot-reload        "0.4.2"]
                   [compojure                 "1.4.0"]
                   [com.cemerick/friend       "0.2.1"]
-                  [com.novemberain/monger    "3.0.0-rc2"]
-                  [cljsjs/material           "1.0.4-0"]
+                  [com.novemberain/monger    "3.0.1"]
                   [danlentz/clj-uuid         "0.1.6"]
                   [hiccup                    "1.0.5"]
-                  [hoplon/boot-hoplon        "0.1.9"]
-                  [hoplon/hoplon             "6.0.0-alpha10"]
-                  [hoplon/castra             "3.0.0-SNAPSHOT"]
+                  [hoplon/boot-hoplon        "0.1.10"]
+                  [hoplon/hoplon             "6.0.0-alpha11"]
+                  [hoplon/castra             "3.0.0-alpha1"]
                   [hoplon/javelin            "3.8.4"]
                   [jeluard/boot-notify       "0.2.0"]
                   [ring                      "1.4.0"]
                   [ring/ring-defaults        "0.1.5"]
-                  [pandeiro/boot-http        "0.7.0-SNAPSHOT"]
+                  [pandeiro/boot-http        "0.7.0"]
                   [org.clojars.hozumi/clj-commons-exec "1.2.0"]
                   [degree9/boot-bower        "0.2.3"]]
  :resource-paths   #{"src"}
  :asset-paths #{"resources/assets"})
->>>>>>> flyboarder/master

 (require
  '[adzerk.bootlaces :refer :all]
  '[adzerk.boot-cljs :refer :all]
- '[adzerk.boot-cljs-repl :refer :all]
  '[adzerk.boot-reload :refer :all]
  '[pandeiro.boot-http :refer :all]
  '[hoplon.boot-hoplon :refer :all]
  '[jeluard.boot-notify :refer [notify]]
  '[degree9.boot-bower :refer [bower]]
- '[ring.adapter.jetty :refer [run-jetty]]
  '[clj-commons-exec :as exec])

 (def +version+ "0.1.0")