Use are macro in util tests.

Use are macro in util tests.

--- test/react/who/util_test.cljs
+++ test/react/who/util_test.cljs
@@ -1,45 +1,54 @@
 (ns react.who.util-test
   (:import goog.Uri)
-  (:require-macros [cemerick.cljs.test :refer [is deftest testing]]
+  (:require-macros [cemerick.cljs.test :refer [are is deftest testing]]
                    [react.who.core :refer [with-base-url]])
   (:require [cemerick.cljs.test :as t]
             [react.who.util :refer [as-str to-str to-uri]]))

 (deftest test-as-str
-  (is (= (as-str "foo") "foo"))
-  (is (= (as-str :foo) "foo"))
-  (is (= (as-str 100) "100"))
-  ;; (is (= (as-str 4/3) (str (float 4/3))))
-  (is (= (as-str "a" :b 3) "ab3"))
-  (is (= (as-str (Uri. "/foo")) "/foo"))
-  (is (= (as-str (Uri. "localhost:3000/foo")) "localhost:3000/foo")))
+  (are [args expected]
+    (is (= expected (apply as-str args)))
+    ["foo"] "foo"
+    [:foo] "foo"
+    [100] "100"
+    ["a" :b 3] "ab3"
+    [(Uri. "/foo")] "/foo"
+    [(Uri. "localhost:3000/foo")] "localhost:3000/foo"))

 (deftest test-to-uri
   (testing "with no base URL"
-    (is (= (to-str (to-uri "foo")) "foo"))
-    (is (= (to-str (to-uri "/foo/bar")) "/foo/bar"))
-    (is (= (to-str (to-uri "/foo#bar")) "/foo#bar")))
+    (are [obj expected]
+      (is (= expected (to-str (to-uri obj))))
+      "foo" "foo"
+      "/foo/bar" "/foo/bar"
+      "/foo#bar" "/foo#bar"))
   (testing "with base URL"
     (with-base-url "/foo"
-      (is (= (to-str (to-uri "/bar")) "/foo/bar"))
-      (is (= (to-str (to-uri "http://example.com")) "http://example.com"))
-      (is (= (to-str (to-uri "https://example.com/bar")) "https://example.com/bar"))
-      (is (= (to-str (to-uri "bar")) "bar"))
-      (is (= (to-str (to-uri "../bar")) "../bar"))
-      (is (= (to-str (to-uri "//example.com/bar")) "//example.com/bar"))))
+      (are [obj expected]
+        (is (= expected (to-str (to-uri obj))))
+        "/bar" "/foo/bar"
+        "http://example.com" "http://example.com"
+        "https://example.com/bar" "https://example.com/bar"
+        "bar" "bar"
+        "../bar" "../bar"
+        "//example.com/bar" "//example.com/bar")))
   (testing "with base URL for root context"
     (with-base-url "/"
-      (is (= (to-str (to-uri "/bar")) "/bar"))
-      (is (= (to-str (to-uri "http://example.com")) "http://example.com"))
-      (is (= (to-str (to-uri "https://example.com/bar")) "https://example.com/bar"))
-      (is (= (to-str (to-uri "bar")) "bar"))
-      (is (= (to-str (to-uri "../bar")) "../bar"))
-      (is (= (to-str (to-uri "//example.com/bar")) "//example.com/bar"))))
+      (are [obj expected]
+        (is (= expected (to-str (to-uri obj))))
+        "/bar" "/bar"
+        "http://example.com" "http://example.com"
+        "https://example.com/bar" "https://example.com/bar"
+        "bar" "bar"
+        "../bar" "../bar"
+        "//example.com/bar" "//example.com/bar")))
   (testing "with base URL containing trailing slash"
     (with-base-url "/foo/"
-      (is (= (to-str (to-uri "/bar")) "/foo/bar"))
-      (is (= (to-str (to-uri "http://example.com")) "http://example.com"))
-      (is (= (to-str (to-uri "https://example.com/bar")) "https://example.com/bar"))
-      (is (= (to-str (to-uri "bar")) "bar"))
-      (is (= (to-str (to-uri "../bar")) "../bar"))
-      (is (= (to-str (to-uri "//example.com/bar")) "//example.com/bar")))))
+      (are [obj expected]
+        (is (= expected (to-str (to-uri obj))))
+        "/bar" "/foo/bar"
+        "http://example.com" "http://example.com"
+        "https://example.com/bar" "https://example.com/bar"
+        "bar" "bar"
+        "../bar" "../bar"
+        "//example.com/bar" "//example.com/bar"))))


Added unit tests for math module.

Added unit tests for math module.

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

--- test/simulacrum/math_test.clj
+++ test/simulacrum/math_test.clj
@@ -0,0 +1,85 @@
+(ns simulacrum.math-test
+  (:require [clojure.test :refer :all]
+            [clojure.core.matrix :as matrix]
+            [simulacrum.math :as math]))
+
+
+(def person-1
+  (matrix/matrix [[0.7M 0.5M 0.9M 0.8M 0.1M]]))
+
+(def person-2
+  (matrix/matrix [[0.1M 0.9M 0.1M 0.7M 0.8M]]))
+
+(def person-3 [[1 4]])
+
+(def person-4 [[3 4]])
+
+(def matrix-1
+  (matrix/matrix [[1 2]
+                  [3 4]]))
+
+(def matrix-2
+  (matrix/matrix [[1 2 3]
+                  [4 5 6]
+                  [7 8 9]]))
+
+(deftest test-get-scalar-distance
+  (is (= 0.0
+         (math/get-scalar-distance person-1 person-1)))
+  (is (= 1.2884098726725126
+         (math/get-scalar-distance person-1 person-2))))
+
+(deftest test-get-matrix-difference
+  (is (= [[0.0M 0.0M 0.0M 0.0M 0.0M]]
+         (math/get-matrix-difference person-1 person-1)))
+  (is (= [[0.6M 0.4M 0.8M 0.1M 0.7M]]
+         (math/get-matrix-difference person-1 person-2))))
+
+(deftest test-get-inverted-matrix-difference
+  (is (= [[1.0M 1.0M 1.0M 1.0M 1.0M]]
+         (math/get-inverted-matrix-difference person-1 person-1)))
+  (is (= [[0.4M 0.6M 0.2M 0.9M 0.3M]]
+         (math/get-inverted-matrix-difference person-1 person-2))))
+
+(deftest test-normalize-matrix
+  (is (= [[1/2 1]
+          [3/2 2]]
+         (math/normalize-matrix matrix-1)))
+  (is (= [[1/2 1]
+          [3/2 2]]
+         (math/normalize-matrix matrix-1 :dimension)))
+  (is (= [[1/4 1/2]
+          [3/4 1]]
+         (math/normalize-matrix matrix-1 :largest)))
+  (is (= [[1/3 2/3 1]
+          [4/3 5/3 2]
+          [7/3 8/3 3]]
+         (math/normalize-matrix matrix-2)))
+  (is (= [[1/9 2/9 1/3]
+          [4/9 5/9 2/3]
+          [7/9 8/9 1]]
+         (math/normalize-matrix matrix-2 :largest))))
+
+(deftest test-get-normalized-matrix
+  (is (= [[7/2 5]
+          [15/2 11]]
+         (math/get-normalized-matrix matrix-1 matrix-1)))
+  (is (= [[7/2 5]
+          [15/2 11]]
+         (math/get-normalized-matrix matrix-1 matrix-1 :dimension)))
+  (is (= [[7/22 5/11]
+          [15/22 1]]
+         (math/get-normalized-matrix matrix-1 matrix-1 :largest))))
+
+(deftest test-compute-compatibility-matrix
+  (is (= [[15/2 11]
+          [30 44]]
+         (math/compute-compatibility-matrix person-3 person-4 matrix-1)))
+  (is (= [[15/2 11]
+          [30 44]]
+         (math/compute-compatibility-matrix
+           person-3 person-4 matrix-1 :dimension)))
+  (is (= [[15/88 1/4]
+          [15/22 1]]
+         (math/compute-compatibility-matrix
+           person-3 person-4 matrix-1 :largest))))


number and area code done.

number and area code done.

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

--- clojure/phone-number/phone.clj
+++ clojure/phone-number/phone.clj
@@ -0,0 +1,37 @@
+(ns phone
+  (:require [clojure.string :as str :only [join]]))
+
+(defn- cleanse
+  "select only the numbers from the given string"
+  [num]
+  (str/join ""
+        (re-seq #"\d" num)))
+
+(defn- valid?
+  [num]
+  (let [length (count num)]
+    (or
+       (= 10 length)
+       (and (= 11 length)
+            (= \1 (first num))))))
+
+(defn- transform
+  [num]
+  "Format the phone number"
+  (if (= 11 (count num))
+    (str/join "" (drop 1 num))
+    num))
+
+(defn number
+  [num]
+  (let [num (cleanse num)]
+    (if (valid? num)
+      (transform num)
+      "0000000000")))
+
+(defn area-code
+  [num]
+  (re-find #"\d{3}" (number num)))
+
+(defn pretty-print
+  [num])


cleanup

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/jeelabs/jet.git/'


Added salava.badge.ui.endorsement namespace

error: pathspec 'src/cljs/salava/badge/ui/endorsement.cljs' did not match any file(s) known to git

--- src/cljs/salava/badge/ui/endorsement.cljs
+++ src/cljs/salava/badge/ui/endorsement.cljs
@@ -0,0 +1,99 @@
+(ns salava.badge.ui.endorsement
+    (:require [salava.core.i18n :refer [t]]
+              [reagent.core :refer [atom cursor create-class]]
+              [reagent-modals.modals :as m :refer [close-modal!]]
+              [salava.badge.ui.helper :as bh]
+              [salava.core.time :refer [unix-time date-from-unix-time]]
+              [reagent-modals.modals :as m]
+              [salava.core.ui.modal :as mo]))
+
+(def views (atom []))
+
+(defn set-new-view [modal]
+  (reset! views (conj @views [modal])))
+
+
+(defn modal-content []
+  [:div {:id "badge-content"}
+   [:div.modal-body
+    [:div
+     [:div.col-md-12
+      (if (< 1 (count @views))
+        [:div {:class "pull-left"}
+         [:button {:type  "button"
+                   :class "close"
+                   :aria-label "OK"
+                   :on-click #(do
+                                (reset! views (pop @views))
+                                (.preventDefault %))}
+          [:i {:class "fa fa-arrow-circle-left" :aria-hidden "true"}]]])
+      [:div {:class "text-right"}
+       [:button {:type         "button"
+                 :class        "close"
+                 :data-dismiss "modal"
+                 :aria-label   "OK"}
+        [:span {:aria-hidden             "true"
+                :dangerouslySetInnerHTML {:__html "×"}}]]]]]
+    [:div (last @views)]]
+   [:div.modal-footer ]])
+
+
+(defn endorser-content [endorsement]
+  (let [{:keys [endorser_name endorser_image endorser_description endorser_url endorser_email endorser_endorsements]} endorsement]
+   (create-class {:reagent-render
+                  (fn []
+                    (bh/endorser-info-displayer endorser_name endorser_url endorser_description endorser_email endorser_image endorser_endorsements))})))
+
+
+(defn inline-endorsement-modal [endorsement]
+  (let [{:keys [endorser_name endorser_image endorsement_comment endorsement_issuedon]} endorsement]
+   [:div {:class "media endorsement-content-item"}
+     [:div.endcontent
+        [:div [:i {:class "fa fa-thumbs-o-up" :style {:font-size "20px"}}]]
+        [:div {:class "endorsement-body-container"}
+         [:div.namedate
+          [:div.name [:h4 {:class "media-heading endorser-body"}
+          [:a {:href "#"
+                :on-click #(do (.preventDefault %) (set-new-view (endorser-content endorsement)))
+               } endorser_name]]]
+          [:div.date [:span (date-from-unix-time (* 1000 endorsement_issuedon))]]
+          ]
+          [:div.commentbox
+            [:span {:style {:font-style "italic"} } endorsement_comment]]
+        ]]]))
+
+
+(defn endorsement-content [endorsements]
+  (let [sorted-endorsements (sort-by :endorsement_issuedon endorsements)]
+    [:div.row
+      [:h1.uppercase-header.endorsement-heading  (t :badge/endorsements)]
+       (into [:div]
+             (for [endorsement sorted-endorsements]
+                  (inline-endorsement-modal endorsement)))]))
+
+(defn modal-init [view]
+  (create-class {:component-will-mount   (fn [] (reset! views [view]))
+                 :reagent-render         (fn [] (modal-content))
+                 :component-will-unmount (fn [] (do (close-modal!)
+                                                    (reset! views [])))}))
+
+
+(defn open-modal [endorsements]
+  (m/modal! [modal-init (endorsement-content endorsements)] {:size :lg}))
+
+(defn endorsement-modal-link [endorsement-count endorsements]
+  (fn []
+    [:div.row
+        [:div.col.xs-12
+         [:hr.endorsementhr]
+            [:a.endorsementlink {
+                       :class "endorsement-link"
+                       :href "#"
+                       :on-click #(do
+                                      (.preventDefault %)
+                                      (open-modal endorsements))}
+                (if (== endorsement-count 1)
+                  (str  endorsement-count " " (t :badge/endorsement))
+                  (str  endorsement-count " " (t :badge/endorsements)))]]]))
+
+


rev multi-arity impls in extend-protocol

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/'


ops namespace is a mess, but contains the secret sauce now

error: pathspec 'src/funimage/imagej/ops.clj' did not match any file(s) known to git

--- src/funimage/imagej/ops.clj
+++ src/funimage/imagej/ops.clj
@@ -0,0 +1,251 @@
+(ns funimage.imagej.ops
+  (:require [funimage.imagej :as ij]
+            [clojure.string :as string]))
+
+(defn get-available-commands
+  "Return a list of available commands."
+  []
+  (.getCommands (.command ij/ij)))
+
+; -------- Temp
+
+#_(doseq [ci (get-available-commands)]
+   (println (.getIdentifier ci)))
+
+#_(def create-ops (some #(when (.contains (.getIdentifier %) "CreateImgFromDimsAndType")
+                          (println (.getIdentifier %))
+                          %) (get-available-commands)))
+
+#_(defn create-img-from-dims-and-type
+   ""
+   [dim tpe]
+   (let [io-map {"in1" dim
+                 "in2" tpe}
+         module (.createModule create-ops)]
+     (.setContext module (.context ij/ij))
+     (.setInput module "in1" dim)
+     (.setInput module "in2" tpe)
+     (println "in1" dim)
+     (println "in2" tpe)
+     (.run module)
+     #_(.run (.command ij/ij)
+        create-ops
+        true
+        io-map)))
+
+#_(create-img-from-dims-and-type (net.imglib2.FinalInterval. (long-array [10 10]))
+                                (net.imglib2.type.numeric.real.DoubleType.))
+
+(require '[clojure.reflect :as r])
+
+(def op-list (.infos (.op ij/ij)))
+
+;(def this-op (nth op-list 637))
+(def this-op (first op-list))
+
+(def this-op (some #(when (= "create" (.getNamespace %)) %) (shuffle op-list))) this-op
+
+(def this-ns (create-ns (symbol (string/join "." [(.getName *ns*) (.getNamespace this-op)]))))
+
+;(def this-var (intern this-ns (symbol (.getName this-op)) ))
+
+(.cInfo this-op)
+
+(def this-module (.createModule (.cInfo this-op)))
+
+;(.setInput this-module "in1" (net.imglib2.FinalInterval. (long-array [10 10])))
+;(.setInput this-module "in2" (net.imglib2.type.numeric.real.DoubleType.))
+;(.run this-module)
+
+#_(net.imagej.ops.create.img.CreateImgFromDimsAndType. (net.imglib2.FinalInterval. (long-array [10 10]))
+                                                      (net.imglib2.type.numeric.real.DoubleType.))
+
+(.inputs (.cInfo this-op))
+
+#_(def tmp (net.imagej.ops.create.img.CreateImgFromDimsAndType.))
+
+(def fi (net.imglib2.FinalInterval. (long-array [10 10])))
+(def tpe (net.imglib2.type.numeric.real.DoubleType.))
+
+;(.img (.create (.op ij/ij)) fi tpe)
+
+(count (filter #(= (:name %) 'img) (:members (r/reflect (.create (.op ij/ij))))))
+
+(def namespaces
+  (into #{}
+        (filter identity
+                (for [op-name (.ops (.op ij/ij))]
+                  (first (string/split op-name #"\."))))))
+
+;(.create (.op ij/ij))
+(defmacro ops-ns-expression
+  [ns-str]
+  (let [ns-name (symbol (str "." ns-str))]
+    `(~ns-name (.op ij/ij))))
+
+(def op-method (nth (seq (:members (r/reflect (ops-ns-expression "create")))) 17))
+
+#_(defn op-expression
+   [ns-str op-signature]
+   (let [ns-name (symbol (str "." ns-str))
+         op-str (symbol (str "." (:name op-signature)))]
+     `(fn [^longs dimensions]
+        (~op-str (~ns-name (.op ij/ij)) dimensions))))
+#_(def ftmp (op-expression "create" op-method))
+
+;(ftmp fi)
+
+
+#_((op-expression "create" op-method) fi)
+
+#_(let [op-expression "(.op ij/ij)"]
+   (first (for [op-name (.ops (.op ij/ij))]
+            (let [parts (string/split op-name #"\.")]
+              (println (str "(." (second parts) " (." (first parts) " " op-expression "))"))))))
+
+(defn make-typehint
+  "Make the typehint for a command input's type."
+  [input-type]
+  ;(.println (System/err) (str input-type " " (.toString input-type)))
+  ;(.println (System/err) (str input-type " " (.toString input-type)))
+  (if-not input-type
+    ""
+    (let [type-string (.toString input-type)
+          parts (string/split type-string #" ")]
+      (if (= 1 (count parts))
+        ;(str "^" (first parts))
+        ""
+        (let [classname (second parts)]
+          ;(.println (System/err) (string/join " " parts))
+          (cond (= classname "[J") "^longs"
+                (= classname "[I") "^ints"
+                (= classname "[D") "^doubles"
+                (.startsWith classname "[[") ""
+                :else
+                (str "^" classname)))))))
+
+(def infos-ignore #{"eval" "help" "identity" "info" "infos" "join" "loop" "map" "module" "op" "ops" "parent" "namespace" "run" "slice"})
+
+(def valid-ops (into #{} (.ops (.op ij/ij))))
+
+; Makes all ops as independent functions
+(def op-list
+  (doall
+    (for [op-info (filter #(valid-ops (.getName %))
+                          (filter #(not (infos-ignore (.getName %)))
+                                  (.infos (.op ij/ij))))]
+      (eval
+        (let [expr (with-out-str
+                     (let [op-expression "(.op ij/ij)"]
+                       ;(.println (System/err) (str "defn " (.getName op-info) op-info))
+                       (let [parts (string/split (.getName op-info) #"\.")
+                             cinfo (.cInfo op-info)
+                             arg-list (string/join
+                                        " "
+                                        (map #(str (make-typehint (.getType %)) " " (.getName %))
+                                             (seq (.inputs cinfo))))
+                             args-to-pass (string/join
+                                        " "
+                                        (map #(.getName %)
+                                             (seq (.inputs cinfo))))]
+                         #_(.println (System/err) (string/join " " (map #(.getType %) (seq (.inputs cinfo)))))
+                         (println "(defn" (string/replace (.getName op-info) "." "-"))
+                         (println "\t\"" (.getTitle cinfo) "\"")
+                         (println "\t[" arg-list "]")
+                         (println (str "\t(." (second parts) " (." (first parts) " " op-expression ") " args-to-pass "))")))))]
+          ;(println expr)
+          (read-string expr))))))
+
+#_(def gops (group-by #(.getName %) (filter #(valid-ops (.getName %))
+                                           (filter #(not (infos-ignore (.getName %)))
+                                                   (.infos (.op ij/ij))))))
+
+#_(for [[op-name op-infos] gops
+       op-info op-infos]
+   (str op-name (when (> (count op-infos) 1)
+                  (let [classname (.getClassName (.cInfo op-info))
+                        tail-part (last (string/split classname #"\."))
+                        extension (if (.contains tail-part "$")
+                                    (last (string/split tail-part #"\$"))
+                                    tail-part)]
+                    (str "." extension)))))
+
+; Appends class name if there is a clash with the op name (because we can't distinguish between typed args)
+(def op-list2
+  (doall
+    (for [[op-name op-infos] (group-by #(.getName %)
+                                       (filter #(valid-ops (.getName %))
+                                               (filter #(not (infos-ignore (.getName %)))
+                                                       (.infos (.op ij/ij)))))
+          op-info op-infos]
+      (eval
+        (let [expr (with-out-str
+                     (let [op-expression "(.op ij/ij)"]
+                       ;(.println (System/err) (str "defn " (.getName op-info) op-info))
+                       ;(.println (System/err) (str "defn " (.getName op-info) " " (.getClassName (.cInfo op-info))))
+                       (let [parts (string/split (.getName op-info) #"\.")
+                             cinfo (.cInfo op-info)
+                             arg-list (string/join
+                                        " "
+                                        (map #(str (make-typehint (.getType %)) " " (.getName %))
+                                             (seq (.inputs cinfo))))
+                             args-to-pass (string/join
+                                            " "
+                                            (map #(.getName %)
+                                                 (seq (.inputs cinfo))))
+                             op-name (str op-name (when (> (count op-infos) 1)
+                                                    (let [classname (.getClassName (.cInfo op-info))
+                                                          tail-part (last (string/split classname #"\."))
+                                                          extension (if (.contains tail-part "$")
+                                                                      (last (string/split tail-part #"\$"))
+                                                                      tail-part)]
+                                                      (str "." extension))))]
+                         #_(.println (System/err) (string/join " " (map #(.getType %) (seq (.inputs cinfo)))))
+                         (println "(defn" (string/replace op-name "." "-"))
+                         (println "\t\"" (.getTitle cinfo) "\"")
+                         (println "\t[" arg-list "]")
+                         (println (str "\t(." (second parts) " (." (first parts) " " op-expression ") " args-to-pass "))")))))]
+          (println expr)
+          (read-string expr))))))
+
+; Handle arguments better
+(def op-list3
+  (doall
+    (for [[op-name op-infos] (group-by #(.getName %)
+                                       (filter #(valid-ops (.getName %))
+                                               (filter #(not (infos-ignore (.getName %)))
+                                                       (.infos (.op ij/ij)))))
+          op-info op-infos]
+      (eval
+        (let [expr (with-out-str
+                     (let [op-expression "(.op ij/ij)"]
+                       ;(.println (System/err) (str "defn " (.getName op-info) op-info))
+                       ;(.println (System/err) (str "defn " (.getName op-info) " " (.getClassName (.cInfo op-info))))
+                       (let [parts (string/split (.getName op-info) #"\.")
+                             cinfo (.cInfo op-info)
+                             required-inputs (filter #(.isRequired %) (seq (.inputs cinfo)))
+                             optional-inputs (filter #(not (.isRequired %)) (seq (.inputs cinfo)))
+                             arg-list (string/join
+                                        " "
+                                        (map #(str (make-typehint (.getType %)) " " (.getName %))
+                                             required-inputs))
+                             args-to-pass (string/join
+                                            " "
+                                            (map #(.getName %)
+                                                 required-inputs))
+                             op-name (str op-name (when (> (count op-infos) 1)
+                                                    (let [classname (.getClassName (.cInfo op-info))
+                                                          tail-part (last (string/split classname #"\."))
+                                                          extension (if (.contains tail-part "$")
+                                                                      (last (string/split tail-part #"\$"))
+                                                                      tail-part)]
+                                                      (str "." extension))))]
+                         #_(.println (System/err) (string/join " " (map #(.getType %) (seq (.inputs cinfo)))))
+                         (println "(defn" (string/replace op-name "." "-"))
+                         (println "\t\"" (.getTitle cinfo) "\"")
+                         (println "\t[" arg-list "]")
+                         (println (str "\t(." (second parts) " (." (first parts) " " op-expression ") " args-to-pass "))")))))]
+          ;(println expr)
+          (read-string expr))))))
+
+


placeholder: geometric series in Clojure

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

--- clojure/geometric_progression.clj
+++ clojure/geometric_progression.clj
@@ -0,0 +1,11 @@
+;; A geometric series is the sum of the numbers in a geometric progression:
+;; a * (1 − r^n ) / (1 − r)
+
+(def a 1)
+(def r 2)
+(def n 7)
+(->>
+ (quot
+  (* a (- 1 (Math/pow r n)))
+  (- 1 r))
+ (println))


Update newrelic-agent to latest version

Update newrelic-agent to latest version

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-mail-works.git/'


Release 0.15.10

Release 0.15.10

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


bump to 0.6.6-SNAPSHOT

bump to 0.6.6-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clj-http "0.6.5"
+(defproject clj-http "0.6.6-SNAPSHOT"
   :description "A Clojure HTTP library wrapping the Apache HttpComponents client."
   :url "https://github.com/dakrone/clj-http/"
   :license {:name "The MIT License"


project: point asset-path to correct location

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/'


Version 1.0.2-SNAPSHOT

Version 1.0.2-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject dda/dda-managed-vm "1.0.1"
+(defproject dda/dda-managed-vm "1.0.2-SNAPSHOT"
   :description "The managed vm desktop crate"
   :url "https://www.domaindrivenarchitecture.org"
   :license {:name "Apache License, Version 2.0"


Actually update version this time

Actually update version this time

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject cryogen/lein-template "0.2.41"
+(defproject cryogen/lein-template "0.2.42"
   :description "A Leiningen template for the Cryogen static site generator"
   :url "https://github.com/cryogen-project/cryogen"
   :license {:name "Eclipse Public License"


Version 183-SNAPSHOT

Version 183-SNAPSHOT

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/tobias/clojars-web.git/'


sablono 0.7.3, closes #86

sablono 0.7.3, closes #86

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/piranha/rum.git/'


forgot file

forgot file

error: pathspec 'sherpa-clojure/src/main/clojure/sherpa/avro_utils.clj' did not match any file(s) known to git

--- sherpa-clojure/src/main/clojure/sherpa/avro_utils.clj
+++ sherpa-clojure/src/main/clojure/sherpa/avro_utils.clj
@@ -0,0 +1,34 @@
+(ns sherpa.avro-utils
+  (:use [clojure.string :only (join)])
+  (:import [org.apache.avro.generic GenericData$Record]))
+
+(defn avro-record
+  "Convert from a map of vars and values to an Avro generic record of the specified type in the protocol."
+  [protocol type vars]
+  (let [schema (.getType protocol type)
+        rec (GenericData$Record. schema)]
+    (when (nil? schema) (throw (RuntimeException. (str "Invalid record type: " type))))
+    (doseq [[k v] vars]
+      (let [field (name k)]
+        (when (nil? (.getField schema field))
+          (throw (RuntimeException.
+                  (str "Invalid field for " type ": " field
+                       ". Expected: " (join ", " (map #(.name %) (.getFields schema)))))))
+        (.put rec field v)))
+    rec))
+
+;; copied from internal Revelytix utils
+(defn- mapmap
+  [kf vf s]
+  (zipmap (map kf s)
+          (map vf s)))
+
+(defn to-map
+  "Convert from an Avro generic record to a map keyed by keywords based on the record field names."
+  [protocol avro-record]
+  (let [schema (.getSchema avro-record)
+        fields (.getFields schema)
+        field-names (map #(.name %) fields)]
+    (println "fields=" fields)
+    (println "field-names=" field-names)
+    (mapmap #(keyword %) #(.get avro-record %) field-names)))


math.combinatorics/cartesian-product

math.combinatorics/cartesian-product

I didn't have time to figure out how to require clj namespaces into cljs ones, so I just copied the one method that I needed from clojure.math.combinatorics.

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

--- src/math/combinatorics.cljs
+++ src/math/combinatorics.cljs
@@ -0,0 +1,22 @@
+(ns math.combinatorics)
+
+;;; Taken from https://github.com/clojure/math.combinatorics
+
+(defn cartesian-product
+  "All the ways to take one item from each sequence"
+  [& seqs]
+  (let [v-original-seqs (vec seqs)
+        step
+        (fn step [v-seqs]
+          (let [increment
+                (fn [v-seqs]
+                  (loop [i (dec (count v-seqs)), v-seqs v-seqs]
+                    (if (= i -1) nil
+                        (if-let [rst (next (v-seqs i))]
+                          (assoc v-seqs i rst)
+                          (recur (dec i) (assoc v-seqs i (v-original-seqs i)))))))]
+            (when v-seqs
+              (cons (map first v-seqs)
+                    (lazy-seq (step (increment v-seqs)))))))]
+    (when (every? seq seqs)
+      (lazy-seq (step v-original-seqs)))))


Whoa, important, return the map even if no geo is found.

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/'


command line style

command line style

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/jchli/jepsen-aurora.git/'


commit stats

commit stats

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/'


corrected spelling for "skipping", tense for "set" in line 14 (#172)

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/B2W-BIT/restQL-server.git/'


Fixed class test errors when using arrays to load configurations

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/lprefontaine/Boing.git/'


Add core spec tests.

Add core spec tests.

error: pathspec 'spec/cats/core_spec.cljx' did not match any file(s) known to git

--- spec/cats/core_spec.cljx
+++ spec/cats/core_spec.cljx
@@ -0,0 +1,109 @@
+(ns cats.core-spec
+  #+cljs
+  (:require [speclj.core :as s :include-macros true]
+            [cats.builtin :as b]
+            [cats.monad.maybe :as maybe]
+            [cats.core :as m :include-macros true])
+  #+clj
+  (:require [speclj.core :as s]
+            [cats.builtin :as b]
+            [cats.monad.maybe :as maybe]
+            [cats.core :as m]))
+
+
+(s/describe "mlet (do-syntax)"
+  (s/it "Support regular let bindings inside mlet"
+    (s/should= (maybe/just 2)
+               (m/mlet [i (maybe/just 1)
+                        :let [i (inc i)]]
+                 (m/return i))))
+
+  (s/it "Support :when guards inside its bindings"
+    (s/should= (maybe/nothing)
+               (m/mlet [i (maybe/just 2)
+                        :when (> i 2)]
+                 (m/return i)))
+    (s/should= [3 4 5]
+               (m/mlet [i [1 2 3 4 5]
+                      :when (> i 2)]
+                 (m/return i))))
+  (s/it "The body runs in an implicit do"
+    (s/should= (maybe/just 3)
+               (m/mlet [i (maybe/just 2)
+                        :let [x (inc i)]]
+                 (assert (= x 3))
+                 (m/return x)))))
+
+(s/describe "sequence"
+  (s/it "It works with vectors"
+    (s/should= (m/sequence [[1 2] [3 4]])
+               [[1 3] [1 4] [2 3] [2 4]]))
+
+  (s/it "It works with lazy seqs"
+    (s/should= (m/sequence [(lazy-seq [1 2]) (lazy-seq [3 4])])
+               [[1 3] [1 4] [2 3] [2 4]]))
+
+  (s/it "It works with sets"
+    (s/should= (m/sequence [#{1 2} #{3 4}])
+               #{[1 3] [1 4] [2 3] [2 4]}))
+
+  (s/it "It works with Maybe values"
+    (s/should= (maybe/just [2 3])
+               (m/sequence [(maybe/just 2) (maybe/just 3)]))
+
+    (s/should= (maybe/nothing)
+               (m/sequence [(maybe/just 2) (maybe/nothing)]))))
+
+
+(s/describe "mapseq"
+  (s/it "It works with maybe values"
+    (s/should= (m/mapseq maybe/just [1 2 3 4 5])
+               (maybe/just [1 2 3 4 5]))
+    (s/should= (maybe/nothing)
+               (m/mapseq (fn [v]
+                           (if (odd? v)
+                             (maybe/just v)
+                             (maybe/nothing)))
+                         [1 2 3 4 5]))))
+
+(s/describe "lift-m"
+  (let [monad+ (m/lift-m 2 +)]
+    (s/it "It can lift a function to the vector monad"
+      (s/should= [1 2 3 4 5 6]
+                 (monad+ [0 2 4] [1 2])))
+
+    (s/it "It can lift a function to the Maybe monad"
+      (s/should= (maybe/just 6)
+                 (monad+ (maybe/just 2) (maybe/just 4)))
+      (s/should= (maybe/nothing)
+                 (monad+ (maybe/just 1) (maybe/nothing))))
+
+    #+clj
+    (s/it "It can lift a function to a Monad Transformer"
+      (let [maybe-sequence-monad (maybe/maybe-transformer b/sequence-monad)]
+        (s/should= [(maybe/just 1) (maybe/just 2)
+                    (maybe/just 3) (maybe/just 4)
+                    (maybe/just 5) (maybe/just 6)]
+                   (m/with-monad maybe-sequence-monad
+                     (monad+ [(maybe/just 0) (maybe/just 2) (maybe/just 4)]
+                             [(maybe/just 1) (maybe/just 2)])))))))
+
+(s/describe "filter"
+  (s/it "It can filter Maybe monadic values"
+    (let [bigger-than-4 (partial < 4)]
+      (s/should= (maybe/just 6)
+                 (m/filter bigger-than-4 (maybe/just 6)))
+      (s/should= (maybe/nothing)
+                 (m/filter bigger-than-4 (maybe/just 3)))))
+  (s/it "It can filter vectors"
+    (s/should= [1 3 5]
+               (m/filter odd? [1 2 3 4 5 6]))))
+
+(s/describe "when"
+  (s/it "It returns the monadic value unchanged when the condition is true"
+    (s/should= (maybe/just 3)
+               (m/when true (maybe/just 3))))
+
+  (s/it "It returns nil in the monadic context when the condition is false"
+    (s/should= [nil]
+               (m/when false []))))


fix string formatting for invite email

fix string formatting for invite email

--- src/pc/email.clj
+++ src/pc/email.clj
@@ -184,7 +184,7 @@
                 :alt "Images disabled? Just come and take a look."
                 :src image-link}]]]
        [:p {:style "font-size: 12px"}
-        (str "Tell us if this message was sent in error %s." (email-address "info"))
+        (format "Tell us if this message was sent in error %s." (email-address "info"))
         ;; Add some hidden text so that Google doesn't try to trim these.
         [:span {:style "display: none; max-height: 0px; font-size: 0px; overflow: hidden;"}
          " Sent at "


Deleted wrong code...

Deleted wrong code...

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/'


Ideas for ufold stream system

Ideas for ufold stream system

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

--- ufold/ideas.clj
+++ ufold/ideas.clj
@@ -0,0 +1,57 @@
+; This is a ufold config file (or rather, what it *will* look like)
+;
+; Each event is applied to these streams. An event is a struct like
+;  :service "cpu"
+;  :host "foo.com"
+;  :time 123456789
+;  :metric_f 0.12
+;  :description "0.12 of 8 cores user/sys/io_wait"
+;  :state "ok"
+;
+; Each stream is a function which, when called with an event, transforms the
+; event in some way and invokes its children.
+;
+; The index is a stateful table of the most recent event for any given [host,
+; service] pair; it reflects the most recent information about the system.
+(let [index (hsql-index)
+      streams
+  [
+   ; Sum all the events we get for 'visits' from any host and find a rate of
+   ; visits/sec over each 10-second window. Reset the host of the resulting
+   ; rate event to nil. With that rate, index it and also update graphite.
+   (where :service "visits"
+          (rate 10
+                (set host nil
+                     index
+                     graphite))
+
+          ; Also index the rate of visits on a per-host basis
+          (by :host (rate 10 index)))
+
+
+   ; CPU, memory, and disk for all hosts
+   (where :service #"^(cpu|memory|disk)"
+          ; Index (keep a copy of the most recent event) all these services
+          index
+
+          ; For each distinct service, find the average and graph that too.
+          ; Produces a CPU average, memory average, "disk a" average, "disk b"
+          ; average, etc.
+          (by :service
+                (mean
+                  (set host nil
+                       graphite))))
+
+   ; Aggregate response times and generate 50th, 95th, 99th, 100th percentiles
+   ; over each 60 second interval.
+   (where :service #"response time"
+          (percentiles 60 [0.5 0.95 0.99 1] index))
+
+   ; Produce a daily email with the total number of signups
+   (where :service "signups" (sum (* 24 3600) (email "ceo@startup.foo" )))
+]])
+
+; Listen for protobuf-encoded events over TCP and UDP, forward all events to
+; streams.
+(tcp-server :port 1234 streams)
+(udp-server streams)


added notepad for interactively testing functions

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

--- src/notepad.clj
+++ src/notepad.clj
@@ -0,0 +1,8 @@
+(require 'distillery.data)
+(refer 'distillery.data)
+(require 'distillery.tasks)
+(refer 'distillery.tasks)
+
+(require 'mastersign.wordcloud)
+(refer 'mastersign.wordcloud)
+


Pass context to entry/handler

Pass context to entry/handler

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/zk/rx.git/'


fixing url -> uri

fixing url -> uri

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/micbie/evemm.git/'


Add paths helpers namespace.

Add paths helpers namespace.

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

--- src/uxbox/util/paths.clj
+++ src/uxbox/util/paths.clj
@@ -0,0 +1,71 @@
+;; This Source Code Form is subject to the terms of the Mozilla Public
+;; License, v. 2.0. If a copy of the MPL was not distributed with this
+;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;;
+;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
+
+(ns uxbox.util.paths
+  "Paths related utils."
+  (:refer-clojure :exclude [name])
+  (:require [storages.core :as st])
+  (:import java.nio.file.Files
+           java.nio.file.Path
+           java.nio.file.Paths
+           java.nio.file.SimpleFileVisitor
+           java.nio.file.FileVisitResult
+           java.nio.file.LinkOption
+           java.nio.file.attribute.FileAttribute
+           java.nio.file.attribute.PosixFilePermissions
+           java.nio.file.NoSuchFileException
+           org.apache.commons.io.FilenameUtils
+           ratpack.form.UploadedFile))
+
+(def path
+  "Alias to storages.core/path."
+  st/path)
+
+(defn exists?
+  "Check if a path exists."
+  [path]
+  (let [^Path path (st/path path)
+        opts (into-array LinkOption [LinkOption/NOFOLLOW_LINKS])]
+    (Files/exists path opts)))
+
+(defn- delete-recursive
+  [^Path path]
+  (try
+    (Files/walkFileTree path (proxy [SimpleFileVisitor] []
+                               (visitFile [file attrs]
+                                 (Files/deleteIfExists file)
+                                 (FileVisitResult/CONTINUE))
+                               (postVisitDirectory [dir exc]
+                                 (Files/deleteIfExists dir)
+                                 (FileVisitResult/CONTINUE))))
+    true
+    (catch NoSuchFileException e
+      false)))
+
+(defn delete
+  "Delete a file or directory."
+  ([path] (delete path nil))
+  ([path {:keys [recursive] :or {recursive false}}]
+   (let [^Path path (st/path path)]
+     (if recursive
+       (delete-recursive path)
+       (Files/deleteIfExists path)))))
+
+(defn extension
+  "Get the file extension."
+  [path]
+  (let [path (st/path path)]
+    (FilenameUtils/getExtension (str path))))
+
+(defn name
+  "Get the file name."
+  [path]
+  (if (instance? UploadedFile path)
+    (.getFileName ^UploadedFile path)
+    (let [path (st/path path)]
+      (FilenameUtils/getName (str path)))))
+
+


a callback to distinct a vector value

a callback to distinct a vector value

error: pathspec 'src/er_cassandra/model/callbacks/distinct_vector_callback.clj' did not match any file(s) known to git

--- src/er_cassandra/model/callbacks/distinct_vector_callback.clj
+++ src/er_cassandra/model/callbacks/distinct_vector_callback.clj
@@ -0,0 +1,6 @@
+(ns er-cassandra.model.callbacks.distinct-vector-callback)
+
+(defn create-distinct-vector-callback
+  [col]
+  (fn [r]
+    (assoc r (vec (distinct (get r col))))))


Add very beta filesystem API

Add very beta filesystem API

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

--- src/grimoire/api.clj
+++ src/grimoire/api.clj
@@ -0,0 +1,320 @@
+(ns grimoire.api
+  "This namespace serves to implement an abstraction layer for looking
+  up examples, symbols, namespaces and artifacts as values without
+  regard to the implementation of the datastore. Ports of Grimoire to
+  different datastores should only need to tweak this namespace."
+
+  (:require [grimoire.web.util :as util]
+            [clojure.java.io :as io]
+            [clojure.string :as string]
+            [clj-semver.core :as semver]))
+
+(defmacro maybe-file [& forms]
+  `(let [f (apply io/file forms)]
+     (when (.exists f) f)))
+
+(def type-file  ":type.txt")
+(def docs-file  ":docs.txt")
+(def notes-file ":notes.txt")
+(def url-file   ":url.txt")
+(def added-file ":added.txt")
+
+;; Group stuff
+;;--------------------------------------------------------------------
+(defrecord GroupHandle [handle name])
+
+(defn list-groups
+  "λ [config] → (Seq GroupHandle)
+
+  Provides an interface for enumeriating all known Maven groups as group handle
+  objects which can be used to enumerate artifacts or for documentation. Returns
+  an unordered sequence of GroupHandles."
+
+  [{{docs :docs} :datastore}]
+  {:pre [(or (instance? java.io.File docs)
+             (instance? java.lang.String docs))]}
+  (let [f (io/file docs)]
+    (when (and (.exists f)
+               (.isDirectory f))
+      (for [f' (.listFiles f)
+            :when (.isDirectory f')
+            :when (= "group" (slurp (io/file f' type-file)))]
+        (->GroupHandle f' (. f' (getName)))))))
+
+;; Artifact stuff
+;;--------------------------------------------------------------------
+(defrecord ArtifactHandle [handle parent name])
+
+(defn list-artifacts
+  "λ [config ← Map, group ← GroupHandle] → (Seq ArtifactHandle)
+
+  Provides an interface for enumerating all the known artifacts in a given
+  Group. Returns an unordered sequence of ArtifactHandles."
+
+  [config group]
+  {:pre [(instance? GroupHandle group)]}
+  (when-let [f (:handle group)]
+    (for [f'    (.listFiles f)
+          :when (.isDirectory f')
+          :when (= "artifact" (slurp (io/file f' type-file)))]
+      (->ArtifactHandle f' group (. f' (getName))))))
+
+;; Version stuff
+;;--------------------------------------------------------------------
+(defrecord VersionHandle [handle parent name])
+
+(defn list-versions
+  "λ [config ← Map, artifact ← ArtifactHandle] → (Seq VersionHandle)
+
+  Provides an interface for enumerating all the known versions if a given
+  Artifact. Returns a sequence of VersionHandles."
+
+  [config artifact]
+  {:pre [(instance? ArtifactHandle artifact)]}
+  (when-let [f (:handle artifact)]
+    (for [f'    (.listFiles f)
+          :when (.isDirectory f')]
+      (->VersionHandle f' artifact (. f' (getName))))))
+
+(defn- list-type-filtered [type ctor config parent]
+  (when-let [f (:handle parent)]
+    (for [f'    (.listFiles f)
+          :when (.isDirectory f')
+          :let  [typef (io/file f' type-file)]
+          :when (.exists typef)
+          :when (= type (slurp typef))]
+      (ctor f' parent (. f' (getName))))))
+
+;; Namespace stuff
+;;--------------------------------------------------------------------
+(defrecord NamespaceHandle [handle parent name])
+
+(defn list-namespaces
+  "λ [config ← Map, version ← VersionHandle] → (Seq NamespaceHandle)
+
+  Provides a mechanism for enumerating all the known namespaces in a
+  given Version. Returns an unordered sequence of
+  VersionHandles."
+
+  [config version]
+  {:pre [(instance? VersionHandle version)]}
+  (list-type-filtered "ns" ->NamespaceHandle config version))
+
+;; Package stuff
+;;--------------------------------------------------------------------
+(defrecord PackageHandle [handle parent name])
+
+(defn list-packages
+  "λ [config ← Map, version ← VersionHandle] → (Seq PackageHandle)
+
+  Provides a mechanism for enumerating all of the Java packages in a given
+  Version entity. Returns an unordered sequence of PackageHandles."
+
+  [config version]
+  {:pre [(instance? VersionHandle version)]}
+  (list-type-filtered "package" ->PackageHandle config version))
+
+;; Def stuff
+;;--------------------------------------------------------------------
+;; Type one of #{:symbol :var :fn :macro :class}
+(defrecord DefHandle [handle parent name type])
+
+(defn- list-ns-contents [ctor type config parent]
+  (when-let [f (:handle parent)]
+    (for [f'    (.listFiles f)
+          :when (.isDirectory f')
+          :let  [typef (io/file f' type-file)]
+          :when (.exists typef)
+          :when (= type (slurp typef))]
+      (ctor f' parent (. f' (getName)) type))))
+
+(defn list-vars
+  "λ [config ← Map, namespace ← NamespaceHandle] → (Seq DefHandle)
+
+  Provides a mechanism for enumerating all the vars (dynamic variables) packaged
+  within a given Namespace. Returns an unordered sequence of DefHandles."
+
+  [config namespace]
+  {:pre [(instance? NamespaceHandle namespace)]}
+  (list-ns-contents ->DefHandle "var" config namespace))
+
+(defn list-fns
+  "λ [config ← Map, namespace ← NamespaceHandle] → (Seq DefHandle)
+
+  Provides a mechanism for enumerating all of the functions (fns) def'd within
+  the given namespace. Returns a sequence of unordered DefHandles."
+
+  [config namespace]
+  {:pre [(instance? NamespaceHandle namespace)]}
+  (list-ns-contents ->DefHandle "fn" config namespace))
+
+(defn list-macros
+  "λ [config ← Map, namespace ← NamespaceHandle] → (Seq DefHandle)
+
+  Provides a mechanism for enumerating all of the macros def'd within the given
+  namespace. Returns an unordered sequence of DefHandles."
+
+  [config namespace]
+  {:pre [(instance? NamespaceHandle namespace)]}
+  (list-ns-contents ->DefHandle "macro" config namespace))
+
+(defn list-symbols
+  "λ [config ← Map, namespace ← NamespaceHandle] → (Seq DefHandle)
+
+  Provides a mechanism for enumerating all the symbols (non-def'd symbols with
+  special meanings). Returns an unordered sequence of DefHandles representing
+  these symbols."
+
+  [config namespace]
+  {:pre [(instance? NamespaceHandle namespace)]}
+  (list-ns-contents ->DefHandle "symbol" config namespace))
+
+;; Class stuff
+;;--------------------------------------------------------------------
+(defrecord ClassHandle [handle parent name])
+
+(defn list-classes
+  "λ [config ← Map, package ← PackageHandle] → (Seq ClassHandle)
+
+  Provides a mechanism for enumerating all of the classes in a given Java
+  package. Returns an unordered seuqence of ClassHandles."
+
+  [config package]
+  {:pre [(instance? PackageHandle package)]}
+  (list-type-filtered ->ClassHandle "class" config namespace))
+
+;; Notes, Examples & things
+;;--------------------------------------------------------------------
+(defn thing->artifact [thing]
+  (if-not (instance? ArtifactHandle thing)
+    (when thing (recur (:parent thing)))
+    thing))
+
+(defn thing->version [thing]
+  (if-not (instance? VersionHandle thing)
+    (when thing (recur (:parent thing)))
+    thing))
+
+(defn thing->path
+  "λ [thing ← (Σ GroupHandle
+                 ArtifactHandle
+                 VersionHandle
+                 NamespaceHandle
+                 PackageHandle
+                 DefHandle
+                 ClassHandle)] → String
+
+  Provides a mechanism for converting one of the Handle objects into a
+  cannonical \"path\" which can be serialized, deserialized and walked back into
+  a Handle."
+
+  [thing]
+  (->> thing
+       (iterate :parent)
+       (take-while identity)
+       (reverse)
+       (map :name)
+       (interpose "/")
+       (apply str)))
+
+(def type-table
+  {"group"    ->GroupHandle
+   "artifact" ->ArtifactHandle
+   "version"  ->VersionHandle
+   "ns"       ->NamespaceHandle
+   "package"  ->PackageHandle
+   "var"      (fn [parent name]
+                (->DefHandle parent name "var"))
+   "fn"       (fn [parent name]
+                (->DefHandle parent name "fn"))
+   "macro"    (fn [parent name]
+                (->DefHandle parent name "macro"))
+   "symbol"   (fn [parent name]
+                (->DefHandle parent name "symbol"))
+   "class"    ->ClassHandle})
+
+(defn path->thing
+  "Attempts to construct the most deeply nested _documentation_ value possible given a"
+  [config path]
+  (let [parts (string/split path #"/")]
+    (loop [parent       nil
+           [part parts] parts]
+      (if-not parent
+        (let [typef (io/file )])
+))
+
+(defn thing->relative-path [class thing]
+  (->> thing
+       (iterate :parent)
+       (take-while #(not (instance? class %1)))
+       (reverse)
+       (map :name)
+       (interpose "/")
+       (apply str)))
+
+(defn thing->root-to [class thing]
+  (->> thing
+       (iterate :parent)
+       (take-while identity)
+       (reverse)
+       (take-while #(not (instance? class %1)))
+       (map :name)
+       (interpose "/")
+       (apply str)))
+
+(defn thing->notes-handle
+
+  [config {handle :handle :as thing}]
+  (let [f (io/file handle notes-file)]
+    (when (.exists f) f)))
+
+(defn thing->url-handle
+
+  [config {handle :handle :as thing}]
+  (let [f (io/file handle url-file)]
+    (if (.exists f) f
+        (recur config (:parent thing)))))
+
+(defn thing->docs-handle
+
+  [config {handle :handle :as thing}]
+  (let [f (io/file handle docs-file)]
+    (when (.exists f) f)))
+
+(defn thing->added-handle
+
+  [config {handle :handle :as thing}]
+  (let [f (io/file handle added-file)]
+    (when (.exists f) f)))
+
+(defn semver:in-range [v0 vf v]
+  (and (>= (semver/cmp v0 v) 0)
+       (<= (semver/cmp v vf) 0)))
+
+(defn thing->example-handles
+
+  [{{notes :notes} :datastore :as config} thing]
+  (let [v0       (or (slurp (thing->added-handle thing))
+                     "1.0.0")
+        vf       (:name (thing->version thing))
+        artifact (thing->artifact thing)
+        versions (list-versions config artifact)
+        apath    (thing->relative-path VersionHandle thing)
+        bpath    (thing->root-to VersionHandle thing)]
+    (for [v     versions
+          :when (semver:in-range v0 vf (:name v))
+          :let  [d (io/file (io/file notes bpath)
+                            apath)]
+          :when (and (.exists d)
+                     (.isDirectory d))
+          f     (.listFiles d)]
+      f)))
+
+
+;; DEV SHIT DO NOT COMMIT
+(def config      {:datastore {:docs "doc-store/"}})
+(def a-group     (first (list-groups     config           )))
+(def a-artifact  (first (list-artifacts  config a-group   )))
+(def a-version   (first (list-versions   config a-artifact)))
+(def a-namespace (first (list-namespaces config a-version )))
+(def a-def       (first (list-fns        config a-namespace)))


Add a utils ns in cljs

Add a utils ns in cljs

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

--- src/cljs/comic_reader/utils.cljs
+++ src/cljs/comic_reader/utils.cljs
@@ -0,0 +1,11 @@
+(ns comic-reader.utils
+  (:require [clojure.string :as s]))
+
+(defn titlize [title & {:keys [to-spaces]
+                        :or {to-spaces #" "}}]
+  (->>
+   (-> title
+       (s/replace to-spaces " ")
+       (s/split #" "))
+   (map s/capitalize)
+   (s/join " ")))


solution for *String repeat* Kata

solution for *String repeat* Kata

error: pathspec 'clojure/8' did not match any file(s) known to git
error: pathspec 'kyu/string-repeat.clj' did not match any file(s) known to git


Some refactoring of ratings response

Some refactoring of ratings response

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/stuartwakefield/microdocuments-prototype.git/'


Leader ready

Leader ready

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/just-cloud/uxtweet-client.git/'


kata2: add another more iterative linear search

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/schaueho/clojure-codekata.git/'


ezabatu-taulak laguntzailea

ezabatu-taulak laguntzailea

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/'


skip cache for testing on EB

skip cache for testing on EB

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/'


start exposing api to js #53

start exposing api to js #53

error: pathspec 'parinfer-lib/src/parinfer/api_js.cljs' did not match any file(s) known to git

--- parinfer-lib/src/parinfer/api_js.cljs
+++ parinfer-lib/src/parinfer/api_js.cljs
@@ -0,0 +1,70 @@
+(ns parinfer.api-js
+  "Exports a JavaScript module with function hooks into Parinfer."
+  (:require
+    [parinfer.indent-mode :as indent-mode]
+    [parinfer.paren-mode :as paren-mode]))
+
+;;-----------------------------------------------------------------------------
+;; JS Function Wrappers
+;;-----------------------------------------------------------------------------
+
+(def opt->cljs
+  {"cursorLine" :cursor-line
+   "cursorX" :cursor-x
+   "lineNo" :line-no
+   "newLine" :new-line})
+
+(defn convert-opts
+  "Convert the JS options object to a clojure map"
+  [js-opts]
+  (reduce
+    (fn [clj-opts [js-key value]]
+      (let [key- (or (opt->cljs js-key) (keyword js-key))]
+        (assoc clj-opts key- value)))
+    {}
+    (js->clj js-opts)))
+
+(defn js-result
+  "Convert the result to a JS object"
+  [{:keys [text valid? state]}]
+  #js {:text text
+       :isValid valid?
+       :state state})
+
+(defn- js-indent-mode
+  "JavaScript wrapper around parinfer.indent-mode/format-text"
+  [txt js-opts]
+  (js-result
+    (indent-mode/format-text
+      txt
+      (convert-opts js-opts))))
+
+(defn- js-indent-mode-change
+  "JavaScript wrapper around parinfer.indent-mode/format-text-change"
+  [txt prev-state js-change js-opts]
+  (js-result
+    (indent-mode/format-text-change
+      prev-state
+      (convert-opts js-change)
+      (convert-opts js-opts))))
+
+(defn- js-paren-mode
+  "JavaScript wrapper around parinfer.paren-mode/format-text"
+  [txt js-opts]
+  (js-result
+    (paren-mode/format-text
+      txt
+      (convert-opts js-opts))))
+
+;;-----------------------------------------------------------------------------
+;; Module Export
+;;-----------------------------------------------------------------------------
+
+(when js/module
+  (set! js/module.exports
+    #js {:indentMode js-indent-mode
+         :indentModeChange js-indent-mode-change
+         :parenMode js-paren-mode}))
+
+;; noop - needed for :nodejs CLJS build
+(set! *main-cli-fn* (fn [] nil))


removed prompt-time

removed prompt-time

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/wilkerlucio/youtube-looper.git/'


add language as parameter to docstring, make formatter assignment DRYer

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/'


tests

tests

error: pathspec 'test/clj/salava/badge/endorsement_test.clj' did not match any file(s) known to git

--- test/clj/salava/badge/endorsement_test.clj
+++ test/clj/salava/badge/endorsement_test.clj
@@ -0,0 +1,13 @@
+(ns salava.badge.endorsement-test
+ (:require [salava.core.migrator :as migrator]
+           [salava.core.test-utils :as t]
+           [clojure.test :refer :all]))
+
+(t/deftest-ctx endorsement-test [ctx]
+  (testing "Endorsements"
+    (testing "Endorse")
+    (testing "Accept endorsment")
+    (testing "Reject endorsment")
+    (testing "Remove endorsement")))
+
+


For all resources

For all resources


Remove commented code

Remove commented code

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/codegeneralist/krest.git/'


De-linting.

De-linting.

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/couragelabs/coachbot.git/'


get start and end date of calendar to render

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/dagda1/i-cal.git/'


filter map reduce

filter map reduce

error: pathspec 'src/sandbox/fmr/discount.clj' did not match any file(s) known to git

--- src/sandbox/fmr/discount.clj
+++ src/sandbox/fmr/discount.clj
@@ -0,0 +1,6 @@
+(ns sandbox.fmr.discount)
+
+(defn calculate-discount [prices]
+  (reduce +
+          (map (fn [price] (* price 0.10))
+               (filter (fn [price] (>= price 20.0)) prices))))


Boot webserver before control

Boot webserver before control

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/terrancesnyder/engulf.git/'


Initial pattern compiler

Initial pattern compiler

fatal: unable to access 'https://github.com/FTSRG/ingraph.git/': The requested URL returned error: 403


Added text anti-aliasing

Added text anti-aliasing

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/hudren/ebook-novel.git/'


Improved lookup and print

Improved lookup and print


Refactored the remove-id-from-body function. Replaced nesting with thread-last macro Pulled out smaller functions

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/aneeshpu/pms.git/'


Removed unused arg

Removed unused arg

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/snichme/expenses-cljs.git/'


microbench experiments

microbench experiments

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/'


more interesting microbench

more interesting microbench


microbench WIP

microbench WIP

fatal: unable to access 'https://github.com/michaelsbradleyjr/transwarp.git/': The requested URL returned error: 403


Adding a bass+drums example for a james brown groove. Could be improved upon, but it's a place to start

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

--- src/overtone/examples/getting_started/funk.clj
+++ src/overtone/examples/getting_started/funk.clj
@@ -0,0 +1,86 @@
+(ns overtone.examples.getting-started.funk
+    "This example creates a simple drum and bass pattern, based off of
+    the James Brown classic 'Licking Stick', with Bootsy Collins on bass,
+    and John Jab'o Starks on drums"
+    (:use [overtone.live]))
+
+; model a plucked string, we'll use this for our bass
+(definst string [note 60 amp 1.0 dur 0.5 decay 30 coef 0.3 gate 1]
+  (let [freq (midicps note)
+        noize (* 0.8 (white-noise))
+        dly   (/ 1.0 freq)
+        plk   (pluck noize gate dly dly decay coef)
+        dist  (distort plk)
+        filt  (rlpf dist (* 12 freq) 0.6)
+        clp   (clip2 filt 0.8)
+        reverb (free-verb clp 0.4 0.8 0.2)]
+    (* amp (env-gen (perc 0.0001 dur) :action 0) reverb)))
+
+; define a simple drumkit using freesound samples
+(def snare (sample (freesound-path 26903)))
+(def kick (sample (freesound-path 2086)))
+(def close-hihat (sample (freesound-path 802)))
+(def open-hihat (sample (freesound-path 26657)))
+
+
+(defn subdivide
+    "subdivide two time intervals by 4, and return the time interval
+    at position. this is a close-hihateap hack to sclose-hihatedule 16th notes without
+    defining the whole pattern with the metronome firing every 16th note."
+    [a b position]
+    (+ a (* position (/ (- b a) 4) )))
+
+(defn drums [nome]
+    (let [beat (nome)]
+        ; hi-hat pattern
+        (at (nome beat) (close-hihat))
+        (at (nome (+ 1 beat)) (open-hihat))
+        (at (nome (+ 2 beat)) (close-hihat))
+        (at (nome (+ 3 beat)) (close-hihat))
+        (at (nome (+ 4 beat)) (close-hihat))
+        (at (nome (+ 5 beat)) (open-hihat))
+        (at (nome (+ 6 beat)) (close-hihat))
+        (at (nome (+ 7 beat)) (close-hihat))
+
+        ; snare pattern
+        (at (nome (+ 2 beat)) (snare))
+        (at (subdivide (nome (+ 2 beat)) (nome (+ 4 beat)) 3) (snare))
+        (at (subdivide (nome (+ 4 beat)) (nome (+ 6 beat)) 1) (snare))
+        (at (nome (+ 6 beat)) (snare))
+        (at (subdivide (nome (+ 6 beat)) (nome (+ 8 beat)) 3) (snare))
+
+        ; kick drum pattern
+        (at (nome beat) (kick))
+        (at (nome (+ 5 beat)) (kick))
+        (at (nome (+ 7 beat)) (kick))
+        (apply-at (nome (+ 8 beat)) drums nome [])))
+
+(defn bass [nome]
+    (let [beat (nome)]
+    (at (nome beat) (string 51))
+    (at (subdivide (nome beat) (nome (+ 2 beat)) 1) (string 51))
+    (at (subdivide (nome beat) (nome (+ 2 beat)) 3) (string 51))
+    (at (subdivide (nome (+ beat 1)) (nome (+ 3 beat)) 1) (string 51))
+    (at (subdivide (nome (+ beat 1)) (nome (+ 3 beat)) 3) (string 51))
+    (at (nome (+ 4 beat)) (string 51))
+    (at (subdivide (nome (+ 4 beat)) (nome (+ 6 beat)) 1) (string 49))
+    (at (nome (+ 5 beat)) (string 46))
+    (at (nome (+ 6 beat)) (string 51))
+    (at (subdivide (nome (+ 6 beat)) (nome (+ 8 beat)) 1) (string 49))
+    (at (nome (+ 7 beat)) (string 46))
+    (at (nome (+ 8 beat)) (string 51))
+    (at (nome (+ 12 beat)) (string 51))
+    (at (subdivide (nome (+ 12 beat)) (nome (+ 14 beat)) 1) (string 51))
+    (apply-at (nome (+ 16 beat)) bass nome [])))
+
+(defn section [nome]
+    (drums nome)
+    (bass nome))
+
+; define a metronome that will fire every eighth note
+; at 100 bpm
+
+(def met (metronome (* 100 2)))
+; to play the beat, just run
+; (section met)
+


Adds test for window passing on exceptions.

error: pathspec 'test/onyx/windowing/window_exceptions_test.clj' did not match any file(s) known to git

--- test/onyx/windowing/window_exceptions_test.clj
+++ test/onyx/windowing/window_exceptions_test.clj
@@ -0,0 +1,125 @@
+(ns onyx.windowing.window-exceptions-tests
+  (:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
+            [clojure.test :refer [deftest is]]
+            [onyx.plugin.core-async :refer [take-segments!]]
+            [schema.core :as s]
+            [onyx.schema :as os]
+            [onyx.static.uuid :refer [random-uuid]]
+            [onyx.test-helper :refer [load-config with-test-env]]
+            [onyx.api]))
+
+(def input
+  [{:id 1 :event-time 0}])
+
+(defn no-op [& _])
+
+(defn user-function [segment]
+  (throw (ex-info "Blow up here" {})))
+
+(def in-chan (atom nil))
+(def in-buffer (atom nil))
+(def out-chan (atom nil))
+
+(defn inject-in-ch [event lifecycle]
+  {:core.async/buffer in-buffer
+   :core.async/chan @in-chan})
+
+(defn inject-out-ch [event lifecycle]
+  {:core.async/chan @out-chan})
+
+(def in-calls
+  {:lifecycle/before-task-start inject-in-ch})
+
+(def out-calls
+  {:lifecycle/before-task-start inject-out-ch})
+
+(defn transform-exception [event segment e]
+  {:status :threw-exception
+   :segment segment})
+
+(def always-true (constantly true))
+
+(deftest window-exceptions-test
+  (let [id (random-uuid)
+        config (load-config)
+        env-config (assoc (:env-config config) :onyx/tenancy-id id)
+        peer-config (assoc (:peer-config config) :onyx/tenancy-id id)
+        batch-size 20
+        workflow
+        [[:in :identity] [:identity :out]]
+
+        catalog
+        [{:onyx/name :in
+          :onyx/plugin :onyx.plugin.core-async/input
+          :onyx/type :input
+          :onyx/medium :core.async
+          :onyx/batch-size batch-size
+          :onyx/max-peers 1
+          :onyx/doc "Reads segments from a core.async channel"}
+
+         {:onyx/name :identity
+          :onyx/fn ::user-function
+          :onyx/type :function
+          :onyx/max-peers 1
+          :onyx/batch-size batch-size}
+
+         {:onyx/name :out
+          :onyx/plugin :onyx.plugin.core-async/output
+          :onyx/type :output
+          :onyx/medium :core.async
+          :onyx/batch-size batch-size
+          :onyx/max-peers 1
+          :onyx/doc "Writes segments to a core.async channel"}]
+
+        flow-conditions
+        [{:flow/from :identity
+          :flow/to [:out]
+          :flow/short-circuit? true
+          :flow/thrown-exception? true
+          :flow/predicate [::always-true]
+          :flow/post-transform ::transform-exception}]
+
+        windows
+        [{:window/id :collect-segments
+          :window/task :identity
+          :window/type :fixed
+          :window/aggregation :onyx.windowing.aggregation/conj
+          :window/window-key :event-time
+          :window/range [5 :minutes]}]
+
+        triggers
+        [{:trigger/window-id :collect-segments
+          :trigger/id :sync
+          :trigger/refinement :onyx.refinements/accumulating
+          :trigger/fire-all-extents? true
+          :trigger/on :onyx.triggers/segment
+          :trigger/threshold [5 :elements]
+          :trigger/sync ::no-op}]
+
+        lifecycles
+        [{:lifecycle/task :in
+          :lifecycle/calls ::in-calls}
+         {:lifecycle/task :out
+          :lifecycle/calls ::out-calls}]]
+
+    (reset! in-chan (chan (inc (count input))))
+    (reset! in-buffer {})
+    (reset! out-chan (chan (sliding-buffer (inc (count input)))))
+
+    (with-test-env [test-env [3 env-config peer-config]]
+      (doseq [i input]
+        (>!! @in-chan i))
+        (close! @in-chan)
+        (let [job (onyx.api/submit-job
+                   peer-config
+                   {:catalog catalog
+                    :workflow workflow
+                    :lifecycles lifecycles
+                    :flow-conditions flow-conditions
+                    :windows windows
+                    :triggers triggers
+                    :task-scheduler :onyx.task-scheduler/balanced})
+              _ (onyx.test-helper/feedback-exception! peer-config (:job-id job))
+              results (take-segments! @out-chan 50)]
+          (is (= #{{:status :threw-exception :segment {:id 1 :event-time 0}}}
+                 (into #{} results)))))))


day17

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

--- src/adventofcode2017/day17.clj
+++ src/adventofcode2017/day17.clj
@@ -0,0 +1,24 @@
+(ns adventofcode2017.day17)
+
+(def steps 303)
+
+;; part 1
+(defn spinlock [[coll curr-pos] val]
+  (let [insert-pos (inc (rem (+ curr-pos steps) (count coll)))]
+    [(concat (take insert-pos coll) [val] (drop insert-pos coll))
+     insert-pos]))
+
+(->> (reduce spinlock [[0] 0] (range 1 2018))
+     first
+     (drop-while #(not= 2017 %))
+     second)
+; 1971
+
+;; part 2
+(defn spinlock2 [[after-zero-val curr-pos] val]
+  (let [insert-pos (inc (rem (+ curr-pos steps) val))]
+    [(if (= 1 insert-pos) val after-zero-val)
+     insert-pos]))
+
+(first (reduce spinlock2 [nil 0] (range 1 50000001)))
+; 17202899


1.0.0 bertsiorako prestatu

1.0.0 bertsiorako prestatu

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.bez.git/'


Upgrade kehaar to 0.10.3

Upgrade kehaar to 0.10.3

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/email-works.git/'


project.clj cleanup

project.clj 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/tiagoantao/turtle.git/'


Version 1.12.1

Version 1.12.1

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/'


Version 1.7.3

Version 1.7.3


Update dips

Update dips

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/'


Added listing from Clojure day 3

Added listing from Clojure day 3

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

--- clojure/atomcache.clj
+++ clojure/atomcache.clj
@@ -0,0 +1,15 @@
+(defn create []
+  (atom {}))
+
+(defn get [cache key]
+  (@cache key))
+
+(defn put
+  ([cache value-map]
+   (swap! cache merge value-map))
+  ([cache key value]
+   (swap! cache assoc key value)))
+
+(def ac (create))
+(put ac :quote "I'm your father, Luke.")
+(println (str "Cached item: " (get ac :quote)))


added servertest crate ...

added servertest crate ...

error: pathspec 'src/dda/pallet/crate/servertest/dda_servertest_crate.clj' did not match any file(s) known to git

--- src/dda/pallet/crate/servertest/dda_servertest_crate.clj
+++ src/dda/pallet/crate/servertest/dda_servertest_crate.clj
@@ -0,0 +1,48 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+(ns dda.pallet.crate.dda-servertest-crate
+  (:require
+    [clojure.tools.logging :as logging]
+    [schema.core :as s]
+    [pallet.api :as api]
+    [pallet.actions :as actions]
+    [pallet.crate :as crate]
+    [pallet.crate.git :as git]
+    [dda.pallet.core.dda-crate :as dda-crate]
+    [dda.pallet.crate.servertest.fact.packages :as package-fact]
+    [dda.pallet.crate.servertest.test.packages :as package-test]))
+
+(def facility :dda-servertest)
+(def version  [0 1 0])
+
+(def ServerTestConfig
+  {})
+
+(s/defmethod dda-crate/dda-settings facility
+  [dda-crate config]
+  "dda-servertest: setting"
+  (do-sth config))
+
+(s/defmethod dda-crate/dda-test facility
+  [dda-crate partial-effective-config])
+
+(def dda-servertest-crate
+  (dda-crate/make-dda-crate
+   :facility facility
+   :version version))
+
+(def with-servertest
+  (dda-crate/create-server-spec dda-servertest-crate))


Update Datomic to 0.9.5661

Update Datomic to 0.9.5661

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/'


atualizando versao do core

atualizando versao do core

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/B2W-BIT/restQL-server.git/'


[WM] update deps in project.clj

[WM] update deps in project.clj

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/user-http-api.git/'


bump version to 2.9.1

bump version to 2.9.1


Update verstion to rev Chef

Update verstion to rev Chef

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/MitchellJThomas/medir.git/'


saving state on cheatsheet tooltips

saving state on cheatsheet tooltips

--- cljs-server/cljsinfo_server/pages/cheatsheet.cljs
+++ cljs-server/cljsinfo_server/pages/cheatsheet.cljs
@@ -655,7 +655,21 @@
   [:div#tooltip-atoms.tooltip-53dde {:style "display:none"}
     [:i.fa.fa-thumb-tack.pin-0ad63]
     [:p.info-2e4f9
-      "TODO: atoms tooltip content"]]
+      "Atoms provide a way to manage state in a ClojureScript program."]
+    [:p.info-2e4f9
+      "Unlike JavaScript, everything in ClojureScript is immutable by default. "
+      "Meaning that you cannot change the value of something after it has been defined."]
+    [:p.info-2e4f9
+      "Atoms allow for mutability and distinguish between setting and reading a value, "
+      "which makes state easier to reason about."]
+    [:p.info-2e4f9
+      "Watcher functions execute when a value changes, providing a powerful UI "
+      "pattern at the language level when your value maps to interface state."
+      ; "Watcher functions execute when a value changes, passing in both the old "
+      ; "value and the new value. "
+      ; "This can be a powerful pattern for UI programming when your value maps "
+      ; "to the state of your interface."
+      ]]

   [:div#tooltip-numbers.tooltip-53dde {:style "display:none"}
     [:i.fa.fa-thumb-tack.pin-0ad63]
@@ -715,7 +729,7 @@
     [:p.info-2e4f9
       "Most literal lists in a ClojureScript program represent a function call."]
     [:p.info-2e4f9
-      " ie: " [:code "(a b c)"] " is a list of three things, and it also means "
+      "ie: " [:code "(a b c)"] " is a list of three things, and it also means "
       "\"call the function a with two arguments: b and c\""]]

   [:div#tooltip-sets.tooltip-53dde {:style "display:none"}
@@ -743,7 +757,8 @@
   [:div#tooltip-maps.tooltip-53dde {:style "display:none"}
     [:i.fa.fa-thumb-tack.pin-0ad63]
     [:p.info-2e4f9
-      "Maps - or hash maps - are a powerful data structure used often in ClojureScript programs."]
+      "A Map is a collection that maps keys to values. "
+      "Accessing a value in a map using a key is very fast."]
     [:p.info-2e4f9
       "In JavaScript, Objects are commonly used as a de-facto hash map using strings as keys. "
       "A key in a ClojureScript Map can be any value, although commonly keywords are used."]]


Kehaar 0.7.0 with bounded thread pools

Kehaar 0.7.0 with bounded thread pools

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-mail-http-api.git/'


Upgrade Datomic to 0.9.5544

Upgrade Datomic to 0.9.5544

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-authority-works.git/'


bump React to 15.1.0-0

bump React to 15.1.0-0

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/piranha/rum.git/'


remove unneeded dependency to org.clojure/java.jdbc

--- project.clj
+++ project.clj
@@ -25,7 +25,6 @@
    ;;; database
    [postgresql/postgresql "8.4-702.jdbc4"]
    [org.apache.tomcat/tomcat-jdbc "7.0.25"]
-   [org.clojure/java.jdbc "0.1.3"]
    [korma "0.3.0-beta10" :exclusions [log4j/log4j] ]
    [lobos "1.0.0-SNAPSHOT"]
    [ring/ring-devel "1.1.0"]


Add lein support.

Add lein support.

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

--- project.clj
+++ project.clj
@@ -0,0 +1,12 @@
+(defproject org.clojure/tools.logging "0.3.2-SNAPSHOT"
+  :description "Clojure logging API."
+  :url "https://github.com/clojure/tools.logging"
+  :license {:name "Eclipse Public License"
+            :url "http://www.eclipse.org/legal/epl-v10.html"}
+  :source-paths ["src/main/clojure"]
+  :test-paths ["src/test/clojure"]
+  :dependencies [[org.clojure/clojure "1.3.0"]]
+  :profiles {:test {:dependencies [[org.slf4j/slf4j-api "1.6.2"]
+                                   [org.slf4j/slf4j-log4j12 "1.6.2"]
+                                   [log4j "1.2.16"]
+                                   [commons-logging "1.1.1"]]}})


Version 1.9.3

Version 1.9.3


Add syntdefs

Add syntdefs

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

--- src-clj/defpi/synths.clj
+++ src-clj/defpi/synths.clj
@@ -0,0 +1,264 @@
+(ns sp
+  (:use [overtone.live])
+  (:require [clojure.string :as str]))
+
+(defn save-synthdef [sdef folder]
+  (let [path (str folder "/" (last (str/split (-> sdef :sdef :name) #"/")) ".scsyndef") ]
+    (overtone.sc.machinery.synthdef/synthdef-write (:sdef sdef) path)
+    path))
+
+(defn save-to-pi [sdef]
+  (save-synthdef sdef "/Users/sam/Dropbox/lab/code/defining-pi/etc/synthdefs/"))
+
+(do
+  (defsynth space_organ [note 24 amp 1 x 0 y 0 out-bus 0]
+    (let [freq-shift (/ x 100)
+          delay (* -1 (/ x 10000))]
+      (out out-bus (pan2  (g-verb (* 0.2 (mix (map #(blip (+ freq-shift (* (midicps (duty:kr % 0 (dseq [note (+ 3 note) (+ 7 note) (+ 12 note) (+ 17 note)] INF))) %2)) (mul-add:kr (lf-noise1:kr 1/2) 3 4)) (+ delay [1 1/4]) [1  8]))) 200 8)))))
+
+
+  (save-to-pi space_organ)
+
+  (defsynth saws [note 52 x 0 y 0 out-bus 0]
+    (let [x    (abs x)
+          x    (min x 10000)
+          x    (max x 50)
+          y    (abs y)
+          y    (/ y 10000)
+          y    (min y 0.3)
+          y    (max y 0)
+          freq (midicps note)]
+      (out out-bus (mix (* 0.15 (normalizer (lpf (saw [freq (+ freq (* freq y))]) x)))))))
+
+  (save-to-pi saws))
+
+
+(do
+  (defsynth trig))
+
+(do
+  (defsynth beep [note 52 attack 0.1 release 0.3 out-bus 0]
+    (let [freq (midicps note)]
+      (out out-bus (* (sin-osc freq)
+                      (env-gen (perc attack release) :action FREE)))))
+
+  (save-to-pi beep))
+
+(do
+  (defsynth saw_beep [note 52 attack 0.1 release 0.3 out-bus 0]
+    (let [freq (midicps note)]
+      (out out-bus (* 0.3
+                      (saw [freq (+ freq (* freq 0.01))])
+                      (env-gen (perc attack release) :action FREE)))))
+
+  (save-to-pi saw_beep))
+
+(do
+  (defsynth loop-synth [buf 0 vol 1 rate 1 out-bus 0]
+    (let [src (play-buf 1 buf rate 1.0 0.0 1.0 1)]
+      (out out-bus (pan2 (* src vol)))))
+  (save-to-pi loop-synth))
+
+(do
+  (defsynth mixer [in-bus 0 amp 1 pan 0]
+    (let [src (in:ar in-bus 1)
+          src (lpf src 20000)]
+      (out 0 (pan2 (* (lag-ud amp 0 0.02) src) pan))))
+
+  (save-to-pi mixer))
+
+(do
+  ;;TODO FIXME!
+  (defsynth babbling [out-bus 0 x 0 y 50]
+    (let [x      (abs x)
+          x      (/ x 100000)
+          x      (min x 0.05)
+          x      (max x 0.005)
+          y      (abs y)
+          y      (min y 10000)
+          y      (max y 200)
+          noise  (* 0.003
+                    (rhpf (one-pole (* 0.99 (brown-noise)))
+                          (+ 500 (* 400 (lpf (* (brown-noise) 14))))
+                          x))
+          noise  [noise noise]
+          noise2 (* 0.005
+                    (rhpf (one-pole (* 0.99 (brown-noise)))
+                          (+ 1000 (* 800 (lpf (* (brown-noise) 20))))
+                          x))
+          noise2 [noise2 noise2]
+          mixed  (+ noise noise2)
+          mixed  (lpf mixed y)]
+      (out out-bus (* 0 (mix (* 3 mixed))))))
+  (save-to-pi babbling))
+
+(do
+  (defsynth fm [note 52 divisor 2.0 depth 1.0 out-bus 0]
+    (let [carrier   (midicps note)
+          modulator (/ carrier divisor)
+          mod-env   (env-gen (lin-env 1 0 1))
+          amp-env   (env-gen (lin-env 0 1 1) :action FREE)]
+      (out out-bus (* 0.25 (* amp-env
+                             (sin-osc (+ carrier
+                                         (* mod-env  (* carrier depth) (sin-osc modulator)))))))))
+
+  (save-to-pi fm))
+
+(do
+
+  (save-to-pi stereo-player)
+  (save-to-pi mono-player)
+ )
+
+
+(do
+  (defsynth woah [note 52 out-bus 0 x 0 y 0]
+    (let [freq (midicps note)
+          x    (abs x)
+          x    (/ x 700)
+          x    (min x 15)
+          x    (max x 0.5)
+          snd  (lpf (sync-saw
+                     freq
+                     (* (* freq 1.5) (+ 2 (sin-osc:kr x))))
+                    1000)]
+      (out out-bus (* 0.25 snd))))
+
+  (save-to-pi woah))
+
+
+(do
+  (defsynth arpeg-click [x 10 buf 0 arp-div 2 beat-div 1 out-bus 0]
+    (let [x (abs x)
+          x (/ x 70)
+          x (min x 200)
+          x (max x 1)
+          tik   (impulse x)
+          a-tik (pulse-divider tik arp-div)
+          b-tik (pulse-divider tik beat-div)
+          cnt   (mod (pulse-count a-tik) (buf-frames 1))
+          note  (buf-rd:kr 1 1 cnt)
+          freq  (midicps note)
+          snd   (white-noise)
+          snd   (rhpf snd 2000 0.4)
+          snd   (normalizer snd)
+          b-env (env-gen (perc 0.01 0.1) b-tik)
+          a-env (env-gen (perc 0.01 0.4) a-tik)]
+      (out out-bus (* 0.20 (pan2 (+ (* 0.5 snd b-env)
+                                    (* (sin-osc freq) a-env)
+                                    (* (sin-osc (* 2 freq)) a-env)))))))
+
+  (save-to-pi arpeg-click))
+
+(do
+  ;;http://computermusicresource.com/Simple.bell.tutorial.html
+(def dull-partials
+  [
+   0.56
+;;   1.19
+;;   1.71
+;;   2.74
+   3
+;;   3.76
+   ])
+
+;; http://www.soundonsound.com/sos/Aug02/articles/synthsecrets0802.asp
+;; (fig 8)
+(def partials
+  [
+   1
+   4
+;;   3
+;;   4.2
+;;   5.4
+;;   6.8
+   ])
+
+;; we make a bell by combining a set of sine waves at the given
+;; proportions of the frequency. Technically not really partials
+;; as for the 'pretty bell' I stuck mainly with harmonics.
+;; Each partial is mixed down proportional to its number - so 1 is
+;; louder than 6. Higher partials are also supposed to attenuate
+;; quicker but setting the release didn't appear to do much.
+
+(defcgen bell-partials
+  "Bell partial generator"
+  [freq {:default 440 :doc "The fundamental frequency for the partials"}
+   attack {:default 0.01}
+   release  {:default 1.0 :doc "Duration multiplier. Length of longest partial will
+                            be dur seconds"}
+   partials {:default [0.5 1 2 4] :doc "sequence of frequencies which are
+                                        multiples of freq"}]
+  "Generates a series of progressively shorter and quieter enveloped sine waves
+  for each of the partials specified. The length of the envolope is proportional
+  to dur and the fundamental frequency is specified with freq."
+  (:ar
+   (apply +
+          (map
+           (fn [partial proportion]
+             (let [env      (env-gen (perc attack (* release proportion)))
+                   vol      (/ proportion 2)
+                   overtone (* partial freq)]
+               (* env vol (sin-osc overtone))))
+           partials ;; current partial
+           (iterate #(/ % 2) 1.0)  ;; proportions (1.0  0.5 0.25)  etc
+           ))))
+
+
+(defsynth dull_bell [note 52 attack 0.01 release 1.0 vol 1.0 out-bus 0]
+  (let [freq (midicps note)
+        snd (* vol (bell-partials freq attack release dull-partials))]
+    (detect-silence snd :action FREE)
+    (out out-bus snd)))
+
+(defsynth pretty_bell [note 52 attack 0.01 release 1 vol 1.0 out-bus 0]
+  (let [freq (midicps note)
+        snd (* vol (bell-partials freq attack release partials))]
+    (detect-silence snd :action FREE)
+    (out out-bus snd)))
+
+(save-to-pi dull_bell)
+(save-to-pi pretty_bell))
+
+
+;; SynthDef(\babblingbrook_jmc, { |out=0, amp=0.1|
+;;      var son;
+
+;;      son = ({RHPF.ar(OnePole.ar(BrownNoise.ar, 0.99), LPF.ar(BrownNoise.ar, 14)
+;;              * 400 + 500, 0.03, 0.003)}!2)
+;;              + ({RHPF.ar(OnePole.ar(BrownNoise.ar, 0.99), LPF.ar(BrownNoise.ar, 20)
+;;              * 800 + 1000, 0.03, 0.005)}!2)  * 4;
+;;      Out.ar(out, son * (amp * 20))
+;; },
+
+
+
+(def e (saws))
+()
+(stop)
+(-> eggs :sdef :name)
+
+(osc-debug )
+(osc-debug :on)
+(ctl e :note 42)
+
+
+(kill-server)
+
+(def g (group))
+
+
+(def b (overtone.sc.machinery.synthdef/synthdef-read :beans))
+
+(pprint b)
+
+(pprint "foo")
+
+(def b2 (overtone.sc.machinery.synthdef/synthdef-read "~/Desktop/beans.scsyndef"))
+
+(pprint b2)
+
+
+(pprint (:sdef beans) )
+
+(keys (:sdef beans))


Flatten a Sequence: source - hack, lint

Flatten a Sequence: source - hack, lint

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

--- src/4clojure/flatten.clj
+++ src/4clojure/flatten.clj
@@ -0,0 +1,38 @@
+;; Flatten a Sequence
+;; http://www.4clojure.com/problem/28
+
+(defn __ [coll]
+  (remove sequential? (rest (tree-seq sequential? seq coll))))
+
+(= (__ '((1 2) 3 [4 [5 6]])) '(1 2 3 4 5 6))
+(= (__ ["a" ["b"] "c"]) '("a" "b" "c"))
+(= (__ '((((:a))))) '(:a))
+
+(flatten ["a" ["b"] "c"])
+
+;; hack: see source of special restrictions
+;; works only with lein repl
+;; not in LightTable nor in http://www.tryclj.com
+;; (source flatten)
+;; =>
+;; (defn flatten
+;;   "Takes any nested combination of sequential things (lists, vectors,
+;;   etc.) and returns their contents as a single, flat sequence.
+;;   (flatten nil) returns an empty sequence."
+;;   {:added "1.2"
+;;    :static true}
+;;   [x]
+;;   (filter (complement sequential?)
+;;           (rest (tree-seq sequential? seq x))))
+
+;; but it could be even shorter
+(defn flatten [x]
+  (remove sequential? (rest (tree-seq sequential? seq x))))
+
+;; 4Clojure copy-paste
+#(remove sequential? (rest (tree-seq sequential? seq %)))
+
+;; reflect:
+;; filter: return list when pred = true
+;; remove: same but when pred = false
+(filter (complement pred) ...) <=> (remove pred ...)


Rename scale opt from s to g

Rename scale opt from s to g

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/terrancesnyder/engulf.git/'


adding hash functions for DHTs

adding hash functions for DHTs

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

--- src/plasma/digest.clj
+++ src/plasma/digest.clj
@@ -0,0 +1,64 @@
+(ns plasma.digest
+  (:import (java.security MessageDigest)))
+
+; Using a unique site key in the digest helps keep passwords safer from dictionary attacks on weak passwords.
+(def *digest-site-key*      "asdf134asdf")
+(def *default-password-len* 10)
+
+; Stretching, running the digest multiple times, makes it harder to brute force passwords also.  5 stretches means 5x the work.
+(def DIGEST-NUM-STRETCHES 10)
+
+(def VALID-CHARS
+   (map char (concat (range 48 58)     ; 0-9
+                     (range 66 91)     ; A-Z
+                     (range 97 123)))) ; a-z
+
+(defn random-char []
+  (nth VALID-CHARS (rand (count VALID-CHARS))))
+
+(defn random-str [len]
+  (apply str (take len (repeatedly random-char))))
+
+(defn- do-hash [type input]
+  (let [hasher (MessageDigest/getInstance type)]
+    (.digest hasher (.getBytes input))))
+
+(defn md5 [input]
+  (do-hash "MD5" input))
+
+(defn sha1 [input]
+  (do-hash "SHA-1" input))
+
+(defn sha256 [input]
+  (do-hash "SHA-256" input))
+
+(defn sha512 [input]
+  (do-hash "SHA-256" input))
+
+(defn hex [bytes]
+  (reduce (fn [result byte]
+            (str result (.substring
+                   (Integer/toString (+ (bit-and byte 0xff) 0x100) 16)
+                   1)))
+          "" bytes))
+
+(defn hex->int [hexval]
+  (read-string (str "0x" hexval)))
+
+(defn secure-digest [& stuff]
+  (sha1 (apply str (interpose "--" stuff))))
+
+(defn make-token []
+  (let [time   (.getTime (java.util.Date. ))
+        garbage (map rand (range 1 10))
+        salt   (apply str time garbage)]
+    (secure-digest salt)))
+
+(defn encrypt-password [password salt]
+  (reduce (fn [result _]
+            (secure-digest result salt password *digest-site-key*))
+          *digest-site-key*
+          (range DIGEST-NUM-STRETCHES)))
+
+(defn random-password []
+  (random-str *default-password-len*))


cache types, methods impls, helpers

cache types, methods impls, helpers

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/'


remove catalogs route

remove catalogs route

vestigial route is vestigial

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/'


upgrade matt's title for maximum clarity


Removed fields that aren't in the database. Oops!

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/couragelabs/coachbot.git/'


Started tinkering around with some pretty printer code; may switch to using clojure.pprint

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

--- src/polismath/pretty_printers.clj
+++ src/polismath/pretty_printers.clj
@@ -0,0 +1,19 @@
+(ns polismath.pretty-printers)
+
+
+(defn str-repeat [s n]
+  (apply str (repeat n s)))
+
+
+(defn prindent [base-indent main-indent & other-strings]
+  (print (str-repeat " " (* 2 (+ base-indent main-indent))))
+  (apply println other-strings))
+
+
+(defn print-repness [repness & {:keys [indent] :or {indent 0}}]
+  (doseq [[gid comments] repness]
+    (prindent indent 0 gid)
+    (doseq [c comments]
+      (prindent indent 2 c))))
+
+