nil won't throw NPE as we don't use isArray anymore

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


Ok, enough symbol stuff for now

Ok, enough symbol stuff for now


Clear out now-necessary latest-reg-status mocks

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


Add (:gen-class) to core ns

Add (:gen-class) to core ns

Allows this to run with lein run. Begone, WildFly!

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/partner-works.git/'


Started on a little problem for fun

Started on a little problem for fun

error: pathspec 'meltdown/core.clj' did not match any file(s) known to git

--- meltdown/core.clj
+++ meltdown/core.clj
@@ -0,0 +1,7 @@
+(require '[clojure.string :as st])
+
+(let [[x y] (st/split (read-line) #" ")]
+  (for [line (repeatedly read-line) :while line]
+
+    ))
+


hailstone clj

hailstone clj

error: pathspec 'Maths/08-Hailstone-Sequence/solutions/askl56-hailstone.clj' did not match any file(s) known to git

--- Maths/08-Hailstone-Sequence/solutions/askl56-hailstone.clj
+++ Maths/08-Hailstone-Sequence/solutions/askl56-hailstone.clj
@@ -0,0 +1,17 @@
+(defn hailstone-seq [n]
+  {:pre [(pos? n)]}
+  (lazy-seq
+   (cond (= n 1)   '(1)
+         (even? n) (cons n (hailstone-seq (/ n 2)))
+         :else     (cons n (hailstone-seq (+ (* n 3) 1))))))
+
+(let [hseq (hailstone-seq 27)]
+  (->  hseq count      (= 112)            assert)
+  (->> hseq (take 4)   (= [27 82 41 124]) assert)
+  (->> hseq (drop 108) (= [8 4 2 1])      assert))
+
+(let [{max-i :num, max-len :len}
+      (reduce #(max-key :len %1 %2)
+              (for [i (range 1 100000)]
+                {:num i, :len (count (hailstone-seq i))}))]
+  (println "Maximum length" max-len "was found for hailstone(" max-i ")."))


Added middleware as left out

Added middleware as left out

error: pathspec '2-collectors/clojure-collector/src/snowplow/clojure_collector/middleware.clj' did not match any file(s) known to git

--- 2-collectors/clojure-collector/src/snowplow/clojure_collector/middleware.clj
+++ 2-collectors/clojure-collector/src/snowplow/clojure_collector/middleware.clj
@@ -0,0 +1,65 @@
+;;;; Copyright (c) 2012 SnowPlow Analytics Ltd. All rights reserved.
+;;;;
+;;;; This program is licensed to you under the Apache License Version 2.0,
+;;;; and you may not use this file except in compliance with the Apache License Version 2.0.
+;;;; You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
+;;;;
+;;;; Unless required by applicable law or agreed to in writing,
+;;;; software distributed under the Apache License Version 2.0 is distributed on an
+;;;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;;; See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
+
+;;;; Author:    Alex Dean (mailto:support@snowplowanalytics.com)
+;;;; Copyright: Copyright (c) 2012 SnowPlow Analytics Ltd
+;;;; License:   Apache License Version 2.0
+
+(ns snowplow.clojure-collector.middleware
+  (:require [clj-stacktrace.repl :as strp]))
+
+;; All of these taken from
+;; http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html
+;; https://github.com/mmcgrana/adder/blob/master/src/adder/middleware.clj
+
+(defn- log [msg & vals]
+  (let [line (apply format msg vals)]
+    (locking System/out (println line))))
+
+(defn wrap-request-logging [handler]
+  (fn [{:keys [request-method uri] :as req}]
+    (let [start  (System/currentTimeMillis)
+          resp   (handler req)
+          finish (System/currentTimeMillis)
+          total  (- finish start)]
+      (log "request %s %s (%dms)" request-method uri total)
+      resp)))
+
+(defn wrap-if [handler pred wrapper & args]
+  (if pred
+    (apply wrapper handler args)
+    handler))
+
+(defn wrap-request-logging [handler]
+  (fn [{:keys [request-method uri] :as req}]
+    (let [start  (System/currentTimeMillis)
+          resp   (handler req)
+          finish (System/currentTimeMillis)
+          total  (- finish start)]
+      (log "request %s %s (%dms)" request-method uri total)
+      resp)))
+
+(defn wrap-exception-logging [handler]
+  (fn [req]
+    (try
+      (handler req)
+      (catch Exception e
+        (log "Exception:\n%s" (strp/pst-str e))
+        (throw e)))))
+
+(defn wrap-failsafe [handler]
+  (fn [req]
+    (try
+      (handler req)
+      (catch Exception e
+        {:status 500
+         :headers {"Content-Type" "text/plain"}
+         :body "We're sorry, something went wrong."}))))


solved

solved

error: pathspec 'src/4clojure/composition.clj' did not match any file(s) known to git

--- src/4clojure/composition.clj
+++ src/4clojure/composition.clj
@@ -0,0 +1,69 @@
+;; Function Composition
+;; http://www.4clojure.com/problem/58
+
+;; Difficulty:	Medium
+;; Topics:	higher-order-functions core-functions
+
+
+;; Write a function which allows you to create function compositions. The parameter list should take a variable number of functions, and create a function that applies them from right-to-left.
+
+
+;; (defn __ [& fns]
+;;   (reduce (fn [acc fun] (fn [& args] )) nil (reverse fns)))
+
+;; got from clojure comp source code
+(defn __
+  ([f g] (fn [x] (f (g x))))
+  ([f g h] (fn [& args] (f (g (apply h args))))))
+
+
+;; *clojure-version*
+
+((comp rest reverse) [1 2 3 4])
+(rest (reverse [1 2 3 4]))
+
+(doseq [f [reverse rest]]
+  (println (f [1 2 3 4])))
+
+
+(= [3 2 1] ((__ rest reverse) [1 2 3 4]))
+
+(= 5 ((__ (partial + 3) second) [1 2 3 4]))
+
+(= true ((__ zero? #(mod % 8) +) 3 5 7 9))
+
+(= "HELLO" ((__ #(.toUpperCase %) #(apply str %) take) 5 "hello world"))
+
+
+;; 4Clojure copy paste
+
+
+;; _artem_uv's solution:
+(fn comp1
+  ([] identity)
+  ([f] f)
+  ([f g]
+     (fn
+       ([] (f (g)))
+       ([x] (f (g x)))
+       ([x y] (f (g x y)))
+       ([x y z] (f (g x y z)))
+       ([x y z & args] (f (apply g x y z args)))))
+  ([f g & fs]
+     (reduce comp1 (list* f g fs))))
+;; also copied from source code ;d
+
+;; _pcl's solution:
+(fn [& xs] (fn [& ys] (reduce #(%2 %1) (apply (last xs) ys) (rest (reverse xs)))))
+;; I had something like this on mind
+
+;; aceeca1's solution:
+(fn [& x] (reduce (fn [f g] (fn [& a] (f (apply g a)))) x))
+
+;; adereth's solution:
+(fn [& fns]
+  (fn [& args]
+    (loop [rfns (rest (reverse fns))
+           v (apply (last fns) args)]
+      (if (seq rfns) (recur (rest rfns) ((first rfns) v))
+        v))))


Fixed a typo in docstring

Fixed a typo in docstring

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/em7/em7OptiFL-core.git/'


fix failing test

fix failing test


provenance example

provenance example

error: pathspec 'tutorial/provenance.clj' did not match any file(s) known to git

--- tutorial/provenance.clj
+++ tutorial/provenance.clj
@@ -0,0 +1,79 @@
+;   Copyright (c) Cognitect, Inc. All rights reserved.
+;   The use and distribution terms for this software are covered by the
+;   Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;   which can be found in the file epl-v10.html at the root of this distribution.
+;   By using this software in any fashion, you are agreeing to be bound by
+;   the terms of this license.
+;   You must not remove this notice, or any other, from this software.
+
+(require '[datomic.client.api.alpha :as d]
+         '[datomic.samples.repl :as repl])
+
+(def conn (repl/scratch-db-conn "config.edn"))
+
+(repl/transact-all conn (repl/resource "day-of-datomic-cloud/social-news.edn"))
+(repl/transact-all conn (repl/resource "day-of-datomic-cloud/provenance.edn"))
+
+(def stu [:user/email "stuarthalloway@datomic.com"])
+
+;; Stu loves to pimp his own blog posts...
+(def tx-result (d/transact
+                 conn
+                 {:tx-data
+                  [{:story/title "ElastiCache in 6 minutes"
+                    :story/url "http://blog.datomic.com/2012/09/elasticache-in-5-minutes.html"}
+                   {:story/title "Keep Chocolate Love Atomic"
+                    :story/url "http://blog.datomic.com/2012/08/atomic-chocolate.html"}
+                   {:db/id "datomic.tx"
+                    :source/user stu}]}))
+
+;; database t of tx1-result
+(def db-t (:t (:db-after tx-result)))
+
+(def editor [:user/email "editor@example.com"])
+
+;; fix spelling error in title
+;; note auto-upsert and attribution
+(def db (:db-after (d/transact
+                     conn
+                     {:tx-data
+                      [{:story/title "ElastiCache in 5 minutes"
+                        :story/url "http://blog.datomic.com/2012/09/elasticache-in-5-minutes.html"}
+                       {:db/id "datomic.tx"
+                        :source/user editor}]})))
+
+(def story [:story/url "http://blog.datomic.com/2012/09/elasticache-in-5-minutes.html"])
+
+;; what is the title now?
+(d/pull db '[:story/title] story)
+
+;; what was the title as of earlier point in time?
+(d/pull (d/as-of db db-t) '[:story/title] story)
+
+;; who changed the title, and when?
+(->> (d/q '[:find ?e ?v ?email ?inst ?added
+            :in $ ?e
+            :where
+            [?e :story/title ?v ?tx ?added]
+            [?tx :source/user ?user]
+            [?tx :db/txInstant ?inst]
+            [?user :user/email ?email]]
+          (d/history (d/db conn))
+          story)
+     (sort-by #(nth % 3))
+     pprint)
+
+;; what is the entire history of entity e?
+(->> (d/q '[:find ?aname ?v ?tx ?inst ?added
+            :in $ ?e
+            :where
+            [?e ?a ?v ?tx ?added]
+            [?a :db/ident ?aname]
+            [?tx :db/txInstant ?inst]]
+          (d/history (d/db conn))
+          story)
+     seq
+     (sort-by #(nth % 2))
+     pprint)
+
+(repl/delete-scratch-dbs "config.edn")


Identation change

Identation change

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/acessocard/microscope.git/'


Add back authorizations :id

Add back authorizations :id

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Add lazytest2.clj, trying out new syntax

error: pathspec 'src/main/clojure/com/stuartsierra/lazytest2.clj' did not match any file(s) known to git

--- src/main/clojure/com/stuartsierra/lazytest2.clj
+++ src/main/clojure/com/stuartsierra/lazytest2.clj
@@ -0,0 +1,201 @@
+(ns com.stuartsierra.lazytest2)
+
+(deftype Context [parents before after])
+
+(defn open-context
+  "Opens context c, and all its parents, unless it is already active."
+  [active c]
+  (let [active (reduce open-context active (:parents c))
+        states (map active (:parents c))]
+    (if-let [f (:before c)]
+      (assoc active c (or (active c) (apply f states)))
+      active)))
+
+(defn close-context
+  "Closes context c and removes it from active."
+  [active c]
+  (let [states (map active (:parents c))]
+    (when-let [f (:after c)]
+      (apply f (active c) states))
+    (let [active (reduce close-context active (:parents c))]
+      (dissoc active c))))
+
+(defmacro defcontext
+  "Defines a context.
+  decl => docstring? [bindings*] before-body* after-fn?
+  after-fn => :after [state] after-body*"
+  [name & decl]
+  (let [m {:name name, :ns *ns*, :file *file*, :line @Compiler/LINE}
+        m (if (string? (first decl)) (assoc m :doc (first decl)) m)
+        decl (if (string? (first decl)) (next decl) decl)
+        bindings (first decl)
+        bodies (next decl)]
+    (assert (vector? bindings))
+    (assert (even? (count bindings)))
+    (let [pairs (partition 2 bindings)
+          locals (vec (map first pairs))
+          contexts (vec (map second pairs))
+          before (take-while #(not= :after %) bodies)
+          after (next (drop-while #(not= :after %) bodies))
+          before-fn `(fn ~locals ~@before)]
+      (when after (assert (vector? (first after))))
+      (let [after-fn (when after
+                       `(fn ~(vec (concat (first after) locals))
+                          ~@after))]
+        `(def ~name (Context ~contexts ~before-fn ~after-fn '~m nil))))))
+
+(defprotocol TestInvokable
+  (invoke-test [t active]))
+
+(deftype TestResults [source children])
+
+(deftype TestPassed [source states])
+
+(deftype TestFailed [source states])
+
+(deftype TestThrown [source states throwable])
+
+(deftype ContextualAssertion [contexts pred] :as this
+  TestInvokable
+    (invoke-test [active]
+      (let [merged (reduce open-context active contexts)
+            states (map merged contexts)]
+        (try
+         (if (apply pred states)
+           (TestPassed this states)
+           (TestFailed this states))
+         (catch Throwable t
+           (TestThrown this states t))
+         (finally
+          (reduce close-context merged
+                  ;; Only close contexts that weren't active at start:
+                  (filter #(not (contains? active %))
+                          (reverse contexts))))))))
+
+(deftype SimpleAssertion [pred] :as this
+  TestInvokable
+    (invoke-test [active]
+      (try
+        (if (pred)
+          (TestPassed this nil)
+          (TestFailed this nil))
+        (catch Throwable t
+          (TestThrown this nil t)))))
+
+(deftype SimpleContainer [children] :as this
+  TestInvokable
+  (invoke-test [active]
+    (try
+     (TestResults this (map #(invoke-test % active) children))
+     (catch Throwable t
+       (TestThrown this active t)))))
+
+(defn- has-after?
+  "True if Context c or any of its parents has an :after function."
+  [c]
+  (or (:after c)
+      (some has-after? (:parents c))))
+
+(deftype ContextualContainer [contexts children] :as this
+  TestInvokable
+  (invoke-test [active]
+    (let [merged (reduce open-context active contexts)
+          states (map merged contexts)]
+      (try
+       (let [results (map #(invoke-test % active) children)]
+         ;; Force non-lazy evaluation when contexts need closing:
+         (when (some has-after? contexts) (dorun results))
+         (TestResults this results))
+       (catch Throwable t
+         (TestThrown this states t))
+       (finally
+        (reduce close-context merged
+                ;; Only close contexts that weren't active at start:
+                (filter #(not (contains? active %))
+                        (reverse contexts))))))))
+
+(defmacro should [& assertions]
+  (loop [r [], as assertions]
+    (if (seq as)
+      (let [[doc form nxt]
+            (if (string? (first as))
+              [(first as) (second as) (nnext as)]
+              [nil (first as) (next as)])]
+        (recur (conj r `(SimpleAssertion
+                         (fn [] ~form)
+                         {:doc ~doc,
+                          :form '~form
+                          :file *file*,
+                          :line ~(:line (meta form))}
+                         nil))
+               nxt))
+      `(SimpleContainer ~r))))
+
+(defmacro given [bindings & assertions]
+  (assert (vector? bindings))
+  (assert (even? (count bindings)))
+  (let [pairs (partition 2 bindings)
+        locals (vec (map first pairs))
+        contexts (vec (map second pairs))]
+    (loop [r [], as assertions]
+      (if (seq as)
+        (let [[doc form nxt]
+              (if (string? (first as))
+                [(first as) (second as) (nnext as)]
+                [nil (first as) (next as)])]
+          (recur (conj r `(ContextualAssertion
+                           ~contexts
+                           (fn ~locals ~form)
+                           {:doc ~doc,
+                            :locals '~locals
+                            :form '~form
+                            :file *file*,
+                            :line ~(:line (meta form))}
+                           nil))
+                 nxt))
+        `(SimpleContainer ~r)))))
+
+(defn attributes
+  "Reads optional name symbol and doc string from args,
+  returns [m a] where m is a map containing keys
+  [:name :doc :ns :file :line] and a is remaining arguments."
+  [args]
+  (let [m {:ns *ns*, :file *file*, :line @Compiler/LINE}
+        m    (if (symbol? (first args)) (assoc m :name (first args)))
+        args (if (symbol? (first args)) (next args) args)
+        m    (if (string? (first args)) (assoc m :doc (first args)))
+        args (if (string? (first args)) (next args) args)]
+    [m args]))
+
+(defn options
+  "Reads keyword-value pairs from args, returns [m a] where m is a map
+  of keyword/value options and a is remaining arguments."
+  [args]
+  (loop [opts {}, as args]
+    (if (and (seq as) (keyword? (first as)))
+      (recur (assoc opts (first as) (second as)) (nnext as))
+      [opts as])))
+
+(defmacro testing
+  "Creates a test container.
+  decl   => name? docstring? option* child*
+
+  name   => a symbol, will def a Var if provided.
+  child  => 'should' or 'given' or nested 'testing'
+
+  options => keyword/value pairs, recognized keys are:
+    :contexts => vector of contexts to run only once for this container.
+    :strategy => a test-running strategy."
+  [& decl]
+  (let [[m decl] (attributes decl)
+        [opts decl] (options decl)
+        {:keys [contexts strategy]} opts
+        children (vec decl)
+        csym (gensym "c")]
+    `(let [~csym ~(if contexts
+                    (do (assert (vector? contexts))
+                        `(ContextualContainer ~contexts ~children '~m nil))
+                    `(SimpleContainer ~children '~m nil))]
+       ~(when (:name m) `(intern *ns* '~(:name m) ~csym))
+       ~csym)))
+


Upated test for local

Upated test for local


Added REPL util

Added REPL util

error: pathspec 'test/puppetlabs/master/testutils/repl.clj' did not match any file(s) known to git

--- test/puppetlabs/master/testutils/repl.clj
+++ test/puppetlabs/master/testutils/repl.clj
@@ -0,0 +1,54 @@
+(ns puppetlabs.master.testutils.repl
+  (:require [puppetlabs.trapperkeeper.services.webserver.jetty9-service :refer [jetty9-service]]
+            [puppetlabs.master.services.master.master-service :refer [master-service]]
+            [puppetlabs.master.services.handler.request-handler-service :refer [request-handler-service]]
+            [puppetlabs.master.services.jruby.jruby-puppet-service :refer [jruby-puppet-pooled-service]]
+            [puppetlabs.master.services.config.jvm-puppet-config-service :refer [jvm-puppet-config-service]]
+            [puppetlabs.trapperkeeper.core :as tk]
+            [puppetlabs.trapperkeeper.app :as tka]
+            [clojure.tools.namespace.repl :refer (refresh)]))
+
+(def system nil)
+
+(defn init []
+  (alter-var-root #'system
+    (fn [_] (let [conf-dir "./scratch/master/conf"
+                   app (tk/build-app
+                        [jetty9-service
+                         master-service
+                         jruby-puppet-pooled-service
+                         request-handler-service
+                         jvm-puppet-config-service]
+                        {:global {:logging-config "./test-resources/logback-dev.xml"}
+                         :jruby-puppet { :jruby-pools  [{:environment "production"
+                                                         :size 1}
+                                                        {:environment "test"
+                                                         :size 1}]
+                                         :load-path    ["./ruby/puppet/lib"
+                                                        "./ruby/facter/lib"]
+                                         :master-conf-dir conf-dir}
+                         :webserver {:client-auth "want"
+                                     :ssl-host    "localhost"
+                                     :ssl-port    8140}})]
+              (tka/init app)))))
+
+(defn start []
+  (alter-var-root #'system tka/start))
+
+(defn stop []
+  (alter-var-root #'system
+                  (fn [s] (when s (tka/stop s)))))
+
+(defn go []
+  (init)
+  (start))
+
+(defn context []
+  @(tka/app-context system))
+
+(defn print-context []
+  (clojure.pprint/pprint (context)))
+
+(defn reset []
+  (stop)
+  (refresh :after 'puppetlabs.enterprise.master.testutils.repl/go))


Added analyze-data.core, start of command-line wrapper around stuff to make it easier to experiment.

error: pathspec 'project/analyze-data/src/analyze_data/core.clj' did not match any file(s) known to git

--- project/analyze-data/src/analyze_data/core.clj
+++ project/analyze-data/src/analyze_data/core.clj
@@ -0,0 +1,41 @@
+(ns analyze-data.core
+  (:require [clojure.core.matrix :as m]
+            [clojure.string :as string]
+            [analyze-data.dataset.create.core :refer [create-dataset-file!]]
+            [analyze-data.evaluate-model :refer [k-fold-cross-validation]]
+            [analyze-data.knn.core :refer [cosine-distance]]
+            [analyze-data.score-model :refer [accuracy f1-score]]
+            [analyze-data.serialize :refer [read-object]]))
+
+(defn create-dataset
+  [f]
+  (m/set-current-implementation :vectorz)
+  (create-dataset-file! :tf-idf f (string/replace f #"\.\w+$" ".dataset")))
+
+(defn- get-options
+  [model-type]
+  (case model-type
+    :knn {:k 3, :distance-fn cosine-distance}
+    :naive-bayes {}))
+
+(defn train
+  [dataset-file model-type]
+  (m/set-current-implementation :vectorz)
+  (let [dataset (read-object dataset-file)
+        {:keys [y classes]} dataset
+        k 10
+        confusion-matrix (apply k-fold-cross-validation
+                                k
+                                model-type
+                                dataset
+                                (get-options model-type))]
+    (println (name model-type) (str k "-fold cross-validation on") dataset-file)
+    (println "Classes:")
+    (doseq [c classes]
+      (let [class-count (count (filter (partial = (.indexOf classes c)) y))]
+        (println "  " (str c ":") class-count)))
+    (println "Accuracy:" (->> confusion-matrix accuracy float (format "%.2f")))
+    (println "F1 Scores:")
+    (let [f1-scores (map (partial f1-score confusion-matrix) classes)]
+      (doseq [[c f1] (zipmap classes f1-scores)]
+        (println "  " (str c ":") (->> f1 float (format "%.2f")))))))


Add evenodd in clojure

Add evenodd in clojure

error: pathspec '2017/continuations-trampolines/clojure-samples/src/clojure_samples/evenodd.clj' did not match any file(s) known to git

--- 2017/continuations-trampolines/clojure-samples/src/clojure_samples/evenodd.clj
+++ 2017/continuations-trampolines/clojure-samples/src/clojure_samples/evenodd.clj
@@ -0,0 +1,38 @@
+;;; Example of even/odd in Clojure; recursive and trampolined.
+;;;
+;;; Eli Bendersky [http://eli.thegreenplace.net]
+;;; This code is in the public domain.
+(ns clojure-samples.evenodd)
+
+(declare is-even?)
+
+(defn is-odd?
+  [n]
+  (if (= n 0)
+    false
+    (is-even? (- n 1))))
+
+(defn is-even?
+  [n]
+  (if (= n 0)
+    true
+    (is-odd? (- n 1))))
+
+(map is-even? '(1 2 3 4))
+
+(declare is-even-thunked?)
+
+(defn is-odd-thunked?
+  [n]
+  (if (= n 0)
+    false
+    #(is-even-thunked? (- n 1))))
+
+(defn is-even-thunked?
+  [n]
+  (if (= n 0)
+    true
+    #(is-odd-thunked? (- n 1))))
+
+(trampoline is-even-thunked? 2)
+(trampoline is-even-thunked? 3)


remove unused imports from memory table

remove unused imports from memory table

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/altamiracorp/honeycomb.git/'


Add tests for factorial

Add tests for factorial

error: pathspec 'test/search/graphs/problems/factorial_test.clj' did not match any file(s) known to git

--- test/search/graphs/problems/factorial_test.clj
+++ test/search/graphs/problems/factorial_test.clj
@@ -0,0 +1,9 @@
+(ns search.graphs.problems.factorial-test
+  (:require [clojure.test :refer :all]
+            [schema.test]
+
+            [search.graphs.problems.test-utils :refer [finishes]]))
+(use-fixtures :once schema.test/validate-schemas)
+
+(deftest ^:slow clojush-test
+  (finishes ['search.graphs.problems.factorial/clojush-graph]))


(PE-6014) Added NOOP certs test

(PE-6014) Added NOOP certs test

error: pathspec 'test/puppetlabs/services/ca/certificate_authority_noop_test.clj' did not match any file(s) known to git

--- test/puppetlabs/services/ca/certificate_authority_noop_test.clj
+++ test/puppetlabs/services/ca/certificate_authority_noop_test.clj
@@ -0,0 +1,48 @@
+(ns puppetlabs.services.ca.certificate-authority-noop-test
+  (:require [clojure.test :refer :all]
+            [me.raynes.fs :as fs]
+            [puppetlabs.services.ca.noop-service :as noop]
+            [puppetlabs.services.config.puppet-server-config-service :as config]
+            [puppetlabs.services.jruby.testutils :as jruby-testutils]
+            [puppetlabs.services.jruby.jruby-puppet-service :as jruby]
+            [puppetlabs.services.puppet-profiler.puppet-profiler-service :as profiler]
+            [puppetlabs.trapperkeeper.app :as tk-app]
+            [puppetlabs.trapperkeeper.services.webserver.jetty9-service :as webserver]
+            [puppetlabs.trapperkeeper.testutils.logging :as logutils]
+            [puppetlabs.trapperkeeper.testutils.bootstrap :as tk-testutils]))
+
+(def ssl-dir "target/master-service-test")
+
+(deftest ca-files-test
+  (testing "CA settings from puppet are honored and the CA
+            files are created when the service starts up"
+    (let [test-dir (doto "target/master-service-test" fs/mkdir)]
+      (try
+        (logutils/with-test-logging
+          (tk-testutils/with-app-with-config
+            app
+
+            [webserver/jetty9-service
+             profiler/puppet-profiler-service
+             noop/certificate-authority-noop-service
+             config/puppet-server-config-service
+             jruby/jruby-puppet-pooled-service]
+
+            (-> (jruby-testutils/jruby-puppet-tk-config
+                  (jruby-testutils/jruby-puppet-config 1))
+                (assoc-in [:jruby-puppet :master-conf-dir]
+                          "dev-resources/puppetlabs/services/master/conf")
+                (assoc :webserver {:port 8081}))
+
+            (let [jruby-service (tk-app/get-service app :JRubyPuppetService)]
+              (jruby/with-jruby-puppet
+                jruby-puppet
+                jruby-service
+
+                (doseq [subdir ["/ca" "/certs" "/public_keys" "/private_keys"]]
+                  (is (not (fs/exists? (str ssl-dir subdir)))))))))
+        (finally
+          (fs/delete-dir test-dir))))))
+
+
+


Use a nested map for :releases config.

Use a nested map for :releases config.

--- src/clojars/promote.clj
+++ src/clojars/promote.clj
@@ -6,6 +6,7 @@
             [clojure.java.shell :as sh]
             [clojure.java.jdbc :as sql]
             [clojure.string :as str]
+            [clojure.set :as set]
             [korma.db :as korma]
             [cemerick.pomegranate.aether :as aether]
             [korma.core :refer [select fields where update set-fields]])
@@ -81,11 +82,9 @@
         (signed? pom keys)
         (unpromoted? info))))

-(def releases {:url (config :releases-url)
-               :username (config :releases-access-key)
-               :passphrase (config :releases-secret-key)})
-
-(aether/register-wagon-factory! "s3" (constantly (SimpleStorageServiceWagon.)))
+(defonce _
+  (aether/register-wagon-factory!
+   "s3" (constantly (SimpleStorageServiceWagon.))))

 (defn- add-coords [{:keys [group name version classifier] :as info}
                    files extension]
@@ -95,18 +94,21 @@

 (defn- deploy-to-s3 [info]
   (let [files (reduce (partial add-coords info) {}
-                      ["jar" "jar.asc" "pom" "pom.asc"])]
+                      ["jar" "jar.asc" "pom" "pom.asc"])
+        releases-repo (set/rename-keys (config :releases)
+                                       {:access-key :username
+                                        :secret-key :passphrase})]
     (aether/deploy-artifacts :artifacts (keys files)
                              :files files
                              :transfer-listener :stdout
-                             :repository {"releases" releases})))
+                             :repository {"releases" releases-repo})))

 (defn promote [{:keys [group name version] :as info}]
   (korma/transaction
    (println "checking" group "/" name "for promotion...")
    (let [blockers (blockers info)]
      (if (empty? blockers)
-       (when (config :releases-secret-key)
+       (when (config :releases)
          (println "Promoting" info)
          (deploy-to-s3 info)
          ;; TODO: this doesn't seem to be happening. db locked?


random population

random population

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojure-ml/cml.git/'


remove redirect to setup with token, we'll handle that on the frontend going forward.

--- src/metabase/routes.clj
+++ src/metabase/routes.clj
@@ -28,19 +28,16 @@
    :intercom_code         "gqfmsgf1"
    :anon_tracking_enabled (metabase.models.setting/get :anon-tracking-enabled)
    :site_name             (metabase.models.setting/get :site-name)
-   :setup_token           (setup/token-value)})
+   :setup_token           (setup/token-value)
+   :timezones             metabase.models.common/timezones})

 ;; Redirect naughty users who try to visit a page other than setup if setup is not yet complete
-(let [redirect-to-setup? (fn [{:keys [uri]}]
-                           (and (setup/incomplete?)
-                                (not (re-matches #"^/setup/.*$" uri))))
-      index (fn [request]
-              (if (redirect-to-setup? request) (resp/redirect (format "/setup/init/%s" (setup/token-value)))
-                  (-> (resp/response (stencil/render-string
-                                       (load-index)
-                                       {:bootstrap_json (cheshire/generate-string (index-page-vars))}))
-                      (resp/content-type "text/html")
-                      (resp/header "Last-Modified" (u/now-with-format date-format-rfc2616)))))]
+(let [index (fn [request]
+              (-> (resp/response (stencil/render-string
+                                   (load-index)
+                                   {:bootstrap_json (cheshire/generate-string (index-page-vars))}))
+                  (resp/content-type "text/html")
+                  (resp/header "Last-Modified" (u/now-with-format date-format-rfc2616))))]
   (defroutes routes
     (GET "/" [] index)                                     ; ^/$           -> index.html
     (GET "/favicon.ico" [] (resp/resource-response "frontend_client/favicon.ico"))


Fixed few issues

Fixed few issues

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/skprasadu/crud-ui-framework.git/'


rename migae-images to migae_images

rename migae-images to migae_images

error: pathspec 'migae-images/src/migae/migae_images.clj' did not match any file(s) known to git

--- migae-images/src/migae/migae_images.clj
+++ migae-images/src/migae/migae_images.clj
@@ -0,0 +1,137 @@
+(ns migae.migae-images
+  (:import [com.google.appengine.api.images ImagesService ImagesServiceFactory Image
+            OutputSettings ImagesService$OutputEncoding Composite$Anchor]
+           com.google.appengine.api.blobstore.BlobKey))
+
+;; original code: appengine-magic
+
+;;; ----------------------------------------------------------------------------
+;;; helpers
+;;; ----------------------------------------------------------------------------
+
+(defonce ^{:dynamic true} *images-service* (atom nil))
+
+
+(defonce ^{:dynamic true} *output-formats*
+  {:jpg ImagesService$OutputEncoding/JPEG
+   :jpeg ImagesService$OutputEncoding/JPEG
+   :png ImagesService$OutputEncoding/PNG})
+
+
+;; (defonce ^{:dynamic true} *composite-anchor*
+;;   {:bottom Composite$Anchor/BOTTOM_CENTER
+;;    :bottom-left Composite$Anchor/BOTTOM_LEFT
+;;    :bottom-right Composite$Anchor/BOTTOM_RIGHT
+;;    :center Composite$Anchor/CENTER_CENTER
+;;    :center-left Composite$Anchor/CENTER_LEFT
+;;    :center-right Composite$Anchor/CENTER_RIGHT
+;;    :top Composite$Anchor/TOP_CENTER
+;;    :top-left Composite$Anchor/TOP_LEFT
+;;    :top-right Composite$Anchor/TOP_RIGHT})
+
+
+(defrecord ImageHistogram [red green blue])
+
+
+(defn get-images-service []
+  (when (nil? @*images-service*)
+    (reset! *images-service* (ImagesServiceFactory/getImagesService)))
+  @*images-service*)
+
+
+(defn get-image [image-arg]
+)
+  ;; (cond
+  ;;  ;; already an image
+  ;;  (instance? Image image-arg)
+  ;;  image-arg
+  ;;  ;; a byte array
+  ;;  (instance? (class (byte-array 0)) image-arg)
+  ;;  (ImagesServiceFactory/makeImage image-arg)
+  ;;  ;; a blob reference
+  ;;  (or (string? image-arg) (instance? BlobKey image-arg))
+  ;;  (ImagesServiceFactory/makeImageFromBlob (ds/as-blob-key image-arg))
+  ;;  blow up
+  ;;  :else (throw (IllegalArgumentException.
+  ;;                "a source image must be a blob key or a byte array"))))
+
+
+
+;;; ----------------------------------------------------------------------------
+;;; transformations
+;;; ----------------------------------------------------------------------------
+
+(defn crop* [left-x top-y right-x bottom-y]
+  (ImagesServiceFactory/makeCrop (double left-x) (double top-y)
+                                 (double right-x) (double bottom-y)))
+
+
+(defn im-feeling-lucky* []
+  (ImagesServiceFactory/makeImFeelingLucky))
+
+
+(defn resize* [width height]
+  (ImagesServiceFactory/makeResize (int width) (int height)))
+
+
+(defn rotate* [degrees-clockwise]
+  (ImagesServiceFactory/makeRotate (int degrees-clockwise)))
+
+
+(defn horizontal-flip* []
+  (ImagesServiceFactory/makeHorizontalFlip))
+
+
+(defn vertical-flip* []
+  (ImagesServiceFactory/makeVerticalFlip))
+
+
+
+;;; ----------------------------------------------------------------------------
+;;; main interface
+;;; ----------------------------------------------------------------------------
+
+(defn transform [image-arg transforms &
+                 {:keys [async? format quality]
+                  :or {async? false
+                       format :jpeg}}]
+  (let [^Image image (get-image image-arg)
+        ^OutputSettings settings (OutputSettings. (*output-formats* format))
+        transforms (if (nil? transforms) [] transforms)
+        n-transforms (count transforms)]
+    (when-not (nil? quality)
+      (.setQuality settings quality))
+    ;; run it
+    (cond
+     ;; just one, use it directly
+     (= 1 (count transforms))
+     (if async?
+         ;; (derefify-future (.applyTransformAsync (get-images-service)
+         ;;                                        (first transforms) image settings))
+         (.applyTransform (get-images-service) (first transforms) image settings))
+     ;; multiples
+     :else
+     (if async?
+         ;; (derefify-future (.applyTransformAsync
+         ;;                   (get-images-service)
+         ;;                   (ImagesServiceFactory/makeCompositeTransform transforms)
+         ;;                   image
+         ;;                   settings))
+         (.applyTransform (get-images-service)
+                          (ImagesServiceFactory/makeCompositeTransform transforms)
+                          image
+                          settings)))))
+
+
+(defn histogram [image-arg]
+  (let [^Image image (get-image image-arg)
+        raw (.histogram (get-images-service) image)
+        [red green blue] raw]
+    (ImageHistogram. (vec red) (vec green) (vec blue))))
+
+
+;; (defn serving-url [blob-key & {:keys [size crop?] :or {crop? false}}]
+;;   (let [blob-key (ds/as-blob-key blob-key)]
+;;     (if-not (nil? size)
+;;         (.getServingUrl (get-images-service) blob-key size crop?)
+;;         (.getServingUrl (get-images-service) blob-key))))


Print :server-ip instead of hard-coded localhost.

--- sidecar/src/figwheel_sidecar/components/figwheel_server.clj
+++ sidecar/src/figwheel_sidecar/components/figwheel_server.clj
@@ -179,7 +179,7 @@
    (let [state (if-not (:file-md5-atom opts)
                  (create-initial-state opts)
                  opts)]
-     (println (str "Figwheel: Starting server at http://localhost:" (:server-port state)))
+     (println (str "Figwheel: Starting server at http://" (:server-ip state) ":" (:server-port state)))
      (assoc state :http-server (server state)))))

 (defn stop-server [{:keys [http-server]}]


Always store merged cache as promise to avoid promisifying the tree

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leif47/immutabledb-experimental.git/'


Add a test demonstating short circuiting in futures/transform

--- core/test/finagle_clojure/futures_test.clj
+++ core/test/finagle_clojure/futures_test.clj
@@ -71,6 +71,15 @@
     (-> (exception (Exception.)) (transform success-fn-a (fn [t] (exception t))) (transform success-fn-b failure-fn-b) await) => :failure-b
     (-> (exception (Exception.)) (transform success-fn-a failure-fn-a) (transform success-fn-b failure-fn-b) await) => :success-b))

+(let [marker (atom 0)
+      success-fn-a (fn [v] (value :success-a))
+      success-fn-b (fn [v] (value (swap! marker inc)))]
+  (facts "transform short circuits"
+    (-> (exception (Exception.)) (transform success-fn-a) (transform success-fn-b) await) => (throws Exception)
+    @marker => 0
+    (-> (value true) (transform success-fn-a) (transform success-fn-b) await) => 1
+    @marker => 1))
+
 (facts "match-class"
   (-> (IllegalArgumentException.) (match-class Exception :expected)) => :expected
   (-> (IllegalArgumentException.) (match-class IllegalArgumentException :expected Exception :unexpected)) => :expected


simplify contexts-for-steps

simplify contexts-for-steps

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tobiasbayer/lambdacd.git/'


Fix pdoseq for empty collections

Fix pdoseq for empty collections

Without this ammendment, it will block indefinitely on empty collections

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jtbeckha/alda.git/'


extract string utility function to misaki.util.string

error: pathspec 'src/misaki/util/string.clj' did not match any file(s) known to git

--- src/misaki/util/string.clj
+++ src/misaki/util/string.clj
@@ -0,0 +1,12 @@
+(ns misaki.util.string
+  "misaki: string utility"
+  (:require [clojure.string :as str]))
+
+; =escape-content
+(defn escape-string
+  "Escape string"
+  [s]
+  (-> s (str/replace #"&" "&")
+        (str/replace #"\"" """)
+        (str/replace #"<" "<")
+        (str/replace #">" ">")))


forgot to check in html helper

forgot to check in html helper

error: pathspec 'src-cljs/frontend/utils/html.cljs' did not match any file(s) known to git

--- src-cljs/frontend/utils/html.cljs
+++ src-cljs/frontend/utils/html.cljs
@@ -0,0 +1,7 @@
+(ns frontend.utils.html
+  ;; need to require runtime for the macro to work :/
+  (:require [hiccups.runtime :as hiccupsrt])
+  (:require-macros [hiccups.core :as hiccups]))
+
+(defn hiccup->html-str [hiccup-form]
+  (hiccups/html hiccup-form))


repl-env: Allow passing :ups-{libs,foreign-libs} via opts.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/modnakasta/weasel.git/'


Working on single and double argument vector ops

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/thinktopic/netlib-ccm.git/'


Added float_regression.clj example.

Added float_regression.clj example.

error: pathspec 'src/examples/float_regression.clj' did not match any file(s) known to git

--- src/examples/float_regression.clj
+++ src/examples/float_regression.clj
@@ -0,0 +1,44 @@
+;; float_regression.clj
+;; an example problem for clojush, a Push/PushGP system written in Clojure
+;; Lee Spector, lspector@hampshire.edu, 2010
+
+;; Differs from simple_regression by using floats and also by precomputing
+;; the fitness cases.
+
+(ns examples.float-regression
+  (:use [clojush]))
+
+;;;;;;;;;;;;
+;; Float symbolic regression of x^3 - 2x^2 - x (problem 5 from the
+;; trivial geography chapter) with minimal float instructions and an
+;; input instruction that uses the auxiliary stack.
+
+(define-registered in
+  (fn [state] (push-item (stack-ref :auxiliary 0 state) :float state)))
+
+(def fitness-cases
+  (for [input (map float (range 10))]
+    [input
+     (- (* input input input)
+        (* 2.0 input input)
+        input)]))
+
+(pushgp
+  :error-function (fn [program]
+                    (doall
+                      (for [[input target] fitness-cases]
+                        (let [state (run-push program
+                                              (push-item input :auxiliary
+                                                         (push-item input :float
+                                                                    (make-push-state))))
+                              top-float (top-item :float state)]
+                          (if (number? top-float)
+                            (Math/abs (- top-float target))
+                            1000)))))
+  :atom-generators (list (fn [] (rand 10))
+                         'in
+                         'float_div
+                         'float_mult
+                         'float_add
+                         'float_sub)
+  :tournament-size 3)


:= must be referred to via intern

:= must be referred to via intern

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


solution 5 clojure

solution 5 clojure

error: pathspec 'clojure/5.clj' did not match any file(s) known to git

--- clojure/5.clj
+++ clojure/5.clj
@@ -0,0 +1,5 @@
+(defn gcd [a, b]
+  (if (= b 0) a (gcd b (mod a b))))
+(defn lcm [a, b]
+  (/ (* a b) (gcd a b)))
+(println (reduce lcm (range 1 21)))


Start using a scale abstraction.

Start using a scale abstraction.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/cstorey/nrod.git/'


Basic version of the first two sections of Sidhe.

error: pathspec 'src/overtunes/songs/sidhe.clj' did not match any file(s) known to git

--- src/overtunes/songs/sidhe.clj
+++ src/overtunes/songs/sidhe.clj
@@ -0,0 +1,49 @@
+(ns overtunes.songs.sidhe
+  (:use [overtone.live])
+  (:use [overtunes.core])
+  (:use [overtunes.instruments.organ-cornet]))
+
+(defn zip [progression basses] (map cons basses progression))
+
+(def descending-C-minor-scale [:C3 :Bb2 :Ab2 :G2 :F2 :Eb2 :D2 :C2])
+
+(def A-young-man-once (zip
+  [(chord :C4 :minor)
+   (chord :G3 :minor)
+   (chord :F3 :minor)
+   (chord :G3 :major)
+   (chord :F3 :minor)
+   (chord :Eb3 :major)
+   (chord :G3 :minor)
+   (chord :C3 :minor)]
+
+   descending-C-minor-scale))
+
+
+(def At-last-he-reached
+  [(chord :C4 :minor)
+   (chord :G3 :minor)
+   (chord :F3 :minor)
+   (chord :F3 :minor)
+   (chord :Bb3 :major)
+   (chord :A3 :major)
+   (chord :D4 :minor)
+   (chord :D4 :minor)
+   (chord :Bb3 :major)
+   (chord :A3 :major)
+   (chord :D4 :minor)
+   (chord :D4 :minor)
+   (chord :Bb3 :major)
+   (chord :A3 :major)
+   (chord :D3 :minor)
+   (chord :D3 :minor)])
+
+(defn sidhe [] (let
+  [m (metronome 120)
+   play-bars (fn [progression metro] (play-progression
+     [progression (take (count progression) (cycle [4/1]))]
+     organ-cornet
+     metro))]
+  (play-bars A-young-man-once (metronome-from m (* 0 4)))
+  (play-bars A-young-man-once (metronome-from m (* 8 4)))
+  (play-bars At-last-he-reached (metronome-from m (* 16 4)))))


Fixed #57 secure-compare length issue

Fixed #57 secure-compare length issue

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/meowcakes/ring.git/'


Test that we can correctly permute byte types

error: pathspec 'test/caesium/binding_test.clj' did not match any file(s) known to git

--- test/caesium/binding_test.clj
+++ test/caesium/binding_test.clj
@@ -0,0 +1,8 @@
+(ns caesium.binding-test
+  (:require [caesium.binding :as b]
+            [clojure.test :refer [deftest is]]))
+
+(deftest permuted-byte-types-test
+  (is (= '[[^long ^{size_t {}} crypto_secretbox_keybytes []]]
+         (#'b/permuted-byte-types
+          '[^long ^{size_t {}} crypto_secretbox_keybytes []]))))


Fixin'

Fixin'

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


link to 2013 site

link to 2013 site

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojurecup/cc2014-frontend.git/'


Various Cider related twiddles

Various Cider related twiddles

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/sw1nn/dotfiles.git/'


Add the signup page

Add the signup page

error: pathspec 'src/circleci/views/signup.clj' did not match any file(s) known to git

--- src/circleci/views/signup.clj
+++ src/circleci/views/signup.clj
@@ -0,0 +1,39 @@
+(ns circleci.views.index
+  (use noir.core
+       hiccup.core
+       hiccup.page-helpers
+       hiccup.form-helpers)
+  (use circleci.views.common))
+
+(defpage "/signup" []
+  (layout
+   [:div#page_title_wrap
+    [:div#page_title
+     [:h3 "Signup for CircleCI"]
+     [:div#clear]]]
+   [:div#content_wrap
+    [:div#content
+     [:div#main_content_wide_wpadding.left
+      [:h1 "Sign up"]
+      [:p.subheading "CircleCI is in alpha right now. Provide your contact information, and we'll contact you when it's ready to try out."]
+      [:p.subheading "Tell us about your environment (which heroku stack, which languages, tools you're using, etc), and which features are most important to you, and we'll prioritize them."]
+      [:form#account {:action "" :method "POST"}
+       [:fieldset
+        [:h3 "Information"]
+        (unordered-list
+         [(list (label "email" "Email address")
+                (text-field {:id "email"
+                             :type "text"} "email"))
+          (list (label "environment" "Your environment")
+                (text-area {:id "environment"
+                            :type "text"
+                            :rows "3"
+                            :cols "50"} "environment"))
+          (list (label "priorities" "Important features")
+                (text-area {:id "priorities"
+                            :type "text"
+                            :rows "3"
+                            :cols "50"} "comments"))])]
+       [:fieldset
+        [:a.call_to_action {:href "#"} "Get Notified"]]]]]]
+   [:div.clear]))


temp rule file for testing

temp rule file for testing

error: pathspec 'kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/irefweb/temp/binary.clj' did not match any file(s) known to git

--- kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/irefweb/temp/binary.clj
+++ kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/irefweb/temp/binary.clj
@@ -0,0 +1,87 @@
+`{:name "irefweb-binary-interactions"
+  :description ""
+  :head ((?/interaction rdfs/subClassOf ?/int_type_id) ;interaction
+
+         ;; create subclasses of the proteins
+         (?/protein1_sc rdfs/subClassOf ?/protein1)
+         (?/protein2_sc rdfs/subClassOf ?/protein2)
+
+         (?/r1 rdf/type owl/Restriction)
+         (?/r1 owl/onProperty obo/RO_0000057) ; has_participant
+         (?/r1 owl/someValuesFrom ?/protein1_sc)
+
+         (?/r2 rdf/type owl/Restriction)
+         (?/r2 owl/onProperty obo/RO_0000057) ; has_participant
+         (?/r2 owl/someValuesFrom ?/protein2_sc)
+
+         (?/interaction rdfs/subClassOf ?/r1)
+         (?/interaction rdfs/subClassOf ?/r2))
+
+  :body
+  ;; get binary interaction records
+  ((_/edge_field kiao/hasTemplate iaoirefweb/IRefWebInteraction_edgeTypeDataField1)
+   (_/edge_field obo/IAO_0000219 ["X" "en"])   ;; "X" signifies binary interaction
+   (_/interaction_record obo/BFO_0000051 _/edge_field)  ;; bfo/has_part
+
+   ;; get the unique interaction identifier
+   (_/interaction_record obo/BFO_0000051 _/interaction_checksum_field) ;; bfo/has_part
+   (_/interaction_checksum_field kiao/hasTemplate iaoirefweb/IRefWebInteraction_checksumInteractionDataField1)
+   (_/interaction_checksum_field obo/IAO_0000219 ?/unique_interaction_id) ;; iao/denotes
+
+   ;; get the interaction type name and ID
+   (_/interaction_record obo/BFO_0000051 _/interaction_type_record) ;; bfo/has_part
+   (_/interaction_type_record kiao/hasTemplate iaoirefweb/IRefWebInteractionTypeSchema1)
+ ;;  (?/interaction_type_record obo/BFO_0000051 ?/int_type_name_field) ;; bfo/has_part
+ ;;  (?/int_type_name_field kiao/hasTemplate iaoirefweb/IRefWebInteractionType_interactionTypeNameDataField1)
+ ;;  (?/int_type_name_field obo/IAO_0000219 ?/int_type_name) ;; iao/denotes
+   (_/interaction_type_record obo/BFO_0000051 _/int_type_id_field) ;; bfo/has_part
+   (_/int_type_id_field kiao/hasTemplate iaoirefweb/IRefWebInteractionType_interactionTypeIdDataField1)
+   (_/int_type_id_field obo/IAO_0000219 _/int_type_id_ice) ;; iao/denotes
+   (_/int_type_id_ice obo/IAO_0000219 ?/int_type_id) ;; iao/denotes
+
+   ;; get the detection method
+   (_/interaction_record obo/BFO_0000051 _/interaction_detection_method_record) ;; bfo/has_part
+   (_/interaction_detection_method_record kiao/hasTemplate iaoirefweb/IRefWebInteractionDetectionMethodSchema1)
+   (_/interaction_detection_method_record obo/BFO_0000051 _/detection_method_id_field) ;; bfo/has_part
+   (_/detection_method_id_field kiao/hasTemplate iaoirefweb/IRefWebInteractionDetectionMethod_detectionMethodIdDataField1)
+   (_/detection_method_id_field obo/IAO_0000219 ?/detection_method_id) ;; iao/denotes
+
+   ;; there is a "super" record in IRefWeb that contains references
+   ;; to the interaction record and interactor record(s)
+   (_/super_record obo/BFO_0000051 _/interaction_record) ;; bfo/has_part
+
+   ;; get the two distinct interactors for this binary interaction
+   (_/super_record obo/BFO_0000051 ?/interactor_record1) ;; bfo/has_part
+   (?/interactor_record1 kiao/hasTemplate iaoirefweb/IRefWebInteractorSchema1)
+   (_/super_record obo/BFO_0000051 ?/interactor_record2) ;; bfo/has_part
+   (?/interactor_record2 kiao/hasTemplate iaoirefweb/IRefWebInteractorSchema1)
+   (!= ?/interactor_record1 ?/interactor_record2)
+
+   ;; get the bioentity (protein) corresponding to interactor 1
+   (?/interactor_record1 obo/BFO_0000051 _/id_field1) ;; bfo/has_part
+   (_/id_field1 kiao/hasTemplate iaoirefweb/IRefWebInteractor_uniqueIdDataField1)
+   (_/id_field1 obo/IAO_0000219 _/id1) ;; iao/denotes
+   (_/id1 obo/IAO_0000219 ?/protein1) ;; iao/denotes
+
+   ;; get the bioentity (protein) corresponding to interactor 2
+   (?/interactor_record2 obo/BFO_0000051 _/id_field2) ;; bfo/has_part
+   (_/id_field2 kiao/hasTemplate iaoirefweb/IRefWebInteractor_uniqueIdDataField1)
+   (_/id_field2 obo/IAO_0000219 _/id2) ;; iao/denotes
+   (_/id2 obo/IAO_0000219 ?/protein2)) ;; iao/denotes
+
+  ;; we take advantage of the fact that IRefWeb has
+  ;; created a unique id for the interaction. This will allow us to reproducibly create
+  ;; a hash for the interaction that can be matched across records.
+  :reify ([?/interaction {:ln (:sha-1 ?/unique_interaction_id)
+                          :ns "kbio" :prefix "I_"}]
+          [?/r1 {:ln (:restriction)
+                 :ns "kbio" :prefix "R_"}]
+          [?/r2 {:ln (:restriction)
+                 :ns "kbio" :prefix "R_"}]
+          [?/protein1_sc {:ln (:sha-1 ?/interaction ?/protein1)
+                          :ns "kbio" :prefix "P_"}]
+          [?/protein2_sc {:ln (:sha-1 ?/interaction ?/protein2)
+                          :ns "kbio" :prefix "P_"}])
+
+  :options {:magic-prefixes [["franzOption_clauseReorderer" "franz:identity"]]}
+  }


Move update-authority-data fn & un-declare

Seems like maybe the reason this was originally declared and then defined later had naturally evolved away.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


fixed bug in update-account

fixed bug in update-account

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/CraZySacX/glitter.git/'


torrent-a partekatu

torrent-a partekatu

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'


clean up some comments

clean up some comments

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


BLAS pooled variance

BLAS pooled variance

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojure-ml/cml.git/'


add is-refundable?, create-payout!

add is-refundable?, create-payout!

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


return community associated with teller property


plan for ability to swap out a ConcurrentHashmap for an ImmutableMap


finite-sequential? helper

finite-sequential? helper


begin chapter 5

begin chapter 5

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aamedina/gltut.git/'


Add session namespace for global management

error: pathspec 'src/cljs/hacker_agent/session.cljs' did not match any file(s) known to git

--- src/cljs/hacker_agent/session.cljs
+++ src/cljs/hacker_agent/session.cljs
@@ -0,0 +1,17 @@
+(ns hacker-agent.session
+  (:require [reagent.core :as reagent :refer [atom]]))
+
+;; ----------
+;; State
+(def app-state (atom {}))
+
+;; ----------
+;; Helper Functions
+(defn global-state [k & [default]]
+  (get @app-state k default))
+
+(defn global-put! [k v]
+  (swap! app-state assoc k v))
+
+(defn local-put! [a k v]
+  (swap! a assoc k v))


Improve toggling

Improve toggling

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/bsmr-clojure/Nightcode.git/'


Move store-es.clj to store_es.clj

Move store-es.clj to store_es.clj

Because it's sooo obvious from the error message that you're not
supposed to replace the dashes in your namespace names with underscores
in their respective file names. SO OBVIOUS.

error: pathspec 'src/brew_monitor/store_es.clj' did not match any file(s) known to git

--- src/brew_monitor/store_es.clj
+++ src/brew_monitor/store_es.clj
@@ -0,0 +1,10 @@
+(ns brew-monitor.store-es
+  (:require [clojurewerkz.elastisch.native :as es]
+            [clojurewerkz.elastisch.native.document :as doc]
+            [clojurewerkz.elastisch.native.response :as response]))
+
+(def conn (es/connect [["127.0.0.1" 9300]] {"cluster.name" "elasticsearch"}))
+
+(defn most-recent-temps []
+  (map #(get-in % [:_source :temp])
+       (response/hits-from (doc/search conn "temp_gauge" "reading" :sort {:time "desc"}))))


Whitespace cleanup.

Whitespace cleanup.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/craigy/chess-cljs.git/'


Don't print stacktraces on error in tx pipeline

This came from the Cognitect copy pasta but probably isn't appropriate here.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/scheduled-message-works.git/'


Implement migrate and load-test-data commands.

--- src/ruuvi_server/launcher.clj
+++ src/ruuvi_server/launcher.clj
@@ -4,6 +4,8 @@
             [ring.adapter.jetty :as jetty]
             [ruuvi-server.core :as ruuvi-server]
             [ruuvi-server.database.entities :as entities]
+            [lobos.migrations :as migrations]
+            [ruuvi-server.database.load-initial-data :as load-initial-data]
             )
   (:use [clojure.tools.logging :only (debug info warn error)])
   (:gen-class))
@@ -90,19 +92,17 @@
           (= engine :aleph) (start-aleph-server config)
           :default (throw (IllegalArgumentException. (str "Unsupported server engine " engine ". Supported 'jetty' and 'aleph'."))))))

-(defn- migrate [config]
+(defn- migrate [config args]
+  (migrations/do-migration (keyword (or (first args) :forward))))

-  )
-
-(defn- load-test-data [config]
-
-  )
+(defn- load-test-data [config args]
+  (load-initial-data/create-test-trackers))

 (defn- parse-command [values]
   (let [value (keyword (first values))]
         (cond (not value) :server
               :default (if (contains? #{:server :migrate :load-test-data} value)
-                         value
+                         (into [value] (rest values))
                          (throw (IllegalArgumentException. "Command must be one of the 'server', 'migrate' or 'load-test-data'."))))))

 (defn -main [& args]
@@ -111,22 +111,22 @@
     (cond (:help params) (display-end-text help)
           (:version params) (display-version))

-    (let [command (parse-command commands-arg)
+    (let [[command & args] (parse-command commands-arg)
           config (load-config params)]
       ;; TODO replace with multimethod
       (cond (= command :server)
             (let []
               (println "RuuviServer starting")
-              (start-server config))
+              (start-server config args))

             (= command :migrate)
             (let []
               (println "Doing migration")
-              (migrate config))
+              (migrate config args))

             (= command :load-test-data)
             (let []
               (println "Load test data to database")
-              (load-test-data config))
+              (load-test-data config args))
             )
       )))


db/download_log.clj: store log of downloaded URLs in SimpleDB

error: pathspec 'src/org/altlaw/db/download_log.clj' did not match any file(s) known to git

--- src/org/altlaw/db/download_log.clj
+++ src/org/altlaw/db/download_log.clj
@@ -0,0 +1,28 @@
+(ns org.altlaw.db.download-log
+  (:require [org.altlaw.util.simpledb :as db])
+  (:import (java.util Date)
+           (org.altlaw.util DateUtils)))
+
+(def #^{:private true} *domain* "DownloadLog")
+
+(defn download-date [url]
+  (let [attrs (db/get-attrs *domain* url)]
+    (when-let [date-string (get attrs "download_date")]
+      (DateUtils/parseDateISO8601 date-string))))
+
+(defn downloaded? [url]
+  (if (download-date url) true false))
+
+(defn enqueue-download [url]
+  (db/put-attrs *domain* url
+                {:queue_date (DateUtils/timestamp)}))
+
+(defn record-download
+  ([url]
+     (db/put-attrs *domain* url
+                   {:download_date (DateUtils/timestamp)}))
+  ([url #^Date date]
+     (db/put-attrs *domain* url
+                   {:download_date
+                    (.format DateUtils/ISO8601_GMT date)})))
+


Problem 0110.

Problem 0110.

error: pathspec 'src/project_euler/problem_0110.clj' did not match any file(s) known to git

--- src/project_euler/problem_0110.clj
+++ src/project_euler/problem_0110.clj
@@ -0,0 +1,43 @@
+(ns project-euler.problem_0110)
+
+;; In the following equation x, y, and n are positive integers.
+
+;; 1   1   1
+;; - + - = -
+;; x   y   n
+
+;; It can be verified that when n = 1260 there are 113 distinct solutions
+;; and this is the least value of n for which the total number of distinct solutions exceeds one hundred.
+
+;; What is the least value of n for which the number of distinct solutions exceeds four million?
+
+;; NOTE: This problem is a much more difficult version of Problem 108
+;; and as it is well beyond the limitations of a brute force approach it requires a clever implementation.
+
+(def primes [2, 3, 5, 7, 11,  13, 17, 19, 23, 29,  31, 37, 41, 43, 47,  53, 59, 61, 67, 71, 73, 79, 83, 89])
+
+(defn count-coprime-pairs [ps]
+  (->> ps
+       (reduce (fn [n k] (+ k n (* 2 n k))))
+       ))
+
+(defn pow [x n]
+  (loop [p 1 n n]
+    (if (zero? n)
+      p
+      (recur (*' p x) (dec n)))))
+
+(defn apply-factors [ps]
+  (->> (map (fn [p k] (pow p k)) primes ps)
+       (reduce *')
+       ))
+
+(defn count-solutions [ps])
+
+;; En essayant d'optimiser manuellement :
+;; (count-coprime-pairs [3 3 2 2 1  1 1 1 1 1  1 1]) -> 4018612
+
+(defn solution []
+  (apply-factors [3 3 2 2 1  1 1 1 1 1  1 1]))
+
+;;-> 9350130049860600


component fixed

component fixed

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mprokopov/privat24-manager.git/'


Start a-trackin' this

Start a-trackin' this

error: pathspec 'src/doctopus/files/storage_impls/temp_fs.clj' did not match any file(s) known to git

--- src/doctopus/files/storage_impls/temp_fs.clj
+++ src/doctopus/files/storage_impls/temp_fs.clj
@@ -0,0 +1,4 @@
+(ns doctopus.files.storage-impls.temp-fs
+  (:require [me.raynes.fs :as fs]))
+
+(def *temp-dir* (fs/temp-dir))


sieve

sieve

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tlight/project-euler.git/'


Refactoring fix

Refactoring fix

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


CMR-3158 unit test for echo10 xml -> umm

error: pathspec 'umm-spec-lib/test/cmr/umm_spec/test/xml_to_umm_mappings/echo10.clj' did not match any file(s) known to git

--- umm-spec-lib/test/cmr/umm_spec/test/xml_to_umm_mappings/echo10.clj
+++ umm-spec-lib/test/cmr/umm_spec/test/xml_to_umm_mappings/echo10.clj
@@ -0,0 +1,32 @@
+(ns cmr.umm-spec.test.xml-to-umm-mappings.echo10
+  (:require
+   [clj-time.core :as t]
+   [clojure.test :refer :all]
+   [cmr.umm-spec.xml-to-umm-mappings.echo10.data-contact :as contact]
+   [cmr.common.xml.parse :refer :all]
+   [cmr.common.xml.simple-xpath :refer [select text]]))
+
+(deftest echo10-contact-role-test
+  (testing "ECHO10 Contact with invalid role and default applied"
+    ;; Test that when the contact role is invalid, the data center defaults to the correct role
+    (let [xml "<Collection>
+                <Contacts>
+                 <Contact>
+                  <Role>USER SERVICES</Role>
+                  <OrganizationName>LPDAAC</OrganizationName>
+                 </Contact>
+                </Contacts>
+               </Collection>"
+          data-centers (contact/parse-data-centers xml true)]
+      (is (= [contact/default-data-center-role] (:Roles (first data-centers)))))
+   (testing "ECHO10 Contact with invalid role and no default applied"
+     (let [xml "<Collection>
+                 <Contacts>
+                  <Contact>
+                   <Role>USER SERVICES</Role>
+                   <OrganizationName>LPDAAC</OrganizationName>
+                  </Contact>
+                 </Contacts>
+                </Collection>"
+           data-centers (contact/parse-data-centers xml false)]
+       (is (= [nil] (:Roles (first data-centers))))))))


Add tests for dasherize & co

Add tests for dasherize & co

error: pathspec 'test/useful/string_test.clj' did not match any file(s) known to git

--- test/useful/string_test.clj
+++ test/useful/string_test.clj
@@ -0,0 +1,19 @@
+(ns useful.string-test
+  (:use useful.string clojure.test))
+
+(deftest to-camel
+  (are [in out] (= out (camelize in))
+       "the-string" "theString"
+       "this-is-real" "thisIsReal"
+       "untouched" "untouched"))
+
+(deftest from-camel
+  (are [in dashed underscored] (= [dashed underscored]
+                                  ((juxt dasherize underscore) in))
+       "setSize"          "set-size"         "set_size"
+       "theURL"           "the-url"          "the_url"
+       "ClassName"        "class-name"       "class_name"
+       "LOUD_CONSTANT"    "loud-constant"    "loud_constant"
+       "the_CRAZY_train"  "the-crazy-train"  "the_crazy_train"
+       "with-dashes"      "with-dashes"      "with_dashes"
+       "with_underscores" "with-underscores" "with_underscores"))


unanswered queries = HTTP 204

unanswered queries = HTTP 204

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/NTerpo/clean-heroku-logs.git/'


Use canonical class name when starting slow processes


solved hamming distance.

solved hamming distance.

error: pathspec 'clojure/point-mutations/dna.clj' did not match any file(s) known to git

--- clojure/point-mutations/dna.clj
+++ clojure/point-mutations/dna.clj
@@ -0,0 +1,12 @@
+(ns dna)
+
+(defn hamming-distance
+  [s1 s2]
+  (loop [[fst-s1 & rst-s1] s1
+         [fst-s2 & rst-s2] s2
+         distance-acc 0]
+    (let [distance (if (= fst-s1 fst-s2) 0 1)
+          distance-acc (+ distance-acc distance)]
+      (if (some empty? [rst-s1 rst-s2])
+        distance-acc
+        (recur rst-s1 rst-s2 distance-acc)))))


whoops, UTM url in tests don't match

whoops, UTM url in tests don't match

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


use layout component for welcome view

use layout component for welcome view

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


Fading out pulse animation

Fading out pulse animation

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dominikzarzecki/meteor-impacts-timelapse.git/'


Fix alignment of cond forms

Fix alignment of cond forms

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/electorate-works.git/'


Added config ns.

Added config ns.

error: pathspec 'src/cmr/authz/config.clj' did not match any file(s) known to git

--- src/cmr/authz/config.clj
+++ src/cmr/authz/config.clj
@@ -0,0 +1,30 @@
+(ns cmr.authz.config
+  (:require
+   [clojure.edn :as edn]
+   [clojure.java.io :as io])
+  (:import
+    (clojure.lang Keyword)))
+
+(def config-file "config/cmr-authz/config.edn")
+
+(defn cfg-data
+  ([]
+    (cfg-data config-file))
+  ([filename]
+    (with-open [rdr (io/reader (io/resource filename))]
+      (edn/read (new java.io.PushbackReader rdr)))))
+
+(defn service->base-url
+  [service]
+  (format "%s://%s:%s"
+          (or (:protocol service) "https")
+          (:host service)
+          (or (:port service) "443")))
+
+(defn service->url
+  [service]
+  (format "%s%s"
+          (service->base-url service)
+          (or (get-in service [:relative :root :url])
+              (:context service)
+              "/")))


Add missing devcards namespace

Add missing devcards namespace

error: pathspec 'devcards/frontend/devcards.cljs' did not match any file(s) known to git

--- devcards/frontend/devcards.cljs
+++ devcards/frontend/devcards.cljs
@@ -0,0 +1,3 @@
+(ns frontend.devcards
+  (:require [frontend.core]
+            [frontend.test-runner]))


New file permutations.clj that will test permutation generation via tree-seq.

error: pathspec 'clojure/org/gavrog/clojure/permutations.clj' did not match any file(s) known to git

--- clojure/org/gavrog/clojure/permutations.clj
+++ clojure/org/gavrog/clojure/permutations.clj
@@ -0,0 +1,11 @@
+(ns org.gavrog.clojure.permutations)
+
+;    def permutations(degree):
+;        def choices(perm):
+;            if 0 in perm:
+;                i = perm.index(0)
+;                return Seq.range(1, degree).select(lambda n: not n in perm).map(
+;                    lambda n: perm[:i] + [n] + perm[i+1:])
+;
+;        return Seq.tree_walk([0] * degree, choices).select(lambda p: not 0 in p)
+


destructure ns, which I prob don't need

destructure ns, which I prob don't need

error: pathspec 'src/com/billpiel/mem_tracer/util/destructure.clj' did not match any file(s) known to git

--- src/com/billpiel/mem_tracer/util/destructure.clj
+++ src/com/billpiel/mem_tracer/util/destructure.clj
@@ -0,0 +1,132 @@
+(ns com.billpiel.mem-tracer.util.destructure)
+
+(declare pb)
+
+(defn p-vec [bvec b val]
+  (let [gvec (with-meta (gensym "vec__")
+               {::placeholder true})]
+    (loop [ret (assoc bvec
+                      gvec
+                      val)
+           n 0
+           bs b
+           seen-rest? false]
+      (if (seq bs)
+        (let [firstb (first bs)]
+          (cond
+            (= firstb '&) (recur (pb ret
+                                     (second bs)
+                                     (drop n (get ret gvec)))
+                                 n
+                                 (nnext bs)
+                                 true)
+            (= firstb :as) (pb ret
+                               (second bs)
+                               gvec)
+            :else (if seen-rest?
+                    (throw (new Exception "Unsupported binding form, only :as can follow & parameter"))
+                    (recur (pb ret
+                               firstb
+                               (nth (get ret gvec)
+                                    n
+                                    nil))
+                           (inc n)
+                           (next bs)
+                           seen-rest?))))
+        ret))))
+
+(defn p-map [bvec b v]
+  (let [gmap (gensym "map__")
+        gmapseq (with-meta gmap {:tag 'clojure.lang.ISeq})
+        defaults (:or b)]
+    (loop [ret (-> bvec
+                   (assoc gmap
+                          (if (seq? v)
+                            (clojure.lang.PersistentHashMap/create (seq v))
+                            v))
+                   ((fn [ret]
+                      (if (:as b)
+                        (assoc ret (:as b) v)
+                        ret))))
+           bes (reduce
+                (fn [bes entry]
+                  (reduce #(assoc %1 %2 ((val entry) %2))
+                          (dissoc bes (key entry))
+                          ((key entry) bes)))
+                (dissoc b :as :or)
+                {:keys #(if (keyword? %) % (keyword (str %))),
+                 :strs str, :syms #(symbol %)})]
+      (if (seq bes)
+        (let [bb (key (first bes))
+              bk (val (first bes))
+              has-default (contains? defaults bb)]
+          (recur (pb ret bb (if has-default
+                              (get (get ret gmap)
+                                   bk
+                                   (defaults bb))
+                              (get (get ret gmap)
+                                   bk)))
+                 (next bes)))
+        ret))))
+
+(defn pb [bvec b v]
+  (cond
+    (symbol? b) (assoc bvec
+                       (if (namespace b) (symbol (name b)) b)
+                       v)
+    (keyword? b) (assoc bvec
+                        (symbol (name b))
+                        v)
+    (vector? b) (p-vec bvec b v)
+    (map? b) (p-map bvec b v)
+    :else (throw (new Exception (str "Unsupported binding form: " b)))))
+
+(defn destructure-to-map [bindings]
+  (let [bents (partition 2 bindings)
+        process-entry (fn [bvec b] (pb bvec (first b) (second b)))]
+    (if-let [kwbs (seq (filter #(keyword? (first %)) bents))]
+      (throw (new Exception (str "Unsupported binding key: " (ffirst kwbs))))
+      (reduce process-entry {} bents))))
+
+(defn arity-match?
+  [arglist args]
+  (let [[a r] (partition-by (partial = '&)
+                            arglist)
+        ca (count a)
+        cargs (count args)]
+    (or (= ca cargs)
+        (and r
+             (< ca cargs)))))
+
+(defn arg-match
+  [arglists args]
+  (let [ arglist (->> arglists
+                      (filter #(arity-match? % args))
+                      first)]
+    (destructure-to-map (list arglist args))))
+
+
+#_ (do
+
+     (destructure-to-map '[a 1 b 2])
+
+     (destructure-to-map '[[a b] [1 2] c 3])
+
+     (-> (destructure-to-map '[[a b] [1 2] c 3])
+         keys
+         first
+         meta)
+
+     (destructure-to-map '[[a & b] [1 2 4] c 3])
+
+     (destructure-to-map '[{a :a} {:a 3}])
+
+     (destructure-to-map '[{:keys [a b] :as ab} {:a 1 :b [3 4 5]}
+                    [_ {[d e & f] :aa} _] [1 {:aa [1 2 3 4 5 6]} 3]
+                    ])
+
+     (defn xxx ([a b] 1) ([a c & b] 2))
+     (partition-by (partial = '&)
+                   ['a 'b '& 'c])
+
+     (clojure.core/destructure '[{a :a} {:a 3}]))


(maint) Handle non-user-data-related schema errors

Validate that the functions used for returning the status from a
service/services have correct inputs and outputs and, if not, return a
well-formatted HTTP error.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nathanielksmith/trapperkeeper-status.git/'


clean up and refactor yggdrasil.parser

clean up and refactor yggdrasil.parser

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jtbeckha/alda.git/'


[WM] s/exclusions/exclude/ in refer-clojure form

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/notification-works.git/'


Fix new identifier creation race condition

I saw this blow up in local testing. I think the pipelining concurrency can allow the message transaction to go in before the identifier creation transaction does. And that's bad.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/scheduled-message-works.git/'


CMR-5192: Added new ns for all concepts.

error: pathspec 'src/cmr/metadata/proxy/concepts/core.clj' did not match any file(s) known to git

--- src/cmr/metadata/proxy/concepts/core.clj
+++ src/cmr/metadata/proxy/concepts/core.clj
@@ -0,0 +1,28 @@
+(ns cmr.metadata.proxy.concepts.core
+  (:require
+   [cmr.http.kit.request :as request]
+   [cmr.http.kit.response :as response]
+   [taoensso.timbre :as log]))
+
+(defn async-get-metadata
+  "Given a data structure with :concept-id, get the nativemetadata for the
+  associated concept."
+  [search-endpoint user-token params]
+  (let [concept-id (:concept-id params)
+        url (format "%s/concepts/%s" search-endpoint concept-id)]
+    (log/debug "Concept query to CMR:" url)
+    (request/async-get
+     url (request/add-token-header {} user-token)
+     {}
+     response/identity-handler)))
+
+(defn extract-metadata
+  [promise]
+  (let [results @promise]
+    (log/trace "Got results from CMR granule collection:" results)
+    results))
+
+(defn get-metadata
+  [search-endpoint user-token params]
+  (let [promise (async-get-metadata search-endpoint user-token params)]
+    (extract-metadata promise)))


CMR-203: Added initial test for keyword searches.

error: pathspec 'test/cmr/system_int_test/search/collection_keyword_search_test.clj' did not match any file(s) known to git

--- test/cmr/system_int_test/search/collection_keyword_search_test.clj
+++ test/cmr/system_int_test/search/collection_keyword_search_test.clj
@@ -0,0 +1,87 @@
+(ns cmr.system-int-test.search.collection-keyword-search-test
+  "Integration test for CMR collection search by keyword terms"
+  (:require [clojure.test :refer :all]
+            [cmr.system-int-test.utils.ingest-util :as ingest]
+            [cmr.system-int-test.utils.search-util :as search]
+            [cmr.system-int-test.utils.index-util :as index]
+            [cmr.system-int-test.data2.collection :as dc]
+            [cmr.system-int-test.data2.core :as d]))
+
+(use-fixtures :each (ingest/reset-fixture "CMR_PROV1" "CMR_PROV2"))
+
+(deftest search-by-keywords
+  (let [psa1 (dc/psa "alpha" :string "ab")
+        psa2 (dc/psa "bravo" :string "bf")
+        psa3 (dc/psa "charlie" :string "foo")
+        psa4 (dc/psa "case" :string "up")
+        sk1 (dc/science-keyword {:category "Cat1"
+                                 :topic "Topic1"
+                                 :term "Term1"
+                                 :variable-level-1 "Level1-1"
+                                 :variable-level-2 "Level1-2"
+                                 :variable-level-3 "Level1-3"
+                                 :detailed-variable "Detail1"})
+        sk2 (dc/science-keyword {:category "Hurricane"
+                                 :topic "Popular"
+                                 :term "Extreme"
+                                 :variable-level-1 "Level2-1"
+                                 :variable-level-2 "Level2-2"
+                                 :variable-level-3 "Level2-3"
+                                 :detailed-variable "UNIVERSAL"})
+        coll1 (d/ingest "CMR_PROV1" (dc/collection {}))
+        coll2 (d/ingest "CMR_PROV1" (dc/collection {:entry-id "ABC!XYZ"}))
+        coll3 (d/ingest "CMR_PROV1" (dc/collection {:collection-data-type "Foo"}))
+        coll4 (d/ingest "CMR_PROV2" (dc/collection {:collection-data-type "Bar"}))
+        coll5 (d/ingest "CMR_PROV2" (dc/collection {:short-name "Short name"}))
+        coll6 (d/ingest "CMR_PROV2" (dc/collection {:archive-center "Some$Place"}))
+        coll7 (d/ingest "CMR_PROV2" (dc/collection {:version-id "ABC123"}))
+        coll8 (d/ingest "CMR_PROV2" (dc/collection {:processing-level-id "PDQ123"}))
+        coll9 (d/ingest "CMR_PROV2" (dc/collection {:science-keywords [sk1 sk2]}))
+        coll10 (d/ingest "CMR_PROV2" (dc/collection {:spatial-keywords ["in out"]}))
+        coll11 (d/ingest "CMR_PROV2" (dc/collection {:platform-sn "Space Laser"}))
+        coll12 (d/ingest "CMR_PROV2" (dc/collection {:product-specific-attributes [psa1 psa2 psa3 psa4]}))
+        coll13 (d/ingest "CMR_PROV2" (dc/collection {:two-d-coord-name "XY"}))]
+
+    (index/refresh-elastic-index)
+
+    (testing "search by keywords."
+      (are [keyword-str items] (d/refs-match? items (search/find-refs :collection {:keyword keyword-str}))
+           "ABC" [coll2]
+           "XYZ" [coll2 coll13]
+           "place" [coll6]
+           "Laser" [coll11]
+           "ABC place Huricane" [coll2 coll6 coll9]
+           "BLAH" []))
+    ; (testing "search by spatial keywords using wildcard *."
+    ;   (is (d/refs-match? [coll3 coll4 coll5 coll7]
+    ;                      (search/find-refs :collection
+    ;                                        {:spatial-keyword "D*"
+    ;                                         "options[spatial-keyword][pattern]" "true"}))))
+    ; (testing "search by spatial keywords using wildcard ?."
+    ;   (is (d/refs-match? [coll4 coll6]
+    ;                      (search/find-refs :collection
+    ;                                        {:spatial-keyword "L?"
+    ;                                         "options[spatial-keyword][pattern]" "true"}))))
+    ; (testing "search by spatial keywords case default is ignore case true."
+    ;   (is (d/refs-match? [coll5 coll7]
+    ;                      (search/find-refs :collection
+    ;                                        {:spatial-keyword "detroit"}))))
+    ; (testing "search by spatial keywords ignore case false."
+    ;   (is (d/refs-match? [coll7]
+    ;                      (search/find-refs :collection
+    ;                                        {:spatial-keyword "detroit"
+    ;                                         "options[spatial-keyword][ignore-case]" "false"}))))
+    ; (testing "search by spatial keywords ignore case true."
+    ;   (is (d/refs-match? [coll5 coll7]
+    ;                      (search/find-refs :collection
+    ;                                        {:spatial-keyword "detroit"
+    ;                                         "options[spatial-keyword][ignore-case]" "true"}))))
+    ; (testing "search by spatial keywords, options :or."
+    ;   (is (d/refs-match? [coll3 coll4]
+    ;                      (search/find-refs :collection {"spatial-keyword[]" ["DC" "LA"]
+    ;                                                     "options[spatial-keyword][or]" "true"}))))
+    ; (testing "search by spatial keywords, options :and."
+    ;   (is (d/refs-match? [coll4]
+    ;                      (search/find-refs :collection {"spatial-keyword[]" ["DC" "LA"]
+    ;                                                     "options[spatial-keyword][and]" "true"}))))))
+    ))


api not incidents

api not incidents

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


Fix tests

Fix tests

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Updated links#collaboration-roots for collaboration roots

- Make sure we have collaboration roots for Projects and Sources


adding populate

adding populate

error: pathspec 'src/celestial/populate.clj' did not match any file(s) known to git

--- src/celestial/populate.clj
+++ src/celestial/populate.clj
@@ -0,0 +1,4 @@
+(ns celestial.populate
+  "A tool for populating Celestial with data in production envs"
+
+ )


Module with DB connectors specifications

error: pathspec 'src/clj_mrazik/db_spec.clj' did not match any file(s) known to git

--- src/clj_mrazik/db_spec.clj
+++ src/clj_mrazik/db_spec.clj
@@ -0,0 +1,21 @@
+;
+;  (C) Copyright 2017  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns clj-mrazik.db-spec
+    "Namespace that contains configuration of all JDBC sources.")
+
+(def mrazik-db
+    {:classname   "org.sqlite.JDBC"
+     :subprotocol "sqlite"
+     :subname     "oknobot.db"
+    })
+


output properties in list

output properties in list

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pyr/bundes.git/'


colorful stacktraces in nrepl.

colorful stacktraces in nrepl.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/sw1nn/dotfiles.git/'


Hello world to clojure

Hello world to clojure

error: pathspec 'clojure/hello.clj' did not match any file(s) known to git

--- clojure/hello.clj
+++ clojure/hello.clj
@@ -0,0 +1,27 @@
+; Hello world
+(println "Hello, world")
+
+; Looping via recursion.
+(defn sum
+  ([cur] (sum cur 0))
+  ([cur acc]
+   (if (= cur 0)
+     acc
+     (sum (- cur 1) (+ acc cur)))
+   )
+  )
+
+(println "Sum 0 to 100 is" (sum 100))
+
+; let is used to bind variables to a given scope.
+(let
+  [ x 1 y 2 z 3]
+  (let
+    [s (+ x y z)]
+    (println s)
+    )
+  )
+
+; Sequences
+(println (map (fn [x] (+ x 1)) [1 2 3 4 5 6]))
+(println (filter (fn [x] (= (mod x 2) 0)) [1 2 3 4 5 6]))


Add new _media_all_received constant symbol

--- src/hatti/constants.cljs
+++ src/hatti/constants.cljs
@@ -7,6 +7,7 @@
 (def _notes "_notes")
 (def _rank "_rank")
 (def _submission_time "_submission_time")
+(def _media_all_received "_media_all_received")
 (def _submitted_by "_submitted_by")
 (def photo "Photo")


Added clojush.problems.regression.uball5d; lein release :minor

error: pathspec 'src/clojush/problems/regression/uball5d.clj' did not match any file(s) known to git

--- src/clojush/problems/regression/uball5d.clj
+++ src/clojush/problems/regression/uball5d.clj
@@ -0,0 +1,53 @@
+;; uball5d.clj
+;; an example problem for clojush, a Push/PushGP system written in Clojure
+;; Lee Spector, lspector@hampshire.edu, 2017
+
+(ns clojush.problems.regression.uball5d
+  (:use [clojush.pushgp.pushgp]
+        [clojush.pushstate]
+        [clojush.random]
+        [clojush.interpreter]
+        [clojure.math.numeric-tower]))
+
+;;;;;;;;;;;;
+;; Floating point symbolic regression of the Vladislavleva 2009 UBall5D problem.
+
+;; Each training case will be in the form [[x1 x2 x3 x4 x5] y], where the xs are
+;; inputs and y is the output.
+
+(def uball5d-training-cases
+  (for [xseq (repeatedly 1024
+                         (fn [] (repeatedly 5
+                                            #(+ 0.05 (lrand 6.05)))))]
+    [xseq
+     (->> (map (fn [x] (#(* % %) (- x 3)))
+               xseq)
+          (reduce +)
+          (+ 5)
+          (/ 10.0))]))
+
+(def argmap
+  {:error-function (fn [program]
+                     (doall
+                       (for [[[x1 x2 x3 x4 x5] y] uball5d-training-cases]
+                         (let [result (->> (run-push program
+                                                     (->> (make-push-state)
+                                                          (push-item x1 :input)
+                                                          (push-item x2 :input)
+                                                          (push-item x3 :input)
+                                                          (push-item x4 :input)
+                                                          (push-item x5 :input)))
+                                           (top-item :float))]
+                           (if (number? result)
+                             (Math/abs (- result y))
+                             1000000)))))
+   :atom-generators (conj '[float_div float_mult float_sub float_add
+                            float_rot float_swap float_dup float_pop
+                            in1 in2 in3 in4 in5]
+                          lrand)
+   :error-threshold 0.01
+   :epigenetic-markers []
+   :parent-selection :epsilon-lexicase
+   :genetic-operator-probabilities {:alternation 0.5
+                                    :uniform-mutation 0.5}})
+


update delete copy to hint at deactivation

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


Clean up REPL reloading

Clean up REPL reloading

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/bsmr-clojure/Nightcode.git/'


prefer short type name (per input)

prefer short type name (per input)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


Add timbre config

Add timbre config

error: pathspec 'config/timbre.clj' did not match any file(s) known to git

--- config/timbre.clj
+++ config/timbre.clj
@@ -0,0 +1,42 @@
+{  ;;; Control log filtering by namespace patterns (e.g. ["my-app.*"]).
+   ;;; Useful for turning off logging in noisy libraries, etc.
+   :ns-whitelist []
+   :ns-blacklist []
+
+   ;; Fns (applied right-to-left) to transform/filter appender fn args.
+   ;; Useful for obfuscating credentials, pattern filtering, etc.
+   :middleware []
+
+   ;;; Control :timestamp format
+   :timestamp-pattern "yyyy-MMM-dd HH:mm:ss ZZ" ; SimpleDateFormat pattern
+   :timestamp-locale  nil ; A Locale object, or nil
+
+   ;; Output formatter used by built-in appenders. Custom appenders may (but are
+   ;; not required to use) its output (:output). Extra per-appender opts can be
+   ;; supplied as an optional second (map) arg.
+   :fmt-output-fn
+   (fn [{:keys [level throwable message timestamp hostname ns]}
+       ;; Any extra appender-specific opts:
+       & [{:keys [nofonts?] :as appender-fmt-output-opts}]]
+     ;; <timestamp> <hostname> <LEVEL> [<ns>] - <message> <throwable>
+     (format "%s %s %s [%s] - %s%s"
+       timestamp hostname (-> level name str/upper-case) ns (or message "")
+       (or (stacktrace throwable "\n" (when nofonts? {})) "")))
+
+   :shared-appender-config {} ; Provided to all appenders via :ap-config key
+   :spit-filename "logs/dungeon-crusade.log"
+   :appenders
+   {:standard-out
+    {:doc "Prints to *out*/*err*. Enabled by default."
+     :min-level :warn :enabled? false :async? true :rate-limit nil
+     :fn (fn [{:keys [error? output]}] ; Use any appender args
+           (binding [*out* (if error? *err* *out*)]
+             (str-println output)))}
+
+    :spit
+    {:doc "Spits to `(:spit-filename :shared-appender-config)` file."
+     :min-level :warn :enabled? false :async? false :rate-limit nil
+     :fn (fn [{:keys [ap-config output]}] ; Use any appender args
+           (when-let [filename (:spit-filename ap-config)]
+             (try (spit filename output :append true)
+                  (catch java.io.IOException _))))}}}