Track new goroutines in agos-new.

Track new goroutines in agos-new.

--- src/rewindable/ago.cljs
+++ src/rewindable/ago.cljs
@@ -31,7 +31,9 @@
   (let [last-id (atom 0)]
     (atom {:gen-id #(swap! last-id inc)
            :bufs {}     ; Keyed by buf-id.
-           :agos {}}))) ; Keyed by buf-id, value is state-machine array.
+           :agos {}     ; Keyed by buf-id, value is state-machine array.
+           :agos-new {} ; Same as :agos, but for new, not yet run goroutines.
+           })))

 (defn ago-snapshot [ago-world-now]
   (assoc ago-world-now :agos
@@ -108,13 +110,17 @@
 ; --------------------------------------------------------

 (defn ago-reg-state-machine [ago-world state-machine-arr buf]
-  (swap! ago-world #(assoc-in % [:agos (.-buf-id buf)] state-machine-arr)))
+  (swap! ago-world #(assoc-in % [:agos-new (.-buf-id buf)] state-machine-arr)))

 (defn ago-run-state-machine [ago-world state-machine-arr buf]
-  :todo)
+  (swap! ago-world #(-> %
+                        (dissoc-in [:agos-new (.-buf-id buf)])
+                        (assoc-in [:agos (.-buf-id buf)] state-machine-arr))))

 (defn ago-dereg-state-machine [ago-world buf]
-  (swap! ago-world #(dissoc-in % [:agos (.-buf-id buf)])))
+  (swap! ago-world #(-> %
+                        (dissoc-in [:agos-new (.-buf-id buf)])
+                        (dissoc-in [:agos (.-buf-id buf)]))))

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


parse-tree-transformer helper

parse-tree-transformer helper

--- cljs/src/main/plastic/cogs/editor/model.cljs
+++ cljs/src/main/plastic/cogs/editor/model.cljs
@@ -201,17 +201,19 @@
       (z/edit node-loc (fn [old-node] (transfer-sticky-attrs old-node new-node)))
       (z/remove node-loc))))

-(defn delete-to-loc [loc node-id]
+(defn delete-node-loc [node-id loc]
   (let [node-loc (findz/find-depth-first loc (partial loc-id? node-id))]
     (assert (zip-utils/valid-loc? node-loc))
     (z/remove node-loc)))

+(defn parse-tree-transformer [f]
+  (fn [parse-tree]
+    (if-let [result (f (zip-utils/make-zipper parse-tree))]
+      (z/root result)
+      parse-tree)))
+
 (defn delete-node [editor node-id]
-  (let [transformer (fn [parse-tree]
-                      (if-let [result (delete-to-loc (zip-utils/make-zipper parse-tree) node-id)]
-                        (z/root result)
-                        parse-tree))]
-    (transform-parse-tree editor transformer)))
+  (transform-parse-tree editor (parse-tree-transformer (partial delete-node-loc node-id))))

 (defn commit-node-value [editor node-id value]
   {:pre [node-id value]}
@@ -222,19 +224,14 @@
       editor
       (set-parse-tree editor (zip/root modified-loc)))))

-(defn insert-values-after-loc [loc node-id values]
+(defn insert-values-after-node-loc [node-id values loc]
   (let [node-loc (findz/find-depth-first loc (partial loc-id? node-id))
         inserter (fn [loc val] (z/insert-right loc val))]
     (assert (zip-utils/valid-loc? node-loc))
     (reduce inserter node-loc (reverse values))))

 (defn insert-values-after-node [editor node-id values]
-  (let [old-root (get-parse-tree editor)
-        root-loc (zip-utils/make-zipper old-root)
-        modified-loc (insert-values-after-loc root-loc node-id values)]
-    (if-not modified-loc
-      editor
-      (transform-parse-tree editor (zip/root modified-loc)))))
+  (transform-parse-tree editor (parse-tree-transformer (partial insert-values-after-node-loc node-id values))))

 (defn get-render-infos [editor]
   (get-in editor [:render-state :forms]))


added debug flag

added debug flag

--- src/syncserver/core.clj
+++ src/syncserver/core.clj
@@ -8,21 +8,30 @@
            com.google.common.cache.CacheBuilder
            java.util.concurrent.TimeUnit))

+(def debug-mode (atom nil))
+
+(defn set-debug [x]
+  (reset! debug-mode x))
+
 (declare ddiff)
+
+(defmacro debug [& text]
+  `(when @debug-mode (println ~@text)))
+

 (def cache! (.. (CacheBuilder/newBuilder) (expireAfterWrite 5 TimeUnit/SECONDS) (build)))

-(def current-state
-  (atom {:state nil
+(def current-state
+  (atom {:state nil
          :current 0}))

 (defn store! [state]
-  (swap! current-state
-    (fn [cs]
-      (let [nk (inc (:current cs))]
-      (.put cache! (str nk) state)
-      (println "just stored" (.getIfPresent cache! (str nk)))
-      (assoc cs :state state :current nk)))))
+  (swap! current-state
+         (fn [cs]
+           (let [nk (inc (:current cs))]
+             (.put cache! (str nk) state)
+             (debug "Cached" (.getIfPresent cache! (str nk)) "at" (str nk))
+             (assoc cs :state state :current nk)))))

 (defn arg-count [f]
   (let [m (first (.getDeclaredMethods (class f)))
@@ -31,10 +40,10 @@

 (defn delta [old-state]
   (if old-state
-   (let [os (.getIfPresent cache! old-state)]
-      (println "exists!")
+    (let [os (.getIfPresent cache! old-state)]
+      (when os (debug "Cache hit:" os))
       (ddiff [] os (:state @current-state) #{}))
-   (ddiff [] nil (:state @current-state) #{})))
+    (ddiff [] nil (:state @current-state) #{})))

 (defn groovy [s x cls]
   (case (.getMaximumNumberOfParameters cls)
@@ -57,10 +66,8 @@
         new-state (transfunc (:state @current-state))]
     (store! new-state)))

-
-
 (defn vector-diff-same-length [path a b diffs]
-  (println "vector-diff-same-length" a b "@" path " : " diffs)
+  (debug "vector-diff-same-length" a b "@" path " : " diffs)
   (reduce (fn [d index]
             (let [itm (get b index)
                   oitem (get a index)]
@@ -68,7 +75,7 @@
               (ddiff (conj path index) oitem itm d))) diffs (range 0 (count b))))

 (defn vector-diff [path a b diff]
-  (println "vector-diff" a b "@" path " : " diff)
+  (debug "vector-diff" a b "@" path " : " diff)
   (if (= a b)
     diff
     (let [[diffing rest] (split-at (count a) b)
@@ -81,7 +88,7 @@
             (ddiff (conj path ky) (get a ky) (get b ky) d)) diffs (keys b)))

 (defn map-diff [path a b diffs]
-  (println "map-diff" a b "@" path " : " diffs)
+  (debug "map-diff" a b "@" path " : " diffs)
   (let [a-keys (into #{} (keys a))
         b-keys (into #{} (keys b))
         del-keys (s/difference a-keys b-keys)
@@ -94,7 +101,7 @@
     d3))

 (defn ddiff [path a b diffs]
-  (println "ddiff" a b "@" path " : " diffs)
+  (debug "ddiff" a b "@" path " : " diffs)
   (cond
    (= a b) diffs
    (every? vector? [a b]) (vector-diff path a b diffs)


Add ctrl+clicking to delete unselected vertices

--- src/constraint/edit.cljs
+++ src/constraint/edit.cljs
@@ -182,9 +182,12 @@
 (defn handle-unslected [clicked-what event world-state]
   (let [clicked-edge? (re-matches edge-regex clicked-what)
         clicked-vertex? (re-matches vertex-regex clicked-what)
-        rightclicked-edge? (and clicked-edge? (is-ctrl+click? event))]
+        ctrl? (is-ctrl+click? event)
+        ctrl+clicked-edge? (and ctrl? clicked-edge?)
+        ctrl+clicked-vertex? (and ctrl? clicked-vertex?)]
     (cond
-      rightclicked-edge? (cycle-edge-player world-state clicked-what)
+      ctrl+clicked-edge? (cycle-edge-player world-state clicked-what)
+      ctrl+clicked-vertex? (delete-vertex clicked-what world-state)
       clicked-edge? (toggle-edge-value world-state clicked-what)
       clicked-vertex? (select-vertex world-state clicked-what)
       :else (add-vertex event world-state))))


Migrate to using react-chartjs-2 from npm and restore chart to main page

--- src/cljs/my_money/components/charts.cljs
+++ src/cljs/my_money/components/charts.cljs
@@ -2,9 +2,9 @@
   (:require [my-money.calculations :as calc]
             [my-money.components.common :as c]
             [reagent.core :as r]
-            [goog.object :as obj]))
+            ["react-chartjs-2" :refer [Line]]))

-#_(def line-chart (r/adapt-react-class (obj/get js/ReactChartjs2 "Line")))
+(def line-chart (r/adapt-react-class Line))

 (defn date-sum->amount [date-sum]
   (/ (:sum date-sum) 100))
@@ -23,7 +23,7 @@
       (str "€")))

 (defn chart [events-to-show starting-amount all-events]
-  #_(let [collapsed? (r/atom false)]
+  (let [collapsed? (r/atom false)]
     (fn [events-to-show starting-amount events]
       (let [date-sums (events->date-sums events-to-show starting-amount events)
             chart-options {:width   400


Show first and last page buttons always, otherwise show a few next to the current selection

--- src/cljs/my_money/components/common.cljs
+++ src/cljs/my_money/components/common.cljs
@@ -69,18 +69,22 @@
 (defn paginator
   "on-click parameter is a function that takes as a parameter
    the index of the page to navigate to"
-  [current max on-click]
-  [:nav>ul.pagination.justify-content-center
-   [:li.page-item {:class (when (= current 0) "disabled")}
-    [:a.page-link {:href "#"
-                   :on-click #(do (.preventDefault %)
-                                  (on-click (dec current)))}
-                  "Previous"]]
-   (for [i (range 0 max)]
-     ^{:key (str "paginator-" i)}
-     [page-button (= i current) i on-click])
-   [:li.page-item {:class (when (= (inc current) max) "disabled")}
-    [:a.page-link {:href "#"
-                   :on-click #(do (.preventDefault %)
-                                  (on-click (inc current)))}
-                  "Next"]]])
+  [current last on-click]
+  (let [first-page-button-to-show (max (- current 3) 0)
+        last-page-button-to-show (min (+ current 3) last)]
+    [:nav>ul.pagination.justify-content-center
+     [page-button false 0 on-click]
+     [:li.page-item {:class (when (= current 0) "disabled")}
+      [:a.page-link {:href "#"
+                     :on-click #(do (.preventDefault %)
+                                    (on-click (dec current)))}
+                    "Previous"]]
+     (for [i (range first-page-button-to-show last-page-button-to-show)]
+       ^{:key (str "paginator-" i)}
+       [page-button (= i current) i on-click])
+     [:li.page-item {:class (when (= (inc current) last) "disabled")}
+      [:a.page-link {:href "#"
+                     :on-click #(do (.preventDefault %)
+                                    (on-click (inc current)))}
+                    "Next"]]
+     [page-button false (dec last) on-click]]))


Simplified, deterministic recursive variance test.

--- src/clojush/pushgp/genetic_operators.clj
+++ src/clojush/pushgp/genetic_operators.clj
@@ -295,21 +295,32 @@
   (levenshtein-distance (expressed-program-sequence-from-genome g1 argmap)
                         (expressed-program-sequence-from-genome g2 argmap)))

+;(defn recursively-variant?
+;  "Returns true iff genome g is considered recursively variant."
+;  [g argmap]
+;  (let [translate #(translate-plush-genome-to-push-program {:genome %} argmap)
+;        child1 (produce-child-genome-by-autoconstruction g g true argmap)
+;        gc1a (produce-child-genome-by-autoconstruction child1 child1 true argmap)
+;        gc1b (produce-child-genome-by-autoconstruction child1 [] true argmap)
+;        gc1c (produce-child-genome-by-autoconstruction child1 child1 false argmap)
+;        child2 (produce-child-genome-by-autoconstruction g g false argmap)
+;        gc2a (produce-child-genome-by-autoconstruction child2 child2 true argmap)
+;        gc2b (produce-child-genome-by-autoconstruction child2 [] true argmap)
+;        gc2c (produce-child-genome-by-autoconstruction child2 child2 false argmap)]
+;    (and (apply distinct? (map translate [g child1 child2 gc1a gc1b gc1c gc2a gc2b gc2c]))
+;         (distinct? (expressed-difference child1 gc1b argmap)
+;                    (expressed-difference child2 gc2b argmap)))))
+
 (defn recursively-variant?
   "Returns true iff genome g is considered recursively variant."
   [g argmap]
-  (let [translate #(translate-plush-genome-to-push-program {:genome %} argmap)
-        child1 (produce-child-genome-by-autoconstruction g g true argmap)
-        gc1a (produce-child-genome-by-autoconstruction child1 child1 true argmap)
-        gc1b (produce-child-genome-by-autoconstruction child1 [] true argmap)
-        gc1c (produce-child-genome-by-autoconstruction child1 child1 false argmap)
-        child2 (produce-child-genome-by-autoconstruction g g false argmap)
-        gc2a (produce-child-genome-by-autoconstruction child2 child2 true argmap)
-        gc2b (produce-child-genome-by-autoconstruction child2 [] true argmap)
-        gc2c (produce-child-genome-by-autoconstruction child2 child2 false argmap)]
-    (and (apply distinct? (map translate [g child1 child2 gc1a gc1b gc1c gc2a gc2b gc2c]))
-         (distinct? (expressed-difference child1 gc1b argmap)
-                    (expressed-difference child2 gc2b argmap)))))
+  (let [c1 (produce-child-genome-by-autoconstruction g g true argmap)
+        c1c (produce-child-genome-by-autoconstruction c1 [] true argmap)
+        c2 (produce-child-genome-by-autoconstruction g [] true argmap)
+        c2c (produce-child-genome-by-autoconstruction c2 [] true argmap)]
+    (and (apply distinct? (map translate [g c1 c1c c2 c2c]))
+         (distinct? (expressed-difference c1 c1c argmap)
+                    (expressed-difference c2 c2c argmap)))))

 (defn autoconstruction
   "Returns a genome for a child produced either by autoconstruction (executing parent1


Uncomment line requiring differences between lineages in symbolic-reproductive-change-changes-differently-diversifying?

--- src/clojush/pushgp/genetic_operators.clj
+++ src/clojush/pushgp/genetic_operators.clj
@@ -1537,7 +1537,7 @@
     (assoc ind :diversifying
       (and (distinct? 1 mbsim-c-gc mbsim-gc-ggc)
            (distinct? 1 mbsim-c2-gc2 mbsim-gc2-ggc2)
-           ;(distinct? mbsim-gc-ggc mbsim-gc2-ggc2)
+           (distinct? mbsim-gc-ggc mbsim-gc2-ggc2) ;**
            (distinct? (- mbsim-c-gc mbsim-gc-ggc)
                       (- mbsim-c2-gc2 mbsim-gc2-ggc2))))))


Fixing bug in description layer.

Fixing bug in description layer.

--- compute/src/think/compute/nn/description.clj
+++ compute/src/think/compute/nn/description.clj
@@ -39,7 +39,7 @@
   [desc backend]
   (if (= (:distribution desc) :bernoulli)
     (layers/bernoulli-dropout backend (:output-size desc) (:probability desc))
-    (layers/gaussian-dropout backend (:output-size desc) (1.0 - (:probability desc)))))
+    (layers/gaussian-dropout backend (:output-size desc) (- 1.0 (:probability desc)))))

 (defmethod create-module :softmax
@@ -146,8 +146,8 @@
     (if (= (get-in layer [:dropout-options :distribution]) :bernoulli)
       (desc/dropout (get-in layer [:dropout-options :probability])
                     :distribution :bernoulli)
-      (desc/dropout (1.0 - (get-in layer [:dropout-options :variance])
-                         :distribution :gaussian))))
+      (desc/dropout (- 1.0 (get-in layer [:dropout-options :variance])
+                       :distribution :gaussian))))

   ;;Be extremely careful about laziness in here because the underlying gpu resources
   ;;could be released before the lazy seq has been realized.


drawing cross or circle

drawing cross or circle

--- src/tictactoe/core.cljs
+++ src/tictactoe/core.cljs
@@ -12,6 +12,28 @@

 (defonce app-state (atom {:text "Welocome to tic-tac-toe!"
                           :board (new-board 3)}))
+(defn blank [i j]
+      [:rect {:width 0.95
+              :height 0.95
+              :x i
+              :y j
+              :fill (if (zero? (get-in @app-state [:board i j]))
+                        "green" "yellow")
+              :on-click
+              (fn rect-click [e]
+                (prn "You clicked me" i j)
+                (prn (swap! app-state update-in [:board i j] inc )))}])
+
+(defn circle [i j]
+  [:circle {:r 0.45
+    :cx (+ 0.5 i) :cy (+ 0.5 j)}])
+
+(defn cross [i j]
+  [:g
+    {:stroke "black" :stroke-width 0.2 :stroke-linecap "round"
+    :transform (str "translate(" (+ 0.5 i) "," (+ 0.5 j) ") " "scale(0.33)")}
+    [:line {:x1 -1 :y1 -1 :x2 1 :y2 1}]
+    [:line {:x1 1 :y1 -1 :x2 -1 :y2 1}]])

 (defn tic-tac-toe []
   [:center
@@ -20,17 +42,13 @@
       {:view-box "0 0 3 3" :width 500 :height 500}
       (for [i (range (count (:board @app-state)))
             j (range (count (:board @app-state)))]
-      [:rect {:width 0.9
-              :height 0.9
-              :x i
-              :y j
-              :fill "green"
-              :on-click
-              (fn rect-click [e]
-                (prn "You clicked me" i j)
-                (prn (swap! app-state update-in [:board i j] inc ))
-                )}])
+            (case (get-in @app-state [:board i j])
+              0 [blank i j]
+              1 [circle i j]
+              2 [cross i j])
+      )
       ]])
+
 (reagent/render-component [tic-tac-toe]
                           (. js/document (getElementById "app")))

@@ -38,5 +56,5 @@
   ;; optionally touch your app-state to force rerendering depending on
   ;; your application
   (swap! app-state assoc-in [:text] "Hello")
-
+  (prn (:board @app-state))
 )


Add some logging

Add some logging

--- src/ecregister/posts.clj
+++ src/ecregister/posts.clj
@@ -128,6 +128,7 @@
 (defn fetch-latest-fa-post [out-chan]
   "Fetches a data about two most recent posts - in articles and in poetry categories, outputs to passed channel"
   (let [parsed-html-chan (chan)]
+    (prn "start getting latest post")
     (go
      (>! parsed-html-chan (extract-fa-post (<! (get-html "http://www.freeaway.ru/articles/all")))))
     (go
@@ -135,6 +136,7 @@
     (go
      (let [p1 (<! parsed-html-chan)
            p2 (<! parsed-html-chan)]
+       (prn "fa posts retrieved")
        ;; note: when finding latest of two posts relying on these facts here:
        ;; a) id's are strings which are actually numbers
        ;; b) more recent posts contain bigger ids, i.e. they grow with time


It is valid for authentication to return nil

--- src/cylon/authentication.clj
+++ src/cylon/authentication.clj
@@ -14,7 +14,7 @@

 ;; RequestAuthenticator

-(s/defn authenticate :- {s/Keyword s/Any}
+(s/defn authenticate :- (s/maybe {s/Keyword s/Any})
   [component :- (s/protocol p/RequestAuthenticator)
    request :- Request]
   (p/authenticate component request))


new default logger code

new default logger code

--- src/engine/repl_init.clj
+++ src/engine/repl_init.clj
@@ -2,8 +2,6 @@
   (:use clojure.tools.logging
         clj-logging-config.log4j))

-(reset-logging!)
-(set-loggers! :root
-              {:pattern "%d %-5p [%t]: %m%n" :level :debug :out *out*})
+(set-logger! :pattern "%d %-5p [%t]: %m%n" :level :debug :out *out*)

-(require 'engine.core #_engine.client #_engine.client.commands 'engine.data.rope 'engine.devel.rope 'engine.devel.benchmark)
+(require 'engine.core 'engine.client 'engine.data.rope 'engine.devel.rope 'engine.devel.benchmark)


Fixes a few bugs from the transition

Fixes a few bugs from the transition

--- src/wordsmith/core.cljs
+++ src/wordsmith/core.cljs
@@ -10,34 +10,37 @@
   ICloneable
   (-clone [s] (js/String. s)))

-(def app-state (atom {:input "" :titles [] :current ""}))
+(def app-state (atom {:input "" :titles [] :current "" :title ""}))

 (defn handle-title-change [event app]
-  (let [new-title (.. event -target -value)
-        old-title (:title app)]
+  (let [new-title (.. event -target -value)]
     (when-not (= "" new-title)
-      (om/update! (:title app) :title new-title))))
+      (om/update! app :title new-title))))

 (defn title-field [app owner]
   (reify
     om/IRender
     (render [_]
-      (dom/div #js {:id "title-field"}
-       (dom/input #js {:type "text" :onBlur #(handle-title-change % app)}
-                  (:current app))))))
+      (let [title (:title app)]
+        (dom/div #js {:id "title-field"}
+          (dom/input #js {:type "text" :onBlur #(handle-title-change % title)}
+                     (:current app)))))))

 (defn update-current [event app]
-  (om/update! (:current app) :current (.. event -target -text)))
+  (om/update! app :current (.. event -target -textContent)))

 (defn left-menu [app owner]
   (reify
     om/IRender
     (render [_]
-      (dom/div #js {:id "left-menu"}
-        (apply dom/ul nil
-          (map #(dom/li
-                  #js {:key (str %) :onClick (fn [e] (update-current e app))} %)
-               (:titles app)))))))
+      (let [current (:current app)]
+        (dom/div #js {:id "left-menu"}
+          (apply dom/ul nil
+            (map #(dom/li
+                    #js {:key (str %)
+                         :onClick (fn [e] (update-current e current))}
+                    (om/value %))
+                 (:titles app))))))))

 (defn wordsmith-app [app owner]
   (reify
@@ -46,6 +49,7 @@
       (om/update! (:titles app) :titles (p/get-all-titles)))
     om/IRender
     (render [_]
+      (print app)
       (dom/div #js {:className "container"}
         (om/build title-field app)
         (om/build left-menu app)


Ensure discovered db schemas are unique

Ensure discovered db schemas are unique

--- src/yetibot/core/db.clj
+++ src/yetibot/core/db.clj
@@ -10,7 +10,7 @@
 (def db-ns-pattern #"(yetibot|plugins).*\.db\..+")

 (defn schemas []
-  (let [nss (find-namespaces db-ns-pattern)]
+  (let [nss (set (find-namespaces db-ns-pattern))]
     (apply require nss)
     (for [n nss :when (ns-resolve n 'schema)]
       (deref (ns-resolve n 'schema)))))


functions for broadcasting

functions for broadcasting

--- src/ysmiraak/tensor.clj
+++ src/ysmiraak/tensor.clj
@@ -115,8 +115,38 @@
          (recur subs x ds (if (integer? sub) r (inc r)))
          x)))))

+(defn unify-dims
+  ([ds] ds)
+  ([ds ds']
+   (as-> (sort-by count [ds ds']) [ds ds']
+     (mapv (fn [d d'] (if (or (= 1 d) (= 1 d') (= d d')) (max d d')))
+           (concat (repeat (- (count ds') (count ds)) 1) ds)
+           ds')))
+  ([ds ds' & more] (reduce unify-dims (unify-dims ds ds') more)))
+
+(defn broadcast
+  [ds x]
+  (let [ds' (dims x), pad (- (count ds) (count ds'))]
+    (if (or (< pad 0) (some not (map (fn [d d'] (and d (or (= d d') (= -1 d) (= 1 d')))) (rseq ds) (rseq ds'))))
+      (throw (ex-info "cannot broadcast dims" {:old ds' :new ds})))
+    (loop [r (dec (count ds))
+           [d  & ds ] (rseq ds)
+           [d' & ds'] (concat (rseq ds') (repeat pad 1))
+           x (nth (iterate vector x) pad)]
+      (if (<= 0 r)
+        (recur (dec r) ds ds'
+               (cond->> x
+                 (and (not= d d') (pos? d))
+                 (mapx r (comp vec (partial repeat d) peek))))
+        x))))
+
+(defn mapx-1
+  ([a f x] (mapx (inc (nat (rank x) a)) f x))
+  ([a f x & xs]
+   (let [xs (cons x xs), ds (apply unify-dims (map dims xs))]
+     (apply mapx (inc (nat (count ds) a)) f (map (partial broadcast ds) xs)))))
+
 ;; todo
 ;; - tests
-;; - broadcasting
 ;; - tf.where tf.gather tf.boolean_mask
 ;; - tensor product & contraction


apply-contracts ported to new syntax, renamed provide-contracts

--- src/fogus/me/provide.clj
+++ src/fogus/me/provide.clj
@@ -34,12 +34,13 @@
 (defn- build-contract
   [cnstr]
   (let [[args pre-post-map] cnstr]
-    (list (into '(f) args)
+    (list (into '[f] args)
           pre-post-map
           (list* 'f args))))

 (defmacro contract
   [name docstring & constraints]
+  (println name docstring constraints)
   (let [raw-cnstr   (->> (partition-by vector? constraints)
                          (partition 2))
         arity-cnstr (for [[[a] c] raw-cnstr]
@@ -56,22 +57,17 @@
   ([f c & more]
      (apply with-constraints (with-constraints f c) more)))

-
-(defmacro apply-contracts [& contracts]
+(defmacro provide-contracts [& contracts]
   (let [fn-names  (map first contracts)
-        contracts (for [c contracts] (if (vector? (second c)) (list* `contract c) (second c)))]
+        contracts (for [[n ds & more] contracts]
+                    (if (vector? (first more))
+                      (list* `contract n ds more)
+                      (first more)))]
     `(do
       ~@(for [[n# c#] (zipmap fn-names contracts)]
           (list `alter-var-root (list `var n#)
                 (list `fn '[f c] (list `with-constraints 'f 'c)) c#))
       nil)))
-
-(comment
-(defn sqr [n]
-  (* n n))
-
-(apply-contracts [sqr [n] number? (not= 0 n) => pos? number?])
-)

 ;; constraint functions and multimethods


Fix .select() vs .selectAll() bug using d3

The important lesson: .selectAll() creates a new grouping while
.select() preserves the current grouping. In the context of a nested
selection like in the detail view, we want the second.

--- src/graphito/detail.cljs
+++ src/graphito/detail.cljs
@@ -28,9 +28,9 @@
         (.classed (js-obj "property-value" true
                           "col-xs-7" true
                           "col-xs-offset-1" true)))
-    (-> property-selection (.selectAll ".property-type")
+    (-> property-selection (.select ".property-type")
         (.text #(:displayType %)))
-    (-> property-selection (.selectAll ".property-value")
+    (-> property-selection (.select ".property-value")
         (.text #(:displayValue %)))
     (-> property-selection .exit .remove))
   (.modal ($ selector)))


caching with atom (slow)

caching with atom (slow)

--- src/gufovolante/core.clj
+++ src/gufovolante/core.clj
@@ -14,16 +14,39 @@
   (:import (org.apache.commons.compress.compressors.xz XZCompressorInputStream))
   )

+;; cache dei file anagrafe aperti
+(def anagrafe (atom  {}))
+
 (defn apri-csv-xz
   "apri un file singolo compresso con xz, restituisce io/reader"
   [filename]
-  (with-open [in-file (-> filename
-                          io/file
-                          io/input-stream
-                          (XZCompressorInputStream. true)
-                          io/reader)]
-    (doall (csv/read-csv in-file)))
-  )
+  (let [chiave (keyword filename)]
+
+    (if (nil? (chiave @anagrafe))
+      ;; apri nuovo file non trovato in cache
+      (swap! anagrafe assoc chiave
+             (with-open [in-file (-> filename
+                                     io/file
+                                     io/input-stream
+                                     (XZCompressorInputStream. true)
+                                     io/reader)]
+               (doall (csv/read-csv in-file)))))
+      ;; ritorna cache
+    (chiave @anagrafe)
+
+  ))
+
+(defn dammi-codice-uscita
+  "prende una stringa del codice uscita siope e ritorna una stringa che lo descrive"
+  [codice chiave]
+  (->> (apri-csv-xz "assets/ANAG_CODGEST_USCITE.D160624.H0102.csv.xz")
+       (keep #(if (string/includes? (str %) codice) %))
+       (into [["codice" "categoria" "descrizione" "creazione" "scadenza"]])
+       mappify
+       (keep #(if (= (:codice %) codice) %))
+       first
+       chiave
+       ))

 (defn analizza-dati [dati]
   (let [colonne [:2016 :2015 :2014 :siope :desc]
@@ -33,7 +56,7 @@
                                    :2014     [#(if (nil? %) 0 (quot (read-string %) 100)) :importo_2014]
                                    :siope    [read-string :codice_siope]
                                 ;; :uscita   [#(if (nil? %) 0 (/ (read-string %) 100)) :imp_uscite_att]
-                                   :desc     :descrizione_codice
+                                   :desc     [#(dammi-codice-uscita % :descrizione) :codice_siope]
                                    } dati)]
     (huri/select-cols colonne rilievo))
   )
@@ -43,7 +66,9 @@
               :columns (some keys dati))
   )

-(defn leggibile [num]
+(defn leggibile
+  "prende un numero e restituisce una stringa leggibile"
+  [num]
   (cond
     (nil? num) "zero"
     (< num 1) "zero"


update component state with new geojson

update component state with new geojson

--- src/hatti/map/utils.cljs
+++ src/hatti/map/utils.cljs
@@ -722,6 +722,7 @@
                                         layer-opts))
       (when show-heatmap? (show-heatmap owner map id_string geojson
                                         layer-opts))
+      (om/set-state! owner :geojson geojson)
       (om/set-state! owner :style style)
       (om/set-state! owner :loaded? true))))


there's a race condition here

there's a race condition here

--- src/tabby/net.clj
+++ src/tabby/net.clj
@@ -52,7 +52,7 @@
      [handshake (s/take! s)]
      (condp = (:type handshake)
        :peering-handshake (do
-                            (info (:id @state) " accepting peer connection from: " (:src handshake))
+                            ;(warn (:id @state) " accepting peer connection from: " (:src handshake))
                             (when-not (get-in @state [:peers (:src handshake) :socket])
                               ;; TODO: revisit this, not sure why we can't just overwrite it
                               (swap! state assoc-in [:peers (:src handshake) :socket] s))


Added io wrappers.

Added io wrappers.

--- rosado/io/io.clj
+++ rosado/io/io.clj
@@ -1,16 +1,14 @@
 ;; simple io abstraction layer for clojure
 ;; Roland Sadowski [szabla gmail com]

-(in-ns 'io)
-(clojure/refer 'clojure)
-
-(import '(java.io File FileReader FileWriter BufferedReader BufferedWriter
-				  FileInputStream FileOutputStream FileOutputStream
-				  BufferedInputStream BufferedOutputStream))
+(clojure/ns rosado.io
+			(:import (java.io File FileReader FileWriter BufferedReader BufferedWriter
+							   FileInputStream FileOutputStream FileOutputStream
+							   BufferedInputStream BufferedOutputStream)))

 (defn reader
   "Returns a reader or input stream (buffered).
-  optional keywords: :unbuff [:ub] - for unbuffered input.
+  Optional keywords: :unbuff [:ub] - for unbuffered input.
   :bytes - for an InputStream instead of a Reader."
   [#^String file-name & modes]
   (cond
@@ -30,7 +28,7 @@

 (defn writer
   "Returns a writer or output stream (buffered).
-  optional keywords: :unbuff [:ub] - for unbuffered output.
+  Optional keywords: :unbuff [:ub] - for unbuffered output.
   :bytes - for an OutputStream instead of a Writer."
   [#^String file-name & modes]
   (cond


Added a delay after refreshing -- now is working! just need to clean up

--- src/xbxnotify.clj
+++ src/xbxnotify.clj
@@ -71,16 +71,18 @@
         (prn "Need all three of: sms-address, gmail-address, and gmail-password to do SMS notifications.")
         (throw (Exception.))))
     (loop [friends {:online []}]
-      (let [new-friends (parse-friends (.refresh page))
+      (.refresh page)
+      (Thread/sleep 5000)
+      (let [new-friends (parse-friends page)
             [old-tags new-tags] (map #(set (map :tag (:online %)))
                                      [friends new-friends])
             logged-on (difference new-tags old-tags)
             logged-off (difference old-tags new-tags)
             msg (case (count logged-on)
                       0 nil
-                      1 (str (first logged-on " has logged on."))
+                      1 (str (first logged-on) " has logged on.")
                       (str (string/join " and " logged-on)
-                           " have logged on"))]
+                           " have logged on."))]
         (if msg
           (do
             (prn msg)


Updated comments; cleaned up some code

Updated comments; cleaned up some code

--- src/ttt/core.cljs
+++ src/ttt/core.cljs
@@ -135,7 +135,7 @@
     ret))

 (defn blocking-deref
-  "Given atom and a Result object, attempt to cycle the process tick on derefing until `pred-fn` isn't true
+  "Given an atom and a Result object, attempt to cycle the process tick on derefing until `pred-fn` isn't true
   By default, `pred-fn` is nil?
   Once the condition doesn't hold, the Result will be set to @a, and @a is returned"
   ([a r]
@@ -164,9 +164,6 @@
       (git-root)
       (blocking-deref res))
     res))
-
-;; Last commit message: git log -n1 --pretty=format:%s
-;; Last commit hash: git rev-parse HEAD

 ;; Lock file I/O
 ;; --------------
@@ -279,15 +276,9 @@
     (inc-state ticket)
     ticket))

-;(defn id-kw->pos
-;  "Given a ticket's id keyword [ie :1], return its supposed position
-;  DO NOT USE THIS
-;  This is here only for historical reasons.  Ticket IDs are integer based"
-;  [id-kw]
-;  (-> id-kw name js/parseInt dec))
-
 (defn id->pos
-  "Given a ticket's integer ID, return its supposed position in the ticket vector"
+  "Given a ticket's integer ID, return its supposed position in the ticket vector
+  This is naive, but gets the job done."
   [id-int]
   (dec id-int))

@@ -305,18 +296,21 @@
     ;; We may have some hooks here, if not TODO remove the `let`
     ticket))

-(defn append-ticket [t-file-map ticket]
+(defn append-ticket
+  "Append a given ticket to the ticket vector/collection"
+  [t-file-map ticket]
   (update-in t-file-map [:tickets] conj (assoc ticket
                                                :id (-> t-file-map :tickets count inc))))

 (defn update-ticket
-  "This ticket needs to have the :id key in it already"
+  "Update a ticket within the ticket vector/collection.
+  The ticket passed must already have an :id"
   [t-file-map ticket]
   (update-in t-file-map [:tickets (-> ticket :id id->pos)] merge ticket))

 (defn ticket-io!
   "This applies a function to the actual ticket file.
-  All functions should take two args: the ticket file map, and a ticket.
+  All functions should take two args: the ticket file map and a ticket.
   You should never lock the ticket file by hand, use this function."
   ([f ticket]
    (ticket-io! f ticket default-ticket-path))
@@ -327,6 +321,10 @@
          _ (unlock!)]
      res)))

+;; Ticket formatting and printing
+;; ------------------------------
+
+;; Create a short hand to determine the opening and closing state of a ticket
 (defn open-state [pref-file]
   (-> (:ticket-states pref-file) first keyword))
 (defn closed-state [pref-file]
@@ -369,7 +367,7 @@
 ;; -----------------
 ;;
 ;; Here are the auxiliary functions for various git hooks and interactions.
-;; These are responsible automatically pushing a ticket through its states
+;; These are responsible for automatically pushing a ticket through its states
 ;; based on git usage.

 (defn process-work
@@ -388,7 +386,11 @@
           ticket))
       ticket)))

-(defn parse-git-message [message-str]
+(defn parse-git-message
+  "Given a commit message of the form: 'this is my commit [...]'
+  break it apart into a map of aossciated ticket ids, potential ttt commands,
+  and the raw commit message itself"
+  [message-str]
   (if-let [hook-str (re-find #"\[.+]$" message-str)]
     (let [hook-sans-br (cstr/replace hook-str #"\[|\]" "")
           parts (cstr/split hook-sans-br #"\s")
@@ -396,7 +398,11 @@
           ticket-ids (map id-str->int (filter #(= \:  (get % 0)) parts))]
       {:ids ticket-ids :maybe-command command :message message-str})))

-(defn process-git [git-hash email & message-pieces]
+(defn process-git
+  "This is the entry point for processing git feedback.
+  It takes a commit hash, the author email, and any chunks of the message.
+  These are most easily obtained with: `git log -n1 --pretty=format:'%H %ae %s'`"
+  [git-hash email & message-pieces]
   (let [message-map (parse-git-message (cstr/join " " message-pieces))
         command (:maybe-command message-map)
         tickets (:tickets (ticket-file!))]


Add support for steps in numeric for loop

--- src/luaclj/core.clj
+++ src/luaclj/core.clj
@@ -169,12 +169,21 @@
     ))
 (defn get-for-statement [& args]
   (println "for-args:" args)
-  (let [for-args (leave :even (first args))]
+  (let [for-args (leave :even (first args))
+        for-body (if (= (count for-args) 5)
+                   (nth for-args 4)
+                   (nth for-args 3))
+        doseq-stmt `(doseq [~(nth for-args 0)
+                            ~(if (= (count for-args) 5)
+                               `(range ~(nth for-args 1)
+                                       ~(nth for-args 2)
+                                       ~(nth for-args 3))
+                               `(range ~(nth for-args 1)
+                                       ~(nth for-args 2)))]
+                      ~for-body)
+        ]
     (println "for-args1:" for-args)
-    `(doseq [~(nth for-args 0)
-            (range ~(nth for-args 1)
-                   ~(nth for-args 2))]
-      ~(nth for-args 3))
+    doseq-stmt
     ))

 (defn get-if-statement [& args]
@@ -314,8 +323,8 @@
     G__15153)
 (pprint (lua-parser (slurp "resources/test/basic.lua")))

-(eval (insta/transform transform-map (lua-parser (slurp "resources/test/basic.lua"))))
-  (try (pprint (insta/transform transform-map (lua-parser (slurp "resources/test/basic.lua"))))
+(eval (insta/transform transform-map (lua-parser (slurp "resources/test/for.lua"))))
+  (try (pprint (insta/transform transform-map (lua-parser (slurp "resources/test/for.lua"))))
        (catch Exception ex (clojure.stacktrace/print-stack-trace ex)))
   (pprint tree)
   (prewalk #(do (println %1) %1) tree)


handles username/password in the yaml file.

--- src/io/cyanite/store.clj
+++ src/io/cyanite/store.clj
@@ -20,6 +20,7 @@
   (channel-for [this])
   (fetch [this agg paths tenant rollup period from to]))

+(def not-nil? (complement nil?))
 ;;
 ;; The following contains necessary cassandra queries. Since
 ;; cyanite relies on very few queries, I decided against using
@@ -145,10 +146,13 @@
            chan_size 10000
            batch_size 500}}]
   (info "creating cassandra metric store")
+  (if (not-any? nil? [username password]) (info "username or password is missing"))
 (let [cluster (if (sequential? cluster) cluster [cluster])
-        session (-> (alia/cluster {:contact-points cluster
-                                   :credentials {:user username, :password password} })
-                    (alia/connect keyspace))
+      session (-> (if (not-any? nil? [username password])
+                    (alia/cluster {:contact-points cluster :credentials {:user username, :password password}})
+                    (alia/cluster {:contact-points cluster})
+                    )
+                   (alia/connect keyspace))
         insert! (insertq session)
         fetch!  (fetchq session)]
     (reify


Change interpreter to work with new :value :literal hierarchy.

--- src/isla/interpreter.clj
+++ src/isla/interpreter.clj
@@ -49,6 +49,9 @@
       (let [ref (interpret sub-node env)]
         {:ref ref :val (lookup-ref ref env)})
       {:val (interpret sub-node env)})))
+
+(defmethod interpret :literal [node env]
+  (interpret (extract node [:c 0]) env))

 (defmethod interpret :identifier [node _]
   (extract node [:c 0]))


Fix test to reflect run task bugfix.

Fix test to reflect run task bugfix.

--- test/test_run.clj
+++ test/test_run.clj
@@ -27,4 +27,4 @@
     (is (= "BRUNCH" (slurp out-file)))
     (delete-file out-file :silently)
     (is (zero? (run project ":mmm" "1")))
-    (is (= ":munched (\"1\")" (slurp out-file))))
+    (is (= ":munched (:mmm \"1\")" (slurp out-file))))


Fix bug with linkifying headers

Fix bug with linkifying headers

--- src/langnostic/files.clj
+++ src/langnostic/files.clj
@@ -24,9 +24,13 @@
      text)
    state])

+(def new-transformers
+  (concat
+   (remove #(= % markdown.common/dashes) markdown.transformers/transformer-vector)
+   [linkify-headers]))
+
 (defn file-content [fname]
   (md/md-to-html-string
    (slurp fname)
-   :custom-transformers [linkify-headers]
-   :replacement-transformers (remove #(= % markdown.common/dashes) markdown.transformers/transformer-vector)
+   :replacement-transformers new-transformers
    :footnotes? true))


Fix chenex build error

Fix chenex build error

--- src/leiningen/chenex.clj
+++ src/leiningen/chenex.clj
@@ -34,8 +34,8 @@
         loc# (try (-> (str "greenyouse/chenex/templates/" t# ".clj") io/resource slurp)
                   (catch Exception _ (lmain/abort (red-text (str "Chenex Error: template " (first temp) " not found.\n
 Options are: cljx")))))]
-    (do (io/make-parents "builds/chenex-build.clj")
-        (spit "builds/chenex-build.clj" loc#))))
+    (do (io/make-parents "builds/chenex-builds.clj")
+        (spit "builds/chenex-builds.clj" loc#))))

 (defn- repl
   "Sets a new target environment for the REPL iteractively. Enter the name


Move Frege compilation into a subprocess to remove Leiningen from the classpath (avoids interaction between Frege annotations and some sonatype libraries). Also wires up stdout/stderr correctly.

--- src/leiningen/fregec.clj
+++ src/leiningen/fregec.clj
@@ -5,7 +5,9 @@

 (ns leiningen.fregec
   (:require [clojure.java.io :as io]
-            [leiningen.classpath :as cp])
+            [leiningen.core.classpath :as cp]
+            [leiningen.core.eval :as eval]
+            [leiningen.core.project :as project])
   (:import java.io.File))

 (defn- stale-frege-sources
@@ -34,21 +36,6 @@
   (reduce + (map (fn [flag] (apply * (repeat (get frege-flags flag 0) 2)))
                  flags)))

-(defn- create-opts
-  "Create options for the Frege compiler."
-  [project]
-  (let [source-path (:frege-source-path project)
-        compile-path (:compile-path project)
-        flags [:warnings :withcp :runjavac]
-        options (flags-to-bits flags)
-        prefix "" ; Frege package prefix - should always be empty string
-        classpath (cp/get-classpath-string project)]
-    (frege.compiler.Main/createopts (into-array String [source-path])
-                                    options
-                                    compile-path
-                                    (into-array String (.split classpath ":"))
-                                    prefix)))
-
 (defn- print-opts
   "Run the Frege code to print the compiler options."
   [opts]
@@ -57,25 +44,45 @@
        frege.prelude.PreludeBase$TST/performUnsafe
        .call))

-(defn- compiler
-  "Create compiler object for project and options."
-  [project opts]
-  (let [files (stale-frege-sources [(:frege-source-path project)]
-                                   (:compile-path project))]
-    (frege.compiler.Main/runfregec (into-array String files)
-                                   opts
-                                   (java.io.PrintWriter. *out*))))
+(defn- subprocess-form
+  "Build a form that can run the Frege compiler in a sub-process."
+  [project srcs out cp flags files]
+  `(binding [*out* *err*]
+     (let [opts#     (frege.compiler.Main/createopts
+                      (into-array String ~srcs)
+                      ~flags ~out
+                      (into-array String ~cp) "")
+           compiler# (frege.compiler.Main/runfregec
+                      (into-array String ~files)
+                      opts# (java.io.PrintWriter. *err*))
+           function# (frege.prelude.PreludeBase$TST/performUnsafe compiler#)]
+       (when-not (.call function#)
+         (println "Frege compilation failed!")))))
+
+(def ^:private subprocess-profile
+  {:dependencies [^:displace ['org.clojure/clojure (clojure-version)]]
+   :eval-in :subprocess})

 (defn fregec
   "Compile Frege source files in :frege-source-path to :compile-path

 Set :fregec-options in project.clj to pass options to the Frege compiler."
   [project]
-  (let [project (merge {:frege-source-path "."
-                        :compile-path "build"}
-                       project)
-        options (create-opts project)
-        compiler (compiler project options)
-        function (frege.prelude.PreludeBase$TST/performUnsafe compiler)]
-    ;; (print-opts options) ;; debugging
-    (.call function)))
+  (binding [*out* *err*]
+    (let [project (merge {:frege-source-paths [(or (:frege-source-path project)
+                                                   ".")]
+                          :compile-path "build"}
+                         project)
+          srcs  (:frege-source-paths project)
+          out   (:compile-path project)
+          files (stale-frege-sources srcs out)
+          flags (flags-to-bits [:warnings :withcp :runjavac])
+          cp    (cp/get-classpath project)
+          form  (subprocess-form project
+                                 (into [] srcs) out
+                                 (into [] cp) flags
+                                 (into [] files))]
+      ;; (print-opts options) ;; debugging
+      (binding [eval/*pump-in* false]
+        (eval/eval-in (project/merge-profiles project [subprocess-profile])
+                      form)))))


make autoload the default

make autoload the default

can't even remember why it is not.

fixes #481

--- src/main/shadow/build/targets/shared.clj
+++ src/main/shadow/build/targets/shared.clj
@@ -164,7 +164,7 @@
        true

        'shadow.cljs.devtools.client.env/autoload
-       (or autoload (some? before-load) (some? after-load) (some? before-load-async))
+       (not (false? autoload))

        'shadow.cljs.devtools.client.env/module-format
        (name (get-in state [:build-options :module-format]))


Change type signature formatting

Change type signature formatting

--- src/oxcart/core.clj
+++ src/oxcart/core.clj
@@ -53,8 +53,8 @@

 (defn gensym
-  "(gensym) → Symbol
-   (gensym prefix ← String) → Symbol
+  "(λ) → Symbol
+   (λ String) → Symbol

   Wrapper around clojure.core/gensym which adds metadata annotating
   generated symbols and permitting distinction between generated and
@@ -69,8 +69,8 @@

 (defn eval
-  "λ form → value
-   λ form → config-map → value
+  "(λ form) → value
+   (λ form → config-map) → value

   Form is any Clojure sexpr, config map is a load configuration and
   value is an arbitrary Clojure value or class.
@@ -136,8 +136,8 @@

 (defn load
-  "λ String → nil
-   λ String → config-map → nil
+  "(λ String) → nil
+   (λ String) → config-map → nil

   Loads a resource on the classpath identified by a string path as
   clojure code via eval for side-effects against the invoking Clojure


adds a helper function for saving a doc

adds a helper function for saving a doc

--- src/pc/http/doc.clj
+++ src/pc/http/doc.clj
@@ -4,7 +4,8 @@
             [clojure.tools.logging :as log]
             [datomic.api :as d]
             [pc.datomic :as pcd]
-            [pc.models.doc :as doc-model])
+            [pc.models.doc :as doc-model]
+            [pc.models.layer :as layer-model])
   (:import [java.io.PushbackReader]))

 (defn read-doc [doc]
@@ -27,3 +28,14 @@
                                        {:cust/uuid (:cust/uuid cust)}))))
       (log/infof "requested duplicate doc for non-existent doc %s" document-name))
     new-doc-id))
+
+(defn save-doc
+  "Helper function to save an existing doc, still needs to be committed and added to docs
+   after it has been saved."
+  [doc-id doc-name]
+  (spit (format "resources/docs/%s.edn" doc-name)
+        (pr-str (map #(dissoc % :db/id :document/id)
+                     ;; we may want to save groups at some point in the future, right now they
+                     ;; just take up space.
+                     (remove #(= :layer.type/group (:layer/type %))
+                             (layer-model/find-by-document (pcd/default-db) {:db/id doc-id}))))))


Cleaner auth-headers function

Cleaner auth-headers function

--- src/pundit/http.clj
+++ src/pundit/http.clj
@@ -100,7 +100,7 @@
 ; Requests

 (defn auth-headers [{:keys [app api-key master-key use-master token]}]
-  (let [h (transient headers)]
+  (let [h (transient {})]
     (assoc! h "X-Parse-Application-Id" app)
     (if use-master
       (assoc! h "X-Parse-Master-Key" master-key)
@@ -112,7 +112,8 @@
 (defn- request [uri auth req-map]
   (-> req-map
       (merge {:url (str *base* (parse-path uri))
-              :headers (auth-headers auth)})
+              :headers (merge headers
+                              (auth-headers auth))})
       http/request
       :body
       (js/read-str :key-fn #(keyword (kebabize %)))))


handle & separators in params; relax headers matching

--- src/rester/core.clj
+++ src/rester/core.clj
@@ -76,12 +76,13 @@
   ([s sep] (str->map s sep {} false))
   ([s sep opts include-empty]
    (if-not (str/blank? s)
-     (->> (str/split s #"\s*,\s*")
-          (map #(let [[k v] (str/split % sep 2)
-                      v (or v (log/warn "missing key or value in " k))]
-                  [k (replace-opts v opts)]))
-          (filter #(or include-empty (not (str/blank? (second %)))))
-          (into {})))))
+     (let [[sep1 sep] (if (vector? sep) sep [#"\s*,\s*" sep])]
+       (->> (str/split s sep1)
+           (map #(let [[k v] (str/split % sep 2)
+                       v (or v (log/warn "missing key or value in " k))]
+                   [k (replace-opts v opts)]))
+           (filter #(or include-empty (not (str/blank? (second %)))))
+           (into {}))))))

 (defn print-http-message [req res]
   (let [format-body #(cond (instance? Element %) (emit-str %)
@@ -218,7 +219,7 @@
                      (coerce-payload (replace-opts exp-body opts) (or (get exp-headers "Content-Type") "")))]
       (-> test (update :url replace-opts opts)
           (update :headers str->map #":" opts false)
-          (update :params str->map #"\s*=\s*" opts true)
+          (update :params str->map  [#"&|(\s*,\s*)" #"\s*=\s*"] opts true)
           (update :payload #(-> % (replace-opts opts) ((if (:dont_parse_payload options) identity json->clj))))
           (update :exp-status #(.intValue (Double/parseDouble %)))
           (assoc :exp-body exp-body :exp-headers exp-headers)))


Unify internal terminology with sweet.clj

--- src/midje/semi_sweet.clj
+++ src/midje/semi_sweet.clj
@@ -61,7 +61,7 @@
 )

-(defmacro call-being-tested [call-form expected-result augmentations]
+(defmacro call-being-tested [call-form expected-result overrides]
   "Creates a map that contains a function-ized version of the form being
    tested, an expected result, and the file position to refer to in case of
    failure. See 'expect'."
@@ -70,7 +70,7 @@
      :expected-result ~expected-result
      :expected-result-text-for-failures '~expected-result
      :file-position (user-file-position)}
-    (hash-map ~@augmentations)))
+    (hash-map ~@overrides)))

 ;; I want to use resolve() to compare calls to fake, rather than the string
 ;; value of the symbol, but for some reason when the tests run, *ns* is User,
@@ -81,11 +81,11 @@
 ;; but those fail for reasons I don't understand. Bah.

-(defn- separate [augmentations-and-expectations]
+(defn- separate [overrides-and-expectations]
   (let [expectation? #(and (seq? %)
 			   (or (= "fake" (name (first %)))
 			       (= "not-called" (name (first %)))))
-	grouped (group-by expectation? augmentations-and-expectations)
+	grouped (group-by expectation? overrides-and-expectations)
 	default-values {false '() true '()}
 	separated (merge default-values grouped)]
     [(separated false) (separated true)])
@@ -96,8 +96,8 @@
    (probably with 'fake') have been satisfied, and check that the actual
    results are as expected. If the expected results are a function, it
    will be called with the actual result as its single argument."
-  [call-form => expected-result & augmentations-and-expectations]
-  (let [ [augmentations expectations] (separate augmentations-and-expectations)]
-    `(let [call# (call-being-tested ~call-form ~expected-result ~augmentations)]
+  [call-form => expected-result & overrides-and-expectations]
+  (let [ [overrides expectations] (separate overrides-and-expectations)]
+    `(let [call# (call-being-tested ~call-form ~expected-result ~overrides)]
        (expect* call# (vector ~@expectations))))
 )


Fix follow-up creation email.

Fix follow-up creation email.

--- src/oc/email/content.clj
+++ src/oc/email/content.clj
@@ -9,7 +9,8 @@
             [hickory.core :as hickory]
             [oc.lib.auth :as auth]
             [oc.lib.jwt :as jwt]
-            [oc.lib.user-avatar :as user-avatar]
+            [oc.lib.user :as user]
+            [oc.lib.storage :as storage]
             [oc.email.config :as config]
             [jsoup.soup :as soup]))

@@ -71,6 +72,17 @@

 (defn- preheader-spacer []
   (s/join (repeat 120 " ")))
+
+;; ----- Retrieve post data -----
+
+(defn get-post-data [payload]
+  (let [notification (:notification payload)
+        user-map {:user-id (:user-id payload)}
+        c {:storage-server-url config/storage-server-url
+           :auth-server-url config/auth-server-url
+           :passphrase config/passphrase
+           :service-name "Email"}]
+    (storage/post-data-for c user-map (:slug (:org payload)) (:board-id notification) (:entry-id notification))))

 ;; ----- HTML Fragments -----

@@ -342,7 +354,7 @@
   ([entry] (post-block entry (:url entry)))
   ([entry entry-url]
   (let [publisher (:publisher entry)
-        avatar-url (user-avatar/fix-avatar-url config/filestack-api-key (:avatar-url publisher))
+        avatar-url (user/fix-avatar-url config/filestack-api-key (:avatar-url publisher))
         headline (post-headline entry)
         vid (:video-id entry)
         abstract (:abstract entry)
@@ -393,7 +405,7 @@
 (defn- digest-post-block
   [user entry]
   (let [publisher (:publisher entry)
-        avatar-url (user-avatar/fix-avatar-url config/filestack-api-key (:avatar-url publisher))
+        avatar-url (user/fix-avatar-url config/filestack-api-key (:avatar-url publisher))
         vid (:video-id entry)
         abstract (:abstract entry)
         cleaned-body (if (clojure.string/blank? abstract) (text/truncated-body (:body entry)) abstract)
@@ -757,8 +769,8 @@

 (defn follow-up-subject [data]
   (let [msg (keywordize-keys data)
-        follow-up-author (-> data :follow-up :author)
-        author-name (or (:name follow-up-author) (str (:first-name follow-up-author) " " (:last-name follow-up-author)))]
+        follow-up-author (-> data :notification :follow-up :author)
+        author-name (user/name-for follow-up-author)]
     (format follow-up-subject-text author-name)))

 (defn- follow-up-post-block
@@ -789,18 +801,24 @@
             (spacer 12 "")
             (paragraph paragraph-text "" "text-left attribution")]]]])))

-(defn- follow-up-notification-content [entry]
-  (let [logo-url (:org-logo-url entry)
-        logo-width (:org-logo-width entry)
-        logo-height (:org-logo-height entry)
+(defn- follow-up-notification-content [msg]
+  (let [notification (:notification msg)
+        org (:org notification)
+        logo-url (:logo-url org)
+        logo-width (:logo-width org)
+        logo-height (:logo-height org)
         logo? (not (s/blank? logo-url))
-        org-name (:org-name entry)
-        note (:note entry)
-        note? (not (s/blank? note))
-        follow-up-author (:author (:follow-up entry))
-        author-name (or (:name follow-up-author) (str (:first-name follow-up-author) " " (:last-name follow-up-author)))
-        message (follow-up-subject entry)
-        entry-url (:url entry)]
+        org-name (:name org)
+        follow-up (:follow-up notification)
+        follow-up-author (:author follow-up)
+        author-name (user/name-for follow-up-author)
+        post-data (get-post-data msg)
+        message (follow-up-subject msg)
+        entry-url (s/join "/" [config/web-url
+                               (:slug org)
+                               (:board-slug post-data)
+                               "post"
+                               (:uuid post-data)])]
     [:td {:class "small-12 large-12 columns main-wrapper vertical-padding" :valign "middle" :align "center"}
       (when (:avatar-url follow-up-author)
         [:table {:class "row"}
@@ -810,7 +828,7 @@
                 [:tr {:class "small-12 large-12 columns"}
                   [:th {:class "small-12 large-12 columns"}
                     [:img.follow-up-author
-                      {:src (user-avatar/fix-avatar-url config/filestack-api-key (:avatar-url follow-up-author))}]]]]]]])
+                      {:src (user/fix-avatar-url config/filestack-api-key (:avatar-url follow-up-author))}]]]]]]])

       (when (:avatar-url follow-up-author)
         (spacer 24))
@@ -819,7 +837,7 @@
           [:th {:class "small-12 large-12 columns"}
             [:h1 {:class "follow-up-header"} message]]]]
       (spacer 16)
-      (follow-up-post-block entry entry-url)
+      (follow-up-post-block post-data entry-url)
       (spacer 24)
       [:table {:class "row"}
         [:tr
@@ -897,7 +915,7 @@
         intro (notify-intro msg)
         notification-author (:author notification)
         notification-author-name (:name notification-author)
-        notification-author-url (user-avatar/fix-avatar-url config/filestack-api-key (:avatar-url notification-author))
+        notification-author-url (user/fix-avatar-url config/filestack-api-key (:avatar-url notification-author))
         uuid (:entry-id notification)
         secure-uuid (:secure-uuid notification)
         origin-url config/web-url


order of arguments

order of arguments

--- src/ophion/aggregate.clj
+++ src/ophion/aggregate.clj
@@ -355,7 +355,7 @@
         config (config/read-path path)
         graph (mongo/connect! (:mongo config))]
     ;; (ingest-incrementally graph (:input env))
-    (ingest-batches-from-path! (:input env) graph)
+    (ingest-batches-from-path! graph (:input env))
     (log/info "ingest complete")))

 (def gods-graph


make sure mul-add is interned to the correct ns if one is specified (also tidy up vararg fns)

--- src/overtone/sc/ugen.clj
+++ src/overtone/sc/ugen.clj
@@ -263,16 +263,14 @@
 ;; We define this uniquely because it has to be smart about its rate.
 ;; TODO: I think this should probably be handled by one of the ugen modes
 ;; that is currently not yet implemented...
-(def mul-add
-  (make-expanding
-   (fn [in mul add]
-     (ugen {:name "MulAdd",
-            :args [{:name "in"}
-                   {:name "mul", :default 1.0}
-                   {:name "add", :default 0.0}]
-            :doc "Multiply and add, equivalent to (+ add (* mul in))"}
-           (op-rate in) 0 (list in mul add)))
-   [true true true]))
+(def mul-add-ugen
+  (fn [in mul add]
+    (ugen {:name "MulAdd",
+           :args [{:name "in"}
+                  {:name "mul", :default 1.0}
+                  {:name "add", :default 0.0}]
+           :doc "Multiply and add, equivalent to (+ add (* mul in))"}
+          (op-rate in) 0 (list in mul add))))

 (derive :overtone.sc.ugen.sc-ugen/sc-ugen root-type)

@@ -364,39 +362,38 @@
 (defn intern-ugens
   "Iterate over all UGen meta-data, generate the corresponding functions and
   intern them in the current or otherwise specified namespace."
-  [& [to-ns]]
-  (let [to-ns (or to-ns *ns*)]
-    (doseq [ugen (filter #(not (or (= "UnaryOpUGen" (:name %))
-                                   (= "BinaryOpUGen" (:name %))))
-                         (vals UGEN-SPECS))]
-      (def-ugen to-ns ugen 0))
-    (doseq [[op-name special] UNARY-OPS]
-      (def-unary-op to-ns op-name special))
-    (doseq [[op-name special] BINARY-OPS]
-      (def-binary-op to-ns op-name special))
-    ;;(intern to-ns 'mul-add (make-expanding mul-add [true true true]))
-    ;;(refer 'overtone.sc.ugen.extra)
-    ))
+  ([] (intern-ugens *ns*))
+  ([to-ns]
+     (doseq [ugen (filter #(not (or (= "UnaryOpUGen" (:name %))
+                                    (= "BinaryOpUGen" (:name %))))
+                          (vals UGEN-SPECS))]
+       (def-ugen to-ns ugen 0))
+     (doseq [[op-name special] UNARY-OPS]
+       (def-unary-op to-ns op-name special))
+     (doseq [[op-name special] BINARY-OPS]
+       (def-binary-op to-ns op-name special))
+     (intern to-ns 'mul-add (make-expanding mul-add-ugen [true true true]))))

 (defn intern-ugens-collide
-  "Intern the ugens that collide with built-in clojure functions."
-  [& [to-ns]]
-  (let [to-ns (or to-ns *ns*)]
-    (doseq [[op kind] generics]
-      (let [func (var-get (resolve (symbol (str "clojure.contrib.generic." (to-str kind)) op)))]
-        (ns-unmap to-ns (symbol op))
-        (intern to-ns (symbol op) (make-expanding func [true true]))))
-
-    ;; intern div-meth so we can access the division operator since / is special cased
-    (intern to-ns 'div-meth
-            (make-expanding (var-get (resolve
-                                      (symbol "clojure.contrib.generic.arithmetic" "/")))
-                            [true true]))
-
-    (doseq [[op-name special] UNARY-OPS-COLLIDE]
-      (def-unary-op to-ns op-name special))
-    (doseq [[op-name special] BINARY-OPS-COLLIDE]
-      (def-binary-op to-ns op-name special))))
+  "Intern the ugens that collide with built-in clojure functions to the current
+  or otherwise specified namespace"
+  ([] (intern-ugens-collide *ns*))
+  ([to-ns]
+     (doseq [[op kind] generics]
+       (let [func (var-get (resolve (symbol (str "clojure.contrib.generic." (to-str kind)) op)))]
+         (ns-unmap to-ns (symbol op))
+         (intern to-ns (symbol op) (make-expanding func [true true]))))
+
+     ;; intern div-meth so we can access the division operator since / is special cased
+     (intern to-ns 'div-meth
+             (make-expanding (var-get (resolve
+                                       (symbol "clojure.contrib.generic.arithmetic" "/")))
+                             [true true]))
+
+     (doseq [[op-name special] UNARY-OPS-COLLIDE]
+       (def-unary-op to-ns op-name special))
+     (doseq [[op-name special] BINARY-OPS-COLLIDE]
+       (def-binary-op to-ns op-name special))))

 ;; We refer all the ugen functions here so they can be access by other parts


fix editors to be reloadable, since dom is not rebuilt everytime now

--- src/parinfer/editor.cljs
+++ src/parinfer/editor.cljs
@@ -190,63 +190,64 @@
   "Create a parinfer editor."
   ([element-id key-] (create-editor! element-id key- {}))
   ([element-id key- opts]
-   (let [element (js/document.getElementById element-id)
-         cm (js/CodeMirror.fromTextArea element (clj->js (merge editor-opts opts)))
-         wrapper (.getWrapperElement cm)
-         initial-state (assoc empty-editor-state
-                              :mode (:parinfer-mode opts))]
-
-
-     (set! (.-id wrapper) (str "cm-" element-id))
-
-     (when-not (:readOnly opts)
-
-       ;; on blur, start playing animation again, if we are not dev mode.
-       (.on cm "blur" (fn [e]
-                        (when-not (:show? @controls-state)
-                          (play-recording! key-))))
-
-       ;; on focus, set recording controls to focus on this editor.
-       ;; and stop any animation.
-       (.on cm "focus" (fn [e]
-                         (swap! controls-state assoc :target-key key-)
-                         (stop-playing! key-)
-                         (on-cursor-activity cm))))
-
-     (when-not (get @state key-)
-       (swap! frame-updates assoc key- {}))
-
-     (swap! state update-in [key-]
-            #(-> (or % initial-state)
-                 (assoc :cm cm)))
-
-     (swap! vcr update-in [key-]
-            #(or % empty-recording))
-
-     ;; Extend the code mirror object with some utility methods.
-     (specify! cm
-               IEditor
-               (cm-key [this] key-)
-               (frame-updated? [this] (get-in @frame-updates [key- :frame-updated?]))
-               (set-frame-updated! [this value] (swap! frame-updates assoc-in [key- :frame-updated?] value))
-               (record-change! [this new-thing]
-                               (let [data (get @vcr key-)]
-                                 (when (:recording? data)
-                                   (let [last-time (:last-time data)
-                                         now (.getTime (js/Date.))
-                                         dt (if last-time (- now last-time) 0)
-                                         new-changes (conj (:changes data) (assoc new-thing :dt dt))
-                                         new-data (assoc data
-                                                         :last-time now
-                                                         :changes new-changes)]
-                                     (swap! vcr assoc key- new-data))))))
-
-     ;; handle code mirror events
-     (.on cm "change" on-change)
-     (.on cm "beforeChange" before-change)
-     (.on cm "cursorActivity" on-cursor-activity)
-
-     cm)))
+   (when-not (get @state key-)
+     (let [element (js/document.getElementById element-id)
+           cm (js/CodeMirror.fromTextArea element (clj->js (merge editor-opts opts)))
+           wrapper (.getWrapperElement cm)
+           initial-state (assoc empty-editor-state
+                                :mode (:parinfer-mode opts))]
+
+
+       (set! (.-id wrapper) (str "cm-" element-id))
+
+       (when-not (:readOnly opts)
+
+         ;; on blur, start playing animation again, if we are not dev mode.
+         (.on cm "blur" (fn [e]
+                          (when-not (:show? @controls-state)
+                            (play-recording! key-))))
+
+         ;; on focus, set recording controls to focus on this editor.
+         ;; and stop any animation.
+         (.on cm "focus" (fn [e]
+                           (swap! controls-state assoc :target-key key-)
+                           (stop-playing! key-)
+                           (on-cursor-activity cm))))
+
+       (when-not (get @state key-)
+         (swap! frame-updates assoc key- {}))
+
+       (swap! state update-in [key-]
+              #(-> (or % initial-state)
+                   (assoc :cm cm)))
+
+       (swap! vcr update-in [key-]
+              #(or % empty-recording))
+
+       ;; Extend the code mirror object with some utility methods.
+       (specify! cm
+                 IEditor
+                 (cm-key [this] key-)
+                 (frame-updated? [this] (get-in @frame-updates [key- :frame-updated?]))
+                 (set-frame-updated! [this value] (swap! frame-updates assoc-in [key- :frame-updated?] value))
+                 (record-change! [this new-thing]
+                                 (let [data (get @vcr key-)]
+                                   (when (:recording? data)
+                                     (let [last-time (:last-time data)
+                                           now (.getTime (js/Date.))
+                                           dt (if last-time (- now last-time) 0)
+                                           new-changes (conj (:changes data) (assoc new-thing :dt dt))
+                                           new-data (assoc data
+                                                           :last-time now
+                                                           :changes new-changes)]
+                                       (swap! vcr assoc key- new-data))))))
+
+       ;; handle code mirror events
+       (.on cm "change" on-change)
+       (.on cm "beforeChange" before-change)
+       (.on cm "cursorActivity" on-cursor-activity)
+
+       cm))))

 ;;----------------------------------------------------------------------
 ;; Setup


let the layout caller specify the meta title and description

--- src/pc/views/content.clj
+++ src/pc/views/content.clj
@@ -60,20 +60,20 @@
     [:link {:href (cdn-path "/img/2208x1182.png") :rel "apple-touch-startup-image" :media "(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)"}]

     [:meta {:name "og:card"         :content "summary"}]
-    [:meta {:name "og:description"  :content "Precursor lets you prototype product design wireframes with a fast and simple web app."}]
     (if-let [image-url (:meta-image view-data)]
       [:meta {:name "og:image" :content image-url}]
       (list [:meta {:name "og:image" :content (cdn-path "/img/precursor-logo.png")}]
             [:meta {:name "og:image:width":content "1200"}]
             [:meta {:name "og:image:height" :content "1200"}]))
     [:meta {:name "og:site_name"    :content "Precursor"}]
-    [:meta {:name "og:title"        :content "Fast prototyping web app, makes collaboration easy."}]
+    [:meta {:name "og:title"        :content (or (:meta-title view-data)
+                                                 "Fast prototyping web app, makes collaboration easy.")}]
+    [:meta {:name "og:description"  :content (or (:meta-description view-data)
+                                                 "Precursor lets you prototype product design wireframes with a fast and simple web app.")}]
     [:meta {:name "og:type"         :content "website"}]
     [:meta {:name "og:url"          :content  (urls/root)}]

     [:meta {:name "twitter:card"         :content "summary_large_image"}]
-    [:meta {:name "twitter:description"  :content "Precursor lets you prototype product design wireframes with a fast and simple web app."}]
-
     (if-let [image-url (:meta-image view-data)]
       [:meta {:name "twitter:image" :content image-url}]
       (list [:meta {:name "twitter:image:src"    :content (cdn-path "/img/precursor-logo.png")}]
@@ -81,7 +81,10 @@
             [:meta {:name "twitter:image:height" :content "1200"}]))
     [:meta {:name "twitter:site"         :content "@PrecursorApp"}]
     [:meta {:name "twitter:site:id"      :content "2900854766"}]
-    [:meta {:name "twitter:title"        :content "Fast prototyping web app, makes collaboration easy."}]
+    [:meta {:name "twitter:title"        :content (or (:meta-title view-data)
+                                                      "Fast prototyping web app, makes collaboration easy.")}]
+    [:meta {:name "twitter:description"  :content (or (:meta-description view-data)
+                                                      "Precursor lets you prototype product design wireframes with a fast and simple web app.")}]
     [:meta {:name "twitter:url"          :content (urls/root)}]

     [:link {:rel "icon"             :href (cdn-path "/favicon.ico")}]


optimize and DRY up pause-run handling

optimize and DRY up pause-run handling

--- src/re_frame/router.cljs
+++ src/re_frame/router.cljs
@@ -56,6 +56,11 @@
 ;;

+;; A map from event metadata keys to the corresponding "run later" functions
+(def later-fns
+  {:flush-dom do-later              ;; after next annimation frame
+   :yield     goog.async.nextTick}) ;; almost immediately
+
 (defprotocol IEventQueue
   (enqueue [this event])

@@ -67,7 +72,7 @@
   (-process-1st-event [this])
   (-run-next-tick [this])
   (-run-queue [this])
-  (-pause-run [this])
+  (-pause-run [this later-fn])
   (-exception [this ex])
   (-begin-resume [this]))

@@ -111,19 +116,14 @@
         (if (zero? n)
           (-fsm-trigger this :finish-run nil)
           (let [event-v (peek queue)]
-            (if (some #{:flush-dom :yield} (keys (meta event-v)))
-              (-fsm-trigger this :pause-run nil)
+            (if-let [later-fn (some later-fns (keys (meta event-v)))]
+              (-fsm-trigger this :pause-run later-fn)
               (do (-process-1st-event this)
                   (recur (dec n)))))))))

   (-pause-run
-    [this]
-    (let [event-v (peek queue)
-          m       (meta event-v)
-          later   (cond
-                    (:flush-dom m) do-later                ;; after next annimation frame
-                    (:yield m)     goog.async.nextTick)]   ;; almost immediately
-      (later #(-fsm-trigger this :begin-resume nil))))
+    [this later-fn]
+    (later-fn #(-fsm-trigger this :begin-resume nil)))

   (-begin-resume
     [this]
@@ -148,11 +148,11 @@

             ;; processing one event after another
             [:running :add-event ]  [:running   #(-add-event this arg1)]
-            [:running :pause-run ]  [:paused    #(-pause-run this)]
             [:running :exception ]  [:quiescent #(-exception this arg1)]
             [:running :finish-run]  (if (empty? queue)       ;; FSM guard
                                       [:quiescent]
                                       [:scheduled  #(-run-next-tick this)])
+            [:running :pause-run ]  [:paused    #(-pause-run this arg1)]

             ;; event processing is paused - probably by :flush-dom metadata
             [:paused :add-event    ]  [:paused   #(-add-event this arg1)]


Cljs resolve takes env as 1st arg. cleanup. still doesn't work.

--- src/spec_tools/core.cljc
+++ src/spec_tools/core.cljc
@@ -119,7 +119,7 @@
 (defprotocol TypeLike
   (type-like [this]))

-(declare -type)
+(declare ->Type)

 (defrecord Type [form pred gfn info]
   #?@(:clj
@@ -143,7 +143,7 @@
   (gen* [_ _ _ _] (if gfn
                     (gfn)
                     (gen/gen-for-pred pred)))
-  (with-gen* [_ gfn] (-type form pred gfn info))
+  (with-gen* [_ gfn] (->Type form pred gfn info))
   (describe* [_] `(spec-tools.core/type ~form))
   IFn
   #?(:clj  (invoke [_ x] (pred x))
@@ -161,15 +161,8 @@
                       (if-let [info (:info t)]
                         {:info info}))))))

-(defn -type
-  ([pred-form pred]
-   (-type pred-form pred nil nil))
-  ([pred-form pred gfn info]
-   (->Type pred-form pred gfn info)))
-
 (defmacro type [pred]
-  `(-type '~(or (-> pred #?(:clj  resolve
-                            :cljs (resolve &env)) ->sym) pred) ~pred))
+  `(->Type '~(or (->> pred #?(:clj resolve, :cljs (resolve &env)) ->sym) pred) ~pred nil nil))

 (defn with-info [^Type t info]
   (map->Type (assoc t :info info)))


Fixed #80 "Reply function broken"

Fixed #80 "Reply function broken"

- use "or" instead of "first-non-nil"
- handle/ reject requests with 'nil' or empty text values

--- src/statuses/routing.clj
+++ src/statuses/routing.clj
@@ -68,14 +68,14 @@
                             "text/html;charset=utf-8"
                             (list-page items next request)))))))

-(defn first-non-nil [& vals]
-  (first (filter (complement nil?) vals)))
-
-(defn new-update [{:keys [form-params] :as request}]
+(defn new-update
+  "Handles the request to add a new update. Checks whether the post values 'entry-text' or
+  'reply-text' have a valid length and if so, creates the new update."
+  [{:keys [form-params] :as request}]
   (let [{:strs [entry-text reply-text reply-to]} form-params
-        field-value (first-non-nil entry-text reply-text)
+        field-value (or entry-text reply-text "")
         length (.length field-value)]
-    (if (<= length max-length)
+    (if (and (<= length max-length) (> length 0))
       (do (swap! db core/add-update (user request) field-value (parse-num reply-to nil))
           (resp/redirect "/statuses"))
       (resp/redirect (str "/statuses/too-long/" length)))))


Warn for malformed `raw` values

Warn for malformed `raw` values

--- src/taoensso/carmine.clj
+++ src/taoensso/carmine.clj
@@ -108,7 +108,10 @@
   subject to automatic de/serialization."
   [x] (protocol/Frozen. x))

-(defn raw "Alpha - subject to change." [x] (protocol/Raw. x))
+(defn raw "Alpha - subject to change."
+  [x] (if (protocol/bytes? x) (protocol/Raw. x)
+          (throw (Exception. "Raw value must be byte[]"))))
+
 (defmacro parse-raw "Alpha - subject to change."
   [& body] `(with-parser (with-meta identity {:raw? true}) ~@body))


(PDB-4506) PuppetDBServer: drop ShutdownService (not needed)

Just throwing the exception from start should accomplish the same
thing more simply, i.e. trapperkeeper apepars to be watching and
initiates the shutdown itself.

The documentation also appears to suggest this since it says that
shutdown-on-error is primarily for use by service threads (which can't
directly throw from a service method like start).

--- src/puppetlabs/puppetdb/cli/services.clj
+++ src/puppetlabs/puppetdb/cli/services.clj
@@ -611,8 +611,7 @@
   that trapperkeeper will call on exit."
   PuppetDBServer
   [[:DefaultedConfig get-config]
-   [:WebroutingService add-ring-handler get-registered-endpoints]
-   [:ShutdownService request-shutdown shutdown-on-error]]
+   [:WebroutingService add-ring-handler get-registered-endpoints]]
   (init [this context]

         (doseq [{:keys [reporter]} (vals metrics/metrics-registries)]
@@ -627,13 +626,13 @@
                  ;; support jdk < 10.
                  ;; https://bugs.openjdk.java.net/browse/JDK-8176254
                  :stop-status (atom #{}))))
-  (start [this context]
-         (try
-          (start-puppetdb context (get-config) this get-registered-endpoints)
-          (catch clojure.lang.ExceptionInfo e
-            (let [msg (log-start-error e)]
-              (shutdown-on-error (service-id this)
-                                 #(throw (Exception. msg)))))))
+  (start
+   [this context]
+   (try
+     (start-puppetdb context (get-config) this get-registered-endpoints)
+     (catch clojure.lang.ExceptionInfo e
+       (let [msg (log-start-error e)]
+         (throw (Exception. msg))))))

   (stop [this context]
         (doseq [{:keys [reporter]} (vals metrics/metrics-registries)]


Minor reformatting in vault.store.file.

Minor reformatting in vault.store.file.

--- src/vault/store/file.clj
+++ src/vault/store/file.clj
@@ -1,8 +1,8 @@
 (ns vault.store.file
   (:require
-    [clojure.string :as string]
     [clojure.java.io :as io]
     [clojure.java.shell :as shell]
+    [clojure.string :as string]
     [vault.blob :refer :all]
     [vault.store :refer :all]))

@@ -79,8 +79,7 @@
   (enumerate [this]
     (enumerate this {}))

-  (enumerate
-    [this opts]
+  (enumerate [this opts]
     (->> (enumerate-files root)
          (map (partial file->blobref root))
          (select-blobrefs opts)))
@@ -117,5 +116,7 @@

 (defn file-store
-  "Creates a new local file-based blobstore."
-  ([algorithm root] (FileBlobStore. algorithm (io/file root))))
+  "Creates a new local file-based blob store."
+  [algorithm root]
+  (FileBlobStore. algorithm
+                  (io/file root)))


remove print statement

remove print statement

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

--- src/status_im/ui/screens/home/views.cljs
+++ src/status_im/ui/screens/home/views.cljs
@@ -232,7 +232,6 @@
                            (not (:show? @search-input-state)))
                   {:on-start-should-set-responder-capture
                    (fn [event]
-                     (println :start)
                      (let [current-position (.-pageY (.-nativeEvent event))
                            current-timestamp (.-timestamp (.-nativeEvent event))]
                        (reset! previous-touch


add existence checking to hooks provided in config

fixes  #145

--- sidecar/src/figwheel_sidecar/auto_builder.clj
+++ sidecar/src/figwheel_sidecar/auto_builder.clj
@@ -100,15 +100,29 @@
         names (if main-ns
                 (conj names (symbol (str main-ns)))
                 names)]
-    (conj names 'figwheel.client)))
+    (conj names 'figwheel.client 'figwheel.client.utils)))

 (defn extract-connection-script-required-ns [{:keys [figwheel] :as build}]
   (list 'ns 'figwheel.connect
         (cons :require (map vector (extract-connection-requires build)))))

+(defn hook-name-to-js [hook-name]
+  (symbol
+   (str "js/"
+        (string/join "." (string/split (str hook-name) #"/")))))
+
+(defn try-jsreload-hook [k hook-name]
+  ;; change hook to js form to avoid compile warnings when it doesn't
+  ;; exist, these compile warnings are confusing and prevent code loading
+  (let [hook-name' (hook-name-to-js hook-name)]
+    (list 'fn '[& x]
+          (list 'if hook-name'
+                (list 'apply hook-name' 'x)
+                (list 'figwheel.client.utils/log :debug (str "Figwheel: " k " hook '" hook-name "' is missing"))))))
+
 (defn extract-connection-script-figwheel-start [{:keys [figwheel]}]
   (let [func-map (select-keys figwheel figwheel-client-hook-keys)
-        func-map (into {} (map (fn [[k v]] [k (symbol v)]) func-map))
+        func-map (into {} (map (fn [[k v]] [k (try-jsreload-hook k v)]) func-map))
         res (merge figwheel func-map)]
     (list 'figwheel.client/start res)))


FIx <link> entry in atom.xml.clj

FIx <link> entry in atom.xml.clj

--- samples/blog/template/atom.xml.clj
+++ samples/blog/template/atom.xml.clj
@@ -10,7 +10,7 @@
  (for [post (:posts site)]
    [:entry
     [:title   (:title post)]
-    [:link    (str (:atom-base site) (:url post))]
+    [:link    {:href (str (:atom-base site) (:url post))}]
     [:updated (date->xml-schema (:date post))]
     [:id      (str (:atom-base site) (:url post))]
     [:content {:type "html"}


implement reverse pairs and tests

implement reverse pairs and tests

--- test/clj/xl/learn/reverse_pairs_test.clj
+++ test/clj/xl/learn/reverse_pairs_test.clj
@@ -1 +1,40 @@
-(ns xl.learn.reverse-pairs-test)
+(ns xl.learn.reverse-pairs-test
+  (:require
+    [xl.reverse-pairs :as pairs]
+    [clojure.test :refer :all]
+    [clojure.test.check :as tc]
+    [clojure.test.check.generators :as gen]
+    [clojure.test.check.properties :as prop]
+    [clojure.test.check.clojure-test :refer [defspec]]
+    )
+  )
+
+(defn- naive [nums]
+  (reduce
+    (fn [p i]
+      (let [ni (nth nums i)
+            pi (reduce
+                 (fn [m j]
+                   (let [nj (nth nums j)]
+                     (if (> nj (* 2 ni)) (inc m) m)
+                     )
+                   )
+                 0
+                 (range i))
+            ]
+          (+ p pi)
+        )
+      )
+    0
+    (range (count nums)))
+  )
+
+(def good
+  (prop/for-all [v (gen/not-empty (gen/vector gen/int))]
+                (= (pairs/find-important-pairs v) (naive v))
+                )
+  )
+
+(defspec check-good-sum
+         100
+         good)


Clean [skip ci]

Clean [skip ci]

--- backend/test/akvo/lumen/endpoints_test.clj
+++ backend/test/akvo/lumen/endpoints_test.clj
@@ -26,7 +26,6 @@
         (let [r (h (get* "/env"))]
           (is (= 200 (:status r)))
           (let [rb (body-kw r)
-                _ (clojure.pprint/pprint rb)
                 ks [:auth :flowApiUrl
                     :lumenDeploymentColor :lumenDeploymentEnvironment
                     :lumenDeploymentVersion :piwikSiteId :sentryDSN :tenant]


-(defn generate): use babel.italiano/generate instead

--- test/babel/test/it.cljc
+++ test/babel/test/it.cljc
@@ -3,7 +3,7 @@
   (:require
    [babel.directory :refer [models]]
    [babel.generate :as generate]
-   [babel.italiano :as italiano :refer [morph preprocess]]
+   [babel.italiano :as italiano :refer [generate morph preprocess]]
    [babel.italiano.grammar :as grammar]
    [babel.italiano.lexicon :as lexicon]
    [babel.italiano.morphology :as morph :refer [analyze-regular]]
@@ -39,12 +39,8 @@
                 `[(log/info (str "done with test: " ~test-name))])]
     `(realtest/deftest ~test-name ~@wrapped-arguments)))

+
 ;; (repeatedly #(println (morph (time (generate reflexive-passato-is-slow)))))
-(defn generate
-  ([spec]
-   (italiano/generate spec model))
-  ([spec model]
-   (italiano/generate spec model)))

 (defn parse
   ([spec]


+(defn ps-tree)

+(defn ps-tree)

--- test/babel/test/it.cljc
+++ test/babel/test/it.cljc
@@ -237,3 +237,17 @@
                         :pred (get-in (first parsed) [:synsem :sem :pred])
                         :subj (get-in (first parsed) [:synsem :sem :subj :pred])}))))

+(defn ps-tree [tree morph]
+  "return just the essentials of a tree: just rule names and surface forms at leaves."
+  (let [rule (get-in tree [:rule])
+        head (get-in tree [:head])
+        comp (get-in tree [:comp])]
+    (if (and head comp rule)
+      (conj {:rule rule}
+            {:head (ps-tree head morph)
+             :comp (ps-tree comp morph)})
+      (morph tree))))
+
+
+
+


[#2287] Fix tests

[#2287] Fix tests

--- backend/test/akvo/lumen/auth_test.clj
+++ backend/test/akvo/lumen/auth_test.clj
@@ -22,8 +22,8 @@
   (condp = expected
     201 (is (= "" (:body response)))
     200 (is (= "" (:body response)))
-    401 (is (= "Not authenticated" (:body response)))
-    403 (is (= "Not authorized" (:body response)))))
+    401 (is (= "\"Not authenticated\"" (:body response)))
+    403 (is (= "\"Not authorized\"" (:body response)))))

 (def wrap-auth (m/wrap-auth {:issuer "keyclaoak"} {:issuer "auth0"}))


Increment version number

Increment version number

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject nightcode "0.0.4"
+(defproject nightcode "0.0.5"
   :license {:name "Public Domain"
             :url "http://unlicense.org/UNLICENSE"}
   :dependencies [[com.github.insubstantial/substance "7.1"]


lein-release plugin: preparing 1.2.0 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject foosball "1.2.0-SNAPSHOT"
+(defproject foosball "1.2.0"
   :dependencies [[org.clojure/clojure "1.5.1"]
                  [com.datomic/datomic-free "0.8.4159" :exclusions [com.amazonaws/aws-java-sdk]]
                  [ring/ring-core "1.2.0"]


Release version 0.12.0.0-beta3.

Release version 0.12.0.0-beta3.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject onyx-app/lein-template "0.12.0.0-SNAPSHOT"
+(defproject onyx-app/lein-template "0.12.0.0-beta3"
   :description "Onyx Leiningen application template"
   :url "https://github.com/onyx-platform/onyx-template"
   :license {:name "MIT License"


(maint) Bump version to 6.11.3-SNAPSHOT

(maint) Bump version to 6.11.3-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def pdb-version "6.11.2")
+(def pdb-version "6.11.3-SNAPSHOT")
 (def clj-parent-version "4.5.4")

 (defn true-in-env? [x]


lein-release plugin: bumped version from 0.61 to 0.62-SNAPSHOT for next development cycle

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject exploud "0.61"
+(defproject exploud "0.62-SNAPSHOT"
   :description "Exploud service"
   :url "http://wikis.in.nokia.com/NokiaMusicArchitecture/Exploud"


Add campfire dependency

Add campfire dependency

--- project.clj
+++ project.clj
@@ -36,6 +36,7 @@
     [org.slf4j/slf4j-log4j12 "1.6.4"]
     [riemann-clojure-client "0.2.1-SNAPSHOT"]
     [slingshot "0.10.2"]
+    [clj-campfire "2.1.0"]
   ]
   :plugins [[codox "0.6.1"]
             [lein-rpm "0.0.5"]]


Deps: Nippy 2.5.0-RC1, Timbre 2.7.1, lein-ancient 0.5.3

--- project.clj
+++ project.clj
@@ -8,8 +8,8 @@
                  [commons-pool/commons-pool   "1.6"]
                  [commons-codec/commons-codec "1.8"]
                  [org.clojure/data.json       "0.2.3"]
-                 [com.taoensso/timbre         "2.6.3"]
-                 [com.taoensso/nippy          "2.5.0-beta2"]]
+                 [com.taoensso/timbre         "2.7.1"]
+                 [com.taoensso/nippy          "2.5.0-RC1"]]
   :profiles {:1.4   {:dependencies [[org.clojure/clojure  "1.4.0"]]}
              :1.5   {:dependencies [[org.clojure/clojure  "1.5.1"]]}
              :1.6   {:dependencies [[org.clojure/clojure  "1.6.0-master-SNAPSHOT"]]}
@@ -26,7 +26,7 @@
             "codox"       ["with-profile" "+test,+1.5" "doc"]}
   :plugins [[lein-expectations "0.0.8"]
             [lein-autoexpect   "1.0"]
-            [lein-ancient      "0.5.2"]
+            [lein-ancient      "0.5.3"]
             [codox             "0.6.6"]]
   :min-lein-version "2.0.0"
   :global-vars {*warn-on-reflection* true}


Upgrade nrepl

Upgrade nrepl

--- project.clj
+++ project.clj
@@ -71,7 +71,7 @@

                  ;; nREPL server
                  [org.clojure/tools.nrepl "0.2.12"]
-                 [cider/cider-nrepl "0.11.0"]
+                 [cider/cider-nrepl "0.14.0"]

                  ;; Database
                  [clojurewerkz/elastisch "3.0.0-beta1"]


Release version 0.10.0.0-alpha6.

Release version 0.10.0.0-alpha6.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.onyxplatform/onyx-metrics "0.10.0.0-SNAPSHOT"
+(defproject org.onyxplatform/onyx-metrics "0.10.0.0-alpha6"
   :description "Instrument Onyx workflows"
   :url "https://github.com/onyx-platform/onyx-metrics"
   :license {:name "Eclipse Public License"
@@ -11,7 +11,7 @@
                              :username :env
                              :password :env
                              :sign-releases false}}
-  :dependencies [[org.onyxplatform/onyx "0.10.0-alpha5"]
+  :dependencies [[org.onyxplatform/onyx "0.10.0-alpha6"]
                  ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                  [org.clojure/clojure "1.8.0"]
                  [metrics-clojure "2.8.0"]]


Update required version for leiningen

Update required version for leiningen

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

--- project.clj
+++ project.clj
@@ -9,7 +9,7 @@
 ;;;

 (defproject conexp-clj (.trim #=(slurp "VERSION"))
-  :min-lein-version "1.3.0"
+  :min-lein-version "1.5.0"
   :description "A ConExp rewrite in clojure"
   :url "http://www.math.tu-dresden.de/~borch/conexp-clj/"
   :repositories {"snapshots" "https://oss.sonatype.org/content/repositories/snapshots/",


(maint) Merge up 62ea32f to main

(maint) Merge up 62ea32f to main

Generated by CI

--- project.clj
+++ project.clj
@@ -27,7 +27,7 @@

   :min-lein-version "2.9.1"

-  :parent-project {:coords [puppetlabs/clj-parent "4.8.3"]
+  :parent-project {:coords [puppetlabs/clj-parent "4.8.4"]
                    :inherit [:managed-dependencies]}

   :dependencies [[org.clojure/clojure]


Make sure lein clean is executed first.

Make sure lein clean is executed first.

--- project.clj
+++ project.clj
@@ -100,8 +100,8 @@
                     :output-dir    "resources/public/js/compiled/test/out"
                     :optimizations :none}}]}

-    :aliases {"run-local"   ["pdo" "clean" ["figwheel" "local"]               ["less" "auto"]]
-              "run-dev"     ["pdo" "clean" ["figwheel" "dev"]                 ["less" "auto"]]
-              "deploy-dev"  ["do"  "clean" ["cljsbuild" "once" "deploy-dev"]  ["less" "once"]]
-              "deploy-qa"   ["do"  "clean" ["cljsbuild" "once" "deploy-qa"]   ["less" "once"]]
-              "deploy-prod" ["do"  "clean" ["cljsbuild" "once" "deploy-prod"] ["less" "once"]]})
+    :aliases {"run-local"   ["pdo" "clean," ["figwheel" "local"]               ["less" "auto"]]
+              "run-dev"     ["pdo" "clean," ["figwheel" "dev"]                 ["less" "auto"]]
+              "deploy-dev"  ["do"  "clean," ["cljsbuild" "once" "deploy-dev"]  ["less" "once"]]
+              "deploy-qa"   ["do"  "clean," ["cljsbuild" "once" "deploy-qa"]   ["less" "once"]]
+              "deploy-prod" ["do"  "clean," ["cljsbuild" "once" "deploy-prod"] ["less" "once"]]})


update deps

update deps

--- project.clj
+++ project.clj
@@ -4,7 +4,7 @@
   :license {:name "Apache License, Version 2.0"
             :url "https://www.apache.org/licenses/LICENSE-2.0.html"}
   :dependencies [[dda/dda-pallet "2.2.2"]
-                 [dda/dda-managed-vm "2.4.0"]]
+                 [dda/dda-managed-vm "2.4.2-SNAPSHOT"]]
   :source-paths ["main/src"]
   :resource-paths ["main/resources"]
   :repositories [["snapshots" :clojars]


Version 0.4.4-SNAPSHOT

Version 0.4.4-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject kixi/terraboot "0.4.3"
+(defproject kixi/terraboot "0.4.4-SNAPSHOT"
   :description "Terraform modules for kixi framework"
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"


Adding slickgrid dependency (todo: package it as cljsjs

--- project.clj
+++ project.clj
@@ -1,6 +1,13 @@
+(def js-preamble
+  ["META-INF/resources/webjars/SlickGrid/2.1/lib/jquery-1.7.min.js"
+   "META-INF/resources/webjars/SlickGrid/2.1/lib/jquery.event.drag-2.2.js"
+   "META-INF/resources/webjars/SlickGrid/2.1/slick.core.js"
+   "META-INF/resources/webjars/SlickGrid/2.1/slick.grid.js"
+   "META-INF/resources/webjars/SlickGrid/2.1/controls/slick.pager.js"
+   "META-INF/resources/webjars/SlickGrid/2.1/slick.dataview.js"])
+
 (defproject onaio/hatti "0.1.0-SNAPSHOT"
   :description "A cljs dataview from your friends at Ona.io"
-
   :dependencies [;; CORE HATTI REQUIREMENTS
                  [org.clojure/clojure "1.6.0"]
                  [org.clojure/clojurescript "0.0-2843"]
@@ -11,6 +18,8 @@
                  ;; JS REQUIREMENTS
                  [cljsjs/moment "2.9.0-0"]
                  [cljsjs/leaflet "0.7.3-0"]
+                 ;; TODO: make into cljs packages
+                 [org.webjars/SlickGrid "2.1"]
                  ;; CLIENT REQUIREMENTS
                  [cljs-http "0.1.17"]
                  [com.cognitect/transit-cljs "0.8.188"]]
@@ -27,9 +36,10 @@
               :compiler {
                   :output-to "examples/stolen/main.js"
                   :output-dir "examples/stolen/out"
+                  :preamble ~js-preamble
                   :cache-analysis true
-                  :optimizations :none
-                  :source-map true}}
+                  :optimizations :advanced
+                  :source-map "examples/stolen/main.js.map"}}
              {:id "hatti"
               :source-paths ["src"]
               :compiler {


Prepare for next release cycle.

Prepare for next release cycle.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.onyxplatform/onyx-dashboard "0.13.3.0-alpha4"
+(defproject org.onyxplatform/onyx-dashboard "0.13.3.0-SNAPSHOT"
   :description "Dashboard for the Onyx distributed computation system"
   :url "http://github.com/lbradstreet/onyx-dashboard"
   :license {:name "Eclipse Public License"


1.1.0-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,5 +1,5 @@
-(defproject clj-ns-browser "1.0.0"
-  :description "Smalltalk-like namespace/class/var/function browser."
+(defproject clj-ns-browser "1.1.0-SNAPSHOT"
+  :description "Smalltalk-like namespace/class/var/function browser for Clojure."
   :dependencies [[org.clojure/clojure "1.3.0"]
                  [seesaw "1.4.0"]
                  [clj-info "0.2.2"]


Update version.

Update version.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject quil "2.2.1"
+(defproject quil "2.2.2-SNAPSHOT"
   :description "(mix Processing Clojure)"
   :url "http://github.com/quil/quil"


adding

adding

--- project.clj
+++ project.clj
@@ -1,12 +1,4 @@
 (defproject com.lighttable/csharp "0.0.1"
  :description "CSHARP language plugin for Light Table"
-  :plugins [[lein-cljsbuild "0.2.7"]]
-  :dependencies [[org.clojure/clojure "1.5.1"]]
-  :cljsbuild {
-  :builds [{
-  :source-path "src/lt/plugins"
-  :compiler {
-  :output-to "csharp_compiled.js"
-  :optimizations :advanced
-  :pretty-print true}}]})
+ :dependencies [[org.clojure/clojure "1.5.1"]])


(maint) solve dependencies without exclusions

Here we reorder and add a transitive dependency rather than grow a list of
exclusions.

--- project.clj
+++ project.clj
@@ -23,10 +23,13 @@
   :dependencies [[org.clojure/clojure "1.6.0"]
                  [org.clojure/tools.logging "0.3.1"]

+                 ;; Transitive dependency for puppetlabs/trapperkeeper-metrics and org.slf4j/jcl-over-slf4
+                 [org.slf4j/slf4j-api "1.7.10"]
+
                  [puppetlabs/trapperkeeper ~tk-version]
                  [puppetlabs/kitchensink ~ks-version]
                  [puppetlabs/trapperkeeper-webserver-jetty9 "1.4.0"]
-                 [puppetlabs/trapperkeeper-metrics "0.1.1" :exclusions [org.slf4j/slf4j-api]]
+                 [puppetlabs/trapperkeeper-metrics "0.1.1"]

                  [cheshire "5.5.0"]
                  [prismatic/schema "0.4.3"]
@@ -43,8 +46,9 @@
                  [puppetlabs/cthun-message "0.2.0"]

                  ;; MQ - activemq
-                 [clamq/clamq-activemq "0.4" :exclusions [org.slf4j/slf4j-api]]
-                 [org.apache.activemq/activemq-core "5.6.0" :exclusions [org.slf4j/slf4j-api org.fusesource.fuse-extra/fusemq-leveldb]]
+                 [clamq/clamq-activemq "0.4"]
+                 [org.apache.activemq/activemq-core "5.6.0"
+                  :exclusions [org.fusesource.fuse-extra/fusemq-leveldb]]
                  ;; bridge to allow some spring/activemq stuff to log over slf4j
                  [org.slf4j/jcl-over-slf4j "1.7.10"]]


0.1.4

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject lein-typescript "0.1.3"
+(defproject lein-typescript "0.1.4"
   :description "A Leiningen plugin for running TypeScript compiler"
   :url "https://github.com/vbauer/lein-typescript"
   :license {:name "Eclipse Public License"


Version 0.3.0

Version 0.3.0

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject freactive "0.2.0-SNAPSHOT"
+(defproject freactive "0.3.0"
   :description "High-performance, pure Clojurescript, declarative DOM library"
   :url "https://github.com/aaronc/freactive"
   :license {:name "Eclipse Public License"


bump cake-marginalia

bump cake-marginalia

--- project.clj
+++ project.clj
@@ -2,7 +2,7 @@
   :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers."
   :dependencies [[clojure "1.2.0"]
                  [ordered-set "0.2.2"]]
-  :dev-dependencies [[org.clojars.flatland/cake-marginalia "0.6.1"]]
+  :dev-dependencies [[org.clojars.flatland/cake-marginalia "0.6.3"]]
   :tasks [protobuf.tasks cake-marginalia.tasks]
   :source-path ["src/clj" "src/jvm"]
   :jar-files ["proto"])


bump version

bump version

--- project.clj
+++ project.clj
@@ -14,7 +14,7 @@
                  [org.twitter4j/twitter4j-stream "2.2.6-SNAPSHOT"]
                  ]

-  :dev-dependencies [[storm "0.7.3"]
+  :dev-dependencies [[storm "0.7.4"]
                      [org.clojure/clojure "1.4.0"]
                      ])


Update to latest stabile cljs

Update to latest stabile cljs

--- project.clj
+++ project.clj
@@ -18,7 +18,7 @@
                    :jvm-opts ^:replace ["-server"]
                    ;:global-vars {*warn-on-reflection* true}
                    :dependencies [[org.clojure/clojure "1.9.0-alpha15"]
-                                  [org.clojure/clojurescript "1.9.456"]
+                                  [org.clojure/clojurescript "1.9.494"]
                                   [criterium "0.4.4"]
                                   [prismatic/schema "1.1.4"]
                                   [org.clojure/test.check "0.9.0"]


Drop min lein back to 2.1.2 for Heroku.

Drop min lein back to 2.1.2 for Heroku.

--- project.clj
+++ project.clj
@@ -63,5 +63,5 @@
       }}]
   }
   :ring {:handler coming-soon.app/app}
-  :min-lein-version "2.2"
+  :min-lein-version "2.1.2"
   :main coming-soon.app)


Reordered clojure.contrib dependencies

Reordered clojure.contrib dependencies

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

--- project.clj
+++ project.clj
@@ -16,15 +16,15 @@
                  [org.clojure.contrib/combinatorics "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/core          "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/def           "1.3.0-SNAPSHOT"]
+                 [org.clojure.contrib/except        "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/graph         "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/lazy-seqs     "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/lazy-xml      "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/math          "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/ns-utils      "1.3.0-SNAPSHOT"]
+                 [org.clojure.contrib/profile       "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/prxml         "1.3.0-SNAPSHOT"]
                  [org.clojure.contrib/set           "1.3.0-SNAPSHOT"]
-                 [org.clojure.contrib/profile       "1.3.0-SNAPSHOT"]
-                 [org.clojure.contrib/except        "1.3.0-SNAPSHOT"]
                  [org.apache.commons/commons-math   "2.0"]
                  [jline                             "0.9.94"]]
   :dev-dependencies [[swank-clojure "1.3.0-SNAPSHOT"]]