day 20 not init

day 20 not init

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

--- src/adventofcode/day20.clj
+++ src/adventofcode/day20.clj
@@ -0,0 +1,9 @@
+(ns adventofcode.day20)
+
+(defn dividers [n]
+  (filter #(zero? (mod n %)) (range 1 (inc n))))
+
+(def part-one (->> (range)
+                   (map #(vector % (* 10 (apply + (dividers %)))))
+                   (filter #(= 29000000 (second %)))
+                   first))


remove logging

remove logging

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


Improve consumer concurrency handling and exclusive consumer recovery

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


allow initial value with new-cache (should probably add assertions to check value 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/michaelsbradleyjr/transwarp.git/'


label type extensions section

label type extensions section


oops, forgot to add the csg examples

oops, forgot to add the csg examples

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

--- src/cljs/geometer/csg.cljs
+++ src/cljs/geometer/csg.cljs
@@ -0,0 +1,37 @@
+(ns geometer.csg
+  (:require [thi.ng.geom.core             :as g]
+            [thi.ng.geom.cuboid           :refer [cuboid]]
+            [thi.ng.geom.gmesh            :as gm]
+            [thi.ng.geom.mesh.csg         :as csg]
+            [thi.ng.geom.mesh.subdivision :as sd]
+            [thi.ng.math.core             :as m]))
+
+(defn starfighter []
+  ;; need under cljs to prevent a stack overflow related to floating
+  ;; point precision
+  (binding [thi.ng.math.core/*eps* 1e-4]
+    (let [prototype (-> (cuboid [0.0 0.0 0.0]
+                                [0.0 0.0 3.0]
+                                [40.0 0.0 10.0]
+                                [40.0 0.0 0.0]
+                                [0.0 40.0 0.0]
+                                [0.0 40.0 3.0]
+                                [40.0 40.0 10.0]
+                                [40.0 40.0 0.0])
+                        (g/center))
+          [back-box top-wing bottom-wing cutout bbox]
+          (map (comp csg/mesh->csg
+                     g/tessellate
+                     sd/catmull-clark
+                     #(g/as-mesh % {:mesh (gm/gmesh)}))
+               [prototype
+                (-> prototype (g/rotate-z (m/radians -65)) (g/center) (g/translate [-5 -20 0]) )
+                (-> prototype (g/rotate-z (m/radians 65)) (g/center) (g/translate [-5 20 0]) )
+                (-> (cuboid 60) (g/center) (g/translate [-58 0 0]))
+                (-> (cuboid 30) (g/center) (g/translate [-25 0 0]))])]
+      (-> back-box
+          (csg/union top-wing)
+          (csg/union bottom-wing)
+          (csg/subtract cutout)
+          (csg/intersect bbox)
+          csg/csg->mesh))))


integrate total-hits info into json/xml /search responses

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


Added custom errors ns.

Added custom errors ns.

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

--- src/cmr/opendap/errors.clj
+++ src/cmr/opendap/errors.clj
@@ -0,0 +1,4 @@
+(ns cmr.opendap.errors)
+
+(def no-permissions "You do not have permissions to access that resource.")
+(def token-required "An ECHO token is required to access this resource.")


Renamed send! to IO.

Renamed send! to IO.

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


pi trackerra bakarrik erabili

pi trackerra bakarrik erabili

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


handle :finite-ts? case

handle :finite-ts? case


Add boot

Add boot

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

--- build.boot
+++ build.boot
@@ -0,0 +1,45 @@
+(def project 'hiccups)
+(def version "0.3.1")
+
+(set-env! :resource-paths #{"resources" "src/cljs" "src/clj"}
+          :source-paths #{"test"}
+          :asset-paths #{"html"}
+          :dependencies '[[org.clojure/clojure "1.8.0"]
+                          [org.clojure/clojurescript "1.8.40"]
+                          [adzerk/boot-test "RELEASE" :scope "test"]
+                          [adzerk/boot-cljs "1.7.228-1" :scope "test"]
+                          [adzerk/boot-cljs-repl "0.3.0" :scope "test"]
+                          [com.cemerick/piggieback "0.2.1" :scope "test"]
+                          [weasel "0.7.0" :scope "test"]
+                          [org.clojure/tools.nrepl "0.2.12" :scope "test"]
+                          [adzerk/boot-reload "0.4.5" :scope "test"]
+                          [pandeiro/boot-http "0.7.0" :scope "test"]
+                          [cljsjs/boot-cljsjs "0.5.1" :scope "test"]])
+
+(task-options!
+  pom {:project     project
+       :version     version
+       :description "FIXME: write description"
+       :url         "http://example/FIXME"
+       :scm         {:url "https://github.com/yourname/tree-graph"}
+       :license     {"Eclipse Public License"
+                     "http://www.eclipse.org/legal/epl-v10.html"}})
+
+(require
+  '[adzerk.boot-cljs :refer :all]
+  '[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
+  '[adzerk.boot-reload :refer :all]
+  '[pandeiro.boot-http :refer :all]
+  '[cljsjs.boot-cljsjs :refer :all])
+
+(deftask web-dev
+         "Developer workflow for web-component UX."
+         []
+         (comp
+           (serve :dir "target/")
+           (watch)
+           (cljs-repl)
+           (speak)
+           (reload)
+           (cljs)
+           (target)))


Yak shaved! Added spec parser in anticipation of a defenity thing

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

--- src/karras/spec_parser.clj
+++ src/karras/spec_parser.clj
@@ -0,0 +1,101 @@
+(ns karras.spec-parser)
+
+(defn attr-name [[name option-map]] name)
+(defn attr-options [[name option-map]] option-map)
+
+(defn filter-spec [f spec]
+  (filter f (partition 2 spec)))
+
+(defn contains-option? [attr kw]
+  (contains? (attr-options attr) kw))
+
+(defn required-attrs [spec]
+  (filter-spec #(= :required (:type (attr-options %)))
+               spec))
+
+(defn enum-attrs [spec]
+  (filter-spec #(contains? (attr-options %) :enums)
+               spec))
+
+(defn pair-attrs [spec]
+  (filter-spec #(and (not (contains-option? % :enums))
+                     (not (contains-option? % :type)))
+               spec))
+
+(defn attrs-with-defaults [spec]
+  (filter-spec #(contains-option? % :default)
+              spec))
+
+(defn pair-field? [spec token]
+  (some #(if (= token (attr-name %)) %) (pair-attrs spec)))
+
+(defn enum-field? [spec token]
+  (some #(if (contains? (:enums (attr-options %)) token) %)
+        (enum-attrs spec)))
+
+(defn enum-name [spec val]
+  (attr-name (get-enum val spec)))
+
+(defn parse-pair [spec parsed key [value & tail]]
+  [(assoc parsed key value) tail])
+
+(defn parse-enum [spec parsed token tail]
+  (let [key (enum-name spec token)]
+    [(assoc parsed key token) tail]))
+
+(defn parse-ignore [spec parsed token tail]
+  [parsed tail])
+
+(defn choose-parser [spec token]
+  (cond (pair-field? spec token) parse-pair
+        (enum-field? spec token) parse-enum
+        :default parse-ignore))
+
+(defn parse-options [spec item init-results init-unparsed]
+  (loop [results init-results
+         [token & tail] init-unparsed]
+    (if token
+      (let [parser (choose-parser spec token)
+            [parsed unparsed] (parser spec results token tail)]
+        (recur parsed unparsed))
+      results)))
+
+(defn apply-default [parsed-item attr]
+  (let [default-fn (:default (attr-options attr))]
+    {(attr-name attr)
+     (default-fn parsed-item)}))
+
+(defn set-defaults [spec parsed-item]
+  (let [attrs (attrs-with-defaults spec)
+        need-defaults (filter #(nil? ((attr-name %) parsed-item)) attrs)
+        defaulted (map #(apply-default parsed-item %) need-defaults)]
+    (apply merge parsed-item defaulted)))
+
+(defn parse-item [spec item]
+  (let [required-keys (map first (required-attrs spec))
+        required-values (take (count required-keys) item)
+        init-results (zipmap required-keys required-values)
+        init-unparsed (drop (count required-keys) item)
+        parsed-item (parse-options spec item init-results init-unparsed)]
+    (set-defaults spec parsed-item)))
+
+(defn parse-items [spec items]
+  (map #(parse-item spec %) items))
+
+(comment
+  (def demographic-spec
+       [:name {:type :required}
+        :age  {:type :required}
+        :gender {:enums #{:male :female}}])
+
+  (def dick ["dick" 1 :male  ])
+  (def jane ["jane" 1 :female])
+
+  (asert (= (parse-item demographic-spec dick)
+            {:gender :male, :age 1, :name "dick"}))
+
+  (assert (= (parse-items demographic-spec [dick jane])
+             [{:gender :male, :age 1, :name "dick"}
+              {:gender :female, :age 1, :name "jane"}])))
+
+


Add new package litedocx.hiccup for hiccup-like style DSL support

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

--- src/bakyeono/litedocx/hiccup.clj
+++ src/bakyeono/litedocx/hiccup.clj
@@ -0,0 +1,6 @@
+(ns bakyeono.litedocx.hiccup
+  "Support hiccup-like style DSL for creating DOCX."
+  (:require [clojure.string :as str])
+  (:use [bakyeono.litedocx.util])
+  (:gen-class))
+


Parsed both heroku-uri's

Parsed both heroku-uri's

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/amedw/mud-server.git/'


Test Identity with generative tests

Test Identity with generative 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/tcsavage/cats.git/'


actually run all the tests

actually run all the 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/QuiltProject/sedan.git/'


disable 404 test

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


Bump to 1.3.0-alpha6.

Bump to 1.3.0-alpha6.

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


Release 0.8.3

Release 0.8.3

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


Bump version to note the addition of fresh.


non-functioning stubs for cljx,cljsbuild

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


Freshen deps, good old ancient

Freshen deps, good old ancient

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


:arrow_up: Upgrade dependencies

:arrow_up: Upgrade dependencies

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/maoo/bot-unfurl.git/'


Version 133

Version 133


0.0.3


Release 0.8.1

Release 0.8.1

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


Updated lein-sub plugin to 0.2.1

Updated lein-sub plugin to 0.2.1

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


bump ClojureScript version

bump ClojureScript version

--- project.clj
+++ project.clj
@@ -9,7 +9,7 @@

   :dependencies [
     [org.clojure/clojure "1.6.0"]
-    [org.clojure/clojurescript "0.0-2356"]
+    [org.clojure/clojurescript "0.0-2411"]
     [hiccups "0.3.0"]]

   :plugins [[lein-cljsbuild "1.0.3"]]


version update

version update

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


added build.boot

added build.boot

--- build.boot
+++ build.boot
@@ -0,0 +1,26 @@
+#!/usr/bin/env boot
+
+#tailrecursion.boot.core/version "2.2.1"
+
+(set-env!
+ :dependencies '[[tailrecursion/boot.task "2.1.0"]
+                 [tailrecursion/hoplon "5.4.1"]
+                 [tailrecursion/boot.notify "2.0.0-SNAPSHOT"]
+                 [tailrecursion/boot.ring   "0.1.0-SNAPSHOT"]
+                 [org.clojure/clojurescript "0.0-2138"]]
+ :src-paths    #{"src"}
+ :out-path     "resources/public")
+
+(add-sync! (get-env :out-path) #{"resources/assets"})
+
+(require '[tailrecursion.hoplon.boot      :refer :all]
+         '[tailrecursion.boot.task.notify :refer [hear]]
+         '[tailrecursion.boot.task.ring   :refer [dev-server]])
+
+(deftask dev
+  []
+  (println "Serving slides at http://localhost:8000/triclojure-deck.html")
+  (comp (watch)
+        (hear)
+        (hoplon {:prerender false})
+        (dev-server)))


Add type specs for the types we support for entities or entity keys

Leave ID type spec vague and a possible URI type spec for the future.

error: pathspec 'src/main/workflo/macros/specs/types.cljc' did not match any file(s) known to git

--- src/main/workflo/macros/specs/types.cljc
+++ src/main/workflo/macros/specs/types.cljc
@@ -0,0 +1,62 @@
+(ns workflo.macros.specs.types
+  (:refer-clojure :exclude [bigdec? bytes? double? float? uri?])
+  (:require #?(:cljs [cljs.spec :as s]
+               :clj  [clojure.spec :as s])))
+
+;;;; Helpers
+
+(defn long? [x]
+  #?(:cljs (and (number? x)
+                (not (js/isNaN x))
+                (not (identical? x js/Infinity))
+                (= 0 (rem x 1)))
+     :clj  (instance? java.lang.Long x)))
+
+(defn bigint? [x]
+  #?(:cljs (long? x)
+     :clj  (instance? clojure.lang.BigInt x)))
+
+(defn float? [x]
+  #?(:cljs (and (number? x)
+                (not (js/isNaN x))
+                (not (identical? x js/Infinity))
+                (not= (js/parseFloat x) (js/parseInt x 10)))
+     :clj  (clojure.core/float? x)))
+
+(defn double? [x]
+  #?(:cljs (float? x)
+     :clj  (clojure.core/double? x)))
+
+(defn bigdec? [x]
+  #?(:cljs (float? x)
+     :clj  (clojure.core/bigdec? x)))
+
+(defn bytes? [x]
+  #?(:cljs (array? x)
+     :clj  (clojure.core/bytes? x)))
+
+;;;; Fundamental types
+
+(s/def ::keyword keyword?)
+(s/def ::string string?)
+(s/def ::boolean boolean?)
+(s/def ::long long?)
+(s/def ::bigint bigint?)
+(s/def ::float float?)
+(s/def ::double double?)
+(s/def ::bigdec bigdec?)
+(s/def ::instant inst?)
+(s/def ::uuid uuid?)
+(s/def ::bytes bytes?)
+(s/def ::enum keyword?)
+
+;;;; Entity IDs
+
+(s/def ::id ::s/any)
+
+;;;; Reference types
+
+(s/def ::ref ::id)
+(s/def ::ref-many
+  #?(:cljs (s/and vector? (s/* ::id))
+     :clj  (s/coll-of ::id :kind vector?)))


Sequences

Sequences

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

--- src/mark-volkmann-tutorial/sequences.clj
+++ src/mark-volkmann-tutorial/sequences.clj
@@ -0,0 +1,49 @@
+;; Sequences
+;; http://java.ociweb.com/mark/clojure/article.html#Sequences
+
+;; Java|Clojure collections, strings, streams, directory, XML trees
+;; lazy sequences: cache-seq concat cycle distinct drop drop-last drop-while filter for interleave interpose iterate lazy-cat lazy-seq line-seq map partition range re-seq remove repeat replicate take take-nth take-while tree-seq
+
+(map #(println %) [1 2 3])
+;; REPL always fully evaluate
+;; but when this code is run in script - it doesnt do anything, because map return lazy sequence
+
+;; force eval by: first second nth last
+;; dorun doall force eval in single lazy sequence
+;; doseq for in one or many lazy sequences
+;; for returns lazy
+
+;; doseq dorun when force side effects, both return nil
+;; doall when eval result need to be retained - holds head of sequence
+
+;; doseq prefered over dorun - easier to read, faster
+(dorun (map #(println %) [1 2 3]))
+(doseq [i [1 2 3]] (println i))
+
+
+(doseq [i [1 2 3]] (println i))
+(dorun (map #(println %) [1 2 3]))
+(doall (map #(do (println %) %) [1 2 3]))
+
+;; lazy = create infinte sequences
+(defn f
+  "square the argument and divide by 2"
+  [x]
+  (println "calculating f of" x)
+  (/ (* x x) 2.0))
+
+; Create an infinte sequence of results from the function f
+; for the values 0 through infinty.
+; Note that the head of this sequence is being held in the binding "f-seq".
+; This will cause the values of all evaluated items to be cached.
+(def f-seq (map f (iterate inc 0)))
+
+; Force evaluation of the first item in the infinte sequence, (f 0).
+(println "first is" (first f-seq))
+
+; Force evaluation of the first three items in the infinte sequence.
+; Since the (f 0) has already been evaluated,
+; only (f 1) and (f 2) will be evaluated.
+(doall (take 3 f-seq))
+
+(println (nth f-seq 2)) ; uses cached result -> 2.0


Add builtin prone (exception reporting middleware) support.

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

--- src/clojure/catacumba/handlers/prone.clj
+++ src/clojure/catacumba/handlers/prone.clj
@@ -0,0 +1,40 @@
+(ns catacumba.handlers.prone
+  "A prone exception reporting middleware integration.
+  NOTE: requires prone >= 1.0.0"
+  (:require [prone.debug :as pdbg]
+            [prone.middleware :as pmdw]
+            [catacumba.core :as ct]
+            [catacumba.http :as http]
+            [catacumba.helpers :as hp]
+            [catacumba.handlers.misc :as misc]
+            [catacumba.impl.routing :as rt]
+            [catacumba.impl.handlers :as hs])
+  (:import ratpack.func.Action
+           ratpack.http.Request
+           ratpack.handling.Chain
+           ratpack.handling.Context
+           ratpack.error.ServerErrorHandler
+           ratpack.registry.RegistrySpec))
+
+(defn- prone-assets
+  [ctx]
+  (if-let [asset (pmdw/asset-url->contents (:path ctx))]
+    (let [response {:body asset :status 200
+                    :headers {"Cache-Control" "max-age=315360000"}}]
+      (if (.endsWith (:path ctx) ".css")
+        (assoc-in response [:headers :content-type] "text/css")
+        response))
+    (ct/delegate)))
+
+(defn- prone-errors
+  [context error namespaces]
+  (binding [pdbg/*debug-data* (atom [])]
+    (pmdw/exceptions-response context error namespaces)))
+
+(defn handler
+  [{:keys [namespaces]}]
+  (fn [chain]
+    (as-> chain $
+      (.all $ (hs/adapter prone-assets))
+      (rt/attach-server-error-handler $ #(prone-errors %1 %2 namespaces)))))
+


[TH] we no longer pass individual channels in

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


Routes macros

Routes macros


Adds authentication and getting started concepts to header


Added project.clj for crypt

Added project.clj for crypt

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


rename test to match name of function it 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/tobiasbayer/lambdacd.git/'


Entities no longer perform a turn every update frame. Bring in turn-based movement from Hlirgh.

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


making reload-config recover from no project.clj

--- sidecar/src/figwheel_sidecar/system.clj
+++ sidecar/src/figwheel_sidecar/system.clj
@@ -254,8 +254,12 @@
      system ids
      (fn [system]
        (repl-println "Figwheel: Reloading build config information")
-       (assoc (doall (reduce clean-build system ids))
-        :builds (get-project-builds))))))
+       (if-let [new-builds (not-empty (get-project-builds))]
+         (assoc (doall (reduce clean-build system ids))
+                :builds new-builds)
+         (do
+           (repl-println "No reload config found in project.clj")
+           system))))))

 ;; doesn't alter the system
 (defn fig-status [system]


rename internal function

rename internal function


verify kept messages are the ones with valid election ids

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


Don't hardcode :all, rather pass along the language when specified.

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


Release version 0.2.2 to Clojars

Release version 0.2.2 to Clojars

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


Version 182

Version 182

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


Version 0.1.1

Version 0.1.1

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


configure project

configure project

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/sbondaryev/cljs-client-server.git/'


Update cache version

Update cache version

Signed-off-by: Roman Selmeci <bb938fc7591901d0e874df22e3ae174886bcb931@infones.com>

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/infones/http-kit.git/'


Rename for clarity

Rename for clarity

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


Route sms responses through handling-decision logic


remove benchmark

remove benchmark

--- storm-netty/test/clj/backtype/storm/messaging/bench_test.clj
+++ storm-netty/test/clj/backtype/storm/messaging/bench_test.clj
@@ -1,62 +0,0 @@
-(ns backtype.storm.messaging.bench-test
-  (:use [clojure test])
-  (:import [backtype.storm.messaging TransportFactory])
-  (:use [backtype.storm bootstrap testing util]))
-
-(bootstrap)
-
-(def port 6800)
-(def task 1)
-(def msg_count 100000)
-(def storm-id "abc")
-(def buffer_size 102400)
-(def repeats 1000)
-
-(defn batch-bench [client server]
-  (doseq [num  (range 1 msg_count)]
-    (let [req_msg (str num)]
-      (.send client task (.getBytes req_msg))))
-  (doseq [num  (range 1 msg_count)]
-    (let [req_msg (str num)]
-      (.recv server 0))))
-
-(defn one-by-one-bench [client server]
-  (let [req_msg (apply str (repeat buffer_size 'c'))]
-    (doseq [num  (range 1 repeats)]
-      (.send client task (.getBytes req_msg))
-      (.recv server 0))))
-
-(deftest test-netty-perf
-  (let [storm-conf {STORM-MESSAGING-TRANSPORT "backtype.storm.messaging.netty.Context"
-                    STORM-MESSAGING-NETTY-BUFFER-SIZE buffer_size
-                    STORM-MESSAGING-NETTY-MAX-RETRIES 10
-                    STORM-MESSAGING-NETTY-MIN-SLEEP-MS 1000
-                    STORM-MESSAGING-NETTY-MAX-SLEEP-MS 5000}
-        context (TransportFactory/makeContext storm-conf)
-        server (.bind context nil port)
-        client (.connect context nil "localhost" port)]
-    (log-message "(Netty) " repeats " messages of payload size " buffer_size " sent one by one")
-    (time (one-by-one-bench client server))
-    (log-message "(Netty) " msg_count " short msgs in batches" )
-    (time (batch-bench client server))
-    (.close client)
-    (.close server)
-    (.term context)))
-
-(deftest test-zmq-perf
-  (let [storm-conf (merge (read-storm-config)
-                          {STORM-MESSAGING-TRANSPORT  "backtype.storm.messaging.zmq"
-                           "topology.executor.receive.buffer.size" buffer_size
-                           "topology.executor.send.buffer.size" buffer_size
-                           "topology.receiver.buffer.size" buffer_size
-                           "topology.transfer.buffer.size" buffer_size})
-        context (TransportFactory/makeContext storm-conf)
-        server (.bind context nil port)
-        client (.connect context nil "localhost" port)]
-    (log-message "(ZMQ) " repeats " messages of payload size " buffer_size " sent one by one")
-    (time (one-by-one-bench client server))
-    (log-message "(ZMQ) " msg_count " short msgs in batches" )
-    (time (batch-bench client server))
-    (.close client)
-    (.close server)
-    (.term context)))


style: remove comments

style: remove comments

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


Add test ensuring that async publisher does not leave open channels


Solve 04 in Clojure

Solve 04 in Clojure

error: pathspec 'Problem004/Clojure/solution_1.clj' did not match any file(s) known to git

--- Problem004/Clojure/solution_1.clj
+++ Problem004/Clojure/solution_1.clj
@@ -0,0 +1,7 @@
+(defn solution
+  []
+  (->>
+   (for [x (range 100 1000) y (range 100 1000)
+         :let [p (* x y)]
+         :when (= (reverse (str p)) (seq (str p)))] p)
+   (apply max)))


revererted geting api from header

revererted geting api from header

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/amedw/mud-server.git/'


Compress a Sequence

Compress a Sequence

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

--- src/4clojure/compress_sequence.clj
+++ src/4clojure/compress_sequence.clj
@@ -0,0 +1,14 @@
+;; Compress a Sequence
+;; http://www.4clojure.com/problem/30
+
+(defn my-distinct [coll]
+  (reduce #(if (= %2 (last %1)) %1 (conj %1 %2)) [] coll))
+
+(my-distinct [1 2 3 3 3 4])
+
+(= (apply str (my-distinct "Leeeeeerrroyyy")) "Leroy")
+(= (my-distinct [1 1 2 3 3 2 2 3]) '(1 2 3 2 3))
+(= (my-distinct [[1 2] [1 2] [3 4] [1 2]]) '([1 2] [3 4] [1 2]))
+
+;; 4Clojure copy-paste
+(fn [coll] (reduce #(if (= %2 (last %1)) %1 (conj %1 %2)) [] coll))


added utilities

added utilities

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

--- src/clojurewebtemplate/util.clj
+++ src/clojurewebtemplate/util.clj
@@ -0,0 +1,26 @@
+(ns clojurewebtemplate.util
+  (:require clojure.java.io)
+  (:use [cheshire.core] [stencil.loader :only [unregister-all-templates]] [stencil.core] [ring.util.response]))
+
+(def development? (= "development" (get (System/getenv) "APP_ENV")))
+
+(defn render [content template & params]
+  "Render website with template where a {{capsule}}
+   element is required for the rendered body"
+  (do (if development? (unregister-all-templates))
+      (render-file template (merge (into {} params) {:capsule content}))))
+
+(defn wrap-template [handler template]
+  (fn [request]
+    (if-let [response (handler request)]
+      (update-in response [:body] render template request))))
+
+(defn wrap-utf8 [handler]
+  (fn [request]
+    (if-let [response (handler request)]
+      (content-type response "text/html;charset=UTF-8"))))
+
+(defn gen-uuid [] (clojure.string/replace (str (java.util.UUID/randomUUID)) #"-" ""))
+
+(defn jresp "JSON Response" [body]
+  {:status  200 :headers { "Content-Type" "application/json" } :body (generate-string body)})


system/get-components extracted to utils ns

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

--- src/clj/hellhound/system/utils.clj
+++ src/clj/hellhound/system/utils.clj
@@ -0,0 +1,10 @@
+(ns hellhound.system.utils
+  "TODO"
+  (:import (clojure.lang IPersistentMap
+                         PersistentVector)))
+
+
+(defn ^PersistentVector get-components
+  "Returns the components catalog of the given `system`."
+  [^IPersistentMap system]
+  (:components system))


fixed bug

fixed bug

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


reset password folder

reset password folder

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

--- reset_password/metabase/reset_password/core.clj
+++ reset_password/metabase/reset_password/core.clj
@@ -0,0 +1,22 @@
+(ns metabase.reset-password.core
+  (:gen-class)
+  (:require [metabase.db :as db]
+            [metabase.models.user :as user]))
+
+(defn- set-reset-token!
+  "Set and return a new `reset_token` for the user with EMAIL-ADDRESS."
+  [email-address]
+  (let [user-id (or (db/select-one-id 'User, :email email-address)
+                    (throw (Exception. (format "No user found with email address '%s'. Please check the spelling and try again." email-address))))]
+    (user/set-user-password-reset-token! user-id)))
+
+(defn -main
+  [email-address]
+  (db/setup-db!)
+  (println (format "Resetting password for %s..." email-address))
+  (try
+    (println (format "OK [[[%s]]]" (set-reset-token! email-address)))
+    (System/exit 0)
+    (catch Throwable e
+      (println (format "FAIL [[[%s]]]" (.getMessage e)))
+      (System/exit -1))))


Working on problem_0106.

Working on problem_0106.

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

--- src/project_euler/problem_0106.clj
+++ src/project_euler/problem_0106.clj
@@ -0,0 +1,39 @@
+(ns project-euler.problem_0106
+  (:require [clojure.math.combinatorics :as combo]))
+
+
+;; Let S(A) represent the sum of elements in set A of size n.
+;; We shall call it a special sum set if for any two non-empty disjoint subsets, B and C,
+;; the following properties are true:
+
+;; S(B) ≠ S(C); that is, sums of subsets cannot be equal.
+;; If B contains more elements than C then S(B) > S(C).
+;; For this problem we shall assume that a given set contains n strictly increasing elements
+;; and it already satisfies the second rule.
+
+;; Surprisingly, out of the 25 possible subset pairs that can be obtained from a set for which n = 4,
+;; only 1 of these pairs need to be tested for equality (first rule).
+;; Similarly, when n = 7, only 70 out of the 966 subset pairs need to be tested.
+
+;; For n = 12, how many of the 261625 subset pairs that can be obtained need to be tested for equality?
+
+;; NOTE: This problem is related to Problem 103 and Problem 105.
+
+
+(defn count-2-partitions [n]
+  (dec (int (Math/pow 2 (dec n)))))
+
+(defn solution-for [n]
+  (let [xs (range n)
+        xs' (range )]
+    (->> (range 2 (/ (inc n) 2))
+         ;; (map (fn [m] (* (combo/count-combinations xs m)
+         ;;                 (count-2-partitions m))))
+         (map (fn [m] (->> (for [l (range 1 (- n m))
+                                 h (range (+ l m) n)] [l h])
+                           (map (fn [[l h]]
+                                  (* (combo/count-combinations (range l h) m)
+                                     )))
+                           )))
+
+         )))


adding origin to header blacklist

adding origin to header blacklist

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


Experimental: suggested API changes for discussion

--- src/me/shenfeng/http/client.clj
+++ src/me/shenfeng/http/client.clj
@@ -7,44 +7,10 @@
            (java.net URI URLEncoder)
            me.shenfeng.http.HttpMethod))

-;;from clojure/contrib/strint.clj: author Chas Emerick. with minor modification
-(defn- silent-read [s]
-  (try
-    (let [r (-> s java.io.StringReader. java.io.PushbackReader.)]
-      [(read r) (slurp r)])
-    ;; this indicates an invalid form -- the head of s is just string data
-    (catch Exception e )))
+;;;; Utils

-(defn- interpolate
-  ([s atom?]
-     (if-let [[form rest] (silent-read (subs s (if atom? 2 1)))]
-       (cons form (interpolate (if atom? (subs rest 1) rest)))
-       (cons (subs s 0 2) (interpolate (subs s 2)))))
-  ([^String s]
-     (if-let [start (->> ["~{" "~("]
-                         (map #(.indexOf s ^String %))
-                         (remove #(== -1 %))
-                         sort
-                         first)]
-       (let [f (subs s 0 start)
-             rst (interpolate (subs s start) (= \{ (.charAt s (inc start))))]
-         (if (> (count f) 0)
-           (cons f rst)
-           rst))
-       (if (> (count s) 0) [s] []))))
-
-(defmacro << [string] `(str ~@(interpolate string)))
-
-(defn- normalize-headers [headers keywordize-headers?]
-  (reduce (fn [m [k v]]
-            (assoc m (if keywordize-headers? (keyword k) ; is lowercased
-                         k) v))
-          {} headers))
-
-(defn- url-encode [unencoded] (URLEncoder/encode unencoded "utf8"))
-
-(defn- utf8-bytes [#^String s] (.getBytes s "utf8"))
-
+(defn- utf8-bytes [s] (.getBytes         (str s) "utf8"))
+(defn- url-encode [s] (URLEncoder/encode (str s) "utf8"))
 (defn- base64-encode [bytes] (DatatypeConverter/printBase64Binary bytes))

 (defn- basic-auth-value [basic-auth]
@@ -53,182 +19,121 @@
                      (str (first basic-auth) ":" (second basic-auth)))]
     (str "Basic " (base64-encode (utf8-bytes basic-auth)))))

-(defn- query-string [params]
-  (str/join "&" (mapcat (fn [[k v]]
-                          (if (sequential? v)
-                            (map #(str (url-encode (name %1))
-                                       "="
-                                       (url-encode (str %2)))
-                                 (repeat k) v)
-                            [(str (url-encode (name k))
-                                  "="
-                                  (url-encode (str v)))]))
-                        params)))
+(defn- prepare-request-headers
+  [{:keys [headers form-params basic-auth user-agent] :as req}]
+  (merge headers
+    (when form-params {"Content-Type"  "application/x-www-form-urlencoded"})
+    (when basic-auth  {"Authorization" (basic-auth-value basic-auth)})
+    (when user-agent  {"User-Agent"    user-agent})))

-(defonce default-client (atom nil))
+(defn- prepare-response-headers [headers]
+  (reduce (fn [m [k v]] (assoc m (keyword k) v)) {} headers))
+
+(defn- query-string
+  "Returns URL-encoded query string for given params map."
+  [m]
+  (let [param (fn [k v]  (str (url-encode (name k)) "=" (url-encode v)))
+        join  (fn [strs] (str/join "&" strs))]
+    (join (for [[k v] m] (if (sequential? v)
+                           (join (map (partial param k) (or (seq v) [""])))
+                           (param k v))))))
+
+(comment (query-string {:k1 "v1" :k2 "v2" :k3 nil :k4 ["v4a" "v4b"] :k5 []}))
+
+(defn- coerce-req
+  [url method {:keys [body query-params form-params] :as req}]
+  (assoc req
+    :url (if query-params
+           (if (neg? (.indexOf (str url) (int \?)))
+             (str url "?" (query-string query-params))
+             (str url "&" (query-string query-params)))
+           url)
+
+    :method (case (or method :get)
+              :get     HttpMethod/GET
+              :head    HttpMethod/HEAD
+              :options HttpMethod/OPTIONS
+              :delete  HttpMethod/DELETE
+              :post    HttpMethod/POST
+              :put     HttpMethod/PUT)
+
+    :headers  (prepare-request-headers req)
+    :body     (if form-params (utf8-bytes (query-string form-params)) body)))
+
+;;;; Public API

 (defn init-client "Initializes and returns a new HTTP client."
-  [& {:keys [timeout user-agent keep-alive]
-      :or {timeout 40000 user-agent "http-kit/1.3" keep-alive 120000}}]
-  (HttpClient. (HttpClientConfig. timeout user-agent keep-alive)))
+   [& {:keys [timeout user-agent keep-alive]
+       :or {timeout 40000 user-agent "http-kit/2.0" keep-alive 120000}}]
+   (HttpClient. (HttpClientConfig. timeout user-agent keep-alive)))

-(let [lock (Object.)]
-  (defn get-default-client "Returns default HTTP client, initializing as neccesary."
-    [] (locking lock
-         (if-let [c @default-client] c (reset! default-client (init-client))))))
-
-(defn- coerce-req [{:keys [headers client method body query-params url
-                           form-params basic-auth user-agent]
-                    :as req}]
-  (merge req  ;; TODO cookie
-         {:headers (merge headers
-                          (when form-params
-                            {"Content-Type" "application/x-www-form-urlencoded"})
-                          (when basic-auth
-                            {"Authorization" (basic-auth-value basic-auth)})
-                          (when user-agent
-                            {"User-Agent" user-agent}))}
-         {:url (if query-params
-                 (let [idx (.indexOf ^String url (int \?))]
-                   (if (== -1 idx)
-                     (str url "?" (query-string query-params))
-                     (str url "&" (query-string query-params))))
-                 url)}
-         {:body (or (when form-params
-                      (utf8-bytes (query-string form-params))) body)}
-         {:client (or client (get-default-client))
-          :method (or method :get)}))
+(defonce default-client (delay (init-client)))

 (defn request
-  "Issues an async HTTP request and returns a promise object to which
-   <http-response> or <exception> will be delivered
-  `(callback <http-response>)` or `((or error-callback callback) <exception>)`
-   See also `request`."
-  [req & [callback error-callback]]
-  (let [{:keys [client url method headers body timeout]} (coerce-req req)
-        method (case method
-                 :get  HttpMethod/GET
-                 :head HttpMethod/HEAD
-                 :options HttpMethod/OPTIONS
-                 :delete HttpMethod/DELETE
-                 :post HttpMethod/POST
-                 :put  HttpMethod/PUT)
-        response (promise)]
+  "Issues an async HTTP request and returns a promise object to which the value
+  of `(callback {:request _ :status _ :headers _ :body _})` or
+     `(callback {:request _ :error _})` will be delivered.
+
+  When unspecified, `callback` is the identity fn.
+
+      ;; Asynchronous GET request (returns a promise)
+      (request \"http://www.cnn.com\")
+
+      ;; Asynchronous GET request with callback
+      (request \"http://www.cnn.com\" :get {}
+        (fn [{:keys [request status body headers error] :as resp}]
+          (if error
+            (do (println \"Error on\" request) error)
+            (do (println \"Success on\" request) body))))
+
+      ;; Synchronous requests
+      @(request ...) or (deref (request ...) timeout-ms timeout-val)
+
+      ;; Issue 2 concurrent requests, then wait for results
+      (let [resp1 (request ...)
+            resp2 (request ...)]
+        (println \"resp1's status: \" (:status @resp1))
+        (println \"resp2's status: \" (:status @resp2)))
+
+  Request options: :client, :timeout, :headers, :body, :query-params,
+    :form-params, :basic-auth, :user-agent"
+  [url & [method {:keys [client timeout] :as opts
+                  :or   {client @default-client}}
+          callback]]
+  (let [{:keys [url method headers body] :as req} (coerce-req url method opts)
+        response     (promise)
+        try-callback (fn [resp] (try ((or callback identity) resp)
+                                    (catch Exception e {:request req
+                                                        :error   e})))]
     (.exec ^HttpClient client url method headers body
            (or timeout -1) ; -1 for client default
            (RespListener.
             (reify IResponseHandler
               (onSuccess [this status headers body]
-                (let [resp {:body body
-                            :request req
-                            :headers (normalize-headers headers true)
-                            :status status}]
-                  (try (when callback (callback resp))
-                       (finally
-                        (deliver response resp)))))
+                (deliver response
+                         (try-callback {:request req
+                                        :body    body
+                                        :headers (prepare-response-headers
+                                                  headers)
+                                        :status  status})))
               (onThrowable [this t]
-                (let [resp {:error t :request req}]
-                  (try (when-let [cb (or error-callback (:error-handler req) callback)]
-                         (cb resp))
-                       (finally
-                        (deliver response resp))))))))
+                (deliver response (try-callback {:request req
+                                                 :error   t}))))))
     response))

-(defmacro ^{:private true} gen-method [method]
-  (let [key (keyword method)
-        m (str method)
-        doc (<< "Issues an asynchronous HTTP ~(str/upper-case m) request.
-  Returns a promise object to which the HTTP response or exception will be delivered
-  Optional callback and error-callback: `(callback <http-response>)` or `((or error-callback callback) <exception>)`
+(defmacro ^:private defreq [method]
+  `(defn ~method
+     ~(str "Issues an async HTTP " (str/upper-case method) " request. "
+           "See `request` for details.")
+     ~'{:arglists '([url & [opts callback]] [url & [callback]])}
+     ~'[url & [s1 s2]]
+     (if (fn? ~'s1)
+       (request ~'url ~(keyword method) {} ~'s1)
+       (request ~'url ~(keyword method) ~'s1 ~'s2))))

-    ;; Asynchronous
-    (~{m} url)
-
-    ;; Synchronous
-    (let [{:keys [status body headers] :as esp} @(~{m} ...)]) or
-    (deref (~{m} ...) timeout-ms timeout-val)
-
-     ;; Issue 2 concurrent ~{m} requests, then wait for results
-    (let [resp1 (~{m} ...)
-          resp2 (~{m} ...)]
-      (println \"resp1's status: \" (:status @resp1))
-      (println \"resp2's status: \" (:status @resp2)))")]
-    `(defn ~method ~doc
-       [~'url & [~'req ~'callback ~'error-callback]]    ;; ~': better names for tootls
-       (if (fn? ~'req)                        ; req is callback, shift params
-         (request {:method ~key :url ~'url} ~'req ~'callback)
-         (request (assoc ~'req :method ~key :url ~'url) ~'callback ~'error-callback)))))
-
-(gen-method get)
-(gen-method delete)
-(gen-method head)
-(gen-method post)
-(gen-method put)
-(gen-method options)
-
-(comment
-  (defn get
-    "Issues an asynchronous HTTP GET request. See `request` for more debail."
-    [url & [req callback error-callback]]
-    (if (fn? req)                        ; req is callback, shift params
-      (request {:method :get :url url} req callback)
-      (request (assoc req :method :get :url url) callback error-callback))))
-
-(comment
-  (defmacro request*
-    "Issues an asynchronous HTTP request, binds the HTTP response or exception to
-  `resp`, then executes the given handler body in the context of that binding.
-  Returns a promise object to which the HTTP response or exception will be delivered:
-
-     ;; Asynchronous
-     (request {:url \"http://www.cnn.com/\"}
-              {:keys [status body headers] :as resp}
-              (if status ; nil on exceptions
-                (do (println \"Body: \" body) body)
-                (do (println \"Exception: \" resp) resp)))
-
-     ;; Synchronous
-     (let [{:keys [status body headers] :as esp} @(request ...)]) or
-     (deref (request ...) timeout-ms timeout-val)
-
-     ;; Issue 2 concurrent requests, then wait for results
-    (let [resp1 (request ...)
-          resp2 (request ...)]
-      (println \"resp1's status: \" (:status @resp1))
-      (println \"resp2's status: \" (:status @resp2)))
-
-  See lower-level `request*` for options."
-    [options resp & handler]
-    `(request ~options (fn [~resp] ~@handler)))
-
-
-  (defmacro ^{:private true} gen-method [method]
-    (let [key (keyword method)
-          url 'url req 'req resp 'resp forms 'forms]
-      `(defmacro ~method
-         "Issues an asynchronous HTTP request. See `request` for more debail."
-         ([~url]
-            `(request {:method ~~key :url ~~url} ~'resp# nil))
-         ([~url ~req]
-            `(let [~'req# (merge {:method ~~key :url ~~url} ~~req)]
-               (request ~'req# ~'resp# nil)))
-         ([~url ~req ~resp & ~forms]
-            `(let [~'req# (merge {:method ~~key :url ~~url} ~~req)]
-               (request ~'req# ~~resp ~@~forms))))))
-
-  (gen-method get)
-  (gen-method delete)
-  (gen-method head)
-  (gen-method post)
-  (gen-method put)
-  (gen-method options)
-
-  (defmacro get
-    "Issues an asynchronous HTTP GET request. See `Request` for more debail."
-    ([url]
-       `(request {:method :get :url ~url} resp# nil))
-    ([url req]
-       `(get ~url ~req resp# nil))
-    ([url req resp & forms]
-       `(let [req# (assoc ~req :method :get :url ~url)]
-          (request req#  ~resp ~@forms)))))
+(defreq get)
+(defreq delete)
+(defreq head)
+(defreq post)
+(defreq put)
+(defreq options)


fix JSON hydration for JDBC clobs that are "null"

--- src/metabase/models/hydrate.clj
+++ src/metabase/models/hydrate.clj
@@ -62,12 +62,11 @@
    RESULT may either be a single result or a sequence of results. "
   [result & [first-key & rest-keys]]
   (if (sequential? result) (map #(apply realize-json % first-key rest-keys) result) ;  map ourself recursively if RESULT is a sequence
-      (let [result (or (some->> result                                              ; deserialize the first JSON key
-                                first-key
-                                read-json-str-or-clob
-                                walk/keywordize-keys
-                                (assoc result first-key))
-                       result)]
+      (let [result (cond-> result
+                     (first-key result) (->> first-key
+                                             read-json-str-or-clob
+                                             walk/keywordize-keys
+                                             (assoc result first-key)))]
         (if (empty? rest-keys) result                                               ; if there are remaining keys recurse to realize those
             (recur result rest-keys)))))


remove extraneous docstrage

remove extraneous docstrage

--- src/metabase/models/hydrate.clj
+++ src/metabase/models/hydrate.clj
@@ -99,10 +99,7 @@
     (hydrate {:a (delay {:b (delay {:c (delay 1)})
                          :e (delay 2)})}
              [:a [:b :c] :e])
-      -> {:a {:b {:c 1} :e 2}}
-
-    (hydrate {:a (delay {:b (delay {:c (delay 1)})})
-              :e (delay 2)} [:a [:b :c] :e])"
+      -> {:a {:b {:c 1} :e 2}}"
   [results k & ks]
   {:pre [(valid-hydration-form? k)
          (every? valid-hydration-form? ks)]}


changed localhost in core.clj

changed localhost in core.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/OttoJursch/sched-system.git/'


Add modal popup content element with solid...

... background. Doing so required me to fix the modal background
element so that it used :background "rgba(0,0,0,0.4)" instead of
:background-color :black and :opacity "0.2", because opacity is
inherited and cannot be overriden - whereas rgba opacity is not
inherited.

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


zipper/specter integration implementation

error: pathspec 'src/clj/com/rpl/specter/zipper.cljx' did not match any file(s) known to git

--- src/clj/com/rpl/specter/zipper.cljx
+++ src/clj/com/rpl/specter/zipper.cljx
@@ -0,0 +1,39 @@
+(ns com.rpl.specter.zipper
+  #+cljs (:require-macros
+            [com.rpl.specter.macros
+              :refer [fixed-pathed-path defpath]])
+  (:use
+    #+clj [com.rpl.specter.macros :only [fixed-pathed-path defpath]]
+    [com.rpl specter])
+  (:require [clojure [zip :as zip]]))
+
+(def VECTOR-ZIP (view zip/vector-zip))
+(def SEQ-ZIP (view zip/seq-zip))
+(def XML-ZIP (view zip/xml-zip))
+(def NEXT (view zip/next))
+(def RIGHT (view zip/right))
+(def RIGHTMOST (view zip/rightmost))
+(def LEFT (view zip/left))
+(def DOWN (view zip/down))
+(def LEFTMOST (view zip/leftmost))
+(def UP (view zip/up))
+(def ROOT (view zip/root))
+
+(defpath NODE []
+  (select* [this structure next-fn]
+    (next-fn (zip/node structure))
+    )
+  (transform* [this structure next-fn]
+    (zip/root (zip/edit structure next-fn))
+    ))
+
+(defn edit [path update-fn]
+  (fixed-pathed-path [late path]
+    (select* [this structure next-fn]
+      (next-fn
+        (zip/edit structure
+                  #(compiled-transform late update-fn %))))
+    (transform* [this structure next-fn]
+      (next-fn
+        (zip/edit structure
+                  #(compiled-transform late update-fn %))))))


rh group

rh group

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

--- addgroup.clj
+++ addgroup.clj
@@ -0,0 +1 @@
+(add-group "RunnersHigh" "Runner's High on viiden nuoren nykyisen ja entisen urheilijan yritys, joka tarjoaa laadukkaat juoksuvalmennuspalvelut kaikentasoisille kilpa- ja kuntojuoksijoille. Lue lisää Runner's High:n nettisivuilta.")


feat(backend): add entry point for tests

error: pathspec 'backend/test/uxbox/tests/main.clj' did not match any file(s) known to git

--- backend/test/uxbox/tests/main.clj
+++ backend/test/uxbox/tests/main.clj
@@ -0,0 +1,18 @@
+;; This Source Code Form is subject to the terms of the Mozilla Public
+;; License, v. 2.0. If a copy of the MPL was not distributed with this
+;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;;
+;; Copyright (c) 2019 Andrey Antukh <niwi@niwi.nz>
+
+(ns uxbox.tests.main
+  (:require [clojure.test :as test]))
+
+(defn -main
+  [& args]
+  (require 'uxbox.tests.test-projects)
+  (let [{:keys [fail]} (test/run-all-tests #"^uxbox.tests.*")]
+    (if (pos? fail)
+      (System/exit fail)
+      (System/exit 0))))
+
+


Provide a no-op null task

Provide a no-op null task

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

--- src/onyx/tasks/null.clj
+++ src/onyx/tasks/null.clj
@@ -0,0 +1,14 @@
+(ns onyx.tasks.null
+  (:require [onyx.schema :as os]
+            [schema.core :as s]))
+
+(s/defn output
+  "Creates a no-op output plugin, requires the inclusion of
+   the onyx.test-helper namespace at startup"
+  [task-name :- s/Keyword opts]
+  {:task {:task-map (merge {:onyx/name task-name
+                            :onyx/plugin :onyx.test-helper/dummy-output
+                            :onyx/type :output
+                            :onyx/medium :null
+                            :onyx/doc "Writes segments to nowhere"} opts)
+          :lifecycles []}})


Add gaussian fitting

Add gaussian fitting

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

--- src/clj/clojurewerkz/statistiker/fitting.clj
+++ src/clj/clojurewerkz/statistiker/fitting.clj
@@ -0,0 +1,15 @@
+(ns clojurewerkz.statistiker.fitting
+  (:import [org.apache.commons.math3.analysis.function Gaussian]
+           [org.apache.commons.math3.fitting GaussianFitter]
+           [org.apache.commons.math3.optim.nonlinear.vector.jacobian LevenbergMarquardtOptimizer]))
+
+(defn gaussian-fitting
+  [v]
+  (let [inst   (GaussianFitter. (LevenbergMarquardtOptimizer.))]
+    (doseq [[x y] v]
+      (.addObservedPoint inst x y))
+    (vec (.fit inst))))
+
+(defn gaussian-function
+  [norm mean sigma]
+  (Gaussian. norm mean sigma))


integrated migration store

integrated migration store

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