Don't use transaction when deleting dataset.

--- src/cavm/h2.clj
+++ src/cavm/h2.clj
@@ -766,11 +766,9 @@
   (let [dataset-id (dataset-id-by-name dataset)]
     (if dataset-id
       (with-delete-status dataset-id
-        (jdbcd/transaction
-          (do
-            (clear-by-exp dataset-id)
-            (jdbcd/do-commands
-              (format "DELETE FROM `dataset` WHERE `id` = %d" dataset-id)))))
+        (clear-by-exp dataset-id)
+        (jdbcd/do-commands
+          (format "DELETE FROM `dataset` WHERE `id` = %d" dataset-id)))
       (info "Did not delete unknown dataset" dataset))))

 (defn create-db [file & [{:keys [classname subprotocol make-pool?]


Adding repl

Adding repl

--- zambuko-back/project.clj
+++ zambuko-back/project.clj
@@ -12,7 +12,8 @@
                  [markdown-clj "0.9.28"]
                  [org.jclouds/jclouds-allblobstore "1.6.0"]
                  [org.hornetq/hornetq-core-client "2.3.3.Final"]
-                 [org.activiti/activiti-engine "5.13"]]
+                 [org.activiti/activiti-engine "5.13"]
+                 [org.clojure/tools.nrepl "0.2.3"]]
   :plugins [[lein-ring "0.8.5"]]
   :repositories [["Alfresco Maven Repository" "https://maven.alfresco.com/nexus/content/groups/public/"]]
   :ring {:handler zambuko-back.handler/war-handler


Update to ClojureScript 1.9.227

Update to ClojureScript 1.9.227

--- planck-cljs/project.clj
+++ planck-cljs/project.clj
@@ -1,11 +1,11 @@
 (defproject planck "0.1.0"
   :profiles {:dev
-             {:dependencies [[org.clojure/clojurescript "1.9.225"]
+             {:dependencies [[org.clojure/clojurescript "1.9.227"]
                              [tubular "1.0.0"]]
               :source-paths ["dev"]}
              :build {}}
   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [org.clojure/clojurescript "1.9.225"]       ; comment if building own, and revise planck-cljs/script/build
+                 [org.clojure/clojurescript "1.9.227"]       ; comment if building own, and revise planck-cljs/script/build
                  [org.clojure/tools.reader "1.0.0-beta3"]
                  [tailrecursion/cljson "1.0.7"]
                  [com.cognitect/transit-clj "0.8.285"]


Extract json response builder to funciton

--- src/silly_image_store/handler.clj
+++ src/silly_image_store/handler.clj
@@ -16,15 +16,16 @@
 (defn- request-url [{scheme :scheme, {host "host"} :headers, uri :uri}]
   (str (name scheme) "://" host uri))

-(defn- json-list-response [base-url names]
-  (letfn [(to-json [n] {:name n :url (str base-url "/" n)})]
-    (map to-json names)))
+(defn- json-list-response-builder [request]
+  (let [base-url (request-url request)
+        to-json (fn [n] {:name n :url (str base-url "/" n)})]
+    (fn [names] (map to-json names))))

 (defn- list-images-route [request bucket]
-  (let [base-image-url (request-url request)
+  (let [json-list-response (json-list-response-builder request)
         image-names (store/list-images images-dir bucket)]
     (if image-names
-      (json-list-response base-image-url image-names)
+      (json-list-response image-names)
       (not-found bucket))))

 (defn- serve-image-route [{{image :image} :params}]
@@ -36,9 +37,9 @@
     (or image-file (not-found "random"))))

 (defn- list-buckets-route [request]
-  (let [base-image-url (request-url request)
+  (let [json-list-response (json-list-response-builder request)
         bucket-names (store/list-image-dirs images-dir)]
-    (json-list-response base-image-url bucket-names)))
+    (json-list-response bucket-names)))

 (defroutes app-routes


Make plugin paths platform-independent.

Make plugin paths platform-independent.

--- src/leiningen/plugin.clj
+++ src/leiningen/plugin.clj
@@ -33,14 +33,14 @@
   (leiningen.install/install project-name version)
   (.mkdirs plugins-path)
   (let [[name group] (extract-name-and-group project-name)
-        temp-project (format "%s/lein-%s" tmp-dir (java.util.UUID/randomUUID))
+        temp-project (file tmp-dir (str "lein-" (java.util.UUID/randomUUID)))
         jarfile (-> (local-repo-path name (or group name) version)
                     (.replace "$HOME" (System/getProperty "user.home")))
         _ (extract-jar (file jarfile) temp-project)
-        project (read-project (format "%s/project.clj" temp-project))
+        project (read-project (str (file temp-project "project.clj")))
         standalone-filename (plugin-standalone-filename group name version)]
     (deps project)
-    (with-open [out (-> (str plugins-path "/" standalone-filename)
+    (with-open [out (-> (file plugins-path standalone-filename)
                         (FileOutputStream.)
                         (ZipOutputStream.))]
       (let [deps (->> (.listFiles (file (:library-path project)))


Change config file to .midje.clj

Change config file to .midje.clj

--- src/midje/util/ecosystem.clj
+++ src/midje/util/ecosystem.clj
@@ -63,7 +63,7 @@
                          (map str (.getStackTrace e))))))))

 (def config-file-name (str/join java.io.File/separator
-                                [(getenv "HOME") ".midje"]))
+                                [(getenv "HOME") ".midje.clj"]))

 (defn has-config-file? []
   (if (not (getenv "HOME"))


fix #1154

fix #1154

--- src/status_im/profile/screen.cljs
+++ src/status_im/profile/screen.cljs
@@ -193,18 +193,19 @@
   [view st/profile
    [status-bar]
    [my-profile-toolbar]
-   [view st/profile-form
-    [profile-badge current-account]
-    [profile-status status true]]
-   [form-spacer]
-   [view actions-list
-    [action-button (label :t/show-qr)
-     :q_r_blue
-     (show-qr current-account :public-key)]]
-   [form-spacer]
-   [view st/profile-info-container
-    [my-profile-info current-account]
-    [bottom-shadow]]])
+   [scroll-view
+    [view st/profile-form
+     [profile-badge current-account]
+     [profile-status status true]]
+    [form-spacer]
+    [view actions-list
+     [action-button (label :t/show-qr)
+      :q_r_blue
+      (show-qr current-account :public-key)]]
+    [form-spacer]
+    [view st/profile-info-container
+     [my-profile-info current-account]
+     [bottom-shadow]]]])

 (defview profile []
   [{:keys [pending?


Add current player component

Add current player component

--- src/obb_demo/views/play.cljs
+++ src/obb_demo/views/play.cljs
@@ -54,11 +54,32 @@
     (when (>= 1000 new-delay 50)
       (state/set-page-data! (assoc game-data :delay new-delay)))))

+(defn- selected-player
+  "Shows the player"
+  [current-player expected]
+
+  (if (= current-player expected)
+    (if (= :p1 current-player)
+      :span.label.label-success
+      :span.label.label-info)
+  :span.label.label-primary))
+
+(defn- players
+  "Displays the players and the current to play"
+  [game]
+  (let [player (game/state game)]
+    [:div
+      [(selected-player player :p2) "Player 2"]
+      " vs "
+      [(selected-player player :p1) "Player 1"]]))
+
 (defn render
   [state]
   (let [game-data (get-game-data state)
         game (:game game-data)]
     [:div.row
+      [:div.col-lg-2
+       (players game)]
       [:div.col-lg-5
         [boardground/render {} game-data]]
       [:div.col-lg-2


store system in galleon/system as usual

store system in galleon/system as usual

--- src/galleon.clj
+++ src/galleon.clj
@@ -10,6 +10,7 @@
   (:import (java.io File)))

 (def default-config-path "/etc/galleon.edn")
+(def system nil)

 (defn file-exists?
   [path]


Clean up scaling code. Dynamically calculate range of slider based on param step value. This fixes rounding issues when typing values in the spinner.

--- src/overtone/gui/control.clj
+++ src/overtone/gui/control.clj
@@ -5,18 +5,31 @@

 (native!)

-(def SLIDER-MAX 1000)
+(defn scale-val [[from-min from-max] [to-min to-max] v]
+  (let [from-min (double from-min)
+        from-max (double from-max)
+        to-min   (double to-min)
+        to-max   (double to-max)
+        v        (double v)]
+    (+ to-min
+     (* (/ (- v from-min)
+           (- from-max from-min))
+        (- to-max to-min)))))

 (defn- control-slider
-  [name init-val min-val max-val step val-atom]
-  (let [spin-model (spinner-model (double init-val)
-                                  :from (double min-val) :to (double max-val) :by (double step))
-        spinner (spinner :model spin-model)
-        scaled-init (* (/ (- init-val min-val)
-                          (double (- max-val min-val)))
-                       SLIDER-MAX)
-        slider (slider :id (keyword name) :class :synth-control-slider
-                       :value scaled-init :min 0 :max SLIDER-MAX :orientation :horizontal)
+  [name min-val max-val step val-atom]
+  (let [init-val   @val-atom
+        spin-model  (spinner-model (double init-val)
+                                   :from (double min-val)
+                                   :to (double max-val)
+                                   :by (double step))
+        spinner     (spinner :class :synth-control-spinner
+                             :model spin-model)
+        slider-max  (int (/ (- max-val min-val) step))
+        scaled-init (scale-val [min-val max-val] [0 slider-max] init-val)
+        slider      (slider :class :synth-control-slider
+                            :value scaled-init :min 0 :max slider-max
+                            :orientation :horizontal)
         label  (label name)
         items  [[label "width 80:80:100"]
                 [spinner "width 80:80:80"]
@@ -27,12 +40,9 @@
      (juxt
        (bind/bind
          slider
-         (bind/transform (fn [v]
-                           (let [val (+ min-val (* (- max-val min-val)
-                                                   (/ v (double SLIDER-MAX))))]
-                             val)))
+         (bind/transform (partial scale-val [0 slider-max] [min-val max-val]))
          val-atom
-         (bind/transform #(* (/ (- % min-val) (- max-val min-val)) SLIDER-MAX))
+         (bind/transform (partial scale-val [min-val max-val] [0 slider-max]))
          ; if the value's "close enough" to the spinner, stop. Otherwise,
          ; we get infinite loops caused by rounding error.
          (bind/filter #(>= (Math/abs (- % (value slider))) 0.01))
@@ -71,7 +81,7 @@
                     " (e.g.  [freq {:default 80 :min 40 :max 880 :step 1}])"))
         (let [control-panes (map
                               (fn [{:keys [name default min max step value]}]
-                                (control-slider name default min max step value))
+                                (control-slider name min max step value))
                               full-params)
               cleanup       (apply juxt (map second control-panes))
               pane (mig-panel :constraints ["" "[right][center][center]" ""]


teach overtone-ugen-name to throw a more understandable exception when a non-string is passed in as an argument.

--- src/overtone/helpers/lib.clj
+++ src/overtone/helpers/lib.clj
@@ -307,6 +307,9 @@

   (overtone-ugen-name \"SinOsc\") ;=> \"sin-osc\""
   [n]
+  (when-not (string? n)
+    (throw (IllegalArgumentException. (str "Cannot convert non-string obj " (with-out-str (pr n)) " to an overtone ugen name"))))
+
   (let [n (.replaceAll n "([a-z])([A-Z])" "$1-$2")
         n (.replaceAll n "([a-z-])([0-9])([A-Z])" "$1$2-$3")
         n (.replaceAll n "([A-Z])([A-Z][a-z])" "$1-$2")


Only polling for midi devices once on boot, since they aren't detected afterwards anyway.

--- src/overtone/studio/midi.clj
+++ src/overtone/studio/midi.clj
@@ -48,7 +48,8 @@
 (def MIDI-POLL-RATE 2000)

 (defonce __DEVICE-POLLER__
-  (every MIDI-POLL-RATE #'detect-midi-devices MIDI-POOL :desc "Check for new midi devices"))
+  (detect-midi-devices))
+;  (every MIDI-POLL-RATE #'detect-midi-devices MIDI-POOL :desc "Check for new midi devices"))

 (defn midi-poly-player
   "Sets up the event handlers and manages synth instances to easily play


rename person institution field

rename person institution field

--- src/wb_es/datomic/data/person.clj
+++ src/wb_es/datomic/data/person.clj
@@ -13,6 +13,6 @@
      :label (:person/standard-name entity)
      :other_names (cons (:person/full-name entity)
                         (:person/also-known-as entity))
-     :description (->> (:person/address entity)
+     :institution (->> (:person/address entity)
                        (:address/institution)
                        (clojure.string/join "\n"))}))


Switch order in main screen

Switch order in main screen

--- src/nightmod/screens.clj
+++ src/nightmod/screens.clj
@@ -94,9 +94,9 @@
                            (filter #(.isDirectory %))
                            (map read-title)
                            (map create-button))]
-      (-> (cons (label "New Game:" ui-skin) new-games)
-          (concat (when (seq saved-games)
-                    (cons (label "Load Game:" ui-skin) saved-games)))
+      (-> (when (seq saved-games)
+            (cons (label "Load Game:" ui-skin) saved-games))
+          (concat (cons (label "New Game:" ui-skin) new-games))
           (vertical :pack)
           (scroll-pane (style :scroll-pane nil nil nil nil nil))
           vector


[#177] Fix some tests

[#177] Fix some tests

--- priv/clojure/string.clj
+++ priv/clojure/string.clj
@@ -172,7 +172,8 @@
         replace erlang.util.Regex/replace.4
         opts (clj_core/seq_to_list.e [])]
     (cond
-      (string? match)
+      (or (string? match)
+          (instance? :erlang.io.StringWriter match))
       (replace-first-str s (str match) (str replacement))
       (regex? match)
       (if (or (string? replacement)
@@ -218,13 +219,13 @@
   the maximum number of splits. Not lazy. Returns vector of the splits."
   {:added "1.2"}
   ([s re]
-   (erlang.util.Regex/split.e re
-                              (when s (str s))
-                              (clj_core/seq_to_list.e [])))
+   (vec (erlang.util.Regex/split.e re
+                                  (when s (str s))
+                                  (clj_core/seq_to_list.e []))))
   ([s re limit]
-   (erlang.util.Regex/split.e re
-                              (when s (str s))
-                              (clj_core/seq_to_list.e [:global #[:match_limit limit]]))))
+   (vec (erlang.util.Regex/split.e re
+                                   (when s (str s))
+                                   (clj_core/seq_to_list.e [:global #[:match_limit limit]])))))

 (defn split-lines
   "Splits s on \\n or \\r\\n."


Add cur-time millis to filename

Add cur-time millis to filename

--- project-template/src/clj/sketch/dynamic.clj
+++ project-template/src/clj/sketch/dynamic.clj
@@ -45,7 +45,7 @@
           (println "Exception in draw function:" t)))

       (println "gen time:" (/ (- (System/currentTimeMillis) cur-time) 1000.0) "s")
-      (let [img-filename (str "img-" img-num "-" seed ".tif")]
+      (let [img-filename (str "img-" img-num "-" cur-time "-" seed ".tif")]
         (save img-filename)
         (println "done saving" img-filename)


Whitespace

Whitespace


cleaned logging

cleaned logging

--- src/ontrail/exercise.clj
+++ src/ontrail/exercise.clj
@@ -41,7 +41,6 @@
         comment-count (if-not (nil? comments) (count comments) 0)
         avatar (get-avatar-url user)
         date (to-human-date (:creationDate exercise))]
-    (.debug logger (format " get ex=%s" id))
     {:id id
      :user user
      :distance distance
@@ -69,7 +68,7 @@
                (mq/fields [ :_id :title :user :body :duration :distance :sport :creationDate :comments ])
                (mq/paginate :page (Integer. page) :per-page 20)
                (mq/sort {:lastModifiedDate -1}))]
-    (.debug logger (str "Get exercise list" rule page "with" (count results) "results."))
+    (.debug logger (str "Get exercise list " rule " " page " with " (count results) " results."))
     (as-ex-result-list results)))

 (defn get-ex [id]


Safeguard abort-join-cluster: only prepare if not already joined

--- src/onyx/log/commands/abort_join_cluster.clj
+++ src/onyx/log/commands/abort_join_cluster.clj
@@ -7,9 +7,12 @@
             [taoensso.timbre :refer [info] :as timbre]
             [onyx.extensions :as extensions]))

+(defn already-joined? [replica entry]
+  (some #{(:id (:args entry))} (:peers replica)))
+
 (s/defmethod extensions/apply-log-entry :abort-join-cluster :- Replica
-  [{:keys [args message-id]} :- LogEntry replica]
-  (if-not (get (set (:peers replica)) (:id args))
+  [{:keys [args] :as entry} :- LogEntry replica]
+  (if-not (already-joined? replica entry)
     (-> replica
         (update-in [:prepared] dissoc (get (map-invert (:prepared replica)) (:id args)))
         (update-in [:accepted] dissoc (get (map-invert (:accepted replica)) (:id args)))
@@ -26,12 +29,10 @@
       {:aborted (or (first prepared) (first accepted))})))

 (s/defmethod extensions/reactions :abort-join-cluster :- Reactions
-  [{:keys [args]} old new diff peer-args]
-  (when (and ;; not already joined
-             (not (get (set (:peers old)) (:id args)))
-             ;; and we are the peer in question
-             (= (:id args) (:id peer-args))
-             (not (:onyx.peer/try-join-once? (:peer-opts (:messenger peer-args)))))
+  [{:keys [args] :as entry} old new diff peer-args]
+  (when (and (not (:onyx.peer/try-join-once? (:peer-opts (:messenger peer-args))))
+             (not (already-joined? old entry))
+             (= (:id args) (:id peer-args)))
     [{:fn :prepare-join-cluster
       :args {:joiner (:id peer-args)
              :peer-site (extensions/peer-site (:messenger peer-args))}}]))


Rename playback -> replay

Rename playback -> replay

--- src/pinpointer/core.cljc
+++ src/pinpointer/core.cljc
@@ -186,8 +186,8 @@
   ([spec x opts]
    (pinpoint-out (s/explain-data spec x) opts)))

-(defn playback
-  ([] (playback {}))
+(defn replay
+  ([] (replay {}))
   ([opts]
    (pinpoint-out @last-explain-data opts)))


intro wizard indicator fix

intro wizard indicator fix

Signed-off-by: andrey <b713972e59b8e606e23253c4a13e948139fea4d1@gmail.com>

--- src/status_im/ui/screens/intro/carousel.cljs
+++ src/status_im/ui/screens/intro/carousel.cljs
@@ -6,12 +6,16 @@
             [status-im.i18n :as i18n]
             [status-im.ui.screens.intro.styles :as styles]))

+(defn code [val]
+  ^{:key val}
+  [animated/code {:exec val}])
+
 (defn dot []
   (let [active            (animated/value 0)
         active-transition (animated/with-timing-transition active {:duration 100})]
     (fn [{:keys [selected progress]}]
       [animated/view {:style (styles/dot-style active-transition)}
-       [animated/code {:exec (animated/set active (if selected 1 0))}]
+       [code (animated/set active (if selected 1 0))]
        [animated/view {:style (styles/dot-progress active-transition progress)}]])))

 (defn dots-selector [{:keys [n selected progress]}]


Better tests

Better tests

--- src/test/cljc/mikron/compiler/core_test.cljc
+++ src/test/cljc/mikron/compiler/core_test.cljc
@@ -7,18 +7,18 @@
   (test/testing "Non-seqable values are literal"
     (test/are [value] (util/literal? value)
       0
+      0.0
       :x
       "x"
-      true))
+      true
+      false))
   (test/testing "Vectors, sets, and maps are literal"
     (test/are [value] (util/literal? value)
       [0]
-      #{:x}
-      {"x" false}
-      [#{1 2 :x [{true [1] :false #{2}}]}]))
-  (test/testing "Lists are not literal"
+      #{0}
+      {0 0}))
+  (test/testing "Lists and symbols are not literal"
     (test/are [value] (not (util/literal? value))
-      '(1 2 3)
+      '(0)
       'x
-      ''x
-      [1 2 '(3 4 5)])))
+      'x/x)))


Update subscription-updated when subscription-amount is changed

--- src/server/daveconservatoire/server/parser.cljs
+++ src/server/daveconservatoire/server/parser.cljs
@@ -252,10 +252,12 @@

 (defn update-current-user [{:keys [current-user-id] :as env} data]
   (if current-user-id
-    (let [enabled-keys #{:user/about :user/subscription-updated :user/subscription-amount}]
+    (let [enabled-keys #{:user/about :user/subscription-amount}]
       (ps/save env (-> (select-keys data enabled-keys)
                        (assoc :db/id current-user-id
-                              :db/table :user))))
+                              :db/table :user)
+                       (cond-> (:user/subscription-amount data)
+                         (assoc :user/subscription-updated (js/Date.))))))
     (go nil)))

 (defn consume-guest-tx [{:keys [http-request current-user-id] :as env}]


Rendezvous should be false if list of nodes is empty

We can disable this validation in status-go. I am not sure why we have it.
But it will take longer.

Signed-off-by: Igor Mandrigin <042dc4512fa3d391c5170cf3aa61e6a638f84342@mandrigin.ru>

--- src/status_im/node/core.cljs
+++ src/status_im/node/core.cljs
@@ -72,6 +72,7 @@
   (let [accounts (get db :accounts/accounts)
         current-fleet-key (fleet/current-fleet db address)
         current-fleet (get fleet/fleets current-fleet-key)
+        rendezvous-nodes (pick-nodes 3 (vals (:rendezvous current-fleet)))
         {:keys [network
                 installation-id
                 settings
@@ -86,13 +87,13 @@

       current-fleet
       (assoc :NoDiscovery   false
-             :Rendezvous    true
+             :Rendezvous    (not (empty? rendezvous-nodes))
              :ClusterConfig {:Enabled true
                              :Fleet              (name current-fleet-key)
                              :BootNodes          (pick-nodes 4 (vals (:boot current-fleet)))
                              :TrustedMailServers (pick-nodes 6 (vals (:mail current-fleet)))
                              :StaticNodes        (pick-nodes 2 (vals (:whisper current-fleet)))
-                             :RendezvousNodes    (pick-nodes 3 (vals (:rendezvous current-fleet)))})
+                             :RendezvousNodes    rendezvous-nodes})

       :always
       (assoc :WhisperConfig         {:Enabled true


Simplify subbing a user to topics

Simplify subbing a user to topics

--- src/tranjlator/chat_room.clj
+++ src/tranjlator/chat_room.clj
@@ -20,8 +20,7 @@
 (defn sub-user
   [pub user-name user-chan topics]
   (doseq [t +user-default-topics+]
-    (a/sub pub t user-chan))
-  user-chan)
+    (a/sub pub t user-chan)))

 (defrecord ChatRoom
     [initial-users initial-history pub-chan process-chan]
@@ -33,13 +32,15 @@
           user-part (chan 10)
           user-join (chan 10)
           chat (chan 10)
-          initial-users (reduce (fn [acc [name chan]] (assoc acc name (sub-user pub name chan +user-default-topics+))) {} initial-users)
           initial-history (or initial-history [])]

       (a/sub pub :user-join user-join)
       (a/sub pub :user-part user-part)
       (a/sub pub :original chat)
-
+
+      (doseq [[name chan] initial-users]
+        (sub-user pub name chan +user-default-topics+))
+
       (assoc this
         :pub-chan pub-chan
         :initial-history initial-history
@@ -52,7 +53,8 @@
                          (log/infof "JOIN: %s" (pr-str msg))
                          (if-not (nil? msg)
                            (do (send-history sender history)
-                               (recur (assoc users user-name (sub-user pub user-name sender +user-default-topics+)) history))
+                               (sub-user pub user-name sender +user-default-topics+)
+                               (recur (assoc users user-name sender) history))
                            (log/warn "ChatRoom shutting down due to \"user-join\" channel closing")))

             user-part ([{:keys [user-name] :as msg}]


Generate initial board

Generate initial board

--- src/twentyfortyeight/db.cljs
+++ src/twentyfortyeight/db.cljs
@@ -7,13 +7,15 @@

 (def board-size 6)

+(def max-tiles (* board-size board-size))
+
 (def directions #{:up :down :right :left})

 (def all-positions (apply concat (for [x (range board-size)]
                                    (for [y (range board-size)]
                                      {:x x :y y}))))

-(def position-set-generator (gen/set (gen/elements all-positions) {:min-elements 3}))
+(def position-set-generator (gen/vector (gen/elements all-positions) 2))

 (defn game-board-generator
   []
@@ -24,8 +26,6 @@
 (defn all-unique-positions?
   [tiles]
   (apply distinct? (map :position tiles)))
-
-(def max-tiles (* board-size board-size))

 (s/def ::game-board
   (s/with-gen


moving away from provided to written to support foreign libs

--- support/src/figwheel/client/file_reloading.cljs
+++ support/src/figwheel/client/file_reloading.cljs
@@ -51,6 +51,9 @@
 (defn name->path [ns]
   (dev-assert (string? ns))
   (aget js/goog.dependencies_.nameToPath ns))
+
+(defn provided? [ns]
+  (aget js/goog.dependencies_.written (name->path ns)))

 ;; this is pretty simple, not sure how brittle it is
 (defn fix-node-request-url [url]
@@ -286,7 +289,7 @@
       (:figwheel-always meta-pragmas)
       (:figwheel-load meta-pragmas)
       ;; might want to use .-visited here
-      (goog/isProvided__ (name namespace))))))
+      (provided? (name namespace))))))

 (defn js-reload [{:keys [request-url namespace] :as file-msg} callback]
   (dev-assert (namespace-file-map? file-msg))


got additional deps and dependency ordered loading working

--- support/src/figwheel/client/file_reloading.cljs
+++ support/src/figwheel/client/file_reloading.cljs
@@ -5,32 +5,117 @@
    [goog.string]
    [goog.net.jsloader :as loader]
    [clojure.string :as string]
+   [clojure.set :refer [difference]]
    [cljs.core.async :refer [put! chan <! map< close! timeout alts!] :as async])
   (:require-macros
    [cljs.core.async.macros :refer [go go-loop]]))

-(declare reload-file*)
+(declare reload-file* resolve-ns)

 (defonce ns-meta-data (atom {}))

 ;; dependency resolution

-#_(defn dependencies []
-  (let [relevant-nms (filter (fn [n]
-                               (and
-                                (not (.startsWith goog.string n "goog"))
-                                (not (.startsWith goog.string n "cljs"))
-                                (not (.startsWith goog.string n "clojure"))))
-                             (js-keys (.. js/goog -dependencies_ -nameToPath)))]
-    (reduce (fn [am nm]
-              (let [pth (aget (.. js/goog -dependencies_ -nameToPath) nm)
-                    reqs (js-keys (aget (.. js/goog -dependencies_ -requires) pth))]
-                (reduce (fn [amm r] (assoc-in amm [r nm] true)) am reqs)))
+(defonce dependency-cache (atom {}))
+
+(defn all? [pred coll]
+  (reduce #(and %1 %2) true (map pred coll)))
+
+(defn namespace-file-map? [m]
+  (or
+   (and (map? m)
+        (string? (:namespace m))
+        (string? (:file m))
+        (= (:type m)
+           :namespace))
+    (do
+      (println "Error not namespace-file-map" (pr-str m))
+      false)))
+
+(defn not-start [n pre]
+  (dev-assert (string? n) (string? pre))
+  (not (.startsWith goog.string n pre)))
+
+(defn invalidate-dependency-cache! []
+  (reset! dependency-cache {}))
+
+(defn relevant-nms []
+  (filter (fn [n]
+            (dev-assert (string? n))
+            (reduce #(and %1 (not-start n %2)) true ["goog" "cljs" "clojure"]))
+          (js-keys (.. js/goog -dependencies_ -nameToPath))))
+
+(defn dependencies* []
+  (dev-assert (map? @dependency-cache))
+  (reduce (fn [acc-map nm]
+            (let [pth (aget (.. js/goog -dependencies_ -nameToPath) nm)
+                  reqs (js-keys (aget (.. js/goog -dependencies_ -requires) pth))]
+              (reduce (fn [amm r] (assoc-in amm [r nm] true)) acc-map reqs)))
             {}
-            relevant-nms)))
-
-#_(defn ns-that-depend-on [nm]
-  (keys (get (dependencies) nm)))
+            (relevant-nms)))
+
+(defn dependencies []
+  (dev-assert (map? @dependency-cache))
+  (if (not-empty @dependency-cache)
+    @dependency-cache
+    (let [deps (dependencies*)]
+      (dev-assert (map? deps))
+      (reset! dependency-cache deps)
+      deps)))
+
+(defn ns-that-depend-on [nm]
+  (dev-assert (string? nm))
+  (set (keys (get (dependencies) nm))))
+
+(defn ancestor* [nm nm2]
+  (dev-assert (string? nm) (string? nm2))
+  (let [deps (ns-that-depend-on nm)]
+    (dev-assert (set? deps))
+    (if (empty? deps)
+      false
+      (if (get deps nm2)
+        true
+        (reduce #(or %1 %2) false
+                (map #(ancestor* % nm2) deps))))))
+
+(defn ancestor [nm nm2]
+  (dev-assert (string? nm) (string? nm2) (map? @dependency-cache))
+  ;; sharing a cache so that it gets blown away when deps are updated
+  (let [cached (get-in @dependency-cache [:ancestor nm nm2])]
+    (if (not (nil? cached))
+      cached
+      (let [res (ancestor* nm nm2)]
+        (swap! dependency-cache assoc-in [:ancestor nm nm2] res)
+        res))))
+
+(defn topo-compare [nm nm2]
+  (dev-assert (string? nm) (string? nm2))
+  (cond
+    (= nm nm2) 0
+    (ancestor nm nm2) -1
+    :else 1))
+
+(defn topo-compare-file-msg [f1 f2]
+  (dev-assert (namespace-file-map? f1) (namespace-file-map? f2))
+  (topo-compare (:namespace f1) (:namespace f2)))
+
+(defn topo-sort-files
+  "Takes a list of file maps and returns a list of files in dep order."
+  [files]
+  (dev-assert (all? namespace-file-map? files))
+  (sort topo-compare-file-msg files))
+
+(defn expand-files-to-include-deps [file-msgs]
+  (dev-assert (all? namespace-file-map? file-msgs))
+  (let [current-ns    (set (map :namespace file-msgs))
+        dependent-ns  (set (mapcat ns-that-depend-on current-ns))
+        additional-ns (difference dependent-ns current-ns)
+        additional-files (map (fn [x] { :namespace x
+                                       :meta-data nil
+                                       :file (resolve-ns x)
+                                       :type :namespace }) additional-ns)]
+    (topo-sort-files (concat (set file-msgs)
+                             additional-files))))

 ;; this assumes no query string on url
 (defn add-cache-buster [url]
@@ -98,8 +183,8 @@

 (defn reload-file [{:keys [request-url] :as file-msg} callback]
   (dev-assert (string? request-url)
-              (map? file-msg)
-              (not (nil? callback)))
+              (not (nil? callback))
+              (namespace-file-map? file-msg))
   (utils/debug-prn (str "FigWheel: Attempting to load " request-url))
   (reload-file* request-url
                 (fn [success?]
@@ -111,10 +196,10 @@
                       (utils/log :error (str  "Figwheel: Error loading file " request-url))
                       (apply callback [file-msg]))))))

-(defn reload-file? [{:keys [request-url namespace dependency-file meta-data] :as file-msg}]
+(defn reload-file? [{:keys [request-url namespace meta-data] :as file-msg}]
+  (dev-assert (namespace-file-map? file-msg))
   (and
-   (or dependency-file
-       (and meta-data (:figwheel-load meta-data))
+   (or (and meta-data (:figwheel-load meta-data))
        ;; IMPORTANT make sure this file is currently provided
        (contains? *loaded-libs* namespace)
        #_(.isProvided_ js/goog (name namespace)))
@@ -139,13 +224,23 @@
 (defn load-all-js-files
   "Returns a chanel with one collection of loaded filenames on it."
   [files]
-  (async/into [] (async/filter< identity (async/merge (mapv reload-js-file files)))))
+  (let [out (chan)]
+    (go-loop [[f & fs] files]
+      (if-not (nil? f)
+        (do (put! out (<! (reload-js-file f)))
+            (recur fs))
+        (close! out)))
+    (async/into [] out))
+  ;; the following is a parallel load which is facter but non-deterministic
+  #_(async/into [] (async/filter< identity (async/merge (mapv reload-js-file files)))))
+

 (defn add-request-url [{:keys [url-rewriter] :as opts} {:keys [file] :as file-msg}]
-  (assoc file-msg :request-url
-         (if url-rewriter
-           (url-rewriter file)
-           (resolve-url file-msg))))
+  (let [resolved-path (resolve-url file-msg)]
+    (assoc file-msg :request-url
+           (if url-rewriter
+             (url-rewriter resolved-path)
+             resolved-path))))

 (defn add-request-urls [opts files]
   (map (partial add-request-url opts) files))
@@ -163,9 +258,20 @@
   (go
     (before-jsload files)
     ;; evaluate the eval bodies first
-    (doseq [eval-body-file (filter #(:eval-body %) files)]
-      (eval-body eval-body-file))
-    (let [files'  (add-request-urls opts (filter #(not (:eval-body %)) files))
+    ;; for now this is only for updating dependencies
+    ;; we are not handling removals
+    ;; TODO handle removals
+    (let [eval-bodies (filter #(:eval-body %) files)]
+      (when (not-empty eval-bodies)
+        (doseq [eval-body-file eval-bodies]
+          (eval-body eval-body-file))
+        (invalidate-dependency-cache!)))
+
+    (let [filtered-files (filter #(and (:namespace %)
+                                       (not (:eval-body %)))
+                                 files)
+          all-files  (expand-files-to-include-deps filtered-files)
+          files'  (add-request-urls opts all-files)
           res'    (<! (load-all-js-files files'))
           res     (filter :loaded-file res')
           files-not-loaded  (filter #(not (:loaded-file %)) res')]
@@ -179,6 +285,7 @@
       (when (not-empty files-not-loaded)
         (utils/log :debug "Figwheel: NOT loading files that haven't been required")
         (utils/log (str "not required:" (pr-str (map :file files-not-loaded))))))))
+

 ;; CSS reloading


more UI presentation fixes

more UI presentation fixes

--- src/tango/cljs/main.cljs
+++ src/tango/cljs/main.cljs
@@ -366,7 +366,8 @@
       (for [event (sort-by :event/position (:competition/events (:competition @app-state)))]
         (let [referenced-class (first (filter #(= (:class/position %) (:event/class-number event))
                                               (:competition/classes (:competition @app-state))))
-              comment-row? (= (:event/number event) -1)]
+              comment-row? (= (:event/number event) -1)
+              direct-final? (= (:event/heats event) 1)]
         ^{:key event}

           [:tr
@@ -379,12 +380,39 @@
                 (:event/comment event)
                 (:class/name referenced-class)))]

-           [:td (if comment-row? "" (count (:class/competitors referenced-class)))]
-           [:td (if comment-row? "" (make-event-round-presentation (:event/round event)))]
-           [:td (if comment-row? "" (:event/heats event))]
-           [:td (if (= 0 (:event/recall event)) "" (:event/recall event))]
+           ;; Startande
+           ;; TODO - get ppl left from refed class
+           [:td
+            (if comment-row?
+              ""
+              (count (:class/competitors referenced-class)))]
+
+           ;; Round
+           [:td
+            (if comment-row?
+              ""
+              (if direct-final?
+                "Direct Final"
+                (make-event-round-presentation (:event/round event))))]
+
+           ;; Heats
+           ;; If there is only 1 heat is that always a Direct Final?
+           [:td
+            (if (or comment-row? direct-final?)
+              ""
+              (str (:event/heats event) " heats"))]
+
+           [:td
+            (if (= 0 (:event/recall event))
+              ""
+              (str "Recall " (:event/recall event)))]
+
            ;; TODO - adjust adj panel in back-end
-           [:td (if comment-row? "" (- (:event/adjudicator-panel event) 2))]
+           [:td
+            (if comment-row?
+              ""
+              (str "Panel " (- (:event/adjudicator-panel event) 2)))]
+
            [:td (make-dance-type-presentation (:event/dances event))]
            ])))]]])


Housekeeping for #92

Housekeeping for #92

--- src/taoensso/faraday.clj
+++ src/taoensso/faraday.clj
@@ -1189,7 +1189,7 @@
                              [<attr> ...]}.
     :total-segments  - Total number of parallel scan segments.
     :segment         - Calling worker's segment number (>=0, <=total-segments).
-    :consistent?     - If the scan should use consistent reads
+    :consistent?     - Use strongly (rather than eventually) consistent reads?

   comparison-operators e/o #{:eq :le :lt :ge :gt :begins-with :between :ne
                              :not-null :null :contains :not-contains :in}.


Function to generate measure map

Function to generate measure map

--- src/tenor/constructs.clj
+++ src/tenor/constructs.clj
@@ -55,6 +55,11 @@
 (defn map-measure [measure scale]
   (map #(hash-map :pos %, :note (rand-nth scale)) measure))

+(defn generate-measure-map [note-count note-value]
+  (map-measure
+    (segment-measure (time-signature note-count))
+    (generate-random-scale)))
+
 (defmacro construct-note [time player entity]
   `(list 'at ~time (list ~player ~entity)))


Math/ not math/

Math/ not math/

--- src/tile_game/board.cljc
+++ src/tile_game/board.cljc
@@ -15,7 +15,7 @@
                 :right [ 1  0]})

 (defn dimension [board]
-  (int (math/sqrt (count board))))
+  (int (Math/sqrt (count board))))

 ;; (defn print-board [board]
 ;;   (let [dim (dimension board)


Silly -init.clj

Silly -init.clj


Updating text-editor widget to bind text field value to cursor value; improving error reporting in after-event

--- web-client/test/test_burgerboard/huh.cljs
+++ web-client/test/test_burgerboard/huh.cljs
@@ -228,8 +228,10 @@
   )

 (defn after-event [event-attr event-arg component callback]
-  (do
-    ((aget (.. component -props) (name event-attr)) event-arg)
-    (callback component)
-    )
-  )
+  ((or
+    (aget (.. component -props) (name event-attr))
+    (fn [_] (throw (js/Error. (str "No event handler for " event-attr))))
+    )
+   event-arg)
+  (callback component)
+  )


Updated project.clj to 1.1.0-SNAPSHOT

Updated project.clj to 1.1.0-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject montoux/lein-less "1.0.0"
+(defproject montoux/lein-less "1.1.0-SNAPSHOT"
   :description "{less} css builder plugin for leiningen"
   :url "http://github.com/montoux/lein-less"
   :license {:name "Eclipse Public License"


Back to dev version

Back to dev version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojurewerkz/cassaforte "2.0.0-beta8"
+(defproject clojurewerkz/cassaforte "2.0.0-beta9-SNAPSHOT"
   :min-lein-version "2.5.0"
   :description "A Clojure client for Apache Cassandra"
   :url "http://clojurecassandra.info"


Deploy 0.5.8

Deploy 0.5.8

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject klang "0.5.7"
+(defproject klang "0.5.8"
   :description "A cljs logger and viewer"
   :url "http://www.github.com/rauhs/klang"
   :license {:name "Eclipse Public License"


Fix transformation.reverse-geocode spec args

--- backend/specs/akvo/lumen/specs/transformation.clj
+++ backend/specs/akvo/lumen/specs/transformation.clj
@@ -339,7 +339,6 @@
 (defmethod op-spec :core/reverse-geocode  [_]
   (s/keys
    :req-un [::transformation.reverse-geocode/args
-	    ::transformation.engine/onError
             ::transformation.engine/op]))

 (create-ns  'akvo.lumen.specs.transformation.sort-column)


Go back to 0.3.12-SNAPSHOT

Go back to 0.3.12-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject nightcode "0.4.0-SNAPSHOT"
+(defproject nightcode "0.3.12-SNAPSHOT"
   :description "An IDE for Clojure and Java"
   :url "https://github.com/oakes/Nightcode"
   :license {:name "Public Domain"


Add missing dependency.

Add missing dependency.

--- project.clj
+++ project.clj
@@ -53,6 +53,7 @@
       :dependencies [
         [midje "1.8.2"] ; Example-based testing https://github.com/marick/Midje
         [ring-mock "0.1.5"] ; Test Ring requests https://github.com/weavejester/ring-mock
+        [io.aviso/pretty "0.1.20"] ; Pretty print exceptions https://github.com/AvisoNovate/pretty
       ]
       :plugins [
         [lein-midje "3.2"] ; Example-based testing https://github.com/marick/lein-midje


Update lein-cljsbuild version

Update lein-cljsbuild version

--- project.clj
+++ project.clj
@@ -73,7 +73,7 @@
                                com.cognitect/transit-clj]]]
   :ring {:handler photon.core/figwheel-instance
          :init photon.core/figwheel-init!}
-  :plugins [[lein-cljsbuild "1.1.0"]
+  :plugins [[lein-cljsbuild "1.1.1"]
             [lein-midje "3.1.3"]
             [lein-ring "0.9.7"]
             [lein-figwheel "0.5.0-1"


Revert to snapshot version.

Revert to snapshot version.

--- project.clj
+++ project.clj
@@ -1,5 +1,5 @@
-(defproject cli4clj "0.8.0"
-;(defproject cli4clj "0.8.1-SNAPSHOT"
+;(defproject cli4clj "0.8.0"
+(defproject cli4clj "0.8.1-SNAPSHOT"
   :description "Create simple interactive CLIs for Clojure applications."
   :url "https://github.com/ruedigergad/cli4clj"
   :license {:name "Eclipse Public License"


Bump version to 0.15.14-SNAPSHOT

Bump version to 0.15.14-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "0.15.13"
+(defproject clojars-web "0.15.14-SNAPSHOT"
   :dependencies [[org.clojure/clojure "1.6.0"]
                  [org.clojure/tools.cli "0.2.1"]
                  [org.apache.maven/maven-model "3.0.4"


Cannot get replies: <Your credentials do not allow access to this resource>

--- test/layzee/integration/twitter_examples.clj
+++ test/layzee/integration/twitter_examples.clj
@@ -14,7 +14,7 @@
        (let [result (first (twitter/lazy-web settings/consumer-token))]
          (.contains (:text result) "#lazyweb") => true)))

-(facts
- (fact "Get replies to a tweet like this"
-       (let [result (first (twitter/replies settings/consumer-token "633472387497902080"))]
-         (println result))))+;(facts
+; (fact "Get replies to a tweet like this"
+;       (let [result (first (twitter/replies settings/consumer-token "633472387497902080"))]
+;         (println result))))


(PDB-3948) Fix transient failure of pretty print

Previously, it was possible for garbage collection to run in the middle
of the developer-pretty-print test. which if it ran in between adding
the cert and facts and the checks would clean them out of the database.

This commit changes the test to use the timestamp now so that even if
garbage collection runs, the facts will remain.

--- test/puppetlabs/puppetdb/http/facts_test.clj
+++ test/puppetlabs/puppetdb/http/facts_test.clj
@@ -1960,9 +1960,9 @@
                             (assoc-in [:developer :pretty-print] (str pretty?)))
                         (fn []
                           (let [facts {:certname "foo"
-                                       :timestamp reference-time
+                                       :timestamp (now)
                                        :environment "DEV"
-                                       :producer_timestamp reference-time
+                                       :producer_timestamp (now)
                                        :producer "bar"
                                        :values{"foo" "bar"
                                                "baz" "bax"}}]


core: *flush-on-newline*

core: *flush-on-newline*

--- core/data/core.clj
+++ core/data/core.clj
@@ -1940,12 +1940,22 @@
   (flush* *out*)
   nil)

+(def
+  ^{:doc
+    "When set to true, output will be flushed whenever a newline is printed.
+
+    Defaults to true."
+    :added "1.0"}
+  *flush-on-newline* true)
+
 (defn prn
-  "Same as pr followed by (newline)."
+  "Same as pr followed by (newline). Observes *flush-on-newline*"
   {:added "1.0"}
   [& more]
   (apply pr more)
-  (newline))
+  (newline)
+  (when *flush-on-newline*
+    (flush)))

 (defn print
   "Prints the object(s) to the output stream that is the current value


Add missing math functions.

Add missing math functions.

--- src/uxbox/util/math.cljs
+++ src/uxbox/util/math.cljs
@@ -16,10 +16,20 @@
   [^number v]
   (js/Math.cos v))

+(defn acos
+  "Returns the arccosine of a number."
+  [^number v]
+  (js/Math.acos v))
+
 (defn tan
   "Returns the tangent of a number."
   [^number v]
   (js/Math.tan v))
+
+(defn atan2
+  "Returns the arctangent of the quotient of its arguments."
+  [^number x ^number y]
+  (js/Math.atan2 x y))

 (defn neg
   "Negate the number"


some basic tests 2

some basic tests 2

--- test/metabase/util/stats_test.clj
+++ test/metabase/util/stats_test.clj
@@ -58,7 +58,6 @@

 (expect "unknown" ((get-anonymous-usage-stats) :running_on))
-(expect "h2" ((get-anonymous-usage-stats) :application_database))
 (expect true ((get-anonymous-usage-stats) :check_for_updates))
 (expect true ((get-anonymous-usage-stats) :site_name))
 (expect true ((get-anonymous-usage-stats) :friendly_names))


Cleaning up more async tests

Cleaning up more async tests

--- test/momentum/test/core/async.clj
+++ test/momentum/test/core/async.clj
@@ -202,105 +202,50 @@
             (compare-and-inc 1)
             (compare-and-inc 2)))))

-;; ==== Catching exceptions
-
-(deftest aborting-in-progress
-  (is (thrown-with-msg?
-        Exception #"BOOM"
-        (let [val (async-val)]
-          @(doasync 1 inc
-             (finally (throw (Exception. "BOOM"))))
-          (abort val (Exception. "BAM"))))))
-
-;; ==== Aborting pipelines in progress
-
-(deftest aborting-a-pipeline-after-first-stage
-  (let [res (atom nil)
-        err (Exception. "BOOM")
-        pipeline
-        (doasync 1 inc
-          (fn [v]
-            (compare-and-set! res nil v)
-            (future*
-             (Thread/sleep 10)
-             (inc v))))]
-    (abort pipeline err)
-    (receive
-     pipeline
-     (fn [_] (reset! res :fail))
-     #(compare-and-set! res 2 %))
-    (is (= err @res))))
-
-(deftest aborting-a-pipeline-before-seed-is-realized
-  (let [res (atom nil) res2 (atom nil)
-        err (Exception. "BOOM")
-        pipeline
-        (doasync (future* (Thread/sleep 20) 1)
-          #(reset! res2 %))]
-    (abort pipeline err)
-    (receive
-     pipeline
-     (fn [v] (reset! res [v :fail]))
-     #(compare-and-set! res nil %))
-    (Thread/sleep 40)
-    (is (= err @res))
-    (is (nil? @res2))))
-
-(deftest aborting-a-pipeline-mid-stage
-  (let [res (atom nil) res2 (atom nil)
-        err (Exception. "BOOM")
-        pipeline
-        (doasync 1
-          (fn [v]
-            (future*
-             (Thread/sleep 10)
-             (inc v)))
-          #(reset! res2 %))]
-    (abort pipeline err)
-    (receive
-     pipeline
-     (fn [v] (reset! res [v :fail]))
-     #(compare-and-set! res nil %))
-    (Thread/sleep 40)
-    (is (= err @res))
-    (is (nil? @res2))))
+(deftest aborting-in-progress-pipeline-aborts-pending-asyncs
+  (let [val (async-val)
+        res (atom nil)]
+    (abort
+     (doasync (defer 1)
+       (fn [_] (reset! res :fail)))
+     (Exception.))
+
+    (Thread/sleep 50)
+    (is (nil? @res)))
+
+  (let [val (async-val)
+        res (atom nil)]
+    (abort
+     (doasync 1
+       #(defer (inc %))
+       (fn [_] (reset! res :fail)))
+     (Exception.))
+
+    (Thread/sleep 50)
+    (is (nil? @res))))

 ;; ==== recur*

 (deftest simple-async-recursion-with-primitives
-  (let [res (atom nil)]
-    (receive
-     (doasync 1
-       (fn [val]
-         (if (< val 4)
-           (recur* (inc val))
-           (inc val))))
-     #(compare-and-set! res nil %)
-     #(reset! res %))
-    (is (= 5 @res))))
-
-(deftest simple-async-recursion-with-async-values
-  (let [val (async-val)]
-    (future
-      (Thread/sleep 10)
-      (put val 1))
-    (is (= 5 @(doasync val
-                (fn [val]
-                  (if (< val 4)
-                    (let [nxt (async-val)]
-                      (future
-                        (Thread/sleep 10)
-                        (put nxt (inc val)))
-                      (recur* nxt))
-                    (inc val))))))))
-
-(deftest async-recursion-is-tail-recursive-for-sync-values
-  (is (= :done
-         @(doasync (repeat 100 "a")
-            (fn [[v & more]]
-              (if more
-                (recur* more)
-                :done))))))
+  (are [x] (= 5 @x)
+       (doasync 1
+         (fn [val]
+           (if (< val 5)
+             (recur* (inc val))
+             val)))
+
+       (doasync (defer 1)
+         (fn [val]
+           (if (< val 5)
+             (recur* (defer (inc val)))
+             val)))
+
+       ;; Tail recursive for sync values
+       (doasync 100000
+         (fn [v]
+           (if (> v 5)
+             (recur* (dec v))
+             v)))))

 ;; ==== async-seq

@@ -542,4 +487,4 @@
               #(.put q2 %)))))

       (is (= (take 750 (incrementing))
-             (sort (map #(deref % 10 -1) vs)))))))
+             (sort (map #(deref % 50 -1) vs)))))))


Test not= exception for dev builds only

Test not= exception for dev builds only

Logging is not enabled for optimized builds

--- test/reagenttest/testreagent.cljs
+++ test/reagenttest/testreagent.cljs
@@ -1241,7 +1241,7 @@
         component (fn []
                     [component-class @prop])]

-    (when isClient
+    (when (and isClient (dev?))
       (let [e (debug/track-warnings
                 #(with-mounted-component [component]
                    (fn [c div]


stray inspect

stray inspect

--- src/pc/server.clj
+++ src/pc/server.clj
@@ -37,7 +37,7 @@
         {:status 200
          :body (pr-str {:layers (layer/find-by-document (pcd/default-db) {:db/id (Long/parseLong id)})})})
    (GET "/document/:document-id" [document-id]
-        (content/app (inspect ring.middleware.anti-forgery/*anti-forgery-token*)))
+        (content/app ring.middleware.anti-forgery/*anti-forgery-token*))
    (GET "/" []
         (let [[document-id] (pcd/generate-eids (pcd/conn) 1)]
           @(d/transact (pcd/conn) [{:db/id document-id :document/name "Untitled"}])


initial

initial


The aalts end event handler returns delta.

--- src/cbfg/core.cljs
+++ src/cbfg/core.cljs
@@ -122,7 +122,12 @@
              (swap! vis #(dissoc-in % [:chs result-ch :msgs result-msg]))
              (when (nil? result-msg) ; The ch is closed.
                (swap! vis #(dissoc-in % [:chs result-ch])))
-             nil))}})
+             (reduce (fn [acc ch-binding]
+                       (if acc acc
+                           (when (and (not (seq? ch-binding))
+                                      (= result-ch ch-binding))
+                             [[:msg-move result-msg :ch result-ch :actx actx]])))
+                     nil ch-bindings)))}})

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


Match list elements correctly.

Match list elements correctly.

--- src/cbfg/core.cljs
+++ src/cbfg/core.cljs
@@ -126,12 +126,11 @@
                wait-chs)
           ")"]
          [])
-       "
"
        (if (not-empty children)
-         ["
children...
"
+         ["

children...
"
           (map (fn [kv] ["
" (vis-html-actx vis (first kv)) "
"])
                children)
-          "

"]
+          "

"]
          [])
        "
"])
     "no actx"))
@@ -168,6 +167,7 @@
         (set-el-innerHTML "vis-html"
                           (apply str
                                  (flatten [(vis-html-actx @vis @root-actx)
+                                           "
"
                                            (vis-html-chs @vis)])))
         (set-el-innerHTML "vis"
                           (str "<circle cx='"


Remove no-longer-valid benchmark

Remove no-longer-valid benchmark

--- benchmarks/caesium/crypto/secretbox_benchmark.clj
+++ benchmarks/caesium/crypto/secretbox_benchmark.clj
@@ -93,9 +93,4 @@
    [secretbox-easy-to-indirect-byte-bufs-with-macros!
     secretbox-easy-to-indirect-byte-bufs!
     secretbox-easy-to-byte-bufs-nocast!]
-   bb/->indirect-byte-buf)
-
-  (bench-secretnonce
-   "secretbox to-buf! with byte arrays, pre-allocation"
-   [s/secretbox-easy-to-buf!]
-   identity))
+   bb/->indirect-byte-buf))


new (failing) test case of composite profile not being dealt with by the reader.

- see #61.

--- test/leiningen/ancient/artifact/reader_test.clj
+++ test/leiningen/ancient/artifact/reader_test.clj
@@ -39,4 +39,22 @@
                 {:keys [without-profiles]} (meta m)]
             (:dependencies m) => (contains #{'[artifact/artifact "0.1.1"]})
             (:dependencies without-profiles) => (contains #{'[artifact/artifact "0.1.1"]})
-            (-> without-profiles :root parent-path) => (parent-path old-project)))))+            (-> without-profiles :root parent-path) => (parent-path old-project)))))
+
+;; https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md#composite-profiles
+(fact "about project file with component profile parsing."
+      (with-temp-file [f (str "(defproject project-x \"0.1.1-SNAPSHOT\"\n"
+                              "  :dependencies [[artifact \"0.1.0\"]]\n"
+                              "  :plugins [[plugin \"0.1.0\"]]\n"
+                              "  :profiles {:shared {:plugins [[plugin2 \"0.1.1\"]]\n"
+                              "                      :dependencies [[artifact2 \"0.1.1\"]]}\n"
+                              "             :dev [:shared {:plugins [[plugin2 \"0.1.2\"]]\n"
+                              "                            :dependencies [[artifact3 \"0.1.2\"]]}]})")]
+        (let [m (read-project-map! f)]
+          m => map?
+          (:dependencies m) => '[[artifact "0.1.0"]]
+          (:plugins m) => '[[plugin "0.1.0"]]
+          (-> m :profiles :shared :dependencies) => '[[artifact2 "0.1.1"]]
+          (-> m :profiles :shared :plugins) => '[[plugin2 "0.1.1"]]
+          (-> m :profiles :dev :dependencies) => '[[artifact3 "0.1.2"]]
+          (-> m :profiles :dev :plugins) => '[[plugin3 "0.1.2"]])))


fix bug for question keywords

fix bug for question keywords

--- src/clj/org/openforis/ceo/utils/type_conversion.clj
+++ src/clj/org/openforis/ceo/utils/type_conversion.clj
@@ -58,12 +58,18 @@
        (Boolean/parseBoolean val)
        (catch Exception _ (boolean default))))))

+;; TODO: This is a temporary fix for survey questions
+(defn- keyword-str [str]
+  (if (and (string? str) (re-matches #"[\p{L}*+!_?-][\p{L}\d*+!_?-]*" str))
+    (keyword str)
+    str))
+
 (defn json->clj
   ([json]
    (json->clj json nil))
   ([json default]
    (try
-     (read-str json :key-fn keyword)
+     (read-str json :key-fn keyword-str)
      (catch Exception _ default))))

 (def jsonb->json str)


Re-enable instrumentation

Re-enable instrumentation

--- test/expound/test_utils.cljc
+++ test/expound/test_utils.cljc
@@ -27,11 +27,10 @@
   (s/check-asserts false))

 (defn instrument-all [test-fn]
-  ;; TODO - bug w/ instrumentation????
-  #_(set! s/*explain-out* (expound/custom-printer {:theme :figwheel-theme}))
-  #_(st/instrument)
+  (set! s/*explain-out* (expound/custom-printer {:theme :figwheel-theme}))
+  (st/instrument)
   (test-fn)
-  #_(st/unstrument))
+  (st/unstrument))

 (defn contains-nan? [x]
   (boolean (some util/nan? (tree-seq coll? identity x))))


destructure stats

destructure stats

--- src/tetrij/core.cljs
+++ src/tetrij/core.cljs
@@ -216,10 +216,11 @@
     [:div#next-tile (rendered-board view)]))

 (defn stats-view []
-  [:div
-   [:div.stats (:level @game)]
-   [:div.stats (:lines @game)]
-   [:div.stats (:score @game)]])
+  (let [{:keys [level lines score]} @game]
+    [:div
+     [:div.stats level]
+     [:div.stats lines]
+     [:div.stats score]]))

 (render-to game-view      "main")
 (render-to stats-view     "sidebar-stats")


remove inspect

remove inspect

--- frontend/controllers/api.cljs
+++ frontend/controllers/api.cljs
@@ -232,7 +232,7 @@
   [target message status {:keys [resp context]} state]
   (if-not (= (:project-name context) (str (get-in state [:navigation-data :org]) "/" (get-in state [:navigation-data :repo])))
     state
-    (assoc-in state (inspect state/project-plan-path) resp)))
+    (assoc-in state state/project-plan-path resp)))

 (defmethod api-event [:project-token :success]


Peer may still be around if accept-join-cluster is being called, even if it is not in prepared/accepted

--- test/onyx/log/generators.clj
+++ test/onyx/log/generators.clj
@@ -30,10 +30,17 @@
                        ; might not need these with the below entries
                        (vals (or (:prepared replica) {}))
                        (vals (or (:accepted replica) {}))))
+    ;; joining peer's prepared/accepted may have been removed
+    ;; by a leave cluster but the joining peer is still there
     (and (not (peerless-entry? entry))
-         (:id (:args entry))) (conj (:id (:args entry)))
+         (:id (:args entry)))
+    (conj (:id (:args entry)))
     (and (not (peerless-entry? entry))
-         (:joiner (:args entry))) (conj (:joiner (:args entry)))))
+         (:accepted-joiner (:args entry)))
+    (conj (:accepted-joiner (:args entry)))
+    (and (not (peerless-entry? entry))
+         (:joiner (:args entry)))
+    (conj (:joiner (:args entry)))))

 (defn generate-side-effects
   "Generates additional reactions that may be generated by the process.


Document .cljs.edn files on task docstring

--- src/adzerk/boot_cljs.clj
+++ src/adzerk/boot_cljs.clj
@@ -154,6 +154,14 @@

 (core/deftask cljs
   "Compile ClojureScript applications.
+
+   Multiple builds can be compiled parallel. To define builds use .cljs.edn
+   files. ID of build is the name of .cljs.edn file without the extension.
+   To compile only specific builds, use ids option to select .cljs.edn files
+   by name. Output files of build will be put below id.out folder in fileset.
+
+   If no .cljs.edn files exists, default one is created. It will depend on
+   all .cljs files in fileset.

    Available --optimization levels (default 'none'):


Fix typo

Fix typo

--- src/main/cljc/mikron/compiler/processor/interp.cljc
+++ src/main/cljc/mikron/compiler/processor/interp.cljc
@@ -20,7 +20,7 @@
     `(runtime.math/interp ~value-1 ~value-2 ~time-factor))

   (defmethod interp :char [_ _ value-1 value-2 global-options]
-    (interp [:default] nil value-1 value-2 char))
+    (interp [:default] nil value-1 value-2 global-options))

   (defmethod interp :list [[_ options schema'] paths value-1 value-2 global-options]
     (compiler.util/macro-context {:gen-syms [value-1-vec value-2-vec]}


Add docstrings for clj(s)-read-opts

Add docstrings for clj(s)-read-opts

--- src/main/clojure/clojure/tools/namespace/parse.cljc
+++ src/main/clojure/clojure/tools/namespace/parse.cljc
@@ -25,10 +25,14 @@
   (and (list? form) (= 'ns (first form))))

 (def clj-read-opts
+  "Map of options for tools.reader/read allowing reader conditionals
+  with the :clj feature enabled."
   {:read-cond :allow
    :features #{:clj}})

 (def cljs-read-opts
+  "Map of options for tools.reader/read allowing reader conditionals
+  with the :cljs feature enabled."
   {:read-cond :allow
    :features #{:cljs}})


CMR-5067 Cleanup.

CMR-5067 Cleanup.

--- umm-spec-lib/src/cmr/umm_spec/umm_g/project.clj
+++ umm-spec-lib/src/cmr/umm_spec/umm_g/project.clj
@@ -8,7 +8,7 @@
   (:import cmr.umm.umm_granule.UmmGranule))

 (defn- umm-g-project->ProjectRef
-  "Returns the umm-lib granule model PlatformRef from the given UMM-G Project."
+  "Returns the umm-lib granule model ProjectRef from the given UMM-G Project."
   [project]
   (:Campaigns project))

@@ -18,7 +18,7 @@
   (seq (reduce concat [] (map umm-g-project->ProjectRef projects))))

 (defn ProjectRefs->umm-g-projects
-  "Returns the UMM-G Platforms from the given umm-lib granule model ProjectRefs."
+  "Returns the UMM-G Projects from the given umm-lib granule model ProjectRefs."
   [project-refs]
   (when (seq project-refs)
     [{:ShortName util/not-provided


IS/SR #26 moved description of radiobutton for ratings to make it clickable like the entire radiobutton

--- src/cljs/conference_rating/add_rating_page/add_rating_page.cljs
+++ src/cljs/conference_rating/add_rating_page/add_rating_page.cljs
@@ -34,9 +34,9 @@

 (defn rating-panel-radio-input [id key input-label value]
   [:div
-   [:p {:class "text-lg-center"} input-label]
    [:input {:field :radio :value value :type "radio" :id id :name key}]
    [:label {:for id}
+   [:p {:class "text-lg-center"} input-label]
     [:span {:class "radio"}]]])

 (defn rating-panel [icon data-key panel-label panel-classes]


perform-author-week-repo-page

perform-author-week-repo-page

--- src/arachnida/server.clj
+++ src/arachnida/server.clj
@@ -324,6 +324,19 @@
         (-> (html-renderer/render-author-week-page author-name selected-week stat-for-week)
             continue-processing)))

+(defn perform-author-week-repo-page
+    [request]
+    (let [params          (:params request)
+          author-name     (get params "name")
+          selected-week   (get params "week")
+          product         (get params "product")
+          repo            (get params "repo")
+          weeks-stat      (get-weeks-stat (Integer/parseInt selected-week) author-name)
+          stat-for-week   (read-stat-for-week selected-week author-name)
+          ]
+        (-> (html-renderer/render-author-week-repo-page author-name selected-week stat-for-week product repo)
+            continue-processing)))
+
 (defn perform-product-page
     [request]
     (let [params (:params request)
@@ -369,6 +382,7 @@
             "/"                                 (perform-index-page request)
             "/author"                           (perform-author-page request)
             "/author-week"                      (perform-author-week-page request)
+            "/author-week-repo"                 (perform-author-week-repo-page request)
             "/product"                          (perform-product-page request)
             "/favicon.ico"                      (return-icon uri)
             "/bootstrap.min.css"                (return-css uri)


Switched to reset! for just setting an atom's value. Removed sample jdbc code.

--- web/src/twitter_hashtags_visualizer/handler.clj
+++ web/src/twitter_hashtags_visualizer/handler.clj
@@ -32,12 +32,12 @@
 (def tags (atom {}))

 (defn query-top-tags []
-  (take 10 (jdbc/query pooled-db-spec
+  (take 10 (jdbc/query pooled-db-spec
                        ["select * from tag_count where valid_to > current_timestamp"]
                        :row-fn #(select-keys % [:tag :count]))))

 (defn update-tags []
-  (swap! tags (fn [_] (query-top-tags))))
+  (reset! tags (query-top-tags)))

 (defn poll-db []
   (update-tags)
@@ -75,32 +75,3 @@

 (def app
   (handler/site app-routes))
-
-(defn -main [& args]
-  (try
-    (println)
-    (println "creating table")
-    (jdbc/db-do-commands
-     pooled-db-spec
-     (jdbc/create-table-ddl :fruit
-                            [:name "varchar(32)" "PRIMARY KEY"]
-                            [:price :int]))
-    (println "inserting fruit"
-             (jdbc/insert! pooled-db-spec :fruit {:name "apple" :price 120}))
-    (println (jdbc/query pooled-db-spec ["SELECT * FROM fruit WHERE price > ? ORDER BY price" 100]))
-    (println "updating price"
-             (jdbc/update! pooled-db-spec :fruit {:name "apple" :price 122} ["name = ?" "apple"]))
-    (println (jdbc/query pooled-db-spec ["SELECT * FROM fruit WHERE price > ? ORDER BY price" 100]))
-    (println "deleting fruit"
-             (jdbc/delete! pooled-db-spec :fruit ["name = ?" "apple"]))
-    (println (jdbc/query pooled-db-spec ["SELECT * FROM fruit WHERE price > ? ORDER BY price" 100]))
-    (finally
-      (println "dropping table")
-      (jdbc/db-do-commands
-       pooled-db-spec
-       (jdbc/drop-table-ddl :fruit)))))
-
-(comment
-  ;; for testing
-  (-main)
-  )


Encapsulate camera resolution properties

--- spectacles/src/spectacles/mirror_camera.clj
+++ spectacles/src/spectacles/mirror_camera.clj
@@ -3,18 +3,21 @@
             [quil.middleware :as m])
   (:import [processing.video Capture]))

-; Inspired by mirror2 from quil examples
+; Inspired by mirror2 from processing-video examples

 (defn setup []

+  (def camera-resolution {:width 1024
+                          :height 768
+                          :frame-rate 30})
   (def cell-size 15)
-  (def cols (/ (q/width) cell-size))
-  (def rows (/ (q/height) cell-size))
+  (def cols (/ (:width camera-resolution) cell-size))
+  (def rows (/ (:height camera-resolution) cell-size))
   (q/color-mode :rgb 255 255 255 100)
   (q/rect-mode :center)

   (println "Initializing Camera...")
-  (let [camera (Capture. (quil.applet/current-applet) 1024 768 "/dev/video1" 30)]
+  (let [camera (Capture. (quil.applet/current-applet) (:width camera-resolution) (:height camera-resolution) "/dev/video1" (:frame-rate camera-resolution))]
     (do
       (.start camera))
     {:camera camera})
@@ -35,7 +38,7 @@
         (let [x (* i cell-size)
               y (* j cell-size)
               pixels (.pixels (:camera state))
-              location (+ (- 1024 x 1) (* 1024 y))
+              location (+ (- (:width camera-resolution) x 1) (* (:width camera-resolution) y))
               color (nth pixels location)
               size (* (/ (q/brightness color) 255) cell-size)
               ]


Simplify hiccup->* fns

Simplify hiccup->* fns

--- src/datemo/arb.clj
+++ src/datemo/arb.clj
@@ -10,29 +10,6 @@

 (defn get-in-metadata [k metadata]
   (k (first (filter #(k %) metadata))))
-
-(defn walk-tx-fn [wrap-node process-node]
-  (fn walk [tx]
-    (let [{metadata :arb/metadata, nodes :arb/value} tx]
-      (clojure.pprint/pprint {:metadata metadata, :nodes nodes})
-      (wrap-node
-       metadata
-       (apply vector (for [node nodes]
-                       (if (:content/text node)
-                         (process-node node)
-                         (walk node))))))))
-
-(defn tx->html [tx]
-  (-> tx (tx->arb) (arb->hiccup) (html)))
-
-(defn tx->arb [tx]
-  (let [process-node #(:content/text %)
-        wrap-node    #(vec
-                       (concat
-                        [:arb {:original-tag (get-in-metadata :metadata/html-tag %1)}]
-                        %2))
-        convert      (walk-tx-fn wrap-node process-node)]
-    (convert tx)))

 (defn walk-arb-fn [wrap-node process-node]
   (fn walk [arb]
@@ -57,6 +34,44 @@
         wrap-node #(vec (concat [(:original-tag %1) {}] %2))
         convert (walk-arb-fn wrap-node proccess-node)]
     (convert arb)))
+
+(defn walk-hiccup-fn [wrap-node process-node]
+  (fn walk [hiccup]
+    (let [[tag _ & nodes] hiccup]
+      (wrap-node tag
+                 (apply vector (for [node nodes]
+                                 (if (string? node)
+                                   (process-node node)
+                                   (walk node))))))))
+
+(defn hiccup->arb [hiccup]
+  (let [process-node #(identity %)
+        wrap-node    #(vec (concat [:arb {:original-tag %1}] %2))
+        convert      (walk-hiccup-fn wrap-node process-node)]
+    (convert hiccup)))
+
+(defn walk-tx-fn [wrap-node process-node]
+  (fn walk [tx]
+    (let [{metadata :arb/metadata, nodes :arb/value} tx]
+      (clojure.pprint/pprint {:metadata metadata, :nodes nodes})
+      (wrap-node
+       metadata
+       (apply vector (for [node nodes]
+                       (if (:content/text node)
+                         (process-node node)
+                         (walk node))))))))
+
+(defn tx->arb [tx]
+  (let [process-node #(:content/text %)
+        wrap-node    #(vec
+                       (concat
+                        [:arb {:original-tag (get-in-metadata :metadata/html-tag %1)}]
+                        %2))
+        convert      (walk-tx-fn wrap-node process-node)]
+    (convert tx)))
+
+(defn tx->html [tx]
+  (-> tx (tx->arb) (arb->hiccup) (html)))

 (defn hiccup->arb [hiccup]
   (let [[tag attrs & value] hiccup]


Define color-modes as a var, not a function.

Otherwise passing a mode key to color-mode doesn't work.

--- src/quil/core.clj
+++ src/quil/core.clj
@@ -792,7 +792,7 @@
   ([r g b] (.color *applet* (float r) (float g) (float b)))
   ([r g b a] (.color *applet* (float r) (float g) (float b) (float a))))

-(defn ^{:private true}
+(def ^{:private true}
   color-modes {:rgb RGB
                :hsb HSB})


add app-state

add app-state

--- src/edge/main.cljs
+++ src/edge/main.cljs
@@ -6,8 +6,44 @@
    [om.dom :as dom]
    [goog.dom :as gdom]))

+(def app-state
+  (atom {:app/title "The title"
+         :app/description "Welcome to Om Next"
+         :garments/by-id
+         {"nct_sandbox_dress_37_7cpxa7" {:name "Dress"
+                                         :colour "Yellow"
+                                         :description "A nice dress"}
+          "nct_sandbox_jacket_4_btcjsf" {:name "Jacket"
+                                         :colour "Blue"
+                                         :description "Very fetching"}
+          "nct_sandbox_trousers_2_5bahk2" {:name "Trousers"
+                                           :colour "Brown"
+                                           :description "What's more to say?"}}}))
+
+(defui RootView
+  static om/IQuery
+  (query [this] [:app/title :app/description])
+  Object
+  (render [this] (dom/div nil
+                          (dom/h2 nil (:app/title (om/props this)))
+                          (dom/p nil (:app/description (om/props this))))))
+
+(defmulti read om/dispatch)
+(defmulti mutate om/dispatch)
+
+(defmethod read :default [env k params]
+  {:value (-> env :state deref k)}
+)
+
 (defn init []
   (enable-console-print!)
+
+  (om/add-root! (om/reconciler {:state app-state
+                                :parser (om/parser {:read read
+                                                    })
+
+                                })
+                RootView
+                (.getElementById js/document "app"))
+
   (println "Congratulations - your environment seems to be working"))
-
-


Stash untested query compiler

Stash untested query compiler

--- src/aurora/language.cljs
+++ src/aurora/language.cljs
@@ -440,13 +440,13 @@
 (deffact Let "Let [name] be the result of [vars] [expr]")
 (deffact When "When [vars] [expr]")

-(defn recall->node [plan {:keys [memory pattern]}]
+(defn recall->nodes [plan {:keys [memory pattern]}]
   (let [[plan node] (add-flow plan (FilterMap. (memory->nodes memory) (pattern->deconstructor pattern)))]
-    [plan node (pattern->vars pattern)]))
+    [plan [node] (pattern->vars pattern)]))

 ;; if clause can be calculated somehow then return a new [plan node vars] pair that calculates it
 ;; TODO make this extensible
-(defn compute->node [plan node vars {:keys [pattern]}]
+(defn compute->nodes [plan nodes vars {:keys [pattern]}]
   (condp = (.-shape pattern)
     Let (when (every? (set vars) (:vars pattern))
           (let [let-fun (expr->fun vars (:expr pattern))
@@ -455,56 +455,77 @@
                                        new-values (aclone (.-values fact))]
                                    (apush new-values new-value)
                                    (Fact. nil new-values)))
-                [plan node] (add-flow plan (->FilterMap [node] filter-map-fun))]
-            [plan node (conj vars (:name pattern))]))
+                [plan node] (add-flow plan (->FilterMap nodes filter-map-fun))]
+            [plan [node] (conj vars (:name pattern))]))
     When (when (every? (set vars) (:vars pattern))
            (let [when-fun (expr->fun vars (:expr pattern))
                  filter-map-fun (fn [fact]
                                   (when (.apply when-fun (.-values fact))
                                     fact))
-                 [plan node] (add-flow plan (->FilterMap [node] filter-map-fun))]
-             [plan node vars]))))
-
-(defn computes->node [plan node vars computes]
-  (let [orig-node node] ;; too much shadowing :S
-    (loop [plan plan
-           node node
+                 [plan node] (add-flow plan (->FilterMap nodes filter-map-fun))]
+             [plan [node] vars]))))
+
+(defn computes->nodes [plan nodes vars computes]
+    (loop [orig-nodes nodes
+           plan plan
+           nodes nodes
            vars vars
            computes-remaining computes
+           computes-applied computes-applied
            computes-unapplied []]
       (if-let [[compute & computes-remaining] (seq computes-remaining)]
-        (if-let [[new-plan new-node new-vars] (compute->node plan node vars compute)]
-          (recur new-plan new-node new-vars computes-remaining computes-unapplied)
-          (recur plan node vars computes-remaining (conj computes-unapplied compute)))
-        (if (= node orig-node)
-          [plan node vars computes-unapplied]
-          (computes? plan node vars computes-unapplied))))))
-
-(defn output->node [plan node vars {:keys [memory pattern]}]
+        (if-let [[new-plan new-nodes new-vars] (compute->nodess plan nodes vars compute)]
+          (recur orig-nodes new-plan new-nodes new-vars computes-remaining (conj computes-applied compute) computes-unapplied)
+          (recur orig-nodes plan nodes vars computes-remaining computes-applied (conj computes-unapplied compute)))
+        (if (= nodes orig-nodes)
+          [plan nodes vars (set computes-applied)]
+          (recur nodes plan nodes vars computes-unapplied computes-applied [])))))
+
+(defn output->nodes [plan nodes vars {:keys [memory pattern]}]
   (assert (every? (set vars) (pattern->vars pattern)))
-  (let [[plan output-node] (add-flow plan (FilterMap. [node] (pattern->constructor pattern)))
+  (let [[plan output-node] (add-flow plan (FilterMap. nodes (pattern->constructor pattern)))
         plan (add-output plan output-node memory)]
     plan))

+(defn join->nodes [plan nodes-a vars-a computes-applied-a nodes-b vars-b computes-applied-b]
+  (let [key-vars (intersection (set vars-a) (set vars-b))
+        val-vars (union (set vars-a) (set vars-b))
+        key-ixes-a (ixes-of vars-a key-vars)
+        key-ixes-b (ixes-of vars-b key-vars)
+        val-ixes-a (ixes-of (concat vars-a vars-b) val-vars)
+        val-ixes-b (ixes-of (concat vars-b vars-a) val-vars)
+        [plan index-a] (add-flow plan (->Index nodes-a key-ixes-a))
+        [plan index-b] (add-flow plan (->Index nodes-b key-ixes-b))
+        [plan lookup-a] (add-flow plan (->Lookup [index-a] index-b key-ixes-a val-ixes-a))
+        [plan lookup-b] (add-flow plan (->Lookup [index-b] index-a key-ixes-b val-ixes-b))]
+    [plan [lookup-a lookup-b] (distinct (concat vars-a vars-b)) (union computes-applied-a computes-applied-b)]))

 ;; RULES

 (defrecord Rule [clauses])
-
-;; turn all Recalls into nodes
-;; try to apply computes
-;; loop
-  ;; join two nodes
-  ;; try to apply computes
-;; filter down vars?

 ;; Correctness: Each clause must appear at least once in the plan
 ;; Heuristic: Each Recall clause is used at most once in the plan
 ;; Heuristic: Each Filter/Let clause is used at most once per path in the plan

-
 (defn rule->flow-plan [rule]
   (let [recalls (filter #(= Recall (type %)) (:clauses rule))
-        computes (filter #(= Compute (type %)) (:clauses rule))
+        computes (set (filter #(= Compute (type %)) (:clauses rule)))
         outputs (filter #(= Output (type %)) (:clauses rule))
-        node->remaining-computes ()]))
+        main-plan (atom empty-flow-plan)
+        nodes&vars&computes-applied (for [recall recalls]
+                                      (let [plan @main-plan
+                                            [plan node vars] (recall->nodes plan recall)
+                                            [plan node vars computes-applied] (computes->nodes plan node vars computes)]
+                                        (swap! main-plan plan)
+                                        [node vars computes-applied]))
+        [nodes vars computes-applied] (reduce (fn [[nodes-a vars-a computes-applied-a] [nodes-b vars-b computes-applied-b]]
+                                               (let [plan @main-plan
+                                                     [plan nodes vars computes-applied-old] (join->nodes plan nodes-a vars-a computes-applied-a nodes-b vars-b computes-applied-b)
+                                                     [plan nodes vars computes-applied-new] (computes->nodes plan nodes vars (difference computes computes-applied-old))]
+                                                 (swap! main-plan plan)
+                                                 [nodes vars (union computes-applied-old computes-applied-new)]))
+                                              nodes&vars&computes-applied)]
+    (assert (= computes-applied (set computes)) (str "Could not apply " (pr-str (difference (set computes) computes-applied))))
+    (doseq [output outputs]
+      (swap! main-plan (output->nodes @main-plan nodes vars output)))))


cleanup

cleanup

--- src/babel/lexiconfn.cljc
+++ src/babel/lexiconfn.cljc
@@ -8,7 +8,6 @@
                       subcat0 subcat1
                       transitive-but-object-cat-not-set
                       verb-subjective]]
-   [clojure.java.io :refer [reader]]
    [clojure.set :as set]
    #?(:clj [clojure.tools.logging :as log])
    #?(:cljs [babel.logjs :as log])


Add sync colors, shift-tap support.

Add sync colors, shift-tap support.

--- src/afterglow/controllers/launchpad_pro.clj
+++ src/afterglow/controllers/launchpad_pro.clj
@@ -84,6 +84,22 @@
 (def stop-active-color
   "The color of the stop button when active."
   (colors/create-color :red))
+
+(def click-unsynced-beat-color
+  "The color of the tap tempo button when a beat is taking place."
+  (colors/create-color :blue))
+
+(def click-unsynced-off-beat-color
+  "The color of the tap tempo button when a beat is not taking place."
+  (colors/darken click-unsynced-beat-color 45))
+
+(def click-synced-beat-color
+  "The color of the tap tempo button when a beat is taking place."
+  (colors/create-color :green))
+
+(def click-synced-off-beat-color
+  "The color of the tap tempo button when a beat is not taking place."
+  (colors/darken click-synced-beat-color 45))

 (defn led-color-values
   "Given a color, return the values that should be sent in a Sysex
@@ -280,6 +296,18 @@
   (when (not= marker @(:last-marker controller))
     (reset! (:last-marker controller) marker)))

+(defn- metronome-sync-colors
+  "Determine the colors to light the tap tempo button. Returns a tuple
+  of the off-beat and on-beat colors based on the current sync
+  status."
+  [controller]
+  (with-show (:show controller)
+    (if (= (:type (show/sync-status)) :manual)
+      [click-unsynced-off-beat-color click-unsynced-beat-color]
+      (if (:current (show/sync-status))
+        [click-synced-off-beat-color click-synced-beat-color]
+        [stop-available-color stop-active-color]))))
+
 (defn- update-interface
   "Determine the desired current state of the interface, and send any
   changes needed to get it to that state."
@@ -302,11 +330,12 @@

     ;; Flash the tap tempo button on beats
     (let [metronome (:metronome (:show controller))
-          marker (rhythm/metro-marker metronome)]
+          marker (rhythm/metro-marker metronome)
+          colors (metronome-sync-colors controller)]
       (swap! (:next-text-buttons controller)
              assoc (:tap-tempo control-buttons)
              (if (or (new-beat? controller marker) (< (rhythm/metro-beat-phase metronome) 0.15))
-               button-active-color button-available-color)))
+               (second colors) (first colors))))

     ;; Make the User button bright, since we live in User mode
     (swap! (:next-text-buttons controller)
@@ -332,17 +361,30 @@
 (defn- interpret-tempo-tap
   "React appropriately to a tempo tap, based on the sync mode of the
   show metronome. If it is manual, invoke the metronome tap-tempo
-  handler. If MIDI, align the current beat to the tap. If DJ Link, set
-  the current beat to be a down beat (first beat of a bar)."
+  handler. If MIDI, align the current beat to the tap. If DJ Link or
+  Traktor Beat phase (so beats are already automatically aligned), set
+  the current beat to be a down beat (first beat of a bar). If the
+  shift key is held down, synchronize at the next higher level."
   [controller]
   (with-show (:show controller)
-    (let [metronome (get-in controller [:show :metronome])]
-      (case (:level (show/sync-status))
-        nil ((:tap-tempo-handler controller))
-        :bpm (rhythm/metro-beat-phase metronome 0)
+    (let [metronome  (get-in controller [:show :metronome])
+          base-level (:level (show/sync-status))
+          level      (if @(:shift-mode controller)
+                       (case base-level
+                         nil   :bpm
+                         :bpm  :beat
+                         :beat :bar
+                         :bar  :phrase
+                         base-level)
+                       base-level)]
+      (case level
+        nil   ((:tap-tempo-handler controller))
+        :bpm  (rhythm/metro-beat-phase metronome 0)
         :beat (rhythm/metro-bar-start metronome (rhythm/metro-bar metronome))
-        :bar (rhythm/metro-phrase-start metronome (rhythm/metro-bar metronome))
-        (warn "Don't know how to tap tempo for sync type" (show/sync-status))))))
+        :bar  (rhythm/metro-phrase-start metronome (rhythm/metro-phrase metronome))
+        (warn "Don't know how to tap tempo for sync type" level)))))
+
+

 (defn- leave-user-mode
   "The user has asked to exit user mode, so suspend our display


Generates templates in a new directory (Fixes #1)

--- src/essay/core.clj
+++ src/essay/core.clj
@@ -10,28 +10,33 @@
 (def help "Essay --- The *essay-est* way of documenting your project.

 Usage:
-  essay new [template]
+  essay new <project-name> [--template=NAME]
   essay generate
   essay -h | --help
   essay --version

 Options:
-  -h --help     Shows this screen.
-  --version     Shows the version number.")
+  --template=NAME       The name of the template [default: default]
+  -h --help             Shows this screen.
+  --version             Shows the version number.")

+
+(defn- fatal [& messages]
+  (apply println (concat ["Fatal error:"] messages))
+  (System/exit 1))

 (defn- show-help? [args]
   (or (nil? args)
       (args "--help")))

-(defn initialise [template]
+(defn initialise [target template]
   (let [root-dir (jio/resource (str "templates/" template))]
-    (println "Copying template files...")
-    (doseq [node (fs/list-dir root-dir)]
-      (let [source (fs/file root-dir node)]
-        (if (fs/directory? source)  (fs/copy-dir source ".")
-            (fs/copy source node))))
-    (println "Files copied. Edit `project.edn` and run `essay generate`.")))
+    (if (or (not root-dir) (not (fs/exists? root-dir)))  (fatal "Unknown template" template)
+        (do
+          (println "Using template" template)
+          (fs/copy-dir root-dir target)
+          (println "Project initialised at " (str (fs/normalized-path target)))
+          (println "Done. Take a look at `project.edn` and run `essay generate`.")))))

 (defn generate []
@@ -54,5 +59,5 @@
     (cond
      (show-help? arg-map)       (println help)
      (arg-map "--version")      (println "Essay 0.1.0")
-     (arg-map "new")            (initialise (or (arg-map "template") "default"))
+     (arg-map "new")            (initialise (arg-map "<project-name>") (arg-map "--template"))
      (arg-map "generate")       (generate))))


[core] Add 'merge-my-data fn.

[core] Add 'merge-my-data fn.

merge-my-data handles updates to the local :data, updating 'state and bumping
the local :version accordingly.

--- src/birdie_tell/core.clj
+++ src/birdie_tell/core.clj
@@ -76,6 +76,23 @@
   [host port]
   (str host ":" port))

+(defn- merge-my-data
+  "Take my state map and 'new-data.
+
+  If 'new-data is equal to my state :data, return the state
+  unchanged.
+
+  If 'new-data is different than my current :data, assoc the new
+  :data, 'inc my :version, and return the new state."
+  [current-state new-data]
+  (let [my-path [:peers :identified (:uuid current-state)]
+        my-state (get-in current-state my-path)]
+    (if (= (:data my-state) new-data)
+      current-state
+      (assoc-in current-state
+                my-path
+                (merge my-state {:data new-data :version (inc (:version my-state))})))))
+
 (defn- update-peer!
   "Update a peer's state in the specified 'peers atom.


Fix bug - missing arg for first node - eid

--- services/tnseq-phase0-d.clj
+++ services/tnseq-phase0-d.clj
@@ -3,7 +3,8 @@
  :path "",

  :graph {:coll {:type "func"
-                :name "collapser"}
+                :name "collapser"
+                :args ["#1"]}
          :mail {:type "func"
                 :name "mailit"
                 :args ["#2"         ; recipient


Get access to photo directory (and base directory) within extractPathInfo()

--- src/h5gal/core.clj
+++ src/h5gal/core.clj
@@ -7,7 +7,7 @@
 (import '(java.text DateFormat))
 (require 'digest)

-(defn dataDir "data")
+(def dataDir "data")

 (defn formatLocalDate [localDate]
   (. (. DateFormat getDateInstance (. DateFormat MEDIUM ) (Locale. "en-gb")) format (. localDate toDate) )
@@ -26,39 +26,38 @@
               ))
   )

-(defn extractPathInfo [relativePath fullPath]
-  (let [matches (re-matches #"^([0-9]{4})\/([0-9]{2})\/([0-9]{2})\/?(.*)?" relativePath)]
+(defn walked [baseDir leafDir]
+  {:b baseDir :l leafDir}
+  )
+
+(defn extractPathInfo [baseDir leafDir]
+  (let
+    [ relativePath (subs (.getAbsolutePath leafDir) (+ (count (.getAbsolutePath baseDir)) 1))
+      matches (re-matches #"^([0-9]{4})\/([0-9]{2})\/([0-9]{2})\/?(.*)?" relativePath)
+      localDate (if matches (local-date (Integer. (matches 1)) (Integer. (matches 2)) (Integer. (matches 3))) nil)
+      dateTime (if matches (date-time (Integer. (matches 1)) (Integer. (matches 2)) (Integer. (matches 3))))
+      ]
     (if matches
-      (let [
-            localDate (local-date (Integer. (matches 1)) (Integer. (matches 2)) (Integer. (matches 3)))
-            dateTime (date-time (Integer. (matches 1)) (Integer. (matches 2)) (Integer. (matches 3)))
-            ]
-        (conj {
-               :dateInst localDate
-               :dateComm (clojure.string/join "/" [(matches 1) (matches 2) (matches 3)])
-               :dateDisp (formatLocalDate localDate)
-               :id (digest/md5 relativePath)
-               }
-              (if (> (count (matches 4)) 0)
-                {:title (matches 4)  :subtitle (formatLocalDate localDate)}
-                {:title (formatLocalDate localDate)}
-                )
+      (conj {
+             :dateInst localDate
+             :dateComm (clojure.string/join "-" [(matches 1) (matches 2) (matches 3)])
+             :dateDisp (formatLocalDate localDate)
+             :id (digest/md5 relativePath)
+             }
+            (if (> (count (matches 4)) 0)
+              {:title (matches 4)  :subtitle (formatLocalDate localDate)}
+              {:title (formatLocalDate localDate)}
               )
-        )
+            )
       nil
       )
     )
   )

-(extractPathInfo "2012/11/25/Christmas")
-(extractPathInfo "2012/11/25")
+(extractPathInfo (file "data") (file "data/2012/11/25/Christmas"))
+(extractPathInfo (file "data") (file "data/2012/11/25"))

-(defn relativePaths [path]
-  (map #(subs (.getAbsolutePath %) (+ (count (.getAbsolutePath (file path))) 1)) (walk path ))
-  )
-
-
-(remove nil? (map extractPathInfo (relativePaths dataDir)))
+(remove nil? (map (partial extractPathInfo (file dataDir)) (walk dataDir)))


Add a notification that the indexes migration may be slow

--- src/com/puppetlabs/puppetdb/scf/migrate.clj
+++ src/com/puppetlabs/puppetdb/scf/migrate.clj
@@ -152,6 +152,7 @@
     * catalog_resources USING (type,title)
     * catalog_resources USING gin(tags) [only when using postgres]"
   []
+  (log/warn "Adding additional indexes; this may take several minutes, depending on the size of your database. Trust us, it will all be worth it in the end.")
   (sql/do-commands
     "CREATE INDEX idx_catalog_resources_catalog ON catalog_resources(catalog)"
     "CREATE INDEX idx_catalog_resources_type_title ON catalog_resources(type,title)")


add source map link if user specifies :source-map

--- src/clj/cljs/closure.clj
+++ src/clj/cljs/closure.clj
@@ -926,6 +926,11 @@
    (str ";(function(){\n" js "\n})();\n")
    js))

+(defn add-source-map-link [{:keys [source-map] :as opts} js]
+  (if source-map
+    (str js "\n//@ sourceMappingURL=" source-map ".merged")
+    js))
+
 (defn build
   "Given a source which can be compiled, produce runnable JavaScript."
   [source opts]
@@ -958,6 +963,7 @@
                (apply optimize all-opts)
                (add-header all-opts)
                (add-wrapper all-opts)
+               (add-source-map-link all-opts)
                (output-one-file all-opts))
           (apply output-unoptimized all-opts js-sources))))))


Fix typos in devcard descriptions

Fix typos in devcard descriptions

--- src/devcards/audio_utils/devcards/gate.cljs
+++ src/devcards/audio_utils/devcards/gate.cljs
@@ -183,8 +183,8 @@
    Compared to the example without look-ahead, this configuration
    clearly shows how the rise in volume is captured instead of being
    cut off. A minor trade-off that becomes apparent at the same time
-   is that a small window of samples below the threshold also make it
-   through the gate."
+   is that a small window of samples below the threshold also makes
+   it through the gate."
   (fn [state owner]
     (gate-test state))
   {:worker  "gate-3.js"
@@ -204,8 +204,8 @@
    Compared to the example without look-ahead, this configuration
    clearly shows how the rise in volume is captured instead of being
    cut off. A minor trade-off that becomes apparent at the same time
-   is that a small window of samples below the threshold also make it
-   through the gate."
+   is that a small window of samples below the threshold also makes
+   it through the gate."
   (fn [state owner]
     (gate-test state))
   {:worker  "gate-3.js"


standartize api -> support config since 1.30 API #180

--- src/clj/swarmpit/api.clj
+++ src/clj/swarmpit/api.clj
@@ -2,6 +2,7 @@
   (:require [clojure.set :refer [rename-keys]]
             [buddy.hashers :as hashers]
             [digest :refer [digest]]
+            [swarmpit.version :refer [version]]
             [swarmpit.utils :refer [merge-data]]
             [swarmpit.docker.client :as dc]
             [swarmpit.docker.log :as dl]
@@ -471,22 +472,32 @@
          (dmo/->service service)
          (dc/create-service auth-config))))

+(defn- standardize-service-configs
+  [service]
+  (if (<= 1.30 (get-in version [:docker :api]))
+    (assoc-in service [:configs] (dmo/->service-configs service (configs)))
+    service))
+
+(defn- standardize-service-secrets
+  [service]
+  (assoc-in service [:secrets] (dmo/->service-secrets service (secrets))))
+
 (defn- standardize-service
   ([service]
    (-> service
-       (assoc-in [:secrets] (dmo/->service-secrets service (secrets)))
-       (assoc-in [:configs] (dmo/->service-configs service (configs)))
+       (standardize-service-secrets)
+       (standardize-service-configs)
        (assoc-in [:repository :imageId] (service-image-id service false))))
   ([service force?]
    (if force?
      (-> service
-         (assoc-in [:secrets] (dmo/->service-secrets service (secrets)))
-         (assoc-in [:configs] (dmo/->service-configs service (configs)))
+         (standardize-service-secrets)
+         (standardize-service-configs)
          (assoc-in [:repository :imageId] (service-image-id service true))
          (update-in [:deployment :forceUpdate] inc))
      (-> service
-         (assoc-in [:secrets] (dmo/->service-secrets service (secrets)))
-         (assoc-in [:configs] (dmo/->service-configs service (configs)))))))
+         (standardize-service-secrets)
+         (standardize-service-configs)))))

 (defn create-service
   [service]


cleaunp ns

cleaunp ns

--- src/clj/swarmpit/api.clj
+++ src/clj/swarmpit/api.clj
@@ -1,6 +1,5 @@
 (ns swarmpit.api
-  (:require [clojure.core.memoize :as memo]
-            [clojure.set :refer [rename-keys]]
+  (:require [clojure.set :refer [rename-keys]]
             [buddy.hashers :as hashers]
             [digest :refer [digest]]
             [swarmpit.docker.client :as dc]


Kind of sidestepping the issue by resolving the type first - hints at all coercion logic should happen after this has been done.

--- src/cljs/go/compiler.clj
+++ src/cljs/go/compiler.clj
@@ -795,7 +795,9 @@
        (emits f (when coerce? ".(CljsCoreIFn)") ".X_invoke_Arity" arity "(" (comma-sep args) ")"))

       ;; this is somewhat optimistic, the analyzer tags the expression based on the body of the fn, not the actual return type.
-      (when-not (or native? has-primitives? (= :statement (:context env)) (= (:tag expr) (-> f :info :ret-tag)))
+      (when-not (or native? has-primitives?
+                    (= :statement (:context env))
+                    (= "interface{}" (-> expr :tag go-type)))
         (emits (go-unbox-no-emit (:tag expr) nil))))))

 (defn normalize-goog-ctor [ctor]


Emitting in a different style.

Emitting in a different style.

--- src/cljs/go/compiler.clj
+++ src/cljs/go/compiler.clj
@@ -585,7 +585,7 @@
       (when loop-locals
         (when (= :return (:context env))
           (emits "return "))
-        (emitln "func (" (comma-sep (map munge loop-locals)) " *AFn){")
+        (emitln "func (" (comma-sep (map munge loop-locals)) ") *AFn {")
         (when-not (= :return (:context env))
           (emits "return ")))
       (let [name (or name (gensym))
@@ -599,16 +599,16 @@
             ms (sort-by #(-> % second :params count) (seq mmap))]
         (when (= :return (:context env))
           (emits "return "))
-        (when (= :expr (:context env))
-          (emitln "func() *AFn {"))
-        (emitln "var " mname " *AFn")
-        (emits mname "= Fn(")
-        (doseq [[n meth] ms]
+        (emitln "func(" mname " *AFn) *AFn {")
+        (emits "return Fn(" mname ", ")
+        (loop [[meth & methods] methods]
           #_(emits "var " n " = ")
           (if (:variadic meth)
             (emit-variadic-fn-method meth)
             (emit-fn-method meth))
-          (emitln ","))
+          (when methods
+            (emitln ",")
+            (recur methods)))
         (emitln ").(*AFn)")
         #_ (emitln mname " = func(arguments ...interface{}) interface{} {" )
         #_(emitln mname " = func(" (comma-sep
@@ -646,9 +646,7 @@
             (if (:variadic meth)
               (emitln mname "_cljs__core__IFn___invoke__arity__variadic = " n "_cljs__core__IFn___invoke__arity__variadic")
               (emitln mname "_cljs__core__IFn___invoke__arity__" c " = " n))))
-        (when (= :expr (:context env))
-          (emitln "return " mname)
-          (emitln "}()")))
+        (emitln "}(&AFn{})"))
       (when loop-locals
         (emitln "}(" (comma-sep loop-locals) "))"))))
   (when (= '-main (:name name))


or-intro special fixed

or-intro special fixed

--- src/latte/prop.clj
+++ src/latte/prop.clj
@@ -382,16 +382,16 @@

 (defspecial or-intro-left%
   "Left introduction for disjunction, a special version of [[or-intro-left]]."
-  [def-env ctx left-type right-term]
-  (when-not (ty/proper-type? def-env ctx left-type)
+  [def-env ctx left-term right-type]
+  (when-not (ty/proper-type? def-env ctx right-type)
     (throw (ex-info "Not a type." {:special 'latte.prop/or-intro-left%
-                                   :term left-type})))
-  (let [[status right-type] (ty/type-of-term def-env ctx right-term)]
+                                   :term right-type})))
+  (let [[status left-type] (ty/type-of-term def-env ctx left-term)]
     (when (= status :ko)
       (throw (ex-info "Cannot type term." {:special 'latte.prop/or-intro-left%
-                                           :term right-term
-                                           :from right-type})))
-    [(list #'or-intro-left left-type right-type) right-term]))
+                                           :term left-term
+                                           :from left-type})))
+    [(list #'or-intro-left left-type right-type) left-term]))

 (defthm or-intro-right
   "Introduction rule for logical disjunction.
@@ -411,16 +411,16 @@

 (defspecial or-intro-right%
   "Right introduction for disjunction, a special version of [[or-intro-right]]."
-  [def-env ctx left-term right-type]
-  (when-not (ty/proper-type? def-env ctx right-type)
+  [def-env ctx left-type right-term]
+  (when-not (ty/proper-type? def-env ctx left-type)
     (throw (ex-info "Not a type." {:special 'latte.prop/or-intro-right%
-                                   :term right-type})))
-  (let [[status left-type] (ty/type-of-term def-env ctx left-term)]
+                                   :term left-type})))
+  (let [[status right-type] (ty/type-of-term def-env ctx right-term)]
     (when (= status :ko)
       (throw (ex-info "Cannot type term." {:special 'latte.prop/or-intro-right%
-                                           :term left-term
-                                           :from left-type})))
-    [(list #'or-intro-right left-type right-type) left-term]))
+                                           :term right-term
+                                           :from right-type})))
+    [(list #'or-intro-right left-type right-type) right-term]))

 (defthm or-elim
   "Elimination rule for logical disjunction.


tofix

tofix

--- src/latte/prop.clj
+++ src/latte/prop.clj
@@ -542,10 +542,12 @@
               :by (or-intro-right (or A B) H5)))
       (have <d> _
             :by (or-elim H3 (or (or A B) C)
-                          <b> <c>)))
+                         <b> <c>)))
     (have <e> _
           :by (or-elim H1 (or (or A B) C)
                         <a> <d>)))
+  [:print '<e> {}]
+  [:print-type '<e> {}]
   (qed <e>))

 (defimplicit or-assoc


Made one of the prints more clear

Made one of the prints more clear

--- src/mafia_votecount/scraper/team_liquid.clj
+++ src/mafia_votecount/scraper/team_liquid.clj
@@ -265,5 +265,5 @@

 (defn scan-all-votes-after [url hosts first-index cycle-number cycle-type]
   (let [player-message-maps (get-player-message-maps url first-index)
-        nothing (println url hosts first-index cycle-number cycle-type)]
+        nothing (println "Called scan-all-votes-after:" url hosts first-index cycle-number cycle-type)]
     (scan-votes player-message-maps hosts first-index cycle-number cycle-type)))


Fix indentation :unamused:

Fix indentation :unamused:


actually properly check if native-scsynth libs are available!!

--- src/overtone/sc/machinery/server/native.clj
+++ src/overtone/sc/machinery/server/native.clj
@@ -11,8 +11,7 @@

 (defn native-scsynth-available? []
   (let [os-arc-path [(get-os) (get-cpu-bits)]]
-    (get-in native-scsynth-lib-availability os-arc-path))
-  false)
+    (get-in native-scsynth-lib-availability os-arc-path)))

 (declare world-options)
 (declare reply-callback)