Better incompatibility message.

Better incompatibility message.

--- src/onyx/peer/resume_point.clj
+++ src/onyx/peer/resume_point.clj
@@ -87,7 +87,7 @@
                   schema-version (cpenc/get-schema-version decoder)
                   metadata-bs (cpenc/get-metadata decoder)
                   _ (when-not (= schema-version cpenc/current-schema-version)
-                      (throw (ex-info "Incompatible schema for state checkpoint."
+                      (throw (ex-info "Incompatible schema for state checkpoint. Please rebuild the state as this migration is not supported."
                                       {:current cpenc/current-schema-version
                                        :retrieved schema-version})))
                   metadata (checkpoint-decompress metadata-bs)


Revert "Fixes #464 - flow conditions :flow/from -> :all didn't compile properly."

This reverts commit c4215838a288d19df5defd90ab518df19e3fa1f3.

--- src/onyx/peer/task_compile.clj
+++ src/onyx/peer/task_compile.clj
@@ -9,7 +9,7 @@
             [clj-tuple :as t]))

 (defn only-relevant-branches [flow task]
-  (filter #(or (= (:flow/from %) task) (= :all (:flow/from %))) flow))
+  (filter #(or (= (:flow/from %) task) (= :all %)) flow))

 (defn compile-flow-conditions [flow-conditions task-name f]
   (let [conditions (filter f (only-relevant-branches flow-conditions task-name))]


Better errors: re-order validation. Specific checks first

Results in better error messages

--- src/onyx/static/validation.clj
+++ src/onyx/static/validation.clj
@@ -46,8 +46,12 @@
   (doseq [entry catalog]
     (name-and-type-not-equal entry)
     (min-and-max-peers-sane entry)
-    (min-max-n-peers-mutually-exclusive entry))
-  (schema/validate Catalog catalog))
+    (min-max-n-peers-mutually-exclusive entry)
+    (try
+      (schema/validate TaskMap entry)
+      (catch Exception e
+        (throw (ex-info (format "Task %s failed validation %s" (:onyx/name entry) (task-map-schema-exception->help e))
+                        {:explanation (task-map-schema-exception->help e)}))))))

 (defn validate-workflow-names [{:keys [workflow catalog]}]
   (when-let [missing-names (->> workflow
@@ -141,9 +145,9 @@

 (defn validate-job
   [job]
-  (schema/validate Job job)
   (validate-catalog (:catalog job))
-  (validate-workflow job))
+  (validate-workflow job)
+  (schema/validate Job job))

 (defn validate-flow-pred-all-kws [flow-schema]
   (prewalk


Message queue: fix dry-run counter logic

--- src/taoensso/carmine/message_queue.clj
+++ src/taoensso/carmine/message_queue.clj
@@ -169,7 +169,9 @@
         redis.call('psetex', _:qk-eoq-backoff, _:eoq-backoff-ms, 'true')
         redis.call('incr', _:qk-ndry-runs)
         return 'eoq-backoff'
-      elseif redis.call('sismember', _:qk-recently-done, mid) == 1 then -- GC
+      end
+
+      if redis.call('sismember', _:qk-recently-done, mid) == 1 then -- GC
         redis.call('lrem', _:qk-mid-circle, 1, mid) -- Efficient here
         redis.call('srem', _:qk-recently-done, mid)
         redis.call('hdel', _:qk-messages,      mid)
@@ -177,10 +179,9 @@
         redis.call('hdel', _:qk-nretries,      mid)
         -- NB do NOT prune :qk_backoffs now, will be used post-handler as a
         -- dedupe backoff
+        redis.call('set', _:qk-ndry-runs, 0) -- Did work on this run
         return nil
       end
-
-      redis.call('set', _:qk-ndry-runs, 0)

       local now         = tonumber(_:now)
       local lock_exp    = tonumber(redis.call('hget', _:qk-locks,    mid) or 0)
@@ -201,6 +202,8 @@
       else
         retries = tonumber(redis.call('hget', _:qk-nretries, mid) or 0)
       end
+
+      redis.call('set', _:qk-ndry-runs, 0) -- Did work on this run

       local mcontent = redis.call('hget', _:qk-messages, mid)
       local attempts = retries + 1


fix issue with ICE ordering after rezzing one

--- src/node/game/core.cljs
+++ src/node/game/core.cljs
@@ -225,7 +225,7 @@
 (defn update! [state side card]
   (let [zone (cons side (:zone card))
         [head tail] (split-with #(not= (:cid %) (:cid card)) (get-in @state zone))]
-    (swap! state assoc-in zone (concat head [card] (rest tail)))))
+    (swap! state assoc-in zone (vec (concat head [card] (rest tail))))))

 (defn resolve-ability [state side {:keys [counter-cost cost effect msg req] :as ability}
                        {:keys [title cid counter] :as card}]


[EN CS] Remove unnecessary validations-db def

--- src/vip/data_processor/db/postgres.clj
+++ src/vip/data_processor/db/postgres.clj
@@ -21,7 +21,7 @@
                  :migrator "resources/migrations"}))

 (declare results-db results
-         validations-db validations
+         validations
          import-entities
          statistics)

@@ -31,12 +31,11 @@
   (let [opts (-> :postgres
                  config
                  (assoc :db (config :postgres :database)))]
-    (db/defdb results-db (db/postgres opts))
-    (db/defdb validations-db (db/postgres opts)))
+    (db/defdb results-db (db/postgres opts)))
   (korma/defentity results
     (korma/database results-db))
   (korma/defentity validations
-    (korma/database validations-db))
+    (korma/database results-db))
   (korma/defentity statistics
     (korma/database results-db))
   (def import-entities


Updated cider-nrepl version

Updated cider-nrepl version

--- web-app/project.clj
+++ web-app/project.clj
@@ -26,7 +26,7 @@
                                                                    ring/ring-core
                                                                    commons-fileupload
                                                                    clj-time]]
-                             [cider/cider-nrepl "0.14.0-SNAPSHOT" :exclusions [org.clojure/clojure
+                             [cider/cider-nrepl "0.15.0-SNAPSHOT" :exclusions [org.clojure/clojure
                                                                                org.clojure/tools.nrepl]]]}}

   :cljsbuild {:builds


stop sending original-e

stop sending original-e

--- src/pc/http/datomic.clj
+++ src/pc/http/datomic.clj
@@ -119,8 +119,6 @@
         v (if (contains? (schema/ident-ids) v)
             (schema/get-ident v)
             v)
-        ;; Temporary fix until we teach frontend how to lookup cust name
-        original-e e
         e (web-peer/client-id db e)]
     (->> {:e e :a a :v v :tx tx :added added}
       (translate-datom db))))


tests for ES http retries

tests for ES http retries

--- test/runbld/test/main_test.clj
+++ test/runbld/test/main_test.clj
@@ -1,22 +1,25 @@
 (ns runbld.test.main-test
-  (:require [schema.test :as s])
-  (:require [clj-git.core :refer [git-branch git-log load-repo]]
+  (:require [cheshire.core :as json]
+            [clj-git.core :refer [git-branch git-log load-repo]]
+            [clj-http.client :as http]
+            [clj-http.core :as http-core]
             [clojure.java.io :as jio]
             [clojure.test :refer :all]
             [clojure.walk :refer [keywordize-keys]]
             [runbld.build :as build]
+            [runbld.env :as env]
+            [runbld.io :as io]
             [runbld.notifications.email :as email]
             [runbld.notifications.slack :as slack]
-            [runbld.env :as env]
             [runbld.opts :as opts]
             [runbld.process :as proc]
             [runbld.store :as store]
-            [runbld.io :as io]
             [runbld.test.support :as ts]
+            [runbld.util.http :refer [wrap-retries]]
             [runbld.vcs.git :as git]
             [runbld.version :as version]
-            [stencil.core :as mustache]
-            [cheshire.core :as json])
+            [schema.test :as s]
+            [stencil.core :as mustache])
   (:require [runbld.main :as main] :reload-all))

 (def email (atom []))
@@ -263,6 +266,62 @@
               (testing "wiping the workspace"
                 (wipe-workspace-orig workspace)
                 ;; Should only have the top-level workspace dir left
-                (is (= [workspace] (map str (file-seq (jio/file workspace))))))))
+                (is (= [workspace]
+                       (map str (file-seq (jio/file workspace))))))))
           (finally
             (io/rmdir-r workspace)))))))
+
+(deftest http-retries
+  (let [call-count (atom 0)]
+    (with-redefs [http-core/http-client (fn [& _]
+                                          (swap! call-count inc)
+                                          (throw (Exception. "oh noes!")))
+                  email/send* (fn [& args]
+                                (swap! email concat args)
+                                ;; to satisfy schema
+                                {})
+                  slack/send (fn [opts ctx]
+                               (let [f (-> opts :slack :template)
+                                     tmpl (-> f io/resolve-resource slurp)
+                                     color (if (-> ctx :process :failed)
+                                             "danger"
+                                             "good")
+                                     js (mustache/render-string
+                                         tmpl (assoc ctx :color color))]
+                                 (reset! slack js)))]
+      (testing "The live path will retry correctly"
+        (is (thrown-with-msg? Exception #"oh noes"
+                              (git/with-tmp-repo [d "tmp/git/main-test-3"]
+                                ;; this call to run will fail b/c of
+                                ;; the redefined http-client call
+                                ;; above
+                                (run (conj ["-c" "test/config/main.yml"
+                                            "-j" "elastic+foo+master"
+                                            "-d" d]
+                                           "test/success.bash")))))
+        (is (= 20 @call-count)
+            "Should've retried the default number of times"))
+      (testing "Can configure the number of retries"
+        (reset! call-count 0)
+        (let [settings (merge
+                        (:es opts/config-file-defaults)
+                        {:url (str "http://" (java.util.UUID/randomUUID) ".io")
+                         :additional-middleware [wrap-retries]
+                         :retries-config {:sleep 50
+                                          :tries 5}})
+              conn (store/make-connection settings)]
+          (is (thrown-with-msg? Exception #"oh noes"
+                                (store/get conn "index" "type" 1234)))
+          (is (= 5 @call-count))))
+      (testing "Can configure the retried exceptions"
+        (reset! call-count 0)
+        (let [settings (merge
+                        (:es opts/config-file-defaults)
+                        {:url (str "http://" (java.util.UUID/randomUUID) ".io")
+                         :additional-middleware [wrap-retries]
+                         :retries-config {:sleep 50
+                                          :tries 5}})
+              conn (store/make-connection settings)]
+          (is (thrown-with-msg? Exception #"oh noes"
+                                (store/get conn "index" "type" 1234)))
+          (is (= 5 @call-count)))))))


Use system-specific assertion

Use system-specific assertion

--- test/runbld/test/opts_test.clj
+++ test/runbld/test/opts_test.clj
@@ -9,8 +9,9 @@
 (use-fixtures :once schema.test/validate-schemas)

 (deftest basic
-  (let [java-home (:home (java/jvm-facts))]
-    (is (= {:program (if (opts/windows?) "CMD.EXE" "zsh")
+  (let [java-home (:home (java/jvm-facts))
+        program (if (opts/windows?) "CMD.EXE" "zsh")]
+    (is (= {:program program
             :args (if (opts/windows?) ["/C"] ["-x"])
             :inherit-exit-code true
             :inherit-env false,
@@ -27,16 +28,17 @@
             (opts/parse-args ["-c" "test/config/opts.yml"
                               "-j" "test,foo,master"
                               "--java-home" java-home
-                              "-p" "zsh"
+                              "-p" program
                               "/path/to/script.zsh"]))))))

 (deftest profile1
-  (let [java-home (:home (java/jvm-facts))]
+  (let [java-home (:home (java/jvm-facts))
+        program (if (opts/windows?) "CMD.EXE" "zsh")]
     (is (= {:from "override@example.com"
             :to "override@example.com"}
            (-> ["-c" "test/config/opts.yml"
                 "-j" "test,foo,master"
-                "-p" "zsh"
+                "-p" program
                 "--java-home" java-home
                 "/path/to/script.zsh"]
                opts/parse-args


Added check for disabled users at login.

--- src/portal_clj/routes/home.clj
+++ src/portal_clj/routes/home.clj
@@ -44,13 +44,15 @@
   (let [params (get req :params)
         session (get req :session)]
     (let [user (-> (get params :email) db-user/get-by-email first)]
-      (if-not (= user nil)
-        (if (get user :admin)
-          (-> (assoc session :user (user :id))
-              (admin/home))
-          (-> (assoc session :user (user :id))
-              (user/home)))
-        (login {} "You either mistyped something or are not in our system.")))))
+      (if (= (get user :active) true)
+        (if-not (= user nil)
+          (if (get user :admin)
+            (-> (assoc session :user (user :id))
+                (admin/home))
+            (-> (assoc session :user (user :id))
+                (user/home)))
+          (login {} "You either mistyped something or are not in our system."))
+        (login {} "Your account is disabled. Please contact an administrator.")))))

 (defn search [req]
   (layout/common (base/search (get req :session) [])))


remove :proj from output

remove :proj from output

--- src/polismath/utils.clj
+++ src/polismath/utils.clj
@@ -69,17 +69,16 @@

 (defn prep-for-uploading-to-client [results]
-  (let [proj (get results :proj)
-        base-clusters (get results :base-clusters)]
+  (let [base-clusters (get results :base-clusters)]
     (snowball
       results
       [
         #(dissoc %1 :mat :rating-mat :opts') ;remove things we don't want to publish

         ; REFORMAT PROJECTION
-        #(dissoc %1 :proj) ; remove the original projection - we'll replace it
-        #(assoc-in %1 [:proj :x] (map first proj))  ; create an array of x values
-        #(assoc-in %1 [:proj :y] (map second proj)) ; create an array of y values
+        #(dissoc %1 :proj) ; remove the original projection - we'll
+                           ; provide buckets/base-clusters instead
+

         ; REFORMAT BASE CLUSTERS
         #(dissoc %1 :base-clusters)
@@ -93,6 +92,4 @@
         ; make the array position of each cluster imply the cluster id
         #(assoc %1 :repness (map :repness (sort-by :id (:repness %1))))

-
-
         ])))


Remove trailing white-space

Remove trailing white-space

--- test/clj/backtype/storm/utils_test.clj
+++ test/clj/backtype/storm/utils_test.clj
@@ -20,9 +20,9 @@
         retry (-> curator .getZookeeperClient .getRetryPolicy)
        ]
     (is (.isAssignableFrom ExponentialBackoffRetry (.getClass retry)))
-    (is (= (.getBaseSleepTimeMs retry) expected_interval))
-    (is (= (.getN retry) expected_retries))
-    (is (= (.getMaxRetryInterval retry) expected_ceiling))
+    (is (= (.getBaseSleepTimeMs retry) expected_interval))
+    (is (= (.getN retry) expected_retries))
+    (is (= (.getMaxRetryInterval retry) expected_ceiling))
     (is (= (.getSleepTimeMs retry 10 0) expected_ceiling))
   )
 )


Story ID: develop fixed bug in parallel load

--- src/untangled/client/impl/application.cljs
+++ src/untangled/client/impl/application.cljs
@@ -49,10 +49,10 @@
 (defn enqueue-reads [{:keys [queue reconciler networking]}]
   (let [parallel-payload (f/mark-parallel-loading reconciler)
         fetch-payload (f/mark-loading reconciler)]
-    (doseq [{:keys [query on-load on-error callback-args]} parallel-payload
-            on-load' (partial action-with-args on-load callback-args)
+    (doseq [{:keys [query on-load on-error callback-args]} parallel-payload]
+      (let [on-load' (partial action-with-args on-load callback-args)
             on-error' (partial action-with-args on-error callback-args)]
-      (real-send networking query on-load' on-error'))
+        (real-send networking query on-load' on-error')))
     (when fetch-payload
       (enqueue queue (assoc fetch-payload :networking networking)))))


Integrate achievement with dispatcher

Integrate achievement with dispatcher

--- src-clj/acha/dispatcher.clj
+++ src-clj/acha/dispatcher.clj
@@ -1,17 +1,35 @@
 (ns acha.dispatcher
   (:require
     [clojure.tools.logging :as logging]
+    [acha.achievement :as achievement]
     [acha.git-parser :as git-parser]))
+
+(defn- apply-achievement [scanner commit-info]
+  (try
+    (when-let [result (scanner commit-info)]
+
+      ;; store it to database
+     ;; (logging/info result)
+
+      )
+
+    (catch Exception e
+      (logging/error e "Error occured during achivement scan commit"))))
+
+(defn- analyze-commit [repo commit df]
+  (try
+    (let [commit-info (git-parser/commit-info repo commit df)]
+      (doseq [scanner achievement/all-commit-info-scanners]
+        (apply-achievement scanner commit-info)))
+    (catch Exception e
+      (logging/error e "Error occured during commit-info parsing" (.getName commit)))
+    (finally )))
+

 (defn analyze [url]
   (let [repo (git-parser/load-repo url)
         df (git-parser/diff-formatter repo)]
     (doseq [commit (git-parser/commit-list repo)]
-      (try
-        (let [commit-info (git-parser/commit-info repo commit df)]
-          (logging/info commit-info))
-        (catch Exception e
-          (logging/error e "Unable to parse commit"))
-        (finally
-          ;; mark this tweets as viewed
-          )))))
+      (analyze-commit repo commit df))))
+
+


add a helper for throwing errors

add a helper for throwing errors

--- src-cljs/frontend/core.cljs
+++ src-cljs/frontend/core.cljs
@@ -318,4 +318,7 @@
 (defn ^:export inspect-state []
   (clj->js @debug-state))

+(defn ^:export throw-error []
+  (throw (Exception. "This is an exception")))
+
 (defonce startup (setup!))


complete testing treat-possible-errors

complete testing treat-possible-errors

--- test/app/test/core.clj
+++ test/app/test/core.clj
@@ -54,14 +54,47 @@
     (verify-first-call-args-for println " [info] " "foo")))

 ; ============================================
+; ConflictingOptions
+; ============================================
+
+(deftest testConflictingOptions
+  (is (true? (conflicting-options?
+               {:query 'mc :linter true :interactive true})))
+  (is (true? (conflicting-options?
+               {:linter true :interactive true})))
+  (is (true? (conflicting-options?
+               {:query 'mc :linter true})))
+  (is (true? (conflicting-options?
+               {:query 'mc :interactive true})))
+  (is (false? (conflicting-options?
+                {:linter false :interactive true})))
+  (is (false? (conflicting-options? {:query 'mc})))
+  (is (false? (conflicting-options? {:linter true})))
+  (is (false? (conflicting-options? {:interactive true}))))
+
+; ============================================
 ; treat-possible-errors
 ; ============================================
+
+(deftest treat-possible-errors-when-everything-is-fine
+  (mocking [usageError exit-error!]
+    (treat-possible-errors {:errors nil} "my nice banner")
+    (verify-call-times-for usageError 0)
+    (verify-call-times-for exit-error! 0)))

 (deftest treat-possible-errors-when-errors-are-passed
   (mocking [usageError exit-error!]
     (treat-possible-errors {:errors ["bad1", "bad2"]} "my nice banner")
     (verify-call-times-for usageError 1)
     (verify-first-call-args-for usageError "my nice banner" {:errors ["bad1", "bad2"]} "")
+    (verify-call-times-for exit-error! 1)
+    (verify-first-call-args-for exit-error!)))
+
+(deftest treat-possible-errors-with-conflicting-options
+  (mocking [usageError exit-error!]
+    (treat-possible-errors {:linter true, :interactive true} "my nice banner")
+    (verify-call-times-for usageError 1)
+    (verify-first-call-args-for usageError "my nice banner"{:linter true, :interactive true} self-exclusive-modes-error)
     (verify-call-times-for exit-error! 1)
     (verify-first-call-args-for exit-error!)))

@@ -121,21 +154,6 @@
   (let [cl (parseType "ClassWithCallToFinalizeWithParams")]
     (is (false? (calls-finalizers? cl)))))

-(deftest testConflictingOptions
-  (is (true? (conflicting-options?
-              {:query 'mc :linter true :interactive true})))
-  (is (true? (conflicting-options?
-              {:linter true :interactive true})))
-  (is (true? (conflicting-options?
-              {:query 'mc :linter true})))
-  (is (true? (conflicting-options?
-              {:query 'mc :interactive true})))
-  (is (false? (conflicting-options?
-               {:linter false :interactive true})))
-  (is (false? (conflicting-options? {:query 'mc})))
-  (is (false? (conflicting-options? {:linter true})))
-  (is (false? (conflicting-options? {:interactive true}))))
-
 ; =============================================================
 ; Command parser
 ; =============================================================


[elasticsearch] Expose index on ElasticSearchDatabase

Fixes #44.

--- joplin.elasticsearch/src/joplin/elasticsearch/database.clj
+++ joplin.elasticsearch/src/joplin/elasticsearch/database.clj
@@ -205,7 +205,7 @@
 ;; ============================================================================
 ;; Ragtime interface

-(defrecord ElasticSearchDatabase [host port]
+(defrecord ElasticSearchDatabase [host port index]
   Migratable
   (add-migration-id [db id]
     (es-add-migration-id (client db) id))


fix some bugs in purui.clj

fix some bugs in purui.clj

--- src/Miscellaneous/purui.clj
+++ src/Miscellaneous/purui.clj
@@ -66,22 +66,33 @@
     (assoc entry col-key stuff)
   entry))

-(defn cp
-  [set1 set2 key1 key2]
+(defn cp2
+  [set1 set2 key1 key2 k-1 k-2]
   (let [c (fn [key s1 s2] (compare (key (first s1)) (key (first s2))))]
     (loop [s1 set1 s2 set2 col []]
       (let [e1 (first s1) e2 (first s2)]
             (if (or (nil? e1) (nil? e2))
               col
-              (cond (> (c key1 set1 set2) 0) (recur s1 (rest s2) col)
-                    (< (c key1 set1 set2) 0) (recur (rest s1) s2 col)
-                    (> (c key2 set1 set2) 0) (recur s1 (rest s2) col)
-                    (< (c key2 set1 set2) 0) (recur (rest s1) s2 col)
-                    (= (c key2 set1 set2) 0) (recur (rest s1) (rest s2) (conj col (into e1 e2)))))))))
-
-
-
-
+              (cond (> (c key1 s1 s2) 0) (recur s1 (rest s2) (conj col (assoc e2 k-1 0)))
+                    (< (c key1 s1 s2) 0) (recur (rest s1) s2 (conj col (assoc e1 k-2 0)))
+                    (> (c key2 s1 s2) 0) (recur s1 (rest s2) (conj col (assoc e2 k-1 0)))
+                    (< (c key2 s1 s2) 0) (recur (rest s1) s2 (conj col (assoc e1 k-2 0)))
+                    (= (c key2 s1 s2) 0) (recur (rest s1) (rest s2) (conj col (into e1 e2)))))))))
+
+(defn cp1
+  [set1 set2 key k-1 k-2]
+  (let [c (fn [key s1 s2] (compare (key (first s1)) (key (first s2))))]
+    (loop [s1 set1 s2 set2 col []]
+      (let [e1 (first s1) e2 (first s2)]
+            (if (or (nil? e1) (nil? e2))
+              col
+              (cond (> (c key s1 s2) 0) (recur s1 (rest s2) (conj col (assoc e2 k-1 0)))
+                    (< (c key s1 s2) 0) (recur (rest s1) s2 (conj col (assoc e1 k-2 0)))
+                    (= (c key s1 s2) 0) (recur (rest s1) (rest s2) (conj col (into e1 e2)))))))))
+
+
+
+(assoc {:a 1 :b 2} :c 3)

@@ -102,6 +113,9 @@
 (def query-7 "SELECT * FROM purui0208_2013_spam_dupliremov;")
 (def query-8 "SELECT brand,pubtime FROM purui0208_2013_spam;")
 (def query-9 "SELECT brand, pubtime FROM purui0214_2013_spam_dupliremov_media;")
+(def query-10 "SELECT origin FROM purui0208_2013_spam;")
+(def query-11 "SELECT origin FROM purui0214_2013_spam_dupliremov_media;")
+

 ;;;;;;;;;working area;;;;;;;
@@ -162,7 +176,7 @@
      (toCSV/toCSV2 [:word :nature :counts] address-1)
      )

-
+;merge time tendency of raw data and clean data
 (def set1
   (->> (jdbc/query db-spec2 [query-8])
        (map #(extract-date "pubtime" %))
@@ -187,13 +201,35 @@

-
-
-
-#_(->> (cp set1 set2 :brand :pubtime)
+(->> (cp2 set1 set2 :brand :pubtime :all-counts :unique-counts)
      (toCSV/toCSV2 [:brand :pubtime :all-counts :unique-counts] address-1)
      )

+;merge origin distribution of raw data and clean data
+
+(def set3
+  (->> (jdbc/query db-spec2 [query-10])
+       frequencies
+       (map #(assoc (first %) :all-counts (second %)))
+       (sort-by :origin)
+     ))
+
+set3
+
+(def set4
+  (->> (jdbc/query db-spec2 [query-11])
+       frequencies
+       (map #(assoc (first %) :unique-counts (second %)))
+       (sort-by :origin)
+     ))
+
+set4
+
+(->> (cp1 set3 set4 :origin :all-counts :unique-counts)
+     (sort #(> (:all-counts %1) (:all-counts %2)))
+     (toCSV/toCSV2 [:origin :all-counts :unique-counts] address-1)
+     )
+(cp1 set3 set4 :origin :all-counts :unique-counts)


Post to /wishlist/ to create new wishlists

--- src/wishlistd/views/routes.clj
+++ src/wishlistd/views/routes.clj
@@ -8,5 +8,5 @@
 (defpage "/wishlist/:code" {:keys [code]}
   (wishlist/get-wishlist-json code))

-(defpage "/create-wishlist" []
+(defpage [:post "/wishlist/"] []
   (wishlist/create-wishlist-json))


Nullpoga

Nullpoga

--- src/antlion_clojure/bot.clj
+++ src/antlion_clojure/bot.clj
@@ -478,7 +478,8 @@

 (defn- matched-response?
   [txt response]
-  (some #(clojure.string/includes? txt %) (:keywords response)))
+  (some->> (:keywords response)
+           (some #(clojure.string/includes? txt %))))

 (defn- registered-response-handler
   [{:keys [slack dynamodb res] :as opt} responses]


~(defn generate-for-verbcoach): rearrange the lets for clarity

--- src/babel/italiano/lab.cljc
+++ src/babel/italiano/lab.cljc
@@ -242,7 +242,9 @@
   "generate sentences efficiently given specific constraints."
   [& [spec]]

-  (let [basic-grammar
+  (let [example-verbs #{"arrabbiarsi" "chiamarsi" "dormire" "fermarsi" "parlare" "sedersi"}
+
+        basic-grammar
         #{"sentence-nonphrasal-head"}

         present-grammar
@@ -307,31 +309,24 @@

         ;; this is a lot like a lexical compilation default map.
         rule-matcher
-        {:top
-         basic-grammar
+        {:top basic-grammar

          ;; example of a specific root's influence on grammar to be
          ;; be used for generation.
-         {:root {:italiano {:italiano "chiamarsi"}}}
-         chiamarsi-grammar
+         {:root {:italiano {:italiano "chiamarsi"}}} chiamarsi-grammar

          {:synsem {:sem {:tense :present
-                         :aspect :perfect}}}
-         present-perfect-grammar
-
-         {:synsem {:sem {:tense :future}}}
-         future-grammar
-
-         {:synsem {:sem {:tense :conditional}}}
-         future-grammar
+                         :aspect :perfect}}} present-perfect-grammar
+
+         {:synsem {:sem {:tense :future}}} future-grammar
+
+         {:synsem {:sem {:tense :conditional}}} future-grammar

          {:synsem {:sem {:tense :past
-                         :aspect :progressive}}}
-         future-grammar
+                         :aspect :progressive}}} future-grammar

          {:synsem {:sem {:tense :present
-                         :aspect :simple}}}
-         present-grammar}
+                         :aspect :simple}}} present-grammar}

         rule-matcher-reducer
         (fn [input-spec]
@@ -372,9 +367,7 @@
                    spec))

                root-spec
-               (let [example-verbs #{"arrabbiarsi" "chiamarsi" "dormire" "fermarsi" "parlare" "sedersi"}
-
-                     unif
+               (let [unif
                      (unify spec
                             {:root {:italiano {:italiano
                                                (first (shuffle example-verbs))}}})]


[#2228] Add internal-api-headers function

--- backend/src/akvo/lumen/component/flow.clj
+++ backend/src/akvo/lumen/component/flow.clj
@@ -23,13 +23,19 @@
         :body
         :access_token)))

+(def commons-api-headers
+  {"User-Agent" "lumen"
+   "Accept" "application/vnd.akvo.flow.v2+json"})

 (defn api-headers
+  "JWT token required thus the call could be used externally"
   [token]
-  {"Authorization" (format "Bearer %s" token)
-   "User-Agent" "lumen"
-   "Accept" "application/vnd.akvo.flow.v2+json"})
+  (merge commons-api-headers {"Authorization" (format "Bearer %s" token)}))

+(defn internal-api-headers
+  "No authorization is required thus it's an internal owned k8s call"
+  [email]
+  (merge commons-api-headers {"X-Akvo-Email" email}))

 (defn check-permissions
   [flow-api token body]


making jail dynamic, adding ship

making jail dynamic, adding ship

--- cartagena-web/src/cartagena_web/core.cljs
+++ cartagena-web/src/cartagena_web/core.cljs
@@ -4,51 +4,78 @@

 (enable-console-print!)

-(println "Edits to this text should show up in your developer console.")
-
-;; define your app data so that it doesn't get over-written on reload
-
 (defonce app-state (atom nil))

 (defn to-scale [n]
   (* 1.5 n))

-(defn jail! []
+(defn static-board []
+  [;; playmat
+   [:rect {:x 0 :y 0 :width 1000 :height 750 :stroke "black" :stroke-width "1" :fill "tan"}]
+   ;; board
+   [:rect {:x 0 :y 0 :width (to-scale 500) :height (to-scale 400) :stroke "black" :stroke-width "0.5" :fill "burlywood"}]
+   ;; jail
+   [:rect {:x 0 :y 0 :width (to-scale 50) :height (to-scale 90) :stroke "black" :fill "darkgray"}]
+   [:text {:x 0 :y (to-scale 15) :style {:text-anchor "start" :stroke "none" :fill "black" :font-size "smaller"}} "jail"]
+   ;; ship
+   [:rect {:x (to-scale 410) :y (to-scale 250) :width (to-scale 90) :height (to-scale 50) :stroke "black" :fill "sienna"}]
+   [:text {:x (to-scale 410) :y (to-scale 260) :style {:text-anchor "start" :stroke "none" :fill "black" :font-size "smaller"}} "ship"]
+
+   [:circle {:cx (to-scale 455) :cy (to-scale 255) :r (to-scale 4) :fill "chartreuse"}]
+   [:circle {:cx (to-scale 455) :cy (to-scale 295) :r (to-scale 4) :fill "chartreuse"}]
+   [:circle {:cx (to-scale 465) :cy (to-scale 255) :r (to-scale 4) :fill "cyan"}]
+   [:circle {:cx (to-scale 475) :cy (to-scale 255) :r (to-scale 4) :fill "yellow"}]
+   [:circle {:cx (to-scale 485) :cy (to-scale 255) :r (to-scale 4) :fill "fuchsia"}]
+   [:circle {:cx (to-scale 495) :cy (to-scale 255) :r (to-scale 4) :fill "red"}]
+   ])
+
+(def good-example (into [:svg {:w 10 :h 8}]
+                        [[:circle {:x 1 :y 2}] [:circle {:x 2 :y 4}]]))
+
+(defn jail []
   (when-let [jail (get-in @app-state [:board 0])]
-    (println "The jail space contains:" jail)))
+    (apply concat
+           (let [pirate-frequencies (frequencies (:pirates jail))
+                 pirate-colors (vec (keys pirate-frequencies))]
+             (for [player-index (range (count pirate-frequencies))]
+               (let [pirate-color (get pirate-colors player-index)
+                     pirate-count (pirate-color pirate-frequencies)
+                     color-name (name pirate-color)
+                     x (to-scale (+ 5 (* 10 player-index)))]
+                 (for [pirate-index (range pirate-count)]
+                   (let [y (to-scale (+ 35 (* 10 pirate-index)))]
+                     [:circle {:cx x :cy y :r (to-scale 4) :fill color-name}]))))))))

-(defn main-view []
-  [:center
-   [:h1 "CARTAGENA"
-    [:div
-     [:svg
+(def rest-of-board
+  [:svg
       {:view-box "0 0 1000 750"
        :width 1000
        :height 750}
-      ;; play mat
-      [:rect {:x 0 :y 0 :width 1000 :height 750 :stroke "black" :stroke-width "1" :fill "tan"}]
-
-      ;; board
-      [:rect {:x 0 :y 0 :width (to-scale 500) :height (to-scale 400) :stroke "black" :stroke-width "0.5" :fill "burlywood"}]
-
-      ;; jail
-      (jail!)
-      [:rect {:x 0 :y 0 :width (to-scale 50) :height (to-scale 90) :stroke "black" :fill "darkgray"}]
-      [:text {:x 0 :y (to-scale 15) :style {:text-anchor "start" :stroke "none" :fill "black" :font-size "smaller"}} "jail"]

       ;; players in jail
-      [:circle {:cx (to-scale 5) :cy (to-scale 35) :r (to-scale 4) :fill "orange"}]
-      [:circle {:cx (to-scale 5) :cy (to-scale 45) :r (to-scale 4) :fill "orange"}]
-      [:circle {:cx (to-scale 15) :cy (to-scale 35) :r (to-scale 4) :fill "green"}]
-      [:circle {:cx (to-scale 15) :cy (to-scale 45) :r (to-scale 4) :fill "green"}]
-      [:circle {:cx (to-scale 15) :cy (to-scale 55) :r (to-scale 4) :fill "green"}]
-      [:circle {:cx (to-scale 15) :cy (to-scale 65) :r (to-scale 4) :fill "green"}]
-      [:circle {:cx (to-scale 15) :cy (to-scale 75) :r (to-scale 4) :fill "green"}]
-      [:circle {:cx (to-scale 15) :cy (to-scale 85) :r (to-scale 4) :fill "green"}]
-      [:circle {:cx (to-scale 25) :cy (to-scale 35) :r (to-scale 4) :fill "black"}]
-      [:circle {:cx (to-scale 25) :cy (to-scale 45) :r (to-scale 4) :fill "black"}]
-      [:circle {:cx (to-scale 25) :cy (to-scale 55) :r (to-scale 4) :fill "black"}]
-      [:circle {:cx (to-scale 25) :cy (to-scale 65) :r (to-scale 4) :fill "black"}]
+      (when-let [jail (get-in @app-state [:board 0])]
+        (let [pirate-frequencies (frequencies (:pirates jail))
+              pirate-colors (vec (keys pirate-frequencies))]
+          (for [player-index (range (count pirate-frequencies))]
+            (let [pirate-color (get pirate-colors player-index)
+                  pirate-count (pirate-color pirate-frequencies)
+                  color-name (name pirate-color)
+                  x (to-scale (+ 5 (* 10 player-index)))]
+              (for [pirate-index (range pirate-count)]
+                (let [y (to-scale (+ 35 (* 10 pirate-index)))]
+                  [:cirlce {:cx x :cy y :r (to-scale 4) :fill color-name}]))))))
+      ;[:circle {:cx (to-scale 5) :cy (to-scale 35) :r (to-scale 4) :fill "orange"}]
+      ;[:circle {:cx (to-scale 5) :cy (to-scale 45) :r (to-scale 4) :fill "orange"}]
+      ;[:circle {:cx (to-scale 15) :cy (to-scale 35) :r (to-scale 4) :fill "green"}]
+      ;[:circle {:cx (to-scale 15) :cy (to-scale 45) :r (to-scale 4) :fill "green"}]
+      ;[:circle {:cx (to-scale 15) :cy (to-scale 55) :r (to-scale 4) :fill "green"}]
+      ;[:circle {:cx (to-scale 15) :cy (to-scale 65) :r (to-scale 4) :fill "green"}]
+      ;[:circle {:cx (to-scale 15) :cy (to-scale 75) :r (to-scale 4) :fill "green"}]
+      ;[:circle {:cx (to-scale 15) :cy (to-scale 85) :r (to-scale 4) :fill "green"}]
+      ;[:circle {:cx (to-scale 25) :cy (to-scale 35) :r (to-scale 4) :fill "blue"}]
+      ;[:circle {:cx (to-scale 25) :cy (to-scale 45) :r (to-scale 4) :fill "blue"}]
+      ;[:circle {:cx (to-scale 25) :cy (to-scale 55) :r (to-scale 4) :fill "blue"}]
+      ;[:circle {:cx (to-scale 25) :cy (to-scale 65) :r (to-scale 4) :fill "blue"}]

       ;; space 1: bottle
@@ -82,7 +109,19 @@
       ;; space 6: skull
       [:rect {:x (to-scale 250) :y (to-scale 60) :width (to-scale 40) :height (to-scale 30) :stroke "black" :stroke-width "0.5" :fill "lightgray"}]
       [:text {:x (to-scale 250) :y (to-scale 75) :style {:text-anchor "start" :stroke "none" :fill "black" :font-size "small"}} "skull"]
-      ]]]])
+      ])
+
+(defn main-view []
+  [:center
+   [:h1 "CARTAGENA"
+    [:div
+     (-> [:svg
+          {:view-box "0 0 1000 750"
+           :width 1000
+           :height 750}]
+         (into (static-board))
+         (into (jail))
+         )]]])

 (defn on-error [{:keys [status status-text]}]
   (.log js/console (str "ERROR [" status "] " status-text)))


Allow combining conditions with "regular" exception objects.


Add hp and make minor adjustments

Add hp and make minor adjustments

--- src/main/cljc/clojure_club/rpg_spec/mgrimm.cljc
+++ src/main/cljc/clojure_club/rpg_spec/mgrimm.cljc
@@ -24,11 +24,16 @@

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

-(s/def ::1d6 (s/int-in 2 7))
+(def class-base-hp
+  {:barbarian 12 :bard 8 :cleric 8 :druid 8 :fighter 10
+   :monk 8 :paladin 10 :ranger 10 :rogue 8 :sorcerer 6 :wizard 6})
+
+(s/def ::1d6 (s/int-in 1 7))
 (s/def ::4d6 (s/tuple ::1d6 ::1d6 ::1d6 ::1d6))

-(s/def ::attribute (s/with-gen (s/int-in 8 25)
+(s/def ::attribute (s/with-gen (s/int-in 4 25)
                      #(s/gen (into #{} (r/map (partial r/fold +) (g/sample (s/gen ::4d6) 100))))))
+
 (s/def ::str ::attribute)
 (s/def ::dex ::attribute)
 (s/def ::int ::attribute)
@@ -38,22 +43,35 @@
 (s/def ::attributes (s/keys :req [::str ::dex ::int ::cha ::wis ::con]))

 (s/def ::name (s/with-gen string?
-                #(s/gen (into #{} (apply map (fn [p s] (str (name p) (name s))) (vals (rand-nth (seq names))))))))
+                #(s/gen (into #{} (apply map (fn [p s] (str (name p) (name s)))
+                                         (vals (rand-nth (seq names))))))))

 (s/def ::gender #{:male :female})
+
 (s/def ::race #{:dwarf :elf :gnome :half-elf :half-orc :halfling :human})
-(s/def ::class (s/coll-of #{:barbarian :bard :cleric :druid :fighter :monk :paladin :ranger :rogue :sorcerer :wizard}
+
+(s/def ::class (s/coll-of (into #{} (keys class-base-hp))
                           :min-count 1 :max-count 2 :distinct true :into #{}))
+
 (s/def ::alignment #{:lawful-good :lawful-neutral :lawful-evil
                      :neutral-good :true-neutral :neutral-evil
                      :chaotic-good :chaotic-neutral :chaotic-evil})
+
 (s/def ::level (s/with-gen (s/int-in 1 21) #(s/gen #{1})))

-(s/def ::character (s/keys :req [::name ::gender ::race ::class ::alignment ::level ::attributes]))
+(s/def ::hp (s/and integer? (some-fn zero? pos?)))
+
+(s/def ::character (s/keys :req [::name ::gender ::race ::class ::alignment
+                                 ::level ::attributes ::hp]))

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

+(defn one-sample [spec] (first (g/sample (s/gen spec) 100)))
+
 (defn create-character []
-  (first (g/sample (s/gen ::character) 100)))
+  (let [{cls ::class {con ::con} ::attributes :as ch} (one-sample ::character)
+        start-cls (first (seq cls))
+        hp (+ con (base-hp start-cls))]
+    (assoc ch ::hp hp)))

 #_(clojure.pprint/pprint (create-character))


CMR-3044: Removed comments from code

CMR-3044: Removed comments from code

--- message-queue-lib/src/cmr/message_queue/queue/sqs.clj
+++ message-queue-lib/src/cmr/message_queue/queue/sqs.clj
@@ -269,16 +269,16 @@

   (reset
      [this]
-     (let [sqs-client (:sqs-client this)]))
-      ;  (doseq [queue (:queues this)
-      ;          :let [queue-name (normalize-queue-name queue)
-      ;                dlq-name (dead-letter-queue queue-name)
-      ;                queue-url (.getQueueUrl (.getQueueUrl sqs-client queue-name))
-      ;                dlq-url (.getQueueUrl (.getQueueUrl sqs-client dlq-name))
-      ;                q-purge-req (PurgeQueueRequest. queue-url)
-      ;                dlq-purge-req (PurgeQueueRequest. dlq-url)]]
-      ;    (.purgeQueue sqs-client q-purge-req)
-      ;    (.purgeQueue sqs-client dlq-purge-req))))
+     (let [sqs-client (:sqs-client this)]
+       (doseq [queue (:queues this)
+               :let [queue-name (normalize-queue-name queue)
+                     dlq-name (dead-letter-queue queue-name)
+                     queue-url (.getQueueUrl (.getQueueUrl sqs-client queue-name))
+                     dlq-url (.getQueueUrl (.getQueueUrl sqs-client dlq-name))
+                     q-purge-req (PurgeQueueRequest. queue-url)
+                     dlq-purge-req (PurgeQueueRequest. dlq-url)]]
+         (.purgeQueue sqs-client q-purge-req)
+         (.purgeQueue sqs-client dlq-purge-req))))

   (health
      [this]


solved

solved

--- src/set_solver/core.clj
+++ src/set_solver/core.clj
@@ -12,7 +12,7 @@
             [org.opencv.imgproc Imgproc]
             [org.opencv.imgcodecs Imgcodecs]))

-(def frame-rate 15)
+(def frame-rate 1)

 (def width 1024)
 (def height 768)
@@ -37,7 +37,7 @@
         :else 0))

 (defn load-image []
-  (Imgcodecs/imread "resources/overhead.jpg")
+  (Imgcodecs/imread "resources/set1.jpg")
   )

 (def h (atom nil))
@@ -347,6 +347,14 @@
            angle
            1.7)))))

+(defn find-sets [cards]
+  (filter #(->> %
+                (map (juxt :shape :color :fill :count))
+                transpose
+                (map set)
+                (map count)
+                (every? #{1 3}))
+          (combo/combinations cards 3)))

 (defn find-contours [img]
   (let [img-gray (reusable (Mat.))
@@ -387,7 +395,8 @@
                                (if (some #(similar-rect (Imgproc/boundingRect %) (Imgproc/boundingRect c)) cs)
                                  cs
                                  (conj cs c)))
-                             []))]
+                             []))
+          card-props (atom [])]

       ;(clojure.pprint/pprint (map #(Imgproc/boundingRect %) cards))

@@ -480,6 +489,12 @@
                              :else :shaded)

                   ]
+              (swap! card-props conj {:count (count card-contours)
+                                      :shape sname
+                                      :color cname
+                                      :fill fill
+                                      :contour c
+                                      :bb (Imgproc/boundingRect c)})

               (Imgproc/putText drawing #_(str (round inside-h) "/"
                                             (round outside-h) "/"
@@ -608,7 +623,21 @@
                 ))))

-        ))
+        )
+      (let [sets (find-sets @card-props)]
+        (doseq [[s i] (map vector sets (range (count sets) 1 -1))
+                :let [color (Scalar. (rand-int 255) (rand-int 255) (rand-int 255))]]
+          ;(Imgproc/drawContours drawing (map :contour s) -1 color (* 30 i))
+          (doseq [c s]
+            (Imgproc/rectangle drawing
+                               (point-sub (.br (:bb c))
+                                          (Point. 300 (* 100 (inc i))))
+                               (point-sub (.br (:bb c))
+                                          (Point. 0 (* 100 i))) color -1))
+          ))
+      )
+
+

     (comment
       (let [pairs (map vector


Added new utility functions and updated input function.

--- src/simulacrum/util.clj
+++ src/simulacrum/util.clj
@@ -1,4 +1,6 @@
-(ns simulacrum.util)
+(ns simulacrum.util
+  (:require [clojure.string :as string]
+            [simulacrum.exceptions :as exceptions]))

 (defn display [data]
@@ -17,6 +19,34 @@
   (display (char 7))
   (clear-screen))

+(defn in?
+  "Given a sequence and a potential element of that sequence, determine if it
+  is, in fact, part of that sequence."
+  [sequence item]
+  (if (empty? sequence)
+    false
+    (reduce
+      #(or %1 %2)
+      (map
+        #(= %1 item)
+        sequence))))
+
+(defn check-input [input]
+  (let [valid-range (range 1 6)]
+    (cond
+      (in? valid-range input)
+        input
+      :else (throw
+              (exceptions/range-error
+                (str "Input must be between " (first valid-range) " and "
+                     (last valid-range)))))))
+
 (defn input [prompt]
   (display prompt)
-  (read-line))
+  (check-input (read-line)))
+
+(defn get-last-line [text]
+  (string/trim
+    (last
+      (string/split text #"\n"))))
+


fixing resolve fn logging

fixing resolve fn logging

--- src/celestial/workflows.clj
+++ src/celestial/workflows.clj
@@ -43,7 +43,7 @@
   "Runs hooks"
   [args workflow event]
   (doseq [[f conf] (get! :hooks)]
-    (debug "running hook"  f (resolve f))
+    (debug "running hook" f (resolve- f))
     (try
       ((resolve- f) (merge args conf {:workflow workflow :event event}))
       (catch Throwable t (error t))


fix update call, since were not on clojure 1.7 yet

--- src/clj/stripe/transfer.clj
+++ src/clj/stripe/transfer.clj
@@ -75,7 +75,7 @@
      (create-transfer options {}))
   ([options :- TransferReq more :- h/RequestOptions]
      (h/post-req "transfers"
-                 (update more :stripe-params merge options))))
+                 (update-in more [:stripe-params] merge options))))

 (s/defn get-transfer :- (ss/Async Transfer)
   "Returns a channel with a Transfer object, or an error if the


Remove comments

Remove comments

--- src/cljs/todomvc/rules.cljs
+++ src/cljs/todomvc/rules.cljs
@@ -12,8 +12,6 @@
                                   clara-tups->maps]]
             [clara.rules.accumulators :as acc]
             [todomvc.tuplerules :refer-macros [def-tuple-session def-tuple-rule]]))
-
-

 (defn todo-tx [id title done]
   (merge
@@ -39,24 +37,13 @@
   [[?e :todo/title]]
   =>
   (insert! [?e :todo/visible :tag]))
-;(defrule todo-is-visible-when-filter-is-all
-;  [:ui/visibility-filter [[e a v]] (= v :all)]
-;  [:todo/title [[e a v]] (= ?e e)]
-;  =>
-;  (insert! [?e :todo/visible :tag]))
+
 (def-tuple-rule todo-is-visile-when-filter-is-done-and-todo-done
   [[_ :ui/visibility-filter :done]]
   [[?e :todo/done]]
   =>
   (insert! [?e :todo/visible :tag]))

-;(defrule todo-is-visible-when-filter-is-done-and-todo-done
-;  [:ui/visibility-filter [[e a v]] (= v :done)]
-;  [:todo/done [[e a v]] (= e ?e)]
-;  =>
-;  (insert! [?e :todo/visible :tag]))
-
-;TODO. Currently returning full expr when detect op, need to parse rest as tuple
 (def-tuple-rule todo-is-visible-when-filter-active-and-todo-not-done
   [[_ :ui/visibility-filter :active]]
   [[?e :todo/title]]
@@ -64,38 +51,14 @@
   =>
   (insert! [?e :todo/visible :tag]))

-;(defrule todo-is-visible-when-filter-active-and-todo-not-done
-;  [:ui/visibility-filter [[e a v]] (= v :active)]
-;  [:todo/title [[e a v]] (= ?e e)]
-;  [:not [:todo/done [[e a v]] (= e ?e)]]
-;  =>
-;  (insert! [?e :todo/visible :tag]))
-
 (def-tuple-rule toggle-all-complete
-  ; when toggle complete action exists
   [:exists [:ui/toggle-complete]]
-  ; and there's a todo that isn't marked "done"
   [[?e :todo/title]]
   [:not [?e :todo/done]]
   =>
   (println "Marked done via toggle complete:" ?e)
   (insert-unconditional! [?e :todo/done :done]))

-;(defrule toggle-all-complete
-;  ; when toggle complete action exists
-;  [:exists [:ui/toggle-complete]]
-;  ; and there's a todo that isn't marked "done"
-;  [:todo/title [[e a v]] (= ?e e)]
-;  [:not [:todo/done [[e a v]] (= ?e e)]]
-;  =>
-;  (println "Marked done via toggle complete:" ?e)
-;  (insert-unconditional! [?e :todo/done :done]))
-
-;TODO. check if :test is considered an op. Note that
-; clara's syntax allows ?binding <- :attribute with no brackets
-; so we need to support that as well
-; Accum *shouldn't* be a problem.
-; Debugging should be easier in CLJ at this point, should just need to compare expansions
 (def-tuple-rule remove-toggle-complete-when-all-todos-done
   [?toggle <- :ui/toggle-complete]
   [?total <- (acc/count) :from [:todo/title]]
@@ -107,20 +70,6 @@
   (println "Retracting toggle-all-complete action: " ?toggle)
   (retract! ?toggle))

-;(defrule remove-toggle-complete-when-all-todos-done
-;  [?toggle <- :ui/toggle-complete]
-;  [?total <- (acc/count) :from [:todo/title]]
-;  [?total-done <- (acc/count) :from [:todo/done]]
-;  [:test (not (not (= ?total ?total-done)))]
-;  =>
-;  (println "Total todos: " ?total)
-;  (println "Total done: " ?total-done)
-;  (println "Retracting toggle-all-complete action: " ?toggle)
-;  (retract! ?toggle))
-
-; Need to nail down our accum syntax. Current expansion violates
-; Clara's schema anyway:
-;Value does not match schema: {:from {:constraints [(not ("s-expression" :all))]}}
 (def-tuple-rule no-done-todos-when-clear-completed-action
   [:exists [:ui/clear-completed]]
   [[?e :todo/title]]
@@ -129,53 +78,18 @@
   =>
   (println "Retracting entity " ?entity)
   (doseq [tuple ?entity] (retract! tuple)))
+; DSL notes on how we might handle retractions such as these.
+; Follows convention for namespaced keyword destructuring slated for CLJ 1.9
+; (retract {:todo/keys :all})
+; (retract {:todo/keys [title visible done]})
+; (retract-entity ?e)

-;(defrule no-done-todos-when-clear-completed-action
-;  ; when clear completed action exists
-;  [:exists [:ui/clear-completed]]
-;  ; and there's a todo that is marked "done"
-;  [:todo/title [[e a v]] (= ?e e)]
-;  [:todo/done [[e a v]] (= ?e e)]
-;  [?entity <- (acc/all) :from [:all [[e a v]] (= ?e e)]]
-;  =>
-;  ; DSL notes on how we might handle retractions such as these.
-;  ; Follows convention for namespaced keyword destructuring slated for CLJ 1.9
-;  ; (retract {:todo/keys :all})
-;  ; (retract {:todo/keys [title visible done]})
-;  ; (retract-entity ?e)
-;  ;; can we run a query in RHS???
-;  (println "Retracting entity " ?entity)
-;  (doseq [tuple ?entity] (retract! tuple)))
-
-;TODO. This doesn't work and we would like the first condition to be expressed with
-; square brackets optional.
-; Also need to handle cases of nested ops as in condition 2. Should do this on
-; same pass as adding support for matching in the rightmost part of the condition
 (def-tuple-rule clear-completed-action-is-done-when-no-done-todos
   [?action <- [:ui/clear-completed]]
   [:not [:exists [:todo/done]]]
   =>
   (println "Clear-completed action finished. Retracting " ?action)
   (retract! ?action))
-
-;(defrule clear-completed-action-is-done-when-no-done-todos
-;  [?action <- :ui/clear-completed]
-;  [:not [:exists [:todo/done]]]
-;  =>
-;  (println "Clear-completed action finished. Retracting " ?action)
-;  (retract! ?action))
-
-;(defrule todo-is-visible-when-a-friday
-;  [:exists [:today/is-friday]]
-;  [:todo/title [[e a v]] (= ?e e)]
-;  =>
-;  (println "BOOM")
-;  (insert! [?e :todo/visible* :tag]))
-;
-;(defrule todo-visible-*
-;  [:exists [:todo/visible* [[e a v]] (= e? e)]]
-;  =>
-;  (insert! [?e :todo/visible :tag]))

 ;(defrule print-all-facts
 ;  [?fact <- :all [[e a v]] (= ?e e) (= ?a a) (= ?v v)]
@@ -193,12 +107,7 @@
 (defquery find-done-count []
   [?count <- (acc/count) :from [:todo/done]])

-;(defsession todos [print-all-facts]
-;  :fact-type-fn (fn [[e a v]] a)
-;  :ancestors-fn (fn [type] [:all]))
-
 (def-tuple-session todos 'todomvc.rules)
-;(def-tuple-session todos [todo-is-visible-when-filter-is-all])

 ;(def facts
 ;  (apply concat


Simplify game events (out of game loop...) and correct go back

--- src/cljs/triboard/core.cljs
+++ src/cljs/triboard/core.cljs
@@ -339,7 +339,8 @@
       (let [ai-turn? #(contains? (:ai-players %) (:player %))
             new-list (drop-while ai-turn? (drop 1 old-list))]
         (if (empty? new-list)
-          old-list new-list)))
+          (take-last 1 old-list)
+          new-list)))
     ))

@@ -359,20 +360,17 @@
         is-human-xf (fn [_] (not (is-ai? @current-player)))
         is-ai-xf (fn [_] (is-ai? @current-player))
         ai-events (chan 1 (comp (filter game-on-xf) (filter is-ai-xf)))
-        player-events (chan 1 (comp (filter game-on-xf) (filter is-human-xf)))
-        game-events (chan 1)]
+        player-events (chan 1 (comp (filter game-on-xf) (filter is-human-xf)))]

     (go
       (while true
         (alt!
           player-events ([coord] (update-game! play-move coord))
-          game-events ([msg] (when (= msg :new-game) (new-game!)))
           ai-events ([msg] (when (= msg :ai-play) (handle-ai!)))
           (async/timeout ai-move-delay) ([_] (put! ai-events :ai-play))
           )))

-    {:game-events game-events
-     :player-events player-events}))
+    player-events))

 (defonce game-loop (start-game-loop))

@@ -399,7 +397,7 @@
   [x y game]
   (rect-cell x y
     (if-not (show-help? game x y) "lightgray" "lightblue")
-    {:on-click #(put! (:player-events game-loop) [x y])}
+    {:on-click #(put! game-loop [x y])}
     ))

 (defn show-scores
@@ -423,7 +421,7 @@
 (defn show-top-panel
   [scores player]
   [:div.scores
-   [top-panel-button #(put! (:game-events game-loop) :new-game) (special-char "★")]
+   [top-panel-button new-game! (special-char "★")]
    [top-panel-button #(swap! app-state update :help not) "?"]
    (show-scores scores player)
    [top-panel-button restart-game! (special-char "↻")]


more ex

more ex

--- src/clojure_fabric/core.clj
+++ src/clojure_fabric/core.clj
@@ -139,10 +139,10 @@
   (client/set-user-context cli user)

-  ;; 2. Channel setup
-
+  ;; 2. Channel
   (defonce chan (client/new-channel cli "mychannel"))
-  (chan/)
-
+  (channel/add-orderer chan (client/new-orderer cli "orderer0" "grpc://localhost:7050"))
+  (channel/add-peer chan (client/new-peer cli "peer0" "grpc://localhost:7051"))
+  (channel/initialize chan)
   )


Added CMR_ECHO_REST_PROTOCOL as configurable option.

--- src/cmr/transmit/config.clj
+++ src/cmr/transmit/config.clj
@@ -45,7 +45,7 @@
                :port (index-set-port)}
    :bootstrap {:host (cfg/config-value :bootstrap-host "localhost")
                :port (bootstrap-port)}
-   :echo-rest {:protocol "http"
+   :echo-rest {:protocol (cfg/config-value :echo-rest-protocol "http")
                :host (cfg/config-value :echo-rest-host "localhost")
                :port (echo-rest-port)
                :context (cfg/config-value :echo-rest-context "")}})


Switch back to using Derby in tests.

Switch back to using Derby in tests.

--- clj_record/test/model/config.clj
+++ clj_record/test/model/config.clj
@@ -1,14 +1,14 @@
 (ns clj-record.test.model.config)

-(comment
 (def db {:classname "org.apache.derby.jdbc.EmbeddedDriver"
          :subprotocol "derby"
          :subname "/tmp/clj-record.test.db"
          :create true})
-)

+(comment
 (def db {:classname "org.postgresql.Driver"
          :subprotocol "postgresql"
          :subname "//localhost:5433/coffeemug"
          :user "enter-user-name-here"
-         :password ""})+         :password ""})
+)


Test rejection of assignment to non existent slot on obj.

--- test/isla/test/interpreter.clj
+++ test/isla/test/interpreter.clj
@@ -66,6 +66,14 @@
                           (library/get-initial-env extra-types))]
     (is (= (get (:ctx result) "isla")
            (new isla.test.interpreter.Person 1 "isla" :undefined)))))
+
+(deftest test-non-existent-slot-assignment
+  (try
+    (interpret (parse "isla is a person\nisla material is 'metal'")
+               (library/get-initial-env extra-types))
+    (is false) ;; shouldn't get called
+    (catch Exception e
+      (is (= (.getMessage e) "Persons do not have a material.")))))
 ;; test extract fn

 (deftest test-extract-block-tag


Break tests for greater good

Break tests for greater good

--- test/spec_tools/core_test.cljc
+++ test/spec_tools/core_test.cljc
@@ -29,9 +29,9 @@
       (is (false? (s/valid? my-integer? "1")))

       ;; FIXME: why this doesn't work with cljs?
-      (testing "cljs resolve doesn't retain ns-info"
+      (testing "fully qualifed predicate symbol is returned with s/form"
         (is (= ['spec-tools.core/type #?(:clj  'clojure.core/integer?
-                                         :cljs 'integer?)] (s/form my-integer?)))
+                                         :cljs 'cljs.core/integer?)] (s/form my-integer?)))
         (is (= ['type 'integer?] (s/describe my-integer?))))

       (testing "also gen works"


Correct misnamed variables; apply lexicographic ordering to param; simplify anonymous function (#1572)

--- waiter/src/waiter/scheduler/kubernetes.clj
+++ waiter/src/waiter/scheduler/kubernetes.clj
@@ -1744,7 +1744,7 @@
 (defn- query-events
   "Query K8s for all namespace-scoped events with matching object names. Returns a
    channel containing the response or an exception."
-  [{:keys [api-server-url] :as scheduler} {:keys [api-request-fn]} {:keys [namespace k8s-object-name]}]
+  [{:keys [api-server-url] :as scheduler} {:keys [api-request-fn]} {:keys [k8s-object-name namespace]}]
   (log/info "fetching events from k8s for" namespace k8s-object-name)
   (let [events-url (str api-server-url "/api/v1/namespaces/" namespace "/events?fieldSelector=involvedObject.name%3D" k8s-object-name)
         events-chan (api-request-fn events-url scheduler)]
@@ -1768,9 +1768,9 @@
   [{:keys [instances k8s/replicaset-creation-timestamp task-count task-stats]} k8s-object-minimum-age-secs]
   (let [creation-timestamp (du/str-to-date-safe replicaset-creation-timestamp)
         healthy-count (:healthy task-stats 0)
-        thirty-seconds-ago (t/ago (t/seconds k8s-object-minimum-age-secs))]
+        max-creation-timestamp (t/ago (t/seconds k8s-object-minimum-age-secs))]
     (and (or (nil? creation-timestamp)
-             (t/before? creation-timestamp thirty-seconds-ago))
+             (t/before? creation-timestamp max-creation-timestamp))
          (or (< task-count instances)
              (< healthy-count task-count)))))

@@ -1778,11 +1778,11 @@
   "Return true if the given pod was created long enough ago and it appears unhealthy"
   [{:keys [metadata status]} k8s-object-minimum-age-secs]
   (let [creation-timestamp (timestamp-str->datetime (:creationTimestamp metadata))
-        thirty-seconds-ago (t/ago (t/seconds k8s-object-minimum-age-secs))
+        max-creation-timestamp (t/ago (t/seconds k8s-object-minimum-age-secs))
         {:keys [conditions]} status
         condition-statuses (map (comp #(Boolean/valueOf %) :status) conditions)]
     (and (or (nil? creation-timestamp)
-             (t/before? creation-timestamp thirty-seconds-ago))
+             (t/before? creation-timestamp max-creation-timestamp))
          (or (nil? condition-statuses)
              (empty? condition-statuses)
              (not-every? true? condition-statuses)))))
@@ -1855,9 +1855,7 @@
 (defn- update-event-fetcher-state-with
   "Update the event fecther state atom with the given content."
   [state-atom content]
-  (swap! state-atom
-         #(as-> % state
-            (merge state content))))
+  (swap! state-atom #(merge % content)))

 (def retry-event-fetcher
   "Configure run-with-retries helper for use in long-running event fetcher go-block."


Draw a basic board grid

Draw a basic board grid

--- src/tile_game/grid.cljs
+++ src/tile_game/grid.cljs
@@ -1,15 +1,34 @@
 (ns tile-game.grid
-  (:require [monet.canvas :as canvas]))
+  (:require [monet.canvas :as cv]))

 (defonce canvas-dom (.getElementById js/document "grid"))
-(defonce monet-canvas (canvas/init canvas-dom "2d"))
+(defonce monet-canvas (cv/init canvas-dom "2d"))

-(canvas/add-entity monet-canvas :background
-                   (canvas/entity {:x 10 :y 10 :w 100 :h 100} ; val
-                                  nil
-                                  (fn [ctx val]
-                                    (-> ctx (canvas/fill-style "green")
-                                        (canvas/fill-rect val)
-                                        (canvas/fill-style "white")
-                                        (canvas/text {:text "Five" :x 50 :y 50})))))
+(defn render-tile [])

+(def colors ["#000000" "#808080" "#C0C0C0" "#FFFFFF"
+             "#800000" "#FF0000" "#808000" "#FFFF00"
+             "#008000" "#00FF00" "#008080" "#00FFFF"
+             "#000080" "#0000FF" "#800080" "#FF00FF"])
+
+(def dim 4)
+(def scale 200)
+
+(doseq [tile (range 0 (dec (* dim dim)))]
+  (cv/add-entity monet-canvas (symbol (str "tile-" tile))
+                 (cv/entity
+                  {:x (+ 10 (* (rem tile dim) (+ scale 10)))
+                   :y (+ 10 (* (quot tile dim) (+ scale 10)))
+                   :w scale :h scale} ; val
+                  nil
+                  (fn [ctx val]
+                    (-> ctx
+                        (cv/fill-style (colors (inc tile)))
+                        (cv/fill-rect val)
+                        (cv/fill-style "black")
+                        (cv/text-align "center")
+                        (cv/text-baseline "middle")
+                        (cv/font-style "bold 48px serif")
+                        (cv/text {:text (str (inc tile))
+                                  :x (+ (:x val) (/ (:w val) 2))
+                                  :y (+ (:y val) (* (:h val) 0.50))}))))))


Need to return the right structure for install

--- support/build-plugin/src/leiningen/immutant.clj
+++ support/build-plugin/src/leiningen/immutant.clj
@@ -2,6 +2,7 @@
   (:require [robert.hooke]
             [leiningen.pom]
             [leiningen.jar]
+            [leiningen.core.main :as main]
             [clojure.java.io :as io]))

 (defn copy-jar [f & args]
@@ -12,7 +13,9 @@
             dest (io/file (:target-path project)
                    (format "%s-%s.jar" (:name project) (:version project)))]
         (.mkdirs (.getParentFile dest))
-        (io/copy src dest))
+        (io/copy src dest)
+        (main/info "Copied" (str dest))
+        {[:extension "jar"] (str dest)})
       (apply f args))))

 (defn put-pom-in-target [f & args]


run the index restoration workflow

run the index restoration workflow

--- src/wb_es/web/setup.clj
+++ src/wb_es/web/setup.clj
@@ -71,6 +71,9 @@
          (last)
          (:id))))

+(defn restore-snapshot
+  [repository-name snapshot-id])
+
 ;; (let [
 ;;       response
 ;;       (http/get (format "%s/%s" es-base-url index)
@@ -86,13 +89,23 @@
 ;;
 ;; wait until restoration finishes

-(defn -main
-  "I don't do a whole lot ... yet."
-  [& args]
+(defn run
+  "run setup"
+  []
   (let [index-id release-id]
     (do
       (es-connect)
       (if (has-index index-id)
-        (println (format "Index %s found, starting server..."))
-        (do
-          )))))
+        (println (format "Elasticsearch index %s is found, starting server..." index-id))
+        (let [repository-name "s3_repository"]
+          (do
+            (connect-snapshot-repository repository-name)
+            (let [snapshot-id (get-snapshot-id repository-name)]
+              (restore-snapshot repository-name snapshot-id)
+              (println (format "Elasticsearch is restored from snapshot %s" snapshot-id))))))
+      )))
+
+(defn -main
+  "I don't do a whole lot ... yet."
+  [& args]
+  (run))


different fixed/failed inputs for different notification services

--- frontend/components/project_settings.cljs
+++ frontend/components/project_settings.cljs
@@ -507,7 +507,7 @@
         [:label {:placeholder placeholder}]))]]
    [:div.chat-room-foot
     (when show-fixed-failed?
-      (om/build fixed-failed-input {:project project :field :hipchat_notify_prefs}))]])
+      (om/build fixed-failed-input {:project project :field (keyword (str (string/lower-case service) "_notify_prefs"))}))]])

 (defn chatrooms [project-data owner]
   (reify


Add `compare-and-set` examples.

Add `compare-and-set` examples.


code style

code style

--- examples/examples/spreadsheet.cljs
+++ examples/examples/spreadsheet.cljs
@@ -38,7 +38,8 @@
         (cell-value x env))))

 (defn- infix [x & xs]
-  (reduce (fn [res [op y]] (op res y)) x (partition 2 xs)))
+  (reduce (fn [res [op y]] (op res y))
+    x (partition 2 xs)))

 (defn read-formula [s env]
   (apply infix (parse-formula s env)))
@@ -88,7 +89,9 @@

 (defn- add-dependency [xy]
   (fn [deps]
-    (if (set? deps) (conj deps xy) #{xy})))
+    (if (set? deps)
+      (conj deps xy)
+      #{xy})))

 (defn- click [xy state]
   (case (:mode state)


Add missing import for using monads in cljs.

--- src/active/clojure/monad.cljc
+++ src/active/clojure/monad.cljc
@@ -5,6 +5,7 @@
   (:require #?(:clj [active.clojure.record :refer :all])
             #?(:clj [clojure.core :as core])
             #?(:cljs [cljs.core :as core])
+            #?(:cljs active.clojure.record) ;; for check-type in define-record-type
             [active.clojure.condition :as c]))

 (define-record-type ^:no-doc Return


adding more workflows testing

adding more workflows testing

--- test/celestial/integration/workflows/docker.clj
+++ test/celestial/integration/workflows/docker.clj
@@ -16,10 +16,28 @@
   (with-state-changes [(before :facts (populate-system redis-type redis-docker-spec))]
     (fact "docker creation workflows" :integration :docker :workflow
        (wf/create (spec)) => nil
+       (get-in (spec) [:docker :container-id]) => (comp not nil?)
        (wf/create (spec)) => (throws ExceptionInfo  (is-type? :celestial.workflows/machine-exists))
        (wf/stop (spec)) => nil
        (wf/destroy (spec)) => nil
       )
+
+    (fact "docker start/stop workflows" :integration :docker :workflow
+       (wf/create (spec)) => nil
+       (wf/stop (spec)) => nil
+       (let [{:keys [docker]} (spec)]
+         (wf/start (spec)) => nil
+         (get-in (spec) [:docker :container-id]) => (docker :container-id)
+         )
+       (wf/destroy (spec)) => nil
+      )
+
+   (fact "docker reload workflows" :integration :docker :workflow
+        (wf/create (spec)) => nil
+        (let [{:keys [docker]} (spec)]
+          (wf/reload (spec)) => nil
+          (get-in (spec) [:docker :container-id]) =not=> (docker :container-id))
+        (wf/destroy (spec)) => nil)
     )
    )
   )


CMR-1580: Addressing pull review comments.

--- umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.clj
+++ umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.clj
@@ -19,8 +19,7 @@
             [cmr.umm-spec.json-schema :as js]
             [clojure.java.io :as io]
             [clj-time.core :as t]
-            [cmr.common.util :as u :refer [are2]]
-            [cmr.umm-spec.umm-json :as umm-json]))
+            [cmr.common.util :as u :refer [are2]]))

 (def example-record-echo10-supported
   "This contains an example record will all the fields supported by ECHO10. It supported
@@ -54,10 +53,7 @@
                                                    :DurationUnit "YEAR"
                                                    :DurationValue 4
                                                    :PeriodCycleDurationUnit "DAY"
-                                                   :PeriodCycleDurationValue 3}])
-                         })]}))
-
-
+                                                   :PeriodCycleDurationValue 3}])})]}))

 (def example-record
   "This contains an example record with fields supported by all formats"
@@ -75,21 +71,6 @@
   (update-in expected [:EntryId :Id] #(str % "_"
                                            ;; TODO put version here once it's added to UMM.
                                            )))
-
-(comment
-
-
-  ;; Take a UMM record, convert to UMM JSON, parse UMM JSON, and then convert to ECHO10 XML
-  (->>  example-record-echo10-supported
-       umm-json/umm->json
-       umm-json/json->umm
-       (xg/generate-xml xm-echo10/umm-c-to-echo10-xml)
-       cmr.common.xml/pretty-print-xml
-       println)
-
-
-  )
-

 (deftest roundtrip-gen-parse
   (are2 [to-xml to-umm expected-manip-fn]
@@ -110,8 +91,7 @@
         xm-smap/umm-c-to-iso-smap-xml um-smap/iso-smap-xml-to-umm-c identity

         "ISO19115-2"
-        xm-iso2/umm-c-to-iso19115-2-xml um-iso2/iso19115-2-xml-to-umm-c identity
-        )
+        xm-iso2/umm-c-to-iso19115-2-xml um-iso2/iso19115-2-xml-to-umm-c identity)

   ;; This is here because echo10 supported additional fields
   (testing "echo10 supported fields"


[#1381] Add column type to aggregation api response

--- backend/src/akvo/lumen/lib/aggregation/line.clj
+++ backend/src/akvo/lumen/lib/aggregation/line.clj
@@ -14,6 +14,7 @@
   [tenant-conn {:keys [columns table-name]} query]
   (let [filter-sql (filter/sql-str columns (get query "filters"))
         column-x (utils/find-column columns (get query "metricColumnX"))
+        column-x-type (get column-x "type")
         column-x-name (get column-x "columnName")
         column-x-title (get column-x "title")
         column-y (utils/find-column columns (get query "metricColumnY"))
@@ -30,7 +31,8 @@
                  "data" (mapv (fn [[x-value y-value]]
                                 {"value" y-value})
                               sql-response)}]
-      "common" {"data" (mapv (fn [[x-value y-value]]
+      "common" {"metadata" {"type" column-x-type}
+                "data" (mapv (fn [[x-value y-value]]
                                {"timestamp" x-value})
                              sql-response)}})))


(maint) Disable update checking in test config

--- test/puppetlabs/puppetdb/testutils/services.clj
+++ test/puppetlabs/puppetdb/testutils/services.clj
@@ -46,6 +46,7 @@
   []
   {:nrepl {}
    :global {:vardir (testutils/temp-dir)}
+   :puppetdb {:disable-update-checking "true"}
    :jetty {:port 0}
    :command-processing {}})


CMR-3254: Fixed conversion problem from DIF10 to ISO19115.

--- umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.clj
+++ umm-spec-lib/test/cmr/umm_spec/test/generate_and_parse.clj
@@ -84,7 +84,6 @@
    separate issues. The issues CMR-3252, CMR-3253, CMR-3254, and CMR-3255 are filed to fix this."
   #{:iso-smap})

-
 (deftest roundtrip-example-metadata
   (let [failed-atom (atom false)
         check-failure (fn [result]
@@ -116,7 +115,11 @@
               :when (not (formats-to-skip target-format))
               :when (not @failed-atom)
               :let [expected (expected-conversion/convert umm target-format)
-                    actual (xml-round-trip :collection target-format umm)]]
+                    actual (xml-round-trip :collection target-format umm)
+                    ;; The RelatedUrls field get reshuffled during the conversions,
+                    ;; so we compare RelatedUrls as a set.
+                    expected (update expected :RelatedUrls set)
+                    actual (update actual :RelatedUrls set)]]

         ;; Taking the parsed UMM and converting it to another format produces the expected UMM
         (check-failure


added perder

added perder

--- src/babel/espanol/lexicon.clj
+++ src/babel/espanol/lexicon.clj
@@ -453,6 +453,10 @@
              :synsem {:cat :verb
                       :sem {:pred :think}}}

+   "perder" {:espanol {:boot-stem "pierd"}
+                :synsem {:cat :verb
+                         :sem {:pred :lose}}}
+
    "pintar" {:synsem {:cat :verb
                       :sem {:pred :paint}}}


cleanup and whitespace formatting

cleanup and whitespace formatting

--- src/babel/italiano/writer.clj
+++ src/babel/italiano/writer.clj
@@ -64,13 +64,13 @@

 (defn generate-one-verb [spec & [count]]
   (log/debug (str "generate-one-verb with spec:" spec "; count=" count))
-  (log/info (str "creating custom model from spec: " spec))
   (writer/generate-from-spec
    (let [model
          (create-model-for-spec spec)]
      (log/debug (str "created custom model from spec: " spec "; new model: " (keys model)))
      model)
    (strip-refs spec)
+
    (cond
      (= (get-in spec [:root :italiano :italiano])
         "chiamarsi")
@@ -82,6 +82,7 @@
                            :tense :past}}}
            {:synsem {:sem {:aspect :perfect
                            :tense :past}}}])
+
    [{:gender :masc}
     {:gender :fem}]


handle non-windows devices better

handle non-windows devices better

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

--- buildscripts/buildcheck/src/buildcheck/core.clj
+++ buildscripts/buildcheck/src/buildcheck/core.clj
@@ -17,11 +17,6 @@
                        (.add Calendar/HOUR -1))]
     (.format format (.getTime one-hour-ago))))

-(def yyyymmdd (SimpleDateFormat. "yyyyMMdd"))
-
-;(defn result-file [bits mode]
-;  (File. micromanager (str "/result" bits (name mode) ".txt")))
-
 (defn result-file [bits mode]
   (File. micromanager (str "/results" bits ".txt")))

@@ -74,6 +69,8 @@
         pattern (re-pattern (str "MMSetup" bits "BIT_[^\\s]+?_" date-token ".exe"))]
     (re-find pattern txt)))

+(def non-windows-device-adapters #{"dc1394" "Video4Linux"})
+
 (defn missing-vcproj []
   (let [device-adapter-parent-dirs [(File. micromanager "/DeviceAdapters")
                                     (File. micromanager "/SecretDeviceAdapters")]
@@ -89,7 +86,7 @@
         (sort
           (clojure.set/difference
             (set (map #(.getName %) directories-without-vcproj))
-            #{"dc1394" "Video4Linux"}))))
+            non-windows-device-adapters))))

 (defn device-vcproj-files []
   (let [device-adapter-parent-dirs [(File. micromanager "/DeviceAdapters")
@@ -129,7 +126,11 @@
 (defn missing-device-pages []
   (let [dll-names (get-dll-names 32)
         device-page-names (device-pages)]
-    (sort (clojure.set/difference (set dll-names) (set device-page-names)))))
+    (sort (clojure.set/difference
+            (clojure.set/union (set non-windows-device-adapters)
+                               (missing-vcproj)
+                               (set dll-names))
+            (set device-page-names)))))

 (defn str-lines [sequence]
   (apply str (interpose "\n" sequence)))


Emit analyzer warnings

Emit analyzer warnings

Fixes #21

--- ClojureScript/replete/src/replete/core.cljs
+++ ClojureScript/replete/src/replete/core.cljs
@@ -34,7 +34,7 @@
           (let [_ (when DEBUG (prn "line:" line))
                 form (r/read-string line)
                 _ (when DEBUG (prn "form:" form))
-                ast (no-warn (ana/analyze env form))
+                ast (ana/analyze env form)
                 _ (when DEBUG (prn "ast:" ast))
                 js (with-out-str
                      (ensure


Implement require in terms of ns special

--- ClojureScript/replete/src/replete/core.cljs
+++ ClojureScript/replete/src/replete/core.cljs
@@ -143,22 +143,91 @@
         (recur (next extensions)))
       (cb nil))))

-(defn require [macros-ns? sym reload]
-  (cljs.js/require
-    {:*compiler*     st
-     :*data-readers* tags/*cljs-data-readers*
-     :*load-fn*      load
-     :*eval-fn*      cljs/js-eval}
-    sym
-    reload
-    {:macros-ns macros-ns?
-     :verbose   (:verbose @app-env)}
-    (fn [res]
-      #_(println "require result:" res))))
-
-(defn require-destructure [macros-ns? args]
-  (let [[[_ sym] reload] args]
-    (require macros-ns? sym reload)))
+(defn- canonicalize-specs
+  [specs]
+  (letfn [(canonicalize [quoted-spec-or-kw]
+            (if (keyword? quoted-spec-or-kw)
+              quoted-spec-or-kw
+              (as-> (second quoted-spec-or-kw) spec
+                (if (vector? spec) spec [spec]))))]
+    (map canonicalize specs)))
+
+(defn- purge-analysis-cache!
+  [state ns]
+  (swap! state (fn [m]
+                 (assoc m ::ana/namespaces (dissoc (::ana/namespaces m) ns)))))
+
+(defn- purge!
+  [names]
+  (doseq [name names]
+    (purge-analysis-cache! st name))
+  (apply swap! cljs.js/*loaded* disj names))
+
+(defn- process-reloads!
+  [specs]
+  (if-let [k (some #{:reload :reload-all} specs)]
+    (let [specs (->> specs (remove #{k}))]
+      (if (= k :reload-all)
+        (purge! @cljs.js/*loaded*)
+        (purge! (map first specs)))
+      specs)
+    specs))
+
+(defn- self-require?
+  [specs]
+  (some
+    (fn [quoted-spec-or-kw]
+      (and (not (keyword? quoted-spec-or-kw))
+        (let [spec (second quoted-spec-or-kw)
+              ns   (if (sequential? spec)
+                     (first spec)
+                     spec)]
+          (= ns @current-ns))))
+    specs))
+
+(defn- make-ns-form
+  [kind specs target-ns]
+  (if (= kind :import)
+    (with-meta `(~'ns ~target-ns
+                  (~kind
+                    ~@(map (fn [quoted-spec-or-kw]
+                             (if (keyword? quoted-spec-or-kw)
+                               quoted-spec-or-kw
+                               (second quoted-spec-or-kw)))
+                        specs)))
+      {:merge true :line 1 :column 1})
+    (with-meta `(~'ns ~target-ns
+                  (~kind
+                    ~@(-> specs canonicalize-specs process-reloads!)))
+      {:merge true :line 1 :column 1})))
+
+(declare make-base-eval-opts)
+(declare print-error)
+
+(defn- process-require
+  [kind cb specs]
+  (let [current-st @st]
+    (try
+      (let [is-self-require? (and (= :kind :require) (self-require? specs))
+            [target-ns restore-ns]
+            (if-not is-self-require?
+              [@current-ns nil]
+              ['cljs.user @current-ns])]
+        (cljs/eval
+          st
+          (make-ns-form kind specs target-ns)
+          (merge (make-base-eval-opts)
+            {:load load})
+          (fn [{e :error}]
+            (when is-self-require?
+              (reset! current-ns restore-ns))
+            (when e
+              (print-error e false)
+              (reset! st current-st))
+            (cb))))
+      (catch :default e
+        (print-error e true)
+        (reset! st current-st)))))

 (defn load-core-source-maps! []
   (when-not (get (:source-maps @st) 'cljs.core)
@@ -264,8 +333,9 @@
                argument (second expression-form)]
            (case (first expression-form)
              in-ns (process-in-ns argument)
-             require (require-destructure false (rest expression-form))
-             require-macros (require-destructure true (rest expression-form))
+             require (process-require :require identity (rest expression-form))
+             require-macros (process-require :require-macros identity (rest expression-form))
+             import (process-require :import identity (rest expression-form))
              doc (if (repl-specials argument)
                    (repl/print-doc (repl-special-doc argument))
                    (repl/print-doc


Deleted old clojars plugin.

Deleted old clojars plugin.

--- src/cake/tasks/clojars.clj
+++ src/cake/tasks/clojars.clj
@@ -1,160 +0,0 @@
-(ns cake.tasks.clojars
-  (:require [clojure.string :as s]
-            [clojure.java.io :as io])
-  (:use cake cake.core [bake.core :only [log]]))
-
-(def clojars-repo-url "http://clojars.org/repo")
-(def clojars-all-jars-url (str clojars-repo-url "/all-jars.clj"))
-(def clojars-all-poms-url (str clojars-repo-url "/all-poms.txt"))
-
-(defn http-get-text-seq [url] (line-seq (io/reader url)))
-
-(defn get-latest-version [library-name]
-  (let [response (http-get-text-seq clojars-all-jars-url)
-        lib-name (symbol library-name)]
-    (second (last (filter #(= (first %) lib-name)
-                          (for [line response]
-                            (read-string line)))))))
-
-(defn install
-  ([library-name dev]
-     (if-let [version (get-latest-version library-name)]
-       (install library-name version dev)
-       (println "Can't find version of" library-name "on clojars.org\r\n"
-                "If the library is in another repository, please provide a version argument.")))
-  ([library-name library-version dev]
-     (let [s-to (if dev #{":dev-deps" ":dev-dependencies"} #{":dependencies" ":deps"})
-           project (line-seq (io/reader "project.clj"))]
-       (if-let [dep-line (some
-                          (fn [x] (and (some #(re-find (re-pattern %) x) s-to) x))
-                          project)]
-         (let [to (some s-to (.split dep-line " "))
-               pad (and dep-line (-> dep-line (s/split #"\[" 2) first count inc))]
-           (spit "project.clj"
-                 (s/replace (slurp "project.clj")
-                            (re-pattern (str to "\\s*\\["))
-                            (str to " [[" library-name
-                                 " \"" library-version "\"]"
-                                 (when-not (re-find #"\[\]" dep-line)
-                                   (str "\n" (s/join (repeat pad " ")))))))
-           (log "Added" library-name library-version "to your" (str to ".")))
-         (println "Neither" (first s-to) "nor" (last s-to) "were found in your project.clj.")))))
-
-(defn search [terms]
-  (let [response (http-get-text-seq clojars-all-jars-url)]
-    (apply println "\nLibraries on Clojars.org that contain: " terms)
-    (println "--------------------------------------------------------------------------------")
-    (doseq [entry (for [line response :when (every? #(.contains line %) terms)]
-                    (read-string line))]
-      (println "  " (first entry) "  " (second entry)))
-    (println)))
-
-(defn get-pom-dir
-  ([library-name version]
-     (let [id-str (if (.contains library-name "/")
-                    (str "./" library-name "/" version "/")
-                    (str "./" library-name "/" library-name "/" version "/"))]
-       id-str)))
-
-(defn get-pom-locations
-  ([library-name version]
-     (let [response (http-get-text-seq clojars-all-poms-url)
-           pom-dir (get-pom-dir library-name version)]
-       (for [line response :when (.startsWith line pom-dir)]
-         line))))
-
-(defn get-latest-pom-location
-  ([library-name version]
-     (last (get-pom-locations library-name version))))
-
-(defn to-clojars-url
-  ([file-location]
-     (str clojars-repo-url "/" file-location)))
-
-(defn get-latest-pom-file
-  ([library-name version]
-     (http-get-text-seq (to-clojars-url (get-latest-pom-location library-name version)))))
-
-(defn extract-description-text [xml]
-  (when-let [desc (re-find (re-pattern (str "<description>(.*)</description>")) xml)]
-    (second desc)))
-
-(defn description-text [xml-seq]
-  (-> (apply str (for [line xml-seq :when (.contains line "<description>")]
-                   line))
-      (extract-description-text)))
-
-(defn get-library-dependencies
-  [library-name version]
-  (let [pom-xml (clojure.xml/parse
-                 (java.io.ByteArrayInputStream.
-                  (.getBytes (apply str (get-latest-pom-file library-name version)))))
-        deps-xml (filter #(= (:tag %) :dependencies) (:content pom-xml))
-        deps-seq (partition 3 (for [x (xml-seq deps-xml)
-                                    :when (or (= (:tag x) :artifactId)
-                                              (= (:tag x) :groupId)
-                                              (= (:tag x) :version))]
-                                (hash-map (:tag x) (first (:content x)))))]
-    (into #{} (for [v deps-seq] (apply merge v)))
-    (map :content (:content (first deps-xml)))))
-
-(defn print-dependencies
-  [library-name version]
-  (println (str "Dependencies for: " library-name "  " version))
-  (println "--------------------------------------------------------------------------------")
-  (doseq [d (get-library-dependencies library-name version)]
-    (let [dep (apply merge (map #(hash-map (:tag %) (first (:content %))) d))]
-      (println (str (:groupId dep) "/" (:artifactId dep) "  " (:version dep))))))
-
-(defn print-description
-  [library-name version]
-  (let [pom-xml-seq (get-latest-pom-file library-name version)
-        desc-text   (description-text pom-xml-seq)]
-    (println (str "Description for library: " library-name "  " version))
-    (println "--------------------------------------------------------------------------------")
-    (println desc-text)))
-
-(defn print-all-versions [library-name]
-  (let [response (http-get-text-seq clojars-all-jars-url)]
-    (println "Available versions for library: " library-name)
-    (println "--------------------------------------------------------------------------------")
-    (doseq [entry (filter #(= (first %) (symbol library-name))
-                          (for [line response]
-                            (read-string line)))]
-      (println "  " (first entry) "  " (second entry)))))
-
-(defn describe
-  ([library-name]
-     (describe library-name (get-latest-version library-name)))
-  ([library-name version]
-     (println)
-     (print-description  library-name version) (println)
-     (print-dependencies library-name version) (println)
-     (print-all-versions library-name)         (println)))
-
-(deftask describe
-  "Describe a library on clojars."
-  {[library-name version] :describe}
-  (if (nil? library-name)
-    (println "Usage: cake describe <library-name>")
-    (if version
-      (describe library-name version)
-      (describe library-name))))
-
-(deftask search
-  "Search clojars for libraries."
-  {terms :search}
-  (if (nil? terms)
-    (println "Usage: cake search <terms>")
-    (search terms)))
-
-(deftask add
-  "Install a library from clojars into your project."
-  "The library will be added to the :deps or :dependencies vector in your project.clj.
-   If you pass the --dev option, it'll be added to :dev-deps or :dev-dependencies."
-  {[library-name version] :add [dev] :dev}
-  (if (nil? library-name)
-    (println "Usage: cake add <library-name> [version] [--dev]")
-    (if version
-      (install library-name version dev)
-      (install library-name dev))))


Add a space between subtitles and name-of-part

--- src/catalog/layout/fop.clj
+++ src/catalog/layout/fop.clj
@@ -140,9 +140,9 @@
   (block {:keep-with-next "always"}
      (bold (wrap creator "" ": " false)
            (external-link record-id (layout/periodify title)))
-     (when (or subtitles name-of-part) " ")
+     (when subtitles " ")
      (layout/render-subtitles subtitles)
-     (layout/periodify name-of-part)
+     (wrap name-of-part " ")
      (when (or source-publisher source-date) " - ")
      (wrap source-publisher "" (if source-date ", " "") false)
      (wrap (layout/year source-date))))


Move the position of the volume number ever so slightly

--- src/catalog/layout/fop.clj
+++ src/catalog/layout/fop.clj
@@ -507,7 +507,7 @@
                :role "H2"}
               (layout/format-date date))]
       [:fo:block-container {:absolute-position "fixed" :width "53mm" :height "53mm"
-                            :left "142mm" :top "119mm" :display-align "center"
+                            :left "143mm" :top "119mm" :display-align "center"
                             :background-color "transparent"}
        (block {:font-size "120pt" :color (color :white)
                :text-align "center"


move meta into its own component

move meta into its own component

--- src/chat/client/views.cljs
+++ src/chat/client/views.cljs
@@ -208,7 +208,7 @@
                         :onChange
                         (fn [e] (put! search-chan {:query (.. e -target -value)}))})))))

-(defn chat-view [data owner]
+(defn user-modal-view [data owner]
   (reify
     om/IInitState
     (init-state [_]
@@ -228,55 +228,61 @@
                               (merge groups-map))
             on-focus (fn [] (om/set-state! owner :focused? true))
             on-blur (fn [] (om/set-state! owner :focused? false))]
-        (dom/div nil
-          (when-let [err (data :error-msg)]
-            (dom/div #js {:className "error-banner"}
-              err
-              (dom/span #js {:className "close"
-                            :onClick (fn [_] (store/clear-error!))}
-                "×")))
-          (dom/div #js {:className (str "meta " (when focused? "focused"))}
-            (dom/img #js {:className "avatar"
-                          :src (let [user-id (get-in @store/app-state [:session :user-id])]
-                                 (get-in @store/app-state [:users user-id :avatar]))})
-            (dom/div #js {:className "extras"}
-              (om/build nickname-view (data :session)
-                        {:opts {:on-focus on-focus :on-blur on-blur}})
-              (om/build groups-view grouped-tags {:opts {:on-focus on-focus :on-blur on-blur}})
-              (when (seq (data :invitations))
-                (om/build invitations-view (data :invitations)))
-              (dom/div #js {:className "new-group"}
-                (dom/label nil "New Group"
-                  (dom/input #js {:placeholder "Group Name"
-                                  :onFocus (fn [_] (on-focus))
-                                  :onBlur (fn [_] (on-blur))
-                                  :onKeyDown
-                                  (fn [e]
-                                    (when (= KeyCodes.ENTER e.keyCode)
-                                      (.preventDefault e)
-                                      (let [group-name (.. e -target -value)]
-                                        (dispatch! :create-group {:name group-name})
-                                        (set! (.. e -target -value) "")))) })))
-              (dom/div #js {:className "logout"
-                            :onClick (fn [_] (dispatch! :logout nil))} "Log Out")))
-          (om/build search-view {})
-          (apply dom/div #js {:className "threads"}
-            (concat
-              (map (fn [t] (om/build thread-view t
-                                     {:key :id
-                                      :opts {:searched? (some? (get-in data [:search-results (t :id)]))}}))
-                   (->> (vals (merge (data :threads)
-                                     (data :search-results)))
-                        (sort-by
-                          (comp (partial apply min)
-                                (partial map :created-at)
-                                :messages))))
-              [(om/build thread-view
-                         {:id (uuid/make-random-squuid)
-                          :new? true
-                          :tag-ids []
-                          :messages []}
-                         {:react-key "new-thread"})])))))))
+        (dom/div #js {:className (str "meta " (when focused? "focused"))}
+          (dom/img #js {:className "avatar"
+                        :src (let [user-id (get-in @store/app-state [:session :user-id])]
+                               (get-in @store/app-state [:users user-id :avatar]))})
+          (dom/div #js {:className "extras"}
+            (om/build nickname-view (data :session)
+                      {:opts {:on-focus on-focus :on-blur on-blur}})
+            (om/build groups-view grouped-tags {:opts {:on-focus on-focus :on-blur on-blur}})
+            (when (seq (data :invitations))
+              (om/build invitations-view (data :invitations)))
+            (dom/div #js {:className "new-group"}
+              (dom/label nil "New Group"
+                (dom/input #js {:placeholder "Group Name"
+                                :onFocus (fn [_] (on-focus))
+                                :onBlur (fn [_] (on-blur))
+                                :onKeyDown
+                                (fn [e]
+                                  (when (= KeyCodes.ENTER e.keyCode)
+                                    (.preventDefault e)
+                                    (let [group-name (.. e -target -value)]
+                                      (dispatch! :create-group {:name group-name})
+                                      (set! (.. e -target -value) "")))) })))
+            (dom/div #js {:className "logout"
+                          :onClick (fn [_] (dispatch! :logout nil))} "Log Out")))))))
+
+(defn chat-view [data owner]
+  (reify
+    om/IRender
+    (render [_]
+      (dom/div nil
+        (when-let [err (data :error-msg)]
+          (dom/div #js {:className "error-banner"}
+            err
+            (dom/span #js {:className "close"
+                           :onClick (fn [_] (store/clear-error!))}
+              "×")))
+        (om/build user-modal-view data)
+        (om/build search-view {})
+        (apply dom/div #js {:className "threads"}
+          (concat
+            (map (fn [t] (om/build thread-view t
+                                   {:key :id
+                                    :opts {:searched? (some? (get-in data [:search-results (t :id)]))}}))
+                 (->> (vals (merge (data :threads)
+                                   (data :search-results)))
+                      (sort-by
+                        (comp (partial apply min)
+                              (partial map :created-at)
+                              :messages))))
+            [(om/build thread-view
+                       {:id (uuid/make-random-squuid)
+                        :new? true
+                        :tag-ids []
+                        :messages []}
+                       {:react-key "new-thread"})]))))))

 (defn login-view [data owner]
   (reify


Enable honeysql handlers in web API.

Enable honeysql handlers in web API.

--- src/cavm/query/expression.clj
+++ src/cavm/query/expression.clj
@@ -1,5 +1,6 @@
 (ns cavm.query.expression
   (:require [clojure.edn :as edn])
+  (:require [honeysql.types :as hsqltypes])
   (:refer-clojure :exclude  [eval]))

 (def eval)
@@ -36,4 +37,4 @@
     :else node))

 (defn expression [exp & globals]
-  (eval (edn/read-string exp) (cons specials globals)))
+  (eval (edn/read-string {:readers {'sql/call hsqltypes/read-sql-call}} exp) (cons specials globals)))


Fix a race condition when two builds from the same repo run at the same time

--- src/circle/backend/git.clj
+++ src/circle/backend/git.clj
@@ -7,7 +7,7 @@
   (:use [arohner.utils :only (inspect)])
   (:require [circle.sh :as sh]))

-(def repo-root "repos/")  ;; Root directory where we will check out repos
+(def repo-root "repos")  ;; Root directory where we will check out repos

 (defn project-name
   "Infer the project name from the URL"
@@ -24,7 +24,9 @@

 (defn default-repo-path [url]
   {:pre [url]}
-  (str repo-root (project-name url)))
+  ;;TECHNICAL_DEBT stick thread-id into the repo path to avoid a race
+  ;;condition when a customer triggers multiple builds
+  (fs/join repo-root (str "thread-" (-> (Thread/currentThread) (.getId))) (project-name url)))

 (defmacro with-temp-ssh-key-file
   "Writes the ssh-key to a temp file, executes body. f is the name of the variable that will hold the File for the ssh-key. Deletes the temp key file when done"


fix io reference

fix io reference

--- src/clj/fleetdb/server.clj
+++ src/clj/fleetdb/server.clj
@@ -3,7 +3,7 @@
   (:require (fleetdb [file :as file] [thread-pool :as thread-pool]
                      [lint :as lint] [embedded :as embedded])
             (clj-stacktrace [repl :as stacktrace])
-            (clojure.java.io [io :as io])
+            (clojure.java [io :as io])
             (clj-json [core :as json]))
   (:import  (java.net ServerSocket Socket InetAddress)
             (java.io BufferedWriter OutputStreamWriter


Actually store the score value

Actually store the score value

--- src/clj/schedule/types.clj
+++ src/clj/schedule/types.clj
@@ -12,9 +12,14 @@
 (gen-class
  :name ^{PlanningSolution {}} schedule.types.ScheduleSolution
  :extends schedule.HardSoftSolution
+ :init init
+ :state state
  :methods [[^{PlanningEntityCollectionProperty {}} getTestItems [] java.util.ArrayList]
            [^{ValueRangeProvider {"id" "slotRange"}} getSlotRange [] java.util.ArrayList]]
  :prefix "solution-")
+
+(defn solution-init []
+  [[] (ref {})])

 (defn solution-getTestItems [this]
   (ArrayList.))
@@ -22,13 +27,21 @@
 (defn solution-getProblemFacts [this]
   (ArrayList.))

-(defn solution-setScore [this score])
+(defn- getValue [this k]
+  (let [state (.state this)] (.get @state k)))
+
+(defn- setValue [this k v]
+  (let [state (.state this)]
+    (dosync (alter state assoc k v)) v))
+
+(defn solution-setScore [this score]
+  (setValue this :score score))

 (defn solution-getSlotRange [this]
   (ArrayList.))

 (defn solution-getScore	[this]
-  (HardSoftScore/parseScore "0hard/0soft"))
+  (getValue this :score))

 (gen-class
  :name ^{PlanningEntity {}} schedule.types.Event


BUGFIX: Need a default empty query, otherwise it's "null"

--- src/cljs/memento/core.cljs
+++ src/cljs/memento/core.cljs
@@ -36,6 +36,7 @@
   (fn [app-state _]
     (merge app-state {:ui-state {:is-busy?      false
                                  :section       :write
+                                 :current-query ""
                                  :is-searching? false}})))

 (register-handler


changed from ssl to http

changed from ssl to http

--- src/client/homepage/core.cljs
+++ src/client/homepage/core.cljs
@@ -173,7 +173,7 @@
        ]
       ]
      [:p [:h4 "Professionaly:"]
-      "In my job at " [:a {:href "https://eversolve.io"} "Eversolve "]
+      "In my job at " [:a {:href "http://eversolve.io"} "Eversolve "]
       "I'm using JavaScript everywhere: MEAN, some MeteorJS, ReactJS. Everything packed in nice Docker-Containers :D"
       [:p "Some of our customers include:"]
       [:ul
@@ -225,7 +225,7 @@
      [:p.summary
       "I'm a former BA-student of Russian Linguistics and History at the University of Hamburg. I enjoy combining humanities with digital technologies - "
       [:strong "Digital Humanities. "]
-      "Now I'm working at " [:a {:href "https://eversolve.io"} "Eversolve "] "."
+      "Now I'm working at " [:a {:href "http://eversolve.io"} "Eversolve "] "."
       ]
      ]
     ]


Redirect /Clojure%20Core/:ns/ & /clojure_core/:ns to new pages

--- src/clj/clojuredocs/entry.clj
+++ src/clj/clojuredocs/entry.clj
@@ -92,7 +92,9 @@
   (GET "/v/:id" [id] (old-v-page-redirect id))
   (GET "/examples_style_guide" [] {:status 301 :headers {"Location" "/examples-styleguide"}})
   (GET "/Clojure%20Core/:ns" [ns] {:status 301 :headers {"Location" (str "/" ns)}})
+  (GET "/Clojure%20Core/:ns/" [ns] {:status 301 :headers {"Location" (str "/" ns)}})
   (GET "/Clojure%20Core" [] {:status 301 :headers {"Location" "/core-library"}})
+  (GET "/clojure_core/:ns/" [ns] {:status 301 :headers {"Location" (str "/" ns)}})
   (GET "/clojure_core" [] {:status 301 :headers {"Location" "/core-library"}}))

 (defroutes _routes


improve Jackson and Sensie Actors Union messages

--- src/clj/game/cards-assets.clj
+++ src/clj/game/cards-assets.clj
@@ -417,6 +417,7 @@
    "Jackson Howard"
    {:abilities [{:cost [:click 1] :effect (effect (draw 2)) :msg "draw 2 cards"}
                 {:label "Shuffle up to 3 cards from Archives into R&D"
+                 :activatemsg "removes Jackson Howard from the game"
                  :effect (effect
                           (move card :rfg)
                           (resolve-ability
@@ -795,6 +796,7 @@
                                    {:prompt "Choose a card in HQ to add to the bottom of R&D"
                                     :choices {:req #(and (= (:side %) "Corp")
                                                          (in-hand? %))}
+                                    :msg "add a card in HQ to the bottom of R&D"
                                     :effect (effect (move target :deck))}
                                   card nil))}]}