[WM] wrap success responses in {:status :ok ...}

Like our other components do.

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


async izena

async izena

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


Move herbivore assertions together

Move herbivore assertions together

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/croeder/clojure-koans-work.git/'


client: fixture data for app-state

client: fixture data for app-state

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


Avoid charging more than once in an application

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


Renaming base-to-array to base-to-byte-array to be explicit

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/xcthulhu/clj-bitauth.git/'


added word count in clojure

added word count in clojure

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

--- scratch/clojure-scratch/wc.clj
+++ scratch/clojure-scratch/wc.clj
@@ -0,0 +1,25 @@
+(use '[clojure.string :only (join split)])
+(def sentence "san francisco is foggy a lot; it is a fun place to live")
+(println
+ (join "\n"
+  (split sentence #"\s")))
+
+(println
+ (join "\n"
+  (map #(str "'" % "' is a string in the sentence")
+   (split sentence #"\s"))))
+
+(defn map-count [ma ke]
+  (assoc ma ke (inc (get ma ke 0))))
+
+(println
+ (reduce map-count {}
+  (split sentence #"\s")))
+
+(println
+ (reduce #(assoc %1 %2 (inc (get %1 %2 0))) {}
+  (split sentence #"\s")))
+
+
+
+


Test refactoring.

Test refactoring.

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


Start tests on product repository, same as in Java version.

error: pathspec 'clojure-functional/src/test/clojure/no/knowit/clojure_functional/product_repository.clj' did not match any file(s) known to git

--- clojure-functional/src/test/clojure/no/knowit/clojure_functional/product_repository.clj
+++ clojure-functional/src/test/clojure/no/knowit/clojure_functional/product_repository.clj
@@ -0,0 +1,39 @@
+(ns no.knowit.clojure_functional.product-repository
+  (:use [clojure.test])
+  (:import [no.knowit.java_functional.product Product])
+  (:import [org.joda.time LocalDate]))
+
+(def product-list (atom []))
+
+(defn product-is-available [local-date]
+  (filter
+    #(.isAvailable %1 local-date) @product-list))
+
+
+(defn clear-state-fn [test-func]
+  (reset! product-list [])
+  (test-func))
+
+(use-fixtures :each clear-state-fn)
+
+
+(deftest empty_list_when_no_products
+  (is (= (product-is-available (LocalDate.)) [])))
+
+(deftest product_available_when_matching_date
+  (let [today (new LocalDate)
+        product (new Product "Cool product" today today)]
+    (swap! product-list
+      #(conj % product))
+    (is (not-empty (product-is-available today)))
+    (is (.contains (product-is-available today) product))))
+
+(deftest empty_list_when_no_products_matching_date
+  (let [today (new LocalDate)
+        yesterday (.minusDays today 1)
+        product (new Product "Cool product" yesterday yesterday)]
+    (swap! product-list
+      #(conj % product))
+    (is (empty (product-is-available today)))))
+
+(run-tests)


Some triangles yo

Some triangles yo

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

--- src/art/moire_triangles_00.clj
+++ src/art/moire_triangles_00.clj
@@ -0,0 +1,63 @@
+(ns art.moire-triangles-00
+  (:require [quil.core :as q]
+            [quil.middleware]))
+
+; (def width  810)
+; (def height 540)
+(def width 1080)
+(def height 720)
+
+(def tri-width (* width 0.1))
+(def tri-height (* (Math/sqrt 3) 0.5 tri-width))
+
+
+(defn rotate-about-center [radians]
+  (q/with-translation [(* 0.5 (q/width)) (* 0.5 (q/height))]
+    (q/rotate radians)))
+
+(defn triangle []
+  (q/triangle 0 tri-height,
+              (* 0.5 tri-width) 0,
+              tri-width tri-height))
+
+
+(defn triangle-row [n]
+  (doseq [x (->> (range n) (map #(* tri-width %)))]
+    (q/with-translation [x 0] (triangle))))
+
+(defn triangle-block [nx ny]
+  (doseq [y (->> (range ny) (map #(* tri-height %)))]
+    (q/with-translation [0 y] (triangle-row nx)
+      )))
+
+
+(defn render []
+  (q/background 0)
+  (q/stroke-weight 0)
+  (triangle-block 15 10)
+  )
+
+(defn setup []
+  (q/fill 255)
+  (q/stroke 255)
+  (q/stroke-weight 1)
+  ; (render)
+  )
+
+(defn step [state] state)
+
+(defn draw [state]
+  (render)
+  )
+
+(defn run []
+  (q/defsketch example
+    :title "Art!"
+    :middleware [quil.middleware/fun-mode]
+    :settings #(q/smooth 2)
+    :setup setup
+    :update step
+    :draw draw
+    :size [width height]
+    ))
+; (run)


Adding db tests.

Adding db tests.

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


add meta tag

add meta tag

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


add helper functions

add helper functions

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

--- src/cljs/bulldog/helpers.cljs
+++ src/cljs/bulldog/helpers.cljs
@@ -0,0 +1,41 @@
+(ns bulldog.helpers
+  (:require [om.core :as om :include-macros true]
+            [chord.client :refer [ws-ch]]
+            [cljs.core.async :refer [<! >!]])
+  (:require-macros [cljs.core.async.macros :refer [go go-loop]]))
+
+
+(defn open-channel
+  ""
+  [app]
+  (go
+    (let [uri (goog.Uri. js/location.href)
+          ssl? (= (.getScheme uri) "https")
+          socket-uri (str (if ssl?  "wss://" "ws://")
+                          (.getDomain uri)
+                          (when (= (.getDomain uri) "localhost")
+                            (str ":" 8080 #_(.getPort uri)))
+                          "/ws")
+          {:keys [ws-channel error]} (<! (ws-ch socket-uri))]
+      (if-not error
+        (do
+          (om/transact! app :socket (fn [_] ws-channel) )
+          (>! ws-channel {:type :init :data nil})
+          (go-loop [{{:keys [type meta data] :as message} :message err :error} (<! ws-channel)]
+            (if-not err
+              (when message
+                (case type
+                  :init (om/transact! app :articles (fn [_] data))
+                  :get-article (om/transact! app :current-article (fn [_] data))
+                  :login (om/transact! app :admin? (fn [_] data))
+                  :unrelated)
+                (recur (<! ws-channel)))
+              (println "Channel error on response"))))
+        (println "Channel error on open" error)))))
+
+
+
+(defn handle-text-change
+  "Store and update input text in view component"
+  [e owner text]
+  (om/set-state! owner text (.. e -target -value)))


Pushing the progressive loading logic to hatti from hatti-web.

error: pathspec 'src/hatti/ona/csv_reader.cljs' did not match any file(s) known to git

--- src/hatti/ona/csv_reader.cljs
+++ src/hatti/ona/csv_reader.cljs
@@ -0,0 +1,48 @@
+(ns hatti.ona.csv-reader
+  (:require-macros [cljs.core.async.macros :refer [go]])
+  (:require [cljs.core.async :refer [<! put! chan timeout close!]]))
+
+(defn process-aggregated-data!
+  "Calls callback on aggregated data that come via messages in channel.
+   Callback accepts two arguments: data (cljs list), and completed? (bool)
+  If there is a parser in message, resume it after a timeout."
+  [agg-data-channel callback]
+  (go
+   (while true
+     (let [{:keys [data completed? parser]} (<! agg-data-channel)]
+       (when data (callback data completed?))
+       ;; Timeout so browser can do some rendering before parsing again.
+       (<! (timeout 100))
+       (when parser (.resume parser))
+       (when completed? (close! agg-data-channel))))))
+
+(defn read-next-chunk!
+  "On each step of data, increment a counter *n*, and put data in a list *agg*.
+   After a exponentially increasing # of steps have been processes,
+   the aggregated data gets flushed into a channel, and parser is paused.
+   The channel reader should resume the parser after processing the data."
+  [data-chunk parser *n* *agg* channel]
+   (swap! *n* inc)
+   (swap! *agg* conj (first (js->clj (.-data data-chunk))))
+   (when (and (>= @*n* 100) (integer? (.log10 js/Math @*n*)))
+     (.pause parser)
+     (put! channel {:data @*agg* :parser parser})
+     (reset! *agg* [])))
+
+(defn progressively-read-csv!
+  "Given csv-string + callback for incremental data,
+   progressively parses csv (with exponential chunk processing).
+   Channel-based asynchronization + waits allow browser to render in bckgrnd."
+  [csv-string chunk-callback]
+  (let [*n* (atom 0)
+        *agg* (atom [])
+        channel (chan)
+        step (fn [chnk parser]
+               (read-next-chunk! chnk parser *n* *agg* channel))
+        complete #(put! channel {:data @*agg* :completed? true})
+        config (clj->js {:header true
+                         :skipEmptyLines true
+                         :step step
+                         :complete complete})]
+    (process-aggregated-data! channel chunk-callback)
+    (.parse js/Papa csv-string config)))


Working on Chapter 7 of On Lisp.

Working on Chapter 7 of On Lisp.

error: pathspec 'books/onlisp/ch7.clj' did not match any file(s) known to git

--- books/onlisp/ch7.clj
+++ books/onlisp/ch7.clj
@@ -0,0 +1,76 @@
+;; Implementing some of the macros from Chapter 7 of On Lisp.
+(require '[clojure.string :as string])
+
+(defn intersperse [sep list]
+     (interpose sep list))
+
+(defn psent [ & vals ]
+  (println (str (string/capitalize (apply str vals))
+                ".")))
+
+;; p. 214
+;; Need to generate a symbol for args.
+(defmacro abbrev [short long]
+  `(defmacro ~short [ & args# ]
+     `(~'~long ~@args#)))
+
+
+(defmacro defmacroprint [ name args & body ]
+  `(do
+     (psent "expanding macro " '~name " with args " '~args)
+     (defmacro ~name ~args
+        (do
+          (psent "evaluating macro " '~name " with arg values: "
+                 ~@(intersperse ", " (filter (fn [symb] (not= '& symb)) args)))
+          ~@body))))
+
+(abbrev dmp defmacroprint)
+
+;; p. 87
+(dmp our-when [test & body]
+    `(if ~test
+         (do
+           ~@body)))
+
+(dmp another-macro [ & body ]
+  `(do
+      (println "inside blah")
+      (reduce + body)))
+
+
+(println "Here are some macros from On Lisp, in action!")
+(our-when true
+       (println "When was true!"))
+
+
+(defn start-tag [name]
+  (str "<" name ">"))
+
+(defn end-tag [name]
+  (str "</" name ">"))
+
+(dmp deftag [tag]
+  `(defn ~tag [ & res#]
+     (apply str
+        (cons (start-tag '~tag) res#))))
+
+(deftag html)
+(deftag head)
+(deftag title)
+(deftag body)
+(deftag h1)
+(deftag h2)
+(deftag p)
+
+(let [doc (html
+            (head
+              (title "Hello"))
+            (body
+              (h1 "Hello World!")
+              (p "This is a test of our html system")
+              (h2 "This is a Header 2")
+              (p "This is the last paragraph")))
+      doc2 (p "HI")]
+  (println doc))
+
+(println (macroexpand '(deftag html)))


small edit to dev/user.clj

small edit to dev/user.clj

--- example/dev/user.clj
+++ example/dev/user.clj
@@ -1,8 +1,9 @@
 (ns user
   (:require
    [figwheel-sidecar.system :as fs]
+   [figwheel-sidecar.repl-api :as f]
+
    [com.stuartsierra.component :as component]
-   [figwheel-sidecar.repl-api :as f]
    [clojure.tools.namespace.repl :refer (refresh refresh-all)]))

 (def temp-config


Add views file

Add views file

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

--- src/todo_repl_webapp/views.clj
+++ src/todo_repl_webapp/views.clj
@@ -0,0 +1,95 @@
+(ns todo-repl-webapp.views
+  (:require [hiccup.form :as form]
+            [hiccup.page :as page]
+            [hiccup.core :as core]))
+
+(def instructions
+  (core/html
+    [:div.alert.alert-info
+      [:div [:b "Instructions"]]
+      [:div.row
+        [:div.col-md-4
+          [:p "To Display Tasks"]
+          [:code "(tasks)"]]
+        [:div.col-md-6
+          [:p "To Reset Tasks"]
+          [:code "(init-tasks)"]]]
+      [:div.row
+        [:div.col-md-4
+          [:p "Tasks look like this"]
+          [:code "{:name name" [:br]
+                 "  :due " [:em "date (try natural language)"] [:br]
+                 "  :context  " [:em "context"] [:br]
+                 "}"]]
+        [:div.col-md-4
+          [:p "To Add a Task"]
+          [:code "(add-new-task" [:br]
+                 "  {:name \"Build a Rocketship\"" [:br]
+                 "   :due \"tomorrow\"" [:br]
+                 "   :context \"hobbies\"})"]]
+
+        [:div.col-md-4
+          [:p "To Complete a Task"]
+          [:code "(complete-task "
+                 [:em "index"]
+                 ")"]]]]))
+
+(defn task-item
+  "Given a task (map), return a div representing the task"
+  [task-map]
+  (core/html
+      [:div.col-md-1
+        [:span.label.label-primary.taskIndex]]
+      [:div.col-md-7
+        (if (= :complete (:status task-map))
+            [:p.lead.text-muted [:strike (:name task-map)]]
+            [:p.lead (:name task-map)])]
+      [:div.col-md-2
+        (if-not (nil? (:context task-map))
+          [:p.text-muted (:context task-map)])]
+      [:div.col-md-2
+        (if-not (nil? (:due task-map))
+          [:p.text-info (:due task-map)])]))
+
+(defn task-line-item
+  "When given a single task (map), return a html table line representing the task"
+  [task-map]
+  (core/html [:div.panel.panel-default
+               [:div.panel-body
+                 (task-item task-map)]]))
+
+(defn task-table
+  "When given a vector of tasks (maps), return an html table representing those tasks"
+  [task-vec]
+  (core/html
+      (clojure.string/join
+        (map task-line-item task-vec))))
+
+(defn display [x & xs]
+  (if-not (empty? x)
+    (core/html [:h2 "list"]
+          #_[:h3 x]
+            (task-table (vec x)))))
+
+(defn home [tasks]
+  (core/html [:head
+          [:title "todo-repl"]
+          (page/include-css "css/bootstrap.min.css")
+          (page/include-js "http://code.jquery.com/jquery-1.10.1.min.js"
+                           "js/bootstrap.min.js")]
+        [:body
+          [:div.col-md-7.col-md-offset-2
+            [:h1 "todo-repl"]
+            [:div
+              instructions]
+            (form/form-to {:id "todoForm"}
+                          [:post "/eval"]
+                          (form/text-area {:class "form-control"}
+                                          "evalInput"
+                                          "(tasks)")
+                          [:br]
+                          (form/submit-button {:id "todoSubmitButton"}
+                                              "Eval"))]
+          [:div#display.col-md-7.col-md-offset-2
+            (display tasks)]
+          (page/include-js "js/eval.js")]))


Generate Bitbucket OAuth url

Generate Bitbucket OAuth url

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

--- src-cljs/frontend/utils/bitbucket.cljs
+++ src-cljs/frontend/utils/bitbucket.cljs
@@ -0,0 +1,31 @@
+(ns frontend.utils.bitbucket
+  (:require
+   [frontend.utils :as utils]
+   [cemerick.url :refer [url]]))
+
+(defn http-endpoint []
+  "https://bitbucket.org"
+  ;;(config/bitbucket-endpoint)
+  )
+
+(defn auth-url []
+  (let [;; auth-host and auth-protocol indicate the circle host that
+        ;; will handle the oauth redirect
+        auth-host (aget js/window "renderContext" "auth_host")
+        auth-protocol (aget js/window "renderContext" "auth_protocol")
+        redirect (-> (str auth-protocol "://" auth-host)
+                     (url  "auth/bitbucket")
+                     (assoc :query (merge {"return-to" (str js/window.location.pathname
+                                                            js/window.location.hash)}
+                                          (when (not= auth-host js/window.location.host)
+                                            ;; window.location.protocol includes the colon
+                                            {"delegate" (str js/window.location.protocol "//" js/window.location.host)})))
+                     (assoc :protocol (or (aget js/window "renderContext" "auth_protocol")
+                                          "https"))
+                     str)]
+    (-> (url (http-endpoint) "site/oauth2/authorize")
+        (assoc :query {"redirect_uri" redirect
+                       "state" (utils/oauth-csrf-token)
+                       "response_type" "code"
+                       "client_id" (aget js/window "renderContext" "bitbucketClientId")})
+        str)))


window.dumpState() for basic debugging in prod

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

--- cljs/sledge/debug.cljs
+++ cljs/sledge/debug.cljs
@@ -0,0 +1,8 @@
+(ns sledge.debug
+ (:require [sledge.core :as core]))
+
+(defn dump-state []
+  (.log js/console "app-state is" (clj->js @core/app-state))
+  (.log js/console "audio is " (core/player-el)))
+
+(aset js/window "dumpState" dump-state)


New arithmetic examples

New arithmetic examples

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


fix(hook): add response time on both after request hook calls

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-Digital/pdg-core.git/'


Correct query param [#145811513]

Correct query param [#145811513]

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


Simplify/unify date handling & formatting

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


Rework state-reg-method-related fns

Rework state-reg-method-related fns


removing native firebase core

removing native firebase 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/stupacki/api-chordbook.git/'


Allow URL without TLD #13.

Allow URL without TLD #13.

Cleaning unsed namespace (used previously by restQL manager)

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


Andy/David Email Management test

Andy/David Email Management test

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

--- test/checkin/email_management_test.clj
+++ test/checkin/email_management_test.clj
@@ -0,0 +1,9 @@
+(ns checkin.email_management_test
+  (:require [clojure.test :refer :all]
+            [checkin.core :refer :all]))
+
+(deftest shouldReturn201WhenAddingAnEmailAddress
+  (let [response (home {})]
+    (testing "success"
+      (is (= 200 (:status response))))))
+


whoops, replace accidently deleted

whoops, replace accidently deleted

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

--- src/cake/leiningen.clj
+++ src/cake/leiningen.clj
@@ -0,0 +1,5 @@
+(ns cake.leiningen
+  (:use [leiningen.core :only [resolve-task]]))
+
+(defmacro lein [task & args]
+  `((resolve-task ~(name task)) ~@args))


protecting from after-request hook

protecting from after-request hook


testing

testing

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


Enforce that "mutations" occur within transactions

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


Ensured xml ids do not start with a digit to pass ePub validation

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


More refactoring, closing this branch afterwards.

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/screen6/bigquery-clj.git/'


implement Mongoose

implement Mongoose

--- src/clj/game/cards-icebreakers.clj
+++ src/clj/game/cards-icebreakers.clj
@@ -285,6 +285,11 @@
    "Mimic"
    {:abilities [{:cost [:credit 1] :msg "break 1 sentry subroutine"}]}

+   "Mongoose"
+   (auto-icebreaker ["Sentry"]
+                    {:abilities [{:cost [:credit 1] :msg "break up to 2 sentry subroutines"}
+                                 {:cost [:credit 2] :msg "add 2 strength" :effect (effect (pump card 2)) :pump 2}]})
+
    "Ninja"
    (auto-icebreaker ["Sentry"]
                     {:abilities [{:cost [:credit 1] :msg "break 1 sentry subroutine"}


Namespace prefixes

Namespace prefixes

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

--- src/clj/sparqlab/prefixes.clj
+++ src/clj/sparqlab/prefixes.clj
@@ -0,0 +1,14 @@
+(ns sparqlab.prefixes)
+
+; ----- Namespace prefixes -----
+
+(defn- prefix
+  "Builds a function for compact IRIs in the namespace `iri`."
+  [iri]
+  (partial str iri))
+
+(def rdfs
+  (prefix "http://www.w3.org/2000/01/rdf-schema#"))
+
+(def xsd
+  (prefix "http://www.w3.org/2001/XMLSchema#"))


Add more test 	modified:   test/loganalyzer/core_test.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/StephenBergeron/Specter.git/'


session manager WIP

session manager WIP

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

--- src/lein_ui/nrepl/handler.clj
+++ src/lein_ui/nrepl/handler.clj
@@ -0,0 +1,170 @@
+(ns lein-ui.nrepl.handler
+  (:require [org.httpkit.server :as server]
+            [clojure.tools.nrepl :as nrepl]
+            [lein-ui.core :as ui]
+            [lein-ui.util :refer [pprint-str]]))
+
+
+;; TODO figure out users
+;; TODO register watcher for messages
+
+
+
+(defn repl-eval! [host port message]
+  (with-open [conn (nrepl/connect :host host
+                                  :port port)]
+  (-> (nrepl/client conn 2000)
+      (nrepl/message message)
+      doall)))
+
+(defonce repl-channels (atom {:connections {}
+                              :sessions {}}))
+
+(defn ensure-project-connection
+  ([project]
+     (if-let [conn (-> @repl-channels :connections (get project))]
+       conn
+       (ensure-project-connection project (apply nrepl/connect
+                                                 (apply concat (ui/get-repl-data project))))))
+  ([project conn]
+     (let [channels @repl-channels]
+       (if (compare-and-set! repl-channels
+                             channels
+                             (assoc-in channels [:connections project] conn))
+         conn
+         (if-let [conn* (get-in @repl-channels [:connections project])]
+           ;; a competing connection was inserted, close ours
+           (do (.close conn) conn*)
+           ;; some other connection or session was created or destroyed
+           (recur project conn))))))
+
+;; Experiment and take notes on "multiple agents can read the client
+;; response stream without interference from each other"
+
+
+
+
+;; {:op "clone"} -async> {:new-session :id}
+
+
+;; I'd like to be able to setup a session for a project & user without
+;; necessarily having a channel available
+
+;; The top-level ensure-user-session can block... for now.
+
+
+;; {send the create session message}
+
+;; block / async handler
+
+;; receive the create session response
+   ;; if it's bad, {log & notify} [callback]
+
+;; {set the session in the state} [set-fn :: SessionId -> Boolean]
+   ;; if it got beat, close, {log, & notify} [callback]
+
+;; {log & notify} [callback]
+
+(fn []
+  (expected-message? msg callback)
+
+  (ui-nrepl/remove-handler-for-id (msg :id))
+
+  (if (set-fn (msg :new-session))
+    (callback :success (msg :new-session))
+    (close-session (msg :new-session) callback)))
+
+(fn [project user conn channel msg]
+  ;; put the new session in our state, cleaning up if there's a
+  ;; race. let the user know what's up and log pertinent information
+  (if (contains? (-> msg :status set)
+                 "done")
+    (do ;;(ui-nrepl/remove-handler-for-id (msg :id))
+        (if-let [session-id (msg :new-session)]
+          (do (swap! repl-channels update-in [:sessions user]
+                     (fn [user-sessions]
+                       (if (user-sessions project)
+                         ;; inside a swap here - normally we don't cause
+                         ;; side effects because it can be run more than
+                         ;; once but we throw after performing the side
+                         ;; effects here so they won't happen again
+                         ;; since swap! will fail.  Not concerned about
+                         ;; performance of competing transactions
+                         ;; (assume low volume)
+                         (do
+                           (nrepl/message conn {:op "close"
+                                                :session session-id})
+                           (println
+                            (format "Duplicate session created for %s on %s"
+                                    user project))
+                           (server/send! channel (pprint-str
+                                                  {:type :error
+                                                   :subject project
+                                                   :error :duplicate-session}))
+                           (throw (ex-info "Duplicate session" {:project project :user user}))))
+                       (assoc user-sessions project session-id)))
+              (println (format "Session created for %s on %s: %s"
+                               user project session-id))
+              (server/send! channel (pprint-str {:type :nrepl/session
+                                                 :subject project
+                                                 :status :created})))
+          (do
+            (println (format (str "Response to create session"
+                                  "for %s on project % with id %s"
+                                  "did not contain a session id")
+                             user project (msg :id)))
+            (server/send! channel (pprint-str
+                                   {:type :error
+                                    :subject project
+                                    :error :unknown-session-error})))))
+    (println "Unexpected response" msg)))
+
+
+
+(defn ensure-user-session
+  ([conn project user]
+     (if-let [session (-> @repl-channels (get-in [:sessions user project]))]
+       session
+       (ensure-user-session conn project user
+                            (apply nrepl/connect
+                                   (apply concat (ui/get-repl-data project))))))
+  ([conn project user session]
+     (let [channels @repl-channels]
+       (if (compare-and-set! repl-channels
+                             channels
+                             (assoc-in channels [:connections project] conn))
+         conn
+         (if-let [conn* (get-in @repl-channels [:connections project])]
+           ;; a competing connection was inserted, close ours
+           (do (.close conn) conn*)
+           ;; some other connection or session was created or destroyed
+           (recur conn project user session))))))
+
+(defn find-repl-session [user project]
+  (let [channels @repl-channels
+        project-connection (get-in channels [:connections project])
+        user-session (get-in channels [:sessions user])]
+    (if-not project-connection
+      )
+    ))
+
+(defmulti handle-message (fn [msg user] (msg :type)))
+
+(defmethod handle-message :nrepl/command [msg user app-state]
+  (let [conn (find-repl-connection user (msg :subject))]
+    (repl-eval! host port (msg  :message))))
+
+(defn nrepl-socket-handler [request]
+  (let [user :current-user]
+    (server/with-channel request channel
+      (on-receive channel (fn [msg]
+                            (try
+                              (handle-message msg user (request :lein-ui/app-state))
+                              (catch Throwable t
+                                (println t)
+                                (server/send! channel (pprint-str
+                                                       {:type :error
+                                                        :exception (str t)}))))))
+      (on-close channel (fn [status]
+                          ;; (release-repl-connections user)
+                          (cleanup user))))))


first attempt that went nowehere. Thanks Java Date library.

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

--- clojure/meetup/meetup.clj
+++ clojure/meetup/meetup.clj
@@ -0,0 +1,31 @@
+(ns meetup)
+(import 'java.util.Calendar)
+
+(defn- dates-in [yr mm day-name]
+  "returns a list of dates, given the year and month and day-name"
+  )
+
+(defn- schedule-by-week [dates pos]
+  "returns the date from the list by it's position. nil if position is not in the list"
+  )
+
+(defn- schedule-by-range [dates date-range]
+  "returns the first date that's also in the given range. nil if none match"
+  )
+
+;;; mon/tue... teenth
+;;; first/second/third/fourth/last mon/tue day
+
+;;; get last
+;; (get v (dec (count v)))
+
+(let [c (Calendar/getInstance)]
+  (doto c
+    (.set Calendar/YEAR 2013)
+    (.set Calendar/MONTH 1) ; Feb is 1
+    ;; (.set Calendar/DAY_OF_MONTH 1)
+    ;; (.set Calendar/DAY_OF_WEEK Calendar/SATURDAY)
+    )
+  [(.getActualMinimum c Calendar/DAY_OF_MONTH)
+   (.getActualMaximum c Calendar/DAY_OF_MONTH)
+   c])


service variables form

service variables form

error: pathspec 'src/cljs/swarmpit/component/service/form_variables.cljs' did not match any file(s) known to git

--- src/cljs/swarmpit/component/service/form_variables.cljs
+++ src/cljs/swarmpit/component/service/form_variables.cljs
@@ -0,0 +1,66 @@
+(ns swarmpit.component.service.form-variables
+  (:require [swarmpit.material :as material :refer [svg]]
+            [swarmpit.utils :refer [remove-el]]
+            [rum.core :as rum]))
+
+(enable-console-print!)
+
+(defonce state (atom []))
+
+(def form-headers ["Name" "Value"])
+
+(defn- add-item
+  "Create new form item"
+  []
+  (swap! state
+         (fn [p] (conj p {:name  ""
+                          :value ""}))))
+
+(defn- remove-item
+  "Remove form item"
+  [index]
+  (swap! state
+         (fn [p] (remove-el p index))))
+
+(defn- update-item
+  "Update form item configuration"
+  [index k v]
+  (swap! state
+         (fn [p] (assoc-in p [index k] v))))
+
+(defn- form-name [value index]
+  (material/table-row-column
+    #js {:key index}
+    (material/text-field
+      #js {:id       "name"
+           :value    value
+           :onChange (fn [e v] (update-item index :name v))})))
+
+(defn- form-value [value index]
+  (material/table-row-column
+    #js {:key index}
+    (material/text-field
+      #js {:id       "value"
+           :value    value
+           :onChange (fn [e v] (update-item index :value v))})))
+
+(rum/defc form < rum/reactive []
+  (let [variables (rum/react state)]
+    [:form
+     [:fieldset
+      [:legend "Environment variables"]
+      (material/theme
+        (material/table
+          #js {:selectable false}
+          (material/table-header-form form-headers #(add-item))
+          (material/table-body
+            #js {:displayRowCheckbox false}
+            (for [index (range (count variables))]
+              (let [variable (nth variables index)
+                    {:keys [name
+                            value]} variable]
+                (material/table-row-form
+                  index
+                  [(form-name name index)
+                   (form-value value index)]
+                  (fn [] (remove-item index))))))))]]))


clarify dox

clarify dox

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -24,8 +24,8 @@
   [{{:keys [source_table] :as query} :query}]
   (let [forms (->> (map apply-form query) ; call `apply-form` for each clause and strip out nil results
                    (filter identity)
-                   (mapcat (fn [form] (if (vector? form) form
-                                         [form])))
+                   (mapcat (fn [form] (if (vector? form) form ; some `apply-form` implementations return a vector of multiple korma forms; if only one was
+                                         [form])))           ; returned wrap it in a vec so `mapcat` can build a flattened sequence of forms
                    doall)]
     (when *enable-debug-logging*
       (log-query query forms))
@@ -53,7 +53,9 @@

   call the matching implementation which should either return `nil` or translate it into a korma clause like

-    (aggregate (count :*) :count)"
+    (aggregate (count :*) :count)
+
+  An implementation of `apply-form` may optionally return a vector of several forms to insert into the generated korma `select` form."
   (fn [[clause-name clause-value]] clause-name))

 ;; ### `:aggregation`


basic embedded ES works

basic embedded ES works

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

--- src/es/node.clj
+++ src/es/node.clj
@@ -0,0 +1,35 @@
+(ns es.node
+  "An embedded ES node instance"
+  (:require
+    [clojurewerkz.elastisch.native :as es]
+    [clojurewerkz.elastisch.native.index :as idx]
+    [clojurewerkz.elastisch.native.document :as doc]))
+
+(def ES (atom nil))
+
+(defn start-node
+  "launch en embedded ES node"
+  []
+  (reset! ES
+          (es/start-local-node
+            (es/build-local-node
+              {:node.name "celestial"
+               :cluser.name "celestial-cluster"
+               :path.logs "/tmp/celestial-es"
+               :path.data "/tmp/celestial-es"
+               :path.work "/tmp/celestial-es"
+               :local true :http.enabled false }))))
+
+(defn stop-node
+  "stops embedded ES node"
+  []
+  (.close @ES)
+  (reset! ES nil))
+
+(comment (start-node)
+         (stop-node)
+         ;; (println @ES)
+         (es/connect-to-local-node! @ES)
+         (idx/create "myapp2_development" )
+         (doc/put "myapp2_development" "person"  "10" {:username "ronen"})
+         (doc/get "myapp2_development" "person" "10"))


Simplification.

Simplification.

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


Add csv-to-map test.

Add csv-to-map test.

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

--- project/analyze-data/test/analyze_data/csv_to_map_test.clj
+++ project/analyze-data/test/analyze_data/csv_to_map_test.clj
@@ -0,0 +1,12 @@
+(ns analyze-data.csv-to-map-test
+  (:require [clojure.test :refer [deftest is]]
+            [analyze-data.csv-to-map :as test-ns])
+  (:import java.io.StringReader))
+
+(deftest csv-to-map-test
+  (is (= []
+         (test-ns/csv-to-map (StringReader. "")))
+      "parses empty file to empty vector")
+  (is (= [{"a" "1", "b" "2"} {"a" "3", "b" "4"}]
+         (test-ns/csv-to-map (StringReader. "a,b\n1,2\n3,4")))
+      "uses first line as header and parses following lines into maps"))


hide kotarak placeholder description

hide kotarak placeholder description

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


add nrepl to figwheel

add nrepl to figwheel

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


expansion of defined VS

expansion of defined VS

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


Moving things around a bit

Moving things around a bit

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


Fix nippy header suppression

Fix nippy header suppression

--- src/main/clojure/pigpen/pig.clj
+++ src/main/clojure/pigpen/pig.clj
@@ -508,7 +508,7 @@
 ;; **********

 (defn ^:private pig-freeze [value]
-  (DataByteArray. (freeze value {:legacy-mode true})))
+  (DataByteArray. (freeze value {:skip-header? true, :legacy-mode true})))

 (defn ^:private pig-freeze-with-nils [value]
   (if value


Added some printing to the clojure backend

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/OttoJursch/sched-system.git/'


unit tests for external-hotlinking namespace

error: pathspec 'test/vignette/util/external_hotlinking.clj' did not match any file(s) known to git

--- test/vignette/util/external_hotlinking.clj
+++ test/vignette/util/external_hotlinking.clj
@@ -0,0 +1,35 @@
+(ns vignette.util.external-hotlinking-test
+  (:require [clout.core :refer [route-matches]]
+            [midje.sweet :refer :all]
+            [ring.mock.request :refer :all]
+            [vignette.http.routes :refer :all]
+            [vignette.util.external-hotlinking :refer :all]))
+
+(def original-url "/wikiaglobal/images/5/58/Wikia-Visualization-Main,croatiaempire.png/revision/latest")
+(def original-legacy-url "/wikiaglobal/images/5/58/Wikia-Visualization-Main,croatiaempire.png")
+
+(defn generate-request
+  ([url]
+    (generate-request url false))
+  ([url include-header?]
+    (let [request (request :get url)]
+      (if include-header?
+        (assoc-in request [:headers force-header-name] force-header-val)
+        request))))
+
+(facts :force-thumb?
+       (let [original-force (generate-request original-url true)
+             original-noforce (generate-request original-url)
+             legacy-force (generate-request original-legacy-url true)
+             legacy-noforce (generate-request original-legacy-url)]
+         (force-thumb? original-force) => true
+         (force-thumb? original-noforce) => falsey
+         (force-thumb? legacy-force) => true
+         (force-thumb? legacy-noforce) => falsey))
+
+(facts :image-params->forced-thumb-params
+       (let [request (generate-request original-url)
+             route-match (route-matches original-route request)
+             request (assoc-in request [:route-params] route-match)
+             image-params (image-params request :original)]
+         (image-params->forced-thumb-params image-params) => (contains force-thumb-params)))


Add lein profiles

Add lein profiles

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

--- lein-profiles.clj
+++ lein-profiles.clj
@@ -0,0 +1,7 @@
+{:user
+ {:plugins [[lein-exec "0.3.5"]
+            [venantius/ultra "0.3.3"]
+            [lein-ancient "0.6.7"]
+            [lein-kibit "0.1.2"]]
+  :ultra {:color-scheme :solarized_dark}}}
+


test/idserver/client.clj: copied from v4 tests

error: pathspec 'src/org/altlaw/test/internal/idserver/client.clj' did not match any file(s) known to git

--- src/org/altlaw/test/internal/idserver/client.clj
+++ src/org/altlaw/test/internal/idserver/client.clj
@@ -0,0 +1,51 @@
+(ns org.altlaw.test.internal.idserver.client
+  (use org.altlaw.internal.idserver.client
+       clojure.contrib.test-is)
+  (require org.altlaw.test.internal))
+
+(use-fixtures :once
+              org.altlaw.test.internal/internal-server-fixture
+              org.altlaw.test.internal/internal-uri-fixture)
+
+(deftest can-set-and-get-new-values
+  (let [coll (name (gensym "coll"))
+        value (rand-int Integer/MAX_VALUE)]
+    (set-value coll "one" value)
+    (is (= value (get-value coll "one")))))
+
+(deftest can-find-value
+  (let [coll (name (gensym "coll"))]
+    (find-value coll "foo")
+    (is (integer? (get-value coll "foo")))))
+
+(deftest find-value-returns-values-that-already-exist
+  (let [coll (name (gensym "coll"))
+        value (rand-int Integer/MAX_VALUE)]
+    (set-value coll "foo" value)
+    (is (= value (get-value coll "foo")))
+    (is (= value (find-value coll "foo")))
+    (is (= value (get-value coll "foo")))))
+
+(deftest nonexistent-values-return-nil
+  (let [coll (name (gensym "coll"))]
+    (is (nil? (get-value coll "does-not-exist")))))
+
+(deftest deleted-keys-return-nil
+  (let [coll (name (gensym "coll"))
+        value (rand-int Integer/MAX_VALUE)]
+    (set-value coll "one" value)
+    (is (= value (get-value coll "one")))
+    (delete-key coll "one")
+    (is (nil? (get-value coll "one")))))
+
+(deftest can-get-entire-collection
+  (let [coll (name (gensym "coll"))
+        value1 (rand-int Integer/MAX_VALUE)
+        value2 (rand-int Integer/MAX_VALUE)
+        value3 (rand-int Integer/MAX_VALUE)
+        correct {"one" value1, "two" value2,
+                 "three" value3}]
+    (set-value coll "one" value1)
+    (set-value coll "two" value2)
+    (set-value coll "three" value3)
+    (is (= correct (into {} (get-map coll))))))


Rename options to emphasize keywords

Rename options to emphasize keywords

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


Upgrade to latest iota for every?

Upgrade to latest iota for every?

--- project.clj
+++ project.clj
@@ -19,7 +19,6 @@
    [clj-time "0.9.0"]
    [hiccup "1.0.5"]
    [json-html "0.3.1"]
-   [juxt/iota "0.1.2"]
    [manifold "0.1.1-alpha4"]
    [metosin/ring-http-response "0.6.5"]
    [metosin/ring-swagger "0.20.2" :exclusions [potemkin]]
@@ -73,6 +72,7 @@
           [ring-mock "0.1.5"]

           [aero "0.1.2"]
+          [juxt/iota "0.2.1"]

           [juxt.modular/aleph "0.1.3" :exclusions [manifold]]
           [juxt.modular/bidi "0.9.2" :exclusions [bidi]]


bump version to 2.8.21

bump version to 2.8.21

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-Digital/pdg-core.git/'


Release 1.0.0

Release 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/starcity-properties/odin.git/'


project.clj edited online with Bitbucket

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


added project.clj

added project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,7 @@
+(defproject limelight "0.1.0-SNAPSHOT"
+  :description "FIXME: write"
+  :dependencies [[org.clojure/clojure "1.2.1"]
+                 [jruby-complete "1.6.3"]
+                 [jna "3.0.9"]]
+  :dev-dependencies [[junit "4.8.2"]]
+  )


bum version to 2.9.2

bum version to 2.9.2


Prepare 0.2.17 release

Prepare 0.2.17 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sablono "0.2.17-SNAPSHOT"
+(defproject sablono "0.2.17"
   :description "Lisp style templating for Facebook's React."
   :url "http://github.com/r0man/sablono"
   :author "Roman Scherer"


default lein test to doo phantom test once

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


Fix up guava nonsense

Fix up guava nonsense

--- project.clj
+++ project.clj
@@ -15,7 +15,8 @@
    [clj-time "0.11.0"]

    [hiccup "1.0.5"]
-   [json-html "0.3.9"]
+   ;; We only need the back-end parts of json
+   [json-html "0.4.0" :exclusions [hiccups]]
    [manifold "0.1.4"]
    [metosin/ring-http-response "0.6.5"]
    [metosin/ring-swagger "0.22.7"]
@@ -31,11 +32,7 @@
    [com.cognitect/transit-clj "0.8.285"]

    ;; Built-in Swagger UI
-   [org.webjars/swagger-ui "2.1.4"]
-
-   ;; Provide exclusions libraries
-   [com.google.guava/guava "18.0"]
-   ]
+   [org.webjars/swagger-ui "2.1.4"]]

   :pedantic? :abort


Logging for org mismatch

Logging for org mismatch

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


a bit, still work

a bit, still work

error: pathspec 'Nest-List/NL.clj' did not match any file(s) known to git

--- Nest-List/NL.clj
+++ Nest-List/NL.clj
@@ -0,0 +1,9 @@
+(def testList [1, [3, [2]], [[[5]]]])
+(def testList2 [1, [3, [2], [6, 7]], [[4, [5]]]])
+
+(defn NL [reLis lis]
+  (cond (empty? lis) reLis
+        (= (first lis) [])
+        (instance? clojure.lang.PersistentVector (first lis))
+        )
+)


Add some tests for middleware->

Add some tests for middleware->

error: pathspec 'spec/rook/middleware_spec.clj' did not match any file(s) known to git

--- spec/rook/middleware_spec.clj
+++ spec/rook/middleware_spec.clj
@@ -0,0 +1,49 @@
+(ns rook.middleware-spec
+  (:use
+    speclj.core
+    io.aviso.rook))
+
+(def terminal-handler identity)
+
+(defn wrap-with-gnip
+  [handler metadata]
+  (if-let [value (:gnip metadata)]
+    (fn [request]
+      (handler (assoc request :gnip value)))))
+
+(defn wrap-with-plug
+  [handler metadata tag]
+  (if (:plug metadata)
+    (fn [request]
+      (-> request
+          (update-in [:plug] (fnil conj []) tag)
+          handler))))
+
+(def request {:uri "/"})
+
+(describe "io.aviso.rook/middleware->"
+
+  (it "can wrap a handler with a middleware"
+      (let [middleware (middleware-> wrap-with-gnip)
+            handler' (middleware terminal-handler {:gnip :gnop})]
+        (should-not-be-same terminal-handler handler')
+        (should= {:uri "/" :gnip :gnop}
+                 (handler' request))))
+
+  (it "leaves a handler alone if middleware returns nil"
+      (let [middleware (middleware-> wrap-with-gnip)
+            handler' (middleware terminal-handler {})]
+        (should-be-same terminal-handler handler')
+        (should= request
+                 (handler' request))))
+
+  (it "can pass parameters to the middleware"
+      (let [middleware (middleware->
+                         (wrap-with-plug :alpha)
+                         (wrap-with-plug :beta)
+                         (wrap-with-plug :gamma))
+            handler' (middleware terminal-handler {:plug true})]
+        (should= {:uri "/" :plug [:gamma :beta :alpha]}
+                 (handler' request)))))
+
+(run-specs)


add cors option

add cors option

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/Yleisradio/yle-api-template.git/'


ezabatu! txukundu

ezabatu! txukundu

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


Introduce a seperate component for measuring dom sizes.

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


remove unused state; fix methods return type; fix replacing uri with empty string in case of blank path-elements; get return body as json

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/max-neverov/ads-client.git/'


Documenting desired type(s)

Documenting desired type(s)


Add util.clj

Add util.clj

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

--- src/puppeteer/util.clj
+++ src/puppeteer/util.clj
@@ -0,0 +1,19 @@
+(ns puppeteer.util
+  (:require [clojure.string :as string]))
+
+(defn- sanitize-name
+  [name]
+  (string/replace name #"[\\\/\_\.]" "-"))
+
+(defn ->app
+  [{:keys [repo-name branch-name] :as job}]
+  (str (sanitize-name repo-name) "-" (sanitize-name branch-name)))
+
+(defn ->host
+  [{:keys [domain repo-name branch-name]}]
+  (str (sanitize-name repo-name) "-" (sanitize-name branch-name) "." domain))
+
+(defn ->service-name
+  [{:keys [repo-name branch-name] :as job}]
+  (str (sanitize-name repo-name) "-" (sanitize-name branch-name)))
+


Fix problem with react warnings for elements...

... of a seq not containing a unique 'key' prop. This is a bit annoying,
codewise, as it adds clutter, only serving to keep react from giving off
warnings in the browser.

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


Fix it so that double-click behavior on item is...

... consistent across Firefox and Chrome. Earlier, double-click on the
text input field of a todo-item would trigger the input field's
:on-double-click function in Chrome, but not in Firefox. This was
because the text-field was (always) ':disabled true', and apparently,
in Firefox, this means "don't trigger :on-double-click or :on-click
functions".

I realized that there was no need for the text-holding element to be an
input field, since I would never edit it in-place - only in the
item-details sidebar. So, I changed it to a :div, and now the
:on-double-click function works just fine.


add query namespace and method prototypes and docstrings 'explain' and 'validate'

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


mapseq indentation fixes

mapseq indentation fixes

--- src/cats/core.cljc
+++ src/cats/core.cljc
@@ -359,23 +359,22 @@
               (reverse mvs)))))

 (defn mapseq
-   "Given a function that takes a value and puts it into a
-   monadic context, map it into the given collection
-   calling sequence on the results.
-
-       (require '[cats.monad.maybe :as maybe])
-       (require '[cats.core :as m])
-
-       (m/mapseq maybe/just [2 3])
-       ;=> <Just [[2 3]]>
-
-       (m/mapseq (fn [v]
-                    (if (odd? v)
-                      (maybe/just v)
-                      (maybe/nothing)))
-                   [1 2])
-       ;=> <Nothing>
-  "
+  "Given a function that takes a value and puts it into a
+  monadic context, map it into the given collection
+  calling sequence on the results.
+
+      (require '[cats.monad.maybe :as maybe])
+      (require '[cats.core :as m])
+
+      (m/mapseq maybe/just [2 3])
+      ;=> <Just [[2 3]]>
+
+      (m/mapseq (fn [v]
+                  (if (odd? v)
+                    (maybe/just v)
+                    (maybe/nothing)))
+                [1 2])
+      ;=> <Nothing>"
   [mf coll]
   (sequence (map mf coll)))


Tests for downloading restaurants

Tests for downloading restaurants

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

--- test/varjocafe/updater_test.clj
+++ test/varjocafe/updater_test.clj
@@ -0,0 +1,9 @@
+(ns varjocafe.updater-test
+  (:use midje.sweet)
+  (:require [varjocafe.updater :as updater]))
+
+(fact :slow "downloads restaurants index"
+      @(updater/get-restaurants) => (contains {:status "OK"}))
+
+(fact :slow "downloads restaurant by id"
+      @(updater/get-restaurant 1) => (contains {:status "OK"}))


parentesiak txukundu

parentesiak txukundu

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


Added the option to use daemon threads in the pool

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


Removed sentiment from stats

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


macros in yo macros

macros in yo macros

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


Remove Google Analytics

Remove Google Analytics

We don't use this information for anything, and it has GDPR
complications around allowing opting-out, so we'll just stop collecting
it.

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


Metadata

Metadata

error: pathspec 'src/mark-volkmann-tutorial/metadata.clj' did not match any file(s) known to git

--- src/mark-volkmann-tutorial/metadata.clj
+++ src/mark-volkmann-tutorial/metadata.clj
@@ -0,0 +1,36 @@
+;; Metadata
+;; http://java.ociweb.com/mark/clojure/article.html#Metadata
+
+(defstruct card-struct :rank :suit)
+
+(def card1 (struct card-struct :king :club))
+(def card2 (struct card-struct :king :club))
+
+;; (println (== card1 card2))    ; same identity? -> false
+; raise error: java.lang.ClassCastException: clojure.lang.PersistentStructMap cannot be cast to java.lang.Number Numbers.java:208 clojure.lang.Numbers.equiv
+(println (= card1 card2))     ; same value? -> true
+
+(def card2 ^{:bent true} card2)           ; adds metadata at read-time
+(def card2 (with-meta card2 {:bent true})) ; adds metadata at run-time
+
+(println (meta card1)) ; -> nil
+(println (meta card2)) ; -> {:bent true}
+(println (= card1 card2)) ; still samve value despite metadata diff. -> true
+
+
+; :private metadata - access restricted in namespace
+; :doc - documentation string
+; :test - is it test function?
+; :tag - type hint -> improve performance, *warn-on-reflection*
+
+; automatically attached
+; :file - for Var
+; :line - where defined
+; :name - symbol
+; :ns - namespace
+; :macro - boolean
+; :arglist - list of vectors of arguments
+
+(meta (var reverse))
+
+; (source reverse) ; don't work in LightTable, work in REPL - retrive code for function or macro


added missing main method

added missing main method

--- src/ruuvi_server/heroku/populate_database.clj
+++ src/ruuvi_server/heroku/populate_database.clj
@@ -3,4 +3,6 @@
   (:use ruuvi-server.load-initial-data)
   )

-(create-test-trackers)+(defn -main []
+  (create-test-trackers)
+  )


Make sure to use write combo of macros :blush:

--- test/metabase/driver/query_processor_test.clj
+++ test/metabase/driver/query_processor_test.clj
@@ -400,7 +400,7 @@
 ;; ### FILTER WITH A FALSE VALUE
 ;; Check that we're checking for non-nil values, not just logically true ones.
 ;; There's only one place (out of 3) that I don't like
-(qp-expect-with-all-datasets
+(datasets/expect-with-all-datasets
  1
  (Q run against places-cam-likes
     return :data :rows first first


Removed add-to and add-to-raw duplication.

--- src/clj/freefrog/governance.clj
+++ src/clj/freefrog/governance.clj
@@ -174,18 +174,21 @@

 ;; ## Entity Generalization Functions ##

-(defn add-to
-  "Generalizes an addition to any collection of things within an entity,
-   ensuring that the given thing doesn't already exist."
-  [entity which-things empty-collection collection-op thing & args]
-  (validate-things entity which-things thing contains? "%s '%s' already exists")
-
+(defn- add-to-raw
+  [entity which-things empty-collection collection-op thing args]
   (let [things (which-things entity)
         entity (if things
                  entity
                  (assoc entity which-things empty-collection))
         add-args (into [thing] args)]
     (apply update-in entity [which-things] collection-op add-args)))
+
+(defn- add-to
+  "Generalizes an addition to any collection of things within an entity,
+   ensuring that the given thing doesn't already exist."
+  [entity which-things empty-collection collection-op thing & args]
+  (validate-things entity which-things thing contains? "%s '%s' already exists")
+  (add-to-raw entity which-things empty-collection collection-op thing args))

 (defn add-policy
   "Add a policy to any entity."
@@ -305,14 +308,8 @@
                  circle)]
     (validate-things circle role-name which-things thing contains?
                      "%s '%s' already exists on role '%s'")
-    (let [things (get-entity circle role-name which-things)
-          circle (if things
-                   circle
-                   (update-role circle role-name assoc which-things
-                                empty-collection))
-          add-args (into [thing] args)]
-      (update-role-raw circle role-name [which-things] collection-op
-                       add-args))))
+    (update-in circle (role-path role-name) add-to-raw
+               which-things empty-collection collection-op thing args)))

 (defn- remove-from-role
   "Removes a thing from a collection of things in a role, making sure that


Midje command checkers (#81)

Midje command checkers (#81)

* Added Midje checkers to pull out standard command keys returned

* typo fix

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

--- test/yetibot/core/test.clj
+++ test/yetibot/core/test.clj
@@ -0,0 +1,37 @@
+(ns yetibot.core.test
+  (:require
+   [midje.sweet :refer [defchecker checker fact => =not=>]]
+   [midje.checking.core :refer [extended-=]]))
+
+;; A few Midje checkers providing Extended Equality tests of standard
+;; keys in the map returned by commands supporting piped data.  These
+;; are intended to be used in *.command.* tests.
+
+(defn mk-checker
+  [expected key]
+  (checker
+   [actual]
+   (extended-= (key actual) expected)))
+
+(defchecker value [expected] (mk-checker expected :result/value))
+(defchecker data  [expected] (mk-checker expected :result/data))
+(defchecker error [expected] (mk-checker expected :result/error))
+
+(def test-str "Quis custodiet ipsos custodes?")
+(def test-map {:result/value test-str})
+
+(fact "Simple string equality works"
+      test-map     => (value test-str)
+      test-str =not=> (value test-str))
+
+(fact "Midje's 'Extended Equality' works, as verified by a regex"
+      test-str     => #"custodes"
+      test-str =not=> #"fidem"
+      test-map     => (value #"custodes")
+      test-map =not=> (value #"fidem"))
+
+(fact "Midje's 'Extended Equality' works, as verified by a predicate"
+      test-str     => string?
+      test-map =not=> string?
+      test-map     => (value string?)
+      test-str =not=> (value string?))


Add IDeref implementation for identity monad type.

--- src/cljx/cats/monad/identity.cljx
+++ src/cljx/cats/monad/identity.cljx
@@ -38,6 +38,16 @@
   proto/Context
   (get-context [_] identity-monad)
   (get-value [_] v)
+
+  #+clj
+  clojure.lang.IDeref
+  #+clj
+  (deref [_] v)
+
+  #+cljs
+  IDeref
+  #+cljs
+  (-deref [_] v)

   #+clj
   Object


add ke component (initial commit)

add ke component (initial commit)

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

--- src/ca_recipe/components/ke.clj
+++ src/ca_recipe/components/ke.clj
@@ -0,0 +1,4 @@
+(ns ca-recepie.components.ke)
+
+(defn get-rules [ke])
+(defn find-rules [ke criterial])


[TH JE] clarify handlers in doc strings

[TH JE] clarify handlers in doc strings

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


port 80

port 80

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


cleanup

cleanup

--- src/gif_to_html/routes/home.clj
+++ src/gif_to_html/routes/home.clj
@@ -11,7 +11,6 @@
     "home.html" {:content (util/md->html "/md/docs.md")}))

 (defn convert-url [url]
-  #_(response/json {:frames 10 :body (class (:body (client/get url)))})
   (response/json (gif->html (:body (client/get url {:as :stream})))))

 (defroutes home-routes


Add migration for moving indexed documents to raw db

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

--- src/clj/subman/migrations.clj
+++ src/clj/subman/migrations.clj
@@ -0,0 +1,25 @@
+(ns subman.migrations
+  "Migration which should be run manually from repl."
+  (:require [monger.collection :as mc]
+            [clojurewerkz.elastisch.rest.document :as esd]
+            [environ.core :refer [env]]
+            [clj-di.core :refer [get-dep]]
+            [subman.handlers :refer [init-models]]
+            [subman.models :refer [get-raw-db get-total-count]]))
+
+(defn from-index-to-raw-db!
+  []
+  (init-models)
+  (let [raw-db (get-raw-db)
+        total-count (get-total-count)
+        limit 1000]
+    (loop [offset 0]
+      (let [subtitles (esd/search (get-dep :db-connection)
+                                  (env :index-name) "subtitle"
+                                  :from offset
+                                  :size limit)]
+        (doseq [item (->> subtitles :hits :hits (map :_source))]
+          (mc/insert raw-db "subtitle" item))
+        (when-not (> (+ offset limit) total-count)
+          (println "Moved:" offset)
+          (recur (+ offset limit)))))))


dynamically render catalogs from a list

dynamically render catalogs from a list

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


fix autopay? add plan-name, set-autopay!, unset-autopay!


lib.koh.xml/parser-client: For RN environment we moved from our own react-native-xml to xmldom, so we dropped the dedicated parser function and use browser version instead

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


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


Pin my system Clojure at 1.8

Pin my system Clojure at 1.8

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


adjusted stuff to work with json instead of jdbc arrays

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/OttoJursch/sched-system.git/'


beginning of trying to add a data access protocol so we can swap out an in memory version for testing

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


[DG TH] Removed usused code

[DG TH] Removed usused 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/democracyworks/election-notification-works.git/'


don't always assoc :cache

don't always assoc :cache

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


Initial commit of rule to transfer objectproperty labels to bioworld

error: pathspec 'resources/rules/post_identifier_merge/step_b_ontology_to_ice/step_b/transfer_object_property_labels.clj' did not match any file(s) known to git

--- resources/rules/post_identifier_merge/step_b_ontology_to_ice/step_b/transfer_object_property_labels.clj
+++ resources/rules/post_identifier_merge/step_b_ontology_to_ice/step_b/transfer_object_property_labels.clj
@@ -0,0 +1,22 @@
+`{:name "transfer-object-property-labels"
+  :description "This rule transfers labels to ObjectProperty instances in bio world"
+  :head ((?/bio_p rdfs/label ?/label))
+  :sparql-string "prefix franzOption_clauseReorderer: <franz:identity>
+                  prefix franzOption_chunkProcessingAllowed: <franz:yes>
+                  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                  prefix owl: <http://www.w3.org/2002/07/owl#>
+                  prefix obo: <http://purl.obolibrary.org/obo/>
+
+                  select ?p ?bio_p ?label {
+                         ?p rdf:type owl:ObjectProperty .
+                         ?p rdfs:label ?label .
+                         ?property_id obo:IAO_0000219 ?p .
+                         ?property_id obo:IAO_0000219 ?bio_p .
+                         filter (?p != ?bio_p && contains(str(?bio_p),'http://ccp.ucdenver.edu/obo/ext/'))
+                  }"
+  }
+
+
+
+
+


Skeleton of a document test

Skeleton of a document test

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


[WM] increase response timeout to 20 secs

With address-works, etc. it can sometimes take awhile.

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


Fix indentation (goodbye pretty symbols :( )


begin collada refactor with hiccup defelem

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


improved utils/apply-move to support all move types

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/truckerpath/icfpc-2017.git/'


adding reporter as module

adding reporter as module

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

--- trackit-statsd/project.clj
+++ trackit-statsd/project.clj
@@ -0,0 +1,15 @@
+(defproject samsara/trackit-statsd (-> "../trackit.version" slurp .trim)
+
+  :description
+  "TRACKit! A Clojure developer friendly wrapper for Yammer's Metrics library."
+
+  :url "https://github.com/samsara/trackit"
+
+  :license {:name "Apache License 2.0"
+            :url "http://www.apache.org/licenses/LICENSE-2.0"}
+
+  :dependencies [;; https://github.com/organicveggie/metrics-statsd
+                 [com.bealetech/metrics-statsd "3.0.0a"] ;; version not yet released
+                 ]
+
+  :plugins [[lein-marginalia "0.8.0"]])


removed debug printing

removed debug printing

--- support/src/figwheel/core.clj
+++ support/src/figwheel/core.clj
@@ -207,13 +207,10 @@
    If changed have occured a message is appended to the :file-change-atom in state.
    Consumers of this info can add a listener to the :file-change-atom."
   [state old-mtimes new-mtimes]
-  (let [changed-source-file-ns (get-changed-source-file-ns old-mtimes new-mtimes)]
-    (p/pprint new-mtimes)
-    (p/pprint changed-source-file-ns)
-    (->> changed-source-file-ns
-         (map (partial make-sendable-file state))
-         (concat (get-dependency-files state))
-         (send-changed-files state))))
+  (->> (get-changed-source-file-ns old-mtimes new-mtimes)
+       (map (partial make-sendable-file state))
+       (concat (get-dependency-files state))
+       (send-changed-files state)))

 ;; css changes


Corrected final test

Corrected final test

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


draft minimal, buffering telemetry component

This keeps the existing metrics component aligned with its upstream
metrics library.

error: pathspec 'core/src/gorillalabs/tesla/component/telemetry.clj' did not match any file(s) known to git

--- core/src/gorillalabs/tesla/component/telemetry.clj
+++ core/src/gorillalabs/tesla/component/telemetry.clj
@@ -0,0 +1,74 @@
+(ns gorillalabs.tesla.component.telemetry
+  (:require [clojure.core.async :refer [<! >!! sliding-buffer chan timeout poll! close! go-loop]]
+            [clojure.tools.logging :as log]
+            [gorillalabs.tesla.component.configuration :as config]
+            [mount.core :as mnt]
+            [riemann.client :as riemann])
+  (:import (java.net InetAddress)))
+
+(defn- now []
+  (/ (System/currentTimeMillis) 1000))
+
+(defn- localhost []
+  (let [addr (InetAddress/getLocalHost)]
+    (.getHostName addr)))
+
+(defn- drain-queue [queue]
+  (loop [items []]
+    (if-let [item (poll! queue)]
+      (recur (conj items item))
+      items)))
+
+(defn- flush-queue [client queue]
+  (let [events (drain-queue queue)]
+    (when (seq events)
+      (log/infof "Sending %d event(s) to telemetry backend..." (count events))
+      (riemann/send-events client events))))
+
+(defn enqueue [telemetry event]
+  (>!! (:queue telemetry) (assoc event :time (now) :host (:host telemetry))))
+
+(defn state [telemetry service state]
+  (enqueue telemetry {:service service :state state}))
+
+(defn custom [telemetry message]
+  (enqueue telemetry message))
+
+(defmacro timed
+  "Wraps expr in a timer and reports the elapsed time as a metric named with identifier."
+  [identifier expr]
+  (let [start (gensym)
+        result (gensym)
+        elapsed (gensym)]
+    (list 'if 'gorillalabs.tesla.component.telemetry/telemetry
+          (list 'let [start   (list 'System/currentTimeMillis)
+                      result  expr
+                      elapsed (list '- (list 'System/currentTimeMillis) start)]
+                (list 'log/infof "[%s] took %dms." identifier elapsed)
+                (list 'gorillalabs.tesla.component.telemetry/enqueue 'gorillalabs.tesla.component.telemetry/telemetry {:service identifier :metric elapsed})
+                result)
+          expr)))
+
+(defn- worker [client queue interval]
+  (go-loop []
+    (<! (timeout (* interval 1000)))
+    (when (flush-queue client queue)
+      (recur))))
+
+(defn- start []
+  (when-let [config (config/config config/configuration [:telemetry])]
+    (log/info "-> starting telemetry")
+    (let [queue  (chan (sliding-buffer 100))
+          client (riemann/tcp-client (:riemann config))]
+      (worker client queue (:interval config 30))
+      {:host     (:host config (localhost))
+       :r-client client
+       :queue    queue})))
+
+(defn- stop [telemetry]
+  (log/info "<- stopping telemetry")
+  (close! (:queue telemetry)))
+
+(mnt/defstate telemetry
+  :start (start)
+  :stop (stop telemetry))


test(request): uncomment duplicate requests fix test

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-Digital/pdg-core.git/'


Add some basic vercmp code

Add some basic vercmp code

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


[upcoming] add received to reg-deadline-passed?

update comment

[skip ci]

fatal: unable to access 'https://github.com/democracyworks/election-notification-works.git/': The requested URL returned error: 403


[WM] Increase partner-site.list timeout to 10s

Still seeing lots of intermittent failures of this in prod and want to
see if this has an impact on that.

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


Another practice

Another practice

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

--- practice/math.clj
+++ practice/math.clj
@@ -0,0 +1,4 @@
+;; Implement these mathematical routines in clojure using pure recursion & loop-recur
+
+;; sum of a coll, product of a coll, factorial, fibo, fibolist, prime?, primes-under, primes-range, next-prime, prev-prime
+;; maxi of a coll, mini of a coll, factors (returns all factors of an integer).


Added grade problem

Added grade problem

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

--- src/clojush/problems/software/grade.clj
+++ src/clojush/problems/software/grade.clj
@@ -0,0 +1,221 @@
+;; grade.clj
+;; Tom Helmuth, thelmuth@cs.umass.edu
+;;
+;; Problem Source: Program Repair Benchmark Paper (add citation later)
+;;
+;; Given 5 integer inputs, all in range [0,100]. The first four represent the
+;; lower numeric thresholds for achieving an A, B, C, and D, and will be
+;; distinct and in descending order. The fifth represents the student's numeric
+;; grade. The program must output "Student has a X grade.", where X is A, B, C,
+;; D, or F depending on the thresholds and their numeric grade.
+;;
+;; input stack has 5 integers
+
+(ns clojush.problems.software.grade
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random util globals]
+        clojush.instructions.tag
+        clojure.math.numeric-tower
+        ))
+
+; Atom generators
+(def grade-atom-generators
+  (concat (list
+            "Student has a "
+            " grade."
+            "A"
+            "B"
+            "C"
+            "D"
+            "F"
+            ;;; end constants
+            (fn [] (lrand-int 101)) ;Integer ERC [0,100]
+            ;;; end ERCs
+            (tag-instruction-erc [:exec :integer :string :boolean] 1000)
+            (tagged-instruction-erc 1000)
+            ;;; end tagERCs
+            'in1
+            'in2
+            'in3
+            'in4
+            'in5
+            ;;; end input instructions
+            )
+          (registered-for-stacks [:integer :boolean :string :exec :print])))
+
+;; A list of data domains for the problem. Each domain is a vector containing
+;; a "set" of inputs and two integers representing how many cases from the set
+;; should be used as training and testing cases respectively. Each "set" of
+;; inputs is either a list or a function that, when called, will create a
+;; random element of the set.
+(def grade-data-domains
+  [[(list '(80 70 60 50 85)
+          '(80 70 60 50 80)
+          '(80 70 60 50 79)
+          '(80 70 60 50 75)
+          '(80 70 60 50 70)
+          '(80 70 60 50 69)
+          '(80 70 60 50 65)
+          '(80 70 60 50 60)
+          '(80 70 60 50 59)
+          '(80 70 60 50 55)
+          '(80 70 60 50 50)
+          '(80 70 60 50 49)
+          '(80 70 60 50 45)) 13 0] ;; Cases from Repair Benchmark paper
+   [(list '(90 80 70 60 100)
+          '(90 80 70 60 0)
+          '(4 3 2 1 5)
+          '(4 3 2 1 4)
+          '(4 3 2 1 3)
+          '(4 3 2 1 2)
+          '(4 3 2 1 1)
+          '(4 3 2 1 0)
+          '(100 99 98 97 100)
+          '(100 99 98 97 99)
+          '(100 99 98 97 98)
+          '(100 99 98 97 97)
+          '(100 99 98 97 96)
+          '(98 48 27 3 55)
+          '(98 48 27 3 14)
+          '(98 48 27 3 1)
+          '(45 30 27 0 1)
+          '(45 30 27 0 0)
+          '(48 46 44 42 40)
+          '(48 46 44 42 41)
+          '(48 46 44 42 42)
+          '(48 46 44 42 43)
+          '(48 46 44 42 44)
+          '(48 46 44 42 45)
+          '(48 46 44 42 46)
+          '(48 46 44 42 47)
+          '(48 46 44 42 48)
+          '(48 46 44 42 49)) 28 0] ;; Hand-written cases
+   [(fn []
+      (let [thresholds (sort > (repeatedly 4 #(lrand-int 101)))]
+        (if (apply distinct? thresholds)
+          (concat thresholds (list (lrand-int 101)))
+          (recur)))) 159 2000] ;; Random cases, which make sure that first 4 integers are distinct
+   ])
+
+;;Can make Grade test data like this:
+;(test-and-train-data-from-domains grade-data-domains)
+
+; Helper function for error function
+(defn grade-test-cases
+  "Takes a sequence of inputs and gives IO test cases of the form
+   [[input1 input2 input3 input4 input5] output]."
+  [inputs]
+  (map #(vector %
+                (str "Student has a "
+                     (let [score (last %)]
+                       (cond
+                         (>= score (first %)) \A
+                         (>= score (second %)) \B
+                         (>= score (nth % 2)) \C
+                         (>= score (nth % 3)) \D
+                         :else \F))
+                     " grade."))
+       inputs))
+
+; Define error function. For now, each run uses different random inputs
+(defn grade-error-function
+  "Returns the error function for the Grade problem. Takes as
+   input Grade data domains."
+  [data-domains]
+  (let [[train-cases test-cases] (map grade-test-cases
+                                      (test-and-train-data-from-domains data-domains))]
+    (when true ;; Change to false to not print test cases
+      (doseq [[i case] (map vector (range) train-cases)]
+        (println (format "Train Case: %3d | Input/Output: %s" i (str case))))
+      (doseq [[i case] (map vector (range) test-cases)]
+        (println (format "Test Case: %3d | Input/Output: %s" i (str case)))))
+    (fn the-actual-grade-error-function
+      ([program]
+        (the-actual-grade-error-function program :train))
+      ([program data-cases] ;; data-cases should be :train or :test
+        (the-actual-grade-error-function program data-cases false))
+      ([program data-cases print-outputs]
+        (let [behavior (atom '())
+              errors (flatten
+                       (doall
+                         (for [[[input1 input2 input3 input4 input5] correct-output] (case data-cases
+                                                                                :train train-cases
+                                                                                :test test-cases
+                                                                                [])]
+                           (let [final-state (run-push program
+                                                       (->> (make-push-state)
+                                                         (push-item input5 :input)
+                                                         (push-item input4 :input)
+                                                         (push-item input3 :input)
+                                                         (push-item input2 :input)
+                                                         (push-item input1 :input)
+                                                         (push-item "" :output)))
+                                 printed-result (stack-ref :output 0 final-state)]
+                             (when print-outputs
+                               (println (format "Correct output: %-19s | Program output: %-19s" (pr-str correct-output) (pr-str printed-result))))
+                             ; Record the behavior
+                             (when @global-print-behavioral-diversity
+                               (swap! behavior conj printed-result))
+                             ; Error is Levenshtein distance and, if correct format, distance from correct letter grade character
+                             (vector
+                               (levenshtein-distance correct-output printed-result)
+                               (let [printed-letter (second (re-find #"^Student has a (.) grade.$" printed-result))
+                                     correct-letter (second (re-find #"^Student has a (.) grade.$" correct-output))]
+                                 (if printed-letter
+                                   (abs (- (int (first correct-letter))
+                                           (int (first printed-letter)))) ;distance from correct character
+                                   1000))
+                               )))))]
+          (when @global-print-behavioral-diversity
+            (swap! population-behaviors conj @behavior))
+          errors)))))
+
+(defn grade-report
+  "Custom generational report."
+  [best population generation error-function report-simplifications]
+  (let [best-program (not-lazy (:program best))
+        best-test-errors (error-function best-program :test)
+        best-total-test-error (apply +' best-test-errors)]
+    (println ";;******************************")
+    (printf ";; -*- Grade problem report - generation %s\n" generation)(flush)
+    (println "Test total error for best:" best-total-test-error)
+    (println (format "Test mean error for best: %.5f" (double (/ best-total-test-error (count best-test-errors)))))
+    (when (zero? (:total-error best))
+      (doseq [[i error] (map vector
+                             (range)
+                             best-test-errors)]
+        (println (format "Test Case  %3d | Error: %d" i error))))
+    (println ";;------------------------------")
+    (println "Outputs of best individual on training cases:")
+    (error-function best-program :train true)
+    (println ";;******************************")
+    )) ;; To do validation, could have this function return an altered best individual
+       ;; with total-error > 0 if it had error of zero on train but not on validation
+       ;; set. Would need a third category of data cases, or a defined split of training cases.
+
+
+; Define the argmap
+(def argmap
+  {:error-function (grade-error-function grade-data-domains)
+   :atom-generators grade-atom-generators
+   :max-points 200
+   :max-points-in-initial-program 100
+   :evalpush-limit 200
+   :population-size 1000
+   :max-generations 200
+   :parent-selection :lexicase
+   :epigenetic-markers [:close]
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    }
+   :alternation-rate 0.01
+   :alignment-deviation 5
+   :uniform-mutation-rate 0.01
+   :problem-specific-report grade-report
+   :print-behavioral-diversity true
+   :report-simplifications 0
+   :final-report-simplifications 5000
+   ;:max-error 1
+   })


move templates into cljs-only source and fully embrace dommy

error: pathspec 'src/client/aspire/templates.cljs' did not match any file(s) known to git

--- src/client/aspire/templates.cljs
+++ src/client/aspire/templates.cljs
@@ -0,0 +1,30 @@
+(ns aspire.templates
+  (:use-macros
+   [dommy.macros :only [deftemplate]]))
+
+;; Utility Fns
+;; -------------------
+(defn ratio->pct
+  "Convert a ratio to a percentage-ratio"
+  [ratio]
+  (* 100 ratio))
+
+(defn ratio->width [ratio]
+  (str "width:" (int (ratio->pct ratio)) "%"))
+
+;; Templates
+;; -------------------
+(deftemplate comp-tag [name version description cnt-completed cnt-remaining]
+  [:div {:class "four-columns competency-pod"}
+   [:img {:alt "", :src "http://i1.ytimg.com/i/fjFOToJzoI_7JEO9IfECMQ/mq1.jpg?v=4fa19736"}]
+   [:h3 {:class "comp-tag-name"} name]
+   [:h2 {:class "comp-tag-version"} version]
+   [:p {:class "comp-tag-description"} description]
+   [:footer {}
+    [:a {:class "button", :href "#"} "Resume"]
+    [:div {:class "status-bar"}
+     [:span {:class "percent-complete",
+             :style (-> (/ cnt-completed cnt-remaining) ratio->width)}] " "
+     [:span {:class "status-context"} (str cnt-completed "/" cnt-remaining)]]]])
+
+


Do not need.

Do not need.

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


Azken iruzkinak: oraingoz denak

Azken iruzkinak: oraingoz denak

fatal: unable to access 'https://github.com/lnmnd/magnet.bez.git/': The requested URL returned error: 403


Adding error handling cases from both the REST interface and the HTTP client.  Added handy (private) logging function

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


Fix language map error

Fix language map error

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


Add schema spec for Clients response

Add schema spec for Clients response

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


FIX: remove debugging output

FIX: remove debugging output

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


added cookies.cljs

added cookies.cljs

error: pathspec 'resources/leiningen/new/threejs_game/src/cljs/cookies.cljs' did not match any file(s) known to git

--- resources/leiningen/new/threejs_game/src/cljs/cookies.cljs
+++ resources/leiningen/new/threejs_game/src/cljs/cookies.cljs
@@ -0,0 +1,31 @@
+(ns {{project.ns}}.cookies
+  (:require [goog.net.Cookies]))
+
+(defn get-cookie
+  "Get cookie with name"
+  [name]
+  (let [cookie (goog.net.Cookies. js/document)]
+    (.get cookie name)))
+
+(defn set-cookie!
+  "Create cookie with name and value with optional max-age"
+  [name value & [max-age]]
+  (let [cookie (goog.net.Cookies. js/document)
+        max-age (or max-age -1)]
+    (.set cookie name value max-age)))
+
+(defn change-cookie!
+  "Change the value and optionally max-age of cookie
+  with name. Returns nil if no cookie was set."
+  [name value & [max-age]]
+  (let [cookie (goog.net.Cookies. js/document)
+        max-age (or max-age -1)]
+    (if (.get cookie name)
+      (.set cookie name value max-age)
+      nil)))
+
+(defn remove-cookie!
+  "Remove the cookie with name."
+  [name]
+  (let [cookie (goog.net.Cookies. js/document)]
+    (.remove cookie name)))


bump version in example project

bump version in example project

fatal: unable to access 'https://github.com/verma/lein-figwheel.git/': The requested URL returned error: 403


[TH] reformat to get under 80 characters

fatal: unable to access 'https://github.com/democracyworks/electorate-works.git/': The requested URL returned error: 403


example for steps that can be killed in manualtrigger (ui doesn't reflect this properly at the moment)

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


Refactored some rather nested functions to use the thread-last macro

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