use (name ...), not (as-str ...)

use (name ...), not (as-str ...)

--- src/clj_http/cookies.clj
+++ src/clj_http/cookies.clj
@@ -7,21 +7,6 @@
            (org.apache.http.impl.cookie BasicClientCookie2)
            (org.apache.http.impl.cookie BrowserCompatSpecFactory)
            (org.apache.http.message BasicHeader)))
-
-;; Copied from clojure.contrib.string in order not to depend on it.
-(defn as-str
-  "Like clojure.core/str, but if an argument is a keyword or symbol,
-  its name will be used instead of its literal representation. "
-  ([] "")
-  ([x] (if (instance? clojure.lang.Named x)
-         (name x)
-         (str x)))
-  ([x & ys]
-     ((fn [^StringBuilder sb more]
-        (if more
-          (recur (. sb  (append (as-str (first more)))) (next more))
-          (str sb)))
-      (new StringBuilder ^String (as-str x)) ys)))

 (defn- cookie-spec []
   (.newInstance
@@ -57,8 +42,8 @@
 (defn- to-basic-client-cookie
   "Converts a cookie seq into a BasicClientCookie2."
   [[cookie-name cookie-content]]
-  (doto (BasicClientCookie2. (as-str cookie-name)
-                             (url-encode (as-str (:value cookie-content))))
+  (doto (BasicClientCookie2. (name cookie-name)
+                             (url-encode (name (:value cookie-content))))
     (.setComment (:comment cookie-content))
     (.setCommentURL (:comment-url cookie-content))
     (.setDiscard (or (:discard cookie-content) true))


add a macro that generates a more natural OpenGL interface

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


figwheel bidez aldaketa jasotzean dena berriz errendatu

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


Update core.clj

Update 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/parenode/clojure-cup-2015.git/'


Catch exceptions that happen before the assertion can be made

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


Broadcast state at the end of all runs

Broadcast state at the end of all runs

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


Vorbereitung 26.11.

Vorbereitung 26.11.

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

--- src/fpc/ul06.clj
+++ src/fpc/ul06.clj
@@ -0,0 +1,84 @@
+; Funktionale Programmierung (in Clojure) Uebungen Serie 6
+; (c) 2014 by Burkhardt Renz, THM
+
+(ns fpc.ul06)
+
+stop
+
+; Aufgabe 1 (Komposition von Funktionen)
+
+; (a) Schreiben Sie eine Funktion, die von einer Zahl n 2 abzieht, ohne dass das Zeichen
+;     - im Code auftaucht.
+
+(def minus2 (comp dec dec))
+
+(minus2 2)
+; => 0
+(minus2 3)
+; => 1
+(minus2 0)
+; => -2
+
+
+; (b) Gegeben sei die Funktion (defn sq[x] (* x x)). Schreiben Sie eine Funktion sqplus,
+;     die eine Zahl um 1 erhöht und dann quadriert. Im Code darf + nicht vorkommen.
+
+(defn sq [x] (* x x))
+
+(def sqplus (comp sq inc))
+
+(sqplus 4)
+; => 25
+
+; Aufgabe 2
+
+; Wenn f eine numerische Funktion und n eine positive ganze Zahl ist,
+; dann können wir die n-fach wiederholte Anwendung von f bilden, die
+; als Funktion von x mit dem Wert f(f(...(f(x))...)) definiert ist.
+; Wenn z. B. f(x) = x+1 ist, dann ist die n-fach wiederholte Anwendung
+; von f die Funktion g(x) = x+n.
+; Wenn z. B. f die Quadrierung ist, dann ist g die 2-hoch-n-te Potenzierung.
+; Schreiben Sie eine Prozedur "n-fach" mit einer Prozedur f und einer
+; positiven ganzen Zahl n als Parameter, die sich z. B. folgendermaßen verwenden läßt:
+
+; ((n-fach quadrat 3) 5)
+; => 390625
+
+; Hinweis: Denken Sie an comp
+
+(defn n-fach
+  [f n]
+  (loop [cur 1, result f]
+    (if (= cur n)
+        result
+        (recur (inc cur) (comp f result)))))
+
+((n-fach inc 3 ) 5)
+;=> 8
+
+((n-fach #(* % %) 3) 5)
+;=> 390625
+
+; Aufgabe 3
+
+; Gegeben sei:
+
+(defn f [g] (g 2))
+
+;(a) Beispiele:
+
+(f #(* % %))
+;=> 4
+
+(f (fn [z] (* z (inc z))))
+;=> 6
+
+; Was passiert, wenn wir (f f) auswerten lassen? Genaue Erklärung?
+
+(f f)
+;=> ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn
+
+; f wendet die übergebene Funktion auf die Zahl 2 an
+; in diesem Fall ist die übergebene Funktion f selbst
+; d.h. f erhält das Argument 2
+; dann wird dieses Argument als Funktion interpretiert -> Fehlermeldung


fix(request): change exception info status 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/B2W-Digital/pdg-core.git/'


[WM] fix straggler plural voting-methods-search

Tried to singularize these, but I missed this one.

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


Use vec for lazy sequence to vector conversion

--- src/cljx/cats/builtin.cljx
+++ src/cljx/cats/builtin.cljx
@@ -102,8 +102,7 @@
       [v])

     (mbind [_ self f]
-      (into []
-            (apply concat (map f self))))
+      (vec (mapcat f self)))

     proto/MonadZero
     (mzero [_]


temporarily remove tracking of tuple process times

--- src/clj/backtype/storm/daemon/executor.clj
+++ src/clj/backtype/storm/daemon/executor.clj
@@ -421,7 +421,7 @@
                           ;;(log-debug "Received tuple " tuple " at task " task-id)
                           ;; need to do it this way to avoid reflection
                           (let [^IBolt bolt-obj (-> task-id task-datas :object)]
-                            (.put tuple-start-times tuple (System/currentTimeMillis))
+;;                            (.put tuple-start-times tuple (System/currentTimeMillis))
                             (.execute bolt-obj tuple)))]
     (log-message "Preparing bolt " component-id ":" (keys task-datas))
     (doseq [[task-id task-data] task-datas
@@ -465,7 +465,8 @@
                                                  ACKER-ACK-STREAM-ID
                                                  [root (bit-xor id ack-val)])
                            ))
-                       (let [delta (tuple-time-delta! tuple-start-times tuple)]
+                       (let [delta 0 ;; (tuple-time-delta! tuple-start-times tuple)
+                            ]
                          (task/apply-hooks user-context .boltAck (BoltAckInfo. tuple delta))
                          (when (sampler)
                            (stats/bolt-acked-tuple! executor-stats
@@ -479,7 +480,8 @@
                          (task/send-unanchored task-data
                                                ACKER-FAIL-STREAM-ID
                                                [root]))
-                       (let [delta (tuple-time-delta! tuple-start-times tuple)]
+                       (let [delta 0 ;;(tuple-time-delta! tuple-start-times tuple)
+                       ]
                          (task/apply-hooks user-context .boltFail (BoltFailInfo. tuple delta))
                          (when (sampler)
                            (stats/bolt-failed-tuple! executor-stats


Init geometry test

Init geometry test

error: pathspec 'test/cljs/db_quiz/geometry_test.cljs' did not match any file(s) known to git

--- test/cljs/db_quiz/geometry_test.cljs
+++ test/cljs/db_quiz/geometry_test.cljs
@@ -0,0 +1,13 @@
+(ns db-quiz.geometry-test
+  (:require [cljs.test :refer-macros [are deftest is testing]]
+            [db-quiz.geometry :as geo]))
+
+(deftest path-travelled
+  (testing "Length of the generated path travelled equals to distance travelled"
+    (let [; TODO: This can be generated with test.check
+          path [[[0.1 0.1] [0.2 0.2]] [[0.8 0.8] [0.9 0.9]]]]
+      (are [distance-travelled]
+           (= (geo/path-length (geo/path-travelled path distance-travelled)) distance-travelled)
+           0
+           0.1
+           0.2))))


Rename io.clj to format.clj

Rename io.clj to format.clj

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

--- common/clojure/nightweb/format.clj
+++ common/clojure/nightweb/format.clj
@@ -0,0 +1,67 @@
+(ns nightweb.format
+  (:use [clojure.java.io :only [file
+                                input-stream
+                                output-stream]]
+        [nightweb.constants :only [slash get-posts-dir]]))
+
+; basic file operations
+
+(defn file-exists?
+  [path]
+  (.exists (file path)))
+
+(defn write-file
+  [path data-barray]
+  (if-let [parent-dir (.getParentFile (file path))]
+    (.mkdirs parent-dir))
+  (with-open [bos (output-stream path)]
+    (.write bos data-barray 0 (alength data-barray))))
+
+(defn read-file
+  [path]
+  (let [length (.length (file path))
+        data-barray (byte-array length)]
+    (with-open [bis (input-stream path)]
+      (.read bis data-barray))
+    data-barray))
+
+; encodings/decodings
+
+(defn b-encode
+  [data-map]
+  (org.klomp.snark.bencode.BEncoder/bencode data-map))
+
+(defn b-decode
+  [data-barray]
+  (try
+    (.getMap (org.klomp.snark.bencode.BDecoder/bdecode
+               (java.io.ByteArrayInputStream. data-barray)))
+    (catch java.lang.Exception e nil)))
+
+(defn base32-encode
+  [data-barray]
+  (net.i2p.data.Base32/encode data-barray))
+
+(defn base32-decode
+  [data-str]
+  (net.i2p.data.Base32/decode data-str))
+
+; read/write specific files
+
+(defn write-key-file
+  [file-path key-data]
+  (write-file file-path (b-encode {"sign-key" key-data
+                                   "sign-algo" "DSA-SHA1"})))
+
+(defn read-key-file
+  [file-path]
+  (let [priv-key-map (b-decode (read-file file-path))
+        sign-key-str (.get priv-key-map "sign-key")]
+    (.getBytes sign-key-str)))
+
+(defn write-post-file
+  [dir-path user-hash text]
+  (write-file (str dir-path
+                   (get-posts-dir user-hash)
+                   slash (.getTime (java.util.Date.)) ".post")
+              (b-encode {"text" text})))


make sure to fully qualify the dataset names

--- test/metabase/driver/postgres_test.clj
+++ test/metabase/driver/postgres_test.clj
@@ -69,14 +69,14 @@
                    [3 #uuid "da1d6ecc-e775-4008-b366-c38e7a2e8433"]
                    [4 #uuid "7a5ce4a2-0958-46e7-9685-1a4eaa3bd08a"]
                    [5 #uuid "84ed434e-80b4-41cf-9c88-e334427104ae"]]}
-  (-> (Q run against postgres-with-uuid using postgres
+  (-> (Q run against metabase.driver.postgres-test/postgres-with-uuid using postgres
          return :data
          aggregate rows of users)
       (update :cols (partial mapv #(dissoc % :id :table_id)))))

 ;; Check that we can filter by a UUID Field
 (expect [[2 #uuid "4652b2e7-d940-4d55-a971-7e484566663e"]]
-  (Q run against postgres-with-uuid using postgres
+  (Q run against metabase.driver.postgres-test/postgres-with-uuid using postgres
      return :data :rows
      aggregate rows of users
      filter = user_id "4652b2e7-d940-4d55-a971-7e484566663e"))


assign-instances and consolidate-instruments now work

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


Fixed comment

Fixed comment

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


Uneko orria ezarri

Uneko orria ezarri


Add skeleton for lookahead gate implementation

error: pathspec 'src/main/audio_utils/gate.cljs' did not match any file(s) known to git

--- src/main/audio_utils/gate.cljs
+++ src/main/audio_utils/gate.cljs
@@ -0,0 +1,11 @@
+(ns audio-utils.gate
+  (:require [audio-utils.util :refer [aatom aderef aswap!]]))
+
+(defprotocol IGate)
+
+(deftype Gate []
+  IGate)
+
+(defn gate
+  []
+  (Gate.))


finish clojure version

finish clojure version

error: pathspec 'Add-Digits/AD.clj' did not match any file(s) known to git

--- Add-Digits/AD.clj
+++ Add-Digits/AD.clj
@@ -0,0 +1,16 @@
+(defn add-digits [str]
+  (let [n (read-string str)]
+    (loop [numL n]
+      (let [sumN (reduce + (spilit-num numL))]
+        (if (< sumN 10)
+          sumN
+          (recur sumN))))))
+
+(defn spilit-num [num]
+  "split num digit by digit, like 123 => 1 2 3"
+  (loop [a (quot num 10)
+         b (mod num 10)
+         result (list b)]
+    (if (< a 10)
+      (conj result a)
+      (recur (quot a 10) (mod a 10) (conj result (mod a 10))))))


slightly optimized -collect

slightly optimized -collect

--- src/datascript/query.cljs
+++ src/datascript/query.cljs
@@ -16,9 +16,6 @@
                     (set (keys attrs2))))
 (defn concatv [& xs]
   (vec (apply concat xs)))
-
-(defn multimap [k+vs]
-  (reduce (fn [acc [k v]] (update-in acc [k] (fnil conj []) v))  {} k+vs))

 (defn source? [sym]
   (and (symbol? sym)
@@ -235,26 +232,25 @@

 (defn -collect
   ([context symbols]
-    (let [symbols-map (multimap (map vector symbols (range)))
-          rels        (:rels context)
-          data        (-collect [(make-array (count symbols))] rels symbols-map)]
+    (let [rels (:rels context)
+          data (-collect [(make-array (count symbols))] rels symbols)]
       (set (map vec data))))
-  ([acc rels symbols-map]
+  ([acc rels symbols]
     (if-let [rel (first rels)]
-      (let [keep-attrs (vec (intersect-keys (:attrs rel) symbols-map))]
+      (let [keep-attrs (select-keys (:attrs rel) symbols)]
         (if (empty? keep-attrs)
-          (recur acc (next rels) symbols-map)
-          (let [from+to (map #(array ((:attrs rel) %) (symbols-map %)) keep-attrs)]
+          (recur acc (next rels) symbols)
+          (let [copy-map (to-array (map #(get keep-attrs %) symbols))
+                len      (count symbols)]
             (recur (for [t1 acc
                          t2 (:tuples rel)]
-                     (let [res (.slice t1 0)] ;; clone
-                       (doseq [idxs from+to
-                               :let [from (aget idxs 0)]
-                               to   (aget idxs 1)]
-                         (aset res to (aget t2 from)))
+                     (let [res (aclone t1)]
+                       (dotimes [i len]
+                         (when-let [idx (aget copy-map i)]
+                           (aset res i (aget t2 idx))))
                        res))
                    (next rels)
-                   symbols-map))))
+                   symbols))))
       acc)))

 (defn find-attrs [q]
@@ -318,8 +314,7 @@
                 [:db/add 3 :age  22]]))
    ["Ivan" "Petr"])

-#_(q '[:find ?e
-     :with ?e2
+#_(q '[:find ?e ?n ?e2 ?n2
      :where [?e :name ?n]
             [?e2 :name ?n2]]
   (-> (d/empty-db)
@@ -334,10 +329,10 @@
                    ["Medusa" 1]
                    ["Cyclops" 1]
                    ["Chimera" 1] ]]
-  (q '[ :find (sum ?heads) (min ?heads) (max ?heads) (count ?heads)
-                       :with ?monster
-                       :in   [[?monster ?heads]] ]
-                    monsters))
+  (q '[:find (sum ?heads) (min ?heads) (max ?heads) (count ?heads)
+       :with ?monster
+       :in   [[?monster ?heads]] ]
+    monsters))

 #_(q '[ :find ?color (max ?amount ?x) (min ?amount ?x)
       :in   [[?color ?x]] ?amount ]


Add custom user ns

Add custom user ns

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

--- src/dev/user.clj
+++ src/dev/user.clj
@@ -0,0 +1,12 @@
+(ns user
+  (:require [clojure.java.io :as io]
+            [clojure.repl :refer :all]
+            [figwheel-sidecar.repl-api :as figwheel]))
+
+(comment
+
+  (figwheel/start-figwheel!)
+  (figwheel/stop-figwheel!)
+  (figwheel/cljs-repl "dev")
+
+  )


[TH] don't need sorted map

[TH] don't need sorted map

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


type annotations

type annotations

--- src/clj/wombat/compiler.clj
+++ src/clj/wombat/compiler.clj
@@ -10,6 +10,8 @@
            [java.io FileReader]
            [wombat ILambda AsmUtil Global])
   (:refer-clojure :exclude [compile load-file eval read]))
+
+;(set! *warn-on-reflection* true)

 (def ^:dynamic *class-loader* (DynamicClassLoader. (RT/baseLoader)))

@@ -202,14 +204,14 @@
          eval)

 (defn asmtype ^Type [^Class cls] (Type/getType cls))
-(def object-type (asmtype Object))
-(def boolean-object-type (asmtype Boolean))
-(def ilambda-type (asmtype ILambda))
-(def void-ctor (Method/getMethod "void <init>()"))
+(def ^Type object-type (asmtype Object))
+(def ^Type boolean-object-type (asmtype Boolean))
+(def ^Type ilambda-type (asmtype ILambda))
+(def ^Method void-ctor (Method/getMethod "void <init>()"))

 (defn dotmunge
   [str]
-  (.replace (munge str) "." "_DOT_"))
+  (.replace ^String (munge str) "." "_DOT_"))

 (defn close-name
   [fsym]
@@ -273,7 +275,7 @@
     (. gen endMethod)))

 (defn emit-array
-  [gen asm-type contents]
+  [^GeneratorAdapter gen asm-type contents]
   (AsmUtil/pushInt gen (count contents))
   (. gen newArray asm-type)
   (dotimes [n (count contents)]
@@ -285,7 +287,7 @@
     (. gen arrayStore asm-type)))

 (defn method-type
-  [gen arity restarg]
+  [^GeneratorAdapter gen arity restarg]
   (. gen push object-type)
   (let [positional (repeat arity object-type)
         sig (if restarg
@@ -295,7 +297,7 @@
   (. gen invokeStatic (asmtype MethodType) (Method/getMethod "java.lang.invoke.MethodType methodType(Class,Class[])")))

 (defn gen-handle
-  [cw {:keys [params restarg thistype] :as env}]
+  [cw {:keys [params restarg ^Type thistype] :as env}]
   (let [^ClassVisitor cv cw
         arity (count params)
         handle (handle-name arity restarg)]
@@ -439,7 +441,7 @@
             (MethodType/methodType CallSite (into-array Class [MethodHandles$Lookup String MethodType String])))))

 (defn emit-global
-  [gen sym]
+  [^GeneratorAdapter gen sym]
   (. gen invokeDynamic "getGlobal"
      (.toMethodDescriptorString (MethodType/methodType Object (make-array Class 0)))
      global-bootstrap
@@ -570,7 +572,7 @@
   :default -invoke-)

 (defmethod emit-seq 'lambda
-  [env context gen [_ params & body :as lambda]]
+  [env context ^GeneratorAdapter gen [_ params & body :as lambda]]
   (when-not (= context :context/statement)
     (let [[dotname bytecode closed-overs] (compile lambda)]
       (. *class-loader* defineClass dotname bytecode lambda)
@@ -586,7 +588,7 @@
 ;;   [env context gen [_ fields :as defcls]])

 (defmethod emit-seq 'let
-  [env context gen [_ bindings & body :as the-let]]
+  [env context ^GeneratorAdapter gen [_ bindings & body :as the-let]]
   (let [start-label (. gen newLabel)
         end-label (. gen newLabel)
         names (mapv #(vector (first %) (. gen newLocal object-type)) bindings)
@@ -600,13 +602,13 @@
       (emit-body let-env context gen body))))

 (defmethod emit-seq 'quote
-  [env context gen [_ quoted :as form]]
+  [env context ^GeneratorAdapter gen [_ quoted :as form]]
   (when (> (count form) 2)
     (throw (IllegalArgumentException. "quote takes exactly one argument")))
   (emit-value context gen quoted))

 (defmethod emit-seq 'begin
-  [env context gen [_ & exprs :as form]]
+  [env context ^GeneratorAdapter gen [_ & exprs :as form]]
   (emit-body env context gen exprs))

 (defn set-global!
@@ -619,14 +621,14 @@
   value)

 (defmethod emit-seq 'define
-  [env context gen [_ name val :as form]]
+  [env context ^GeneratorAdapter gen [_ name val :as form]]
   (when (> (count form) 3)
     (throw (IllegalArgumentException. "define only takes one value")))
   (set-global! name (eval* val))
   (emit-global gen name))

 (defmethod emit-seq 'if
-  [env context gen [_ condition then else :as the-if]]
+  [env context ^GeneratorAdapter gen [_ condition then else :as the-if]]
   (debug "emit-seq if" the-if context)
   (when-not (<= 3 (count the-if) 4)
     (throw (IllegalArgumentException. "if takes 2 or 3 forms")))
@@ -649,7 +651,7 @@
 (defn asm-println
   "Generates bytecode to print the toString of whatever is on top of
   the stack. Leaves stack unchaged."
-  [gen]
+  [^GeneratorAdapter gen]
   (. gen dup)
   (. gen invokeVirtual object-type (Method/getMethod "String toString()"))
   (. gen push "DEBUG: ")
@@ -664,19 +666,19 @@
   (. gen invokeVirtual (asmtype java.io.PrintWriter) (Method/getMethod "void println(String)")))

 (defn emit-var
-  [gen sym]
+  [^GeneratorAdapter gen sym]
   (. gen push (namespace sym))
   (. gen push (name sym))
   (. gen invokeStatic (asmtype RT) (Method/getMethod "clojure.lang.Var var(String,String)")))

 (declare emit-jvm)
 (defmethod emit-seq :jvm
-  [env context gen [_ & insns]]
+  [env context ^GeneratorAdapter gen [_ & insns]]
   (doseq [i insns]
     (emit-jvm env context gen i)))

 (defmethod emit-seq -invoke-
-  [env context gen [fun & args :as call]]
+  [env context ^GeneratorAdapter gen [fun & args :as call]]
   (when (nil? fun)
     (throw (IllegalArgumentException. "Can't invoke nil")))
   (debug "emitting invoke:" call)


Adds cljs semi-persistence using localStorage

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

--- src/wordsmith/persistence.cljs
+++ src/wordsmith/persistence.cljs
@@ -0,0 +1,21 @@
+(ns wordsmith.persistence)
+
+(def prefix "wordsmith:documents:")
+
+(def prefix-length (count prefix))
+
+(defn generate-key [title]
+  (str prefix title))
+
+(defn set-document [title content]
+  (let [k (generate-key title)]
+    (.setItem js/localStorage k content)))
+
+(defn get-document [title]
+  (let [k (generate-key title)]
+    (.getItem js/localStorage k)))
+
+(defn get-all-titles []
+  (let [ks (.keys js/Object js/localStorage)
+        filtered (filter #(= (.substring % 0 prefix-length) prefix) ks)]
+    (mapv #(.substring % prefix-length) filtered)))


Minimal OAuth approval prompt

Minimal OAuth approval prompt

--- src/cljs/salava/oauth/ui/authorize.cljs
+++ src/cljs/salava/oauth/ui/authorize.cljs
@@ -4,10 +4,11 @@
             [salava.core.ui.layout :as layout]
             [salava.core.i18n :refer [t]]))

+;; TODO translations, app name from config
 (defn content [form]
   [:div
    [:h1 "Authorize application"]
-   [:p "TODO describe app access"]
+   [:p "Open Badge Passport mobile app would like to access your data."]
    [:form {:method "post" :action (path-for "/user/oauth2/authorize")}
     [:input {:type "hidden" :name "client_id" :value (.get form "client_id")}]
     [:input {:type "hidden" :name "state" :value (.get form "state")}]


bos,eos toks

bos,eos toks

--- src/clojure/zensols/nlparse/feature.clj
+++ src/clojure/zensols/nlparse/feature.clj
@@ -9,8 +9,17 @@
   (:require [zensols.nlparse.wordnet :as wn]
             [zensols.nlparse.parse :as pt]))

-;; TODO: move to classifer/none-label
-(def ^:private none-label "<none>")
+(def none-label
+  "Value used for missing features."
+  "<none>")
+
+(def beginning-of-sentence-label
+  "Beginning of sentence marker."
+  "<bos>")
+
+(def end-of-sentence-label
+  "End of sentence marker."
+  "<eos>")

 ;; util
 (defn upper-case? [text]


Add missing settings ns file.

Add missing settings ns file.

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

--- src/uxbox/ui/settings.cljs
+++ src/uxbox/ui/settings.cljs
@@ -0,0 +1,81 @@
+(ns uxbox.ui.settings
+  (:require [sablono.core :as html :refer-macros [html]]
+            [rum.core :as rum]
+            [cuerdas.core :as str]
+            [uxbox.router :as r]
+            [uxbox.rstore :as rs]
+            [uxbox.ui.icons :as i]
+            [uxbox.ui.mixins :as mx]
+            [uxbox.util.dom :as dom]
+            [uxbox.data.dashboard :as dd]
+            [uxbox.ui.dashboard.header :refer (header)]))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Page: Profile
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn profile-page-render
+  [own]
+  (html
+   [:main.dashboard-main
+    (header)
+    [:section.dashboard-content
+     [:ul
+      [:li {:on-click #(r/go :settings/profile)} "Profile"]
+      [:li {:on-click #(r/go :settings/password)} "Password"]
+      [:li {:on-click #(r/go :settings/notifications)} "Notifications"]]
+
+     [:section.dashboard-grid.library
+      [:span "TODO 1"]]]]))
+
+(def ^:static profile-page
+  (mx/component
+   {:render profile-page-render
+    :name "profile-page"
+    :mixins [mx/static]}))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Page: password
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn password-page-render
+  [own]
+  (html
+   [:main.dashboard-main
+    (header)
+    [:section.dashboard-content
+     [:ul
+      [:li {:on-click #(r/go :settings/profile)} "Profile"]
+      [:li {:on-click #(r/go :settings/password)} "Password"]
+      [:li {:on-click #(r/go :settings/notifications)} "Notifications"]]
+     [:section.dashboard-grid.library
+      [:span "TODO 2"]]]]))
+
+(def ^:static password-page
+  (mx/component
+   {:render password-page-render
+    :name "password-page"
+    :mixins [mx/static]}))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Page: notifications
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn notifications-page-render
+  [own]
+  (html
+   [:main.dashboard-main
+    (header)
+    [:section.dashboard-content
+     [:ul
+      [:li {:on-click #(r/go :settings/profile)} "Profile"]
+      [:li {:on-click #(r/go :settings/password)} "Password"]
+      [:li {:on-click #(r/go :settings/notifications)} "Notifications"]]
+     [:section.dashboard-grid.library
+      [:span "TODO 3"]]]]))
+
+(def ^:static notifications-page
+  (mx/component
+   {:render notifications-page-render
+    :name "notifications-page"
+    :mixins [mx/static]}))


code format

code format

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


couple of extra fixes

couple of extra fixes

--- src/cljs/just_married/home/gift.cljs
+++ src/cljs/just_married/home/gift.cljs
@@ -1,6 +1,7 @@
 (ns just-married.home.gift
   (:require [just-married.home.language :refer [translate]]
-            [clojure.string :as string]))
+            [clojure.string :as string]
+            [goog.string :as gstring]))

 (def LANGUAGE-TO-CURRENCY
   {:en "gbp"
@@ -10,17 +11,18 @@
   {:eur {:name "Andrea Crotti"
          :iban "DE70100110012629402677"}

-   ;;TODO: fix the naem
-   :gbp {:name "Andrea & Enrica"
+   :gbp {:name "Andrea Crotti"
          :iban "GB19ABBY09012921859069"
          :number "21859069"
          :sort-code "09-01-29"}})

 (def gift-dict
-  {:en {:gift "Your company in this special day will be the greatest gift. If you would like to contribute to our Honeymoon at the Seychelles you can do use these bank coordinates:"}
+  {:en {:gift   "Your company in this special day will be the greatest gift. If you would like to contribute to our Honeymoon at the Seychelles you can do use these bank coordinates:"
+        :pounds "British Pounds"}

-   :it {:gift "La vostra presenza in questo giorno speciale sarà il regalo più importante.
-Se vorrete contribuire al nostro viaggio di nozze alle Seychelles potrete farlo usando queste coordinate bancarie:"}})
+   :it {:gift   "La vostra presenza in questo giorno speciale sarà il regalo più importante.
+Se vorrete contribuire al nostro viaggio di nozze alle Seychelles potrete farlo usando queste coordinate bancarie:"
+        :pounds "Sterline"}})

 (def ^:private tr
   (partial translate gift-dict))
@@ -31,13 +33,10 @@
    (into [:tr]
          (for [f fields]
            [:th (-> f name string/upper-case)]))
+
    (into [:tr]
          (for [f fields]
            [:td (-> coordinates key f)]))])
-
-(into [:th]
-      (for [f [1 2 3]]
-        [:td f]))

 (defn gift
   []
@@ -47,5 +46,5 @@
    [:h4 "Euros (€)"]
    (coords-table [:name :iban] :eur)

-   [:h4 "British Pounds (£)"]
+   [:h4 (gstring/format "%s (£)" (tr :pounds))]
    (coords-table [:name :iban :number :sort-code] :gbp)])


notes for ai

notes for ai

--- src/cljs/triboard/ai/strategies.cljs
+++ src/cljs/triboard/ai/strategies.cljs
@@ -3,6 +3,12 @@
     [triboard.ai.minimax :as minimax]
     ))

+
+;; TODO - For the AI sensible to the number of moves
+;; We do not care about transitions or new scores
+;; This is one level lower and we want to keep the
+;; available moves for each player
+;; This means we want something different for leaf score

 (defn score-sensible-ai
   [player]


WIP just docs here

WIP just docs here

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


Refactored message constants into their own ns

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

--- src/clojure/frereth_cp/message/constants.clj
+++ src/clojure/frereth_cp/message/constants.clj
@@ -0,0 +1,64 @@
+(ns frereth-cp.message.constants
+  (:require [frereth-cp.message.specs :as specs]))
+
+(def stream-length-limit
+  "How many bytes can the stream send before we've exhausted the address space?
+
+(dec (pow 2 60)): this allows > 200 GB/second continuously for a year"
+  1152921504606846976)
+
+;; These seem like they'd make more sense under shared.constants
+
+(def k-div4
+  "aka 1/4 k"
+  256)
+
+(def k-div2
+  "aka 1/2 k"
+  512)
+
+(def k-1
+  "aka 1k"
+  1024)
+
+(def k-2
+  "aka 2k"
+  2048)
+
+(def k-4
+  "aka 4k"
+  4096)
+
+(def k-8
+  "aka 8k"
+  8192)
+
+(def k-64
+  "aka 128k"
+  65536)
+
+(def k-128
+  "aka 128k"
+  131072)
+
+;; (dec (pow 2 32))
+(def MAX_32_UINT 4294967295)
+
+(def ms-5
+  "5 milliseconds, in nanoseconds
+
+  This almost definitely belongs in shared.constansts,
+  assuming it isn't there already"
+  5000000)
+
+(def secs-1
+  "in nanoseconds"
+  specs/sec->n-sec)
+
+(def secs-10
+  "in nanoseconds"
+  (* secs-1 10))
+
+(def minute-1
+  "in nanoseconds"
+  (* 60 secs-1))


reverse

reverse

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

--- src/hackerrank/fp_reverse_a_list.clj
+++ src/hackerrank/fp_reverse_a_list.clj
@@ -0,0 +1,69 @@
+(ns hackerrank.fp-reverse-a-list)
+
+;;; https://www.hackerrank.com/challenges/fp-reverse-a-list
+;;; Reverse a list without using reverse function. The input and output portions will be handled automatically. You need to write a function with the recommended method signature.
+;;;
+;;; Input and Output Format
+;;; Each element of the list is displayed on a new line.
+;;; The output list is the reverse of the input list.
+;;;
+;;; Sample Input
+;;;
+;;; 19
+;;; 22
+;;; 3
+;;; 28
+;;; 26
+;;; 17
+;;; 18
+;;; 4
+;;; 28
+;;; 0
+;;; Sample Output
+;;;
+;;; 0
+;;; 28
+;;; 4
+;;; 18
+;;; 17
+;;; 26
+;;; 28
+;;; 3
+;;; 22
+;;; 19
+;;; Method Signature
+;;;
+;;; Number Of Parameters: 1
+;;; Parameters: [list]
+;;; Returns: List or Vector
+;;; Constraints
+;;; List will have N elements, 1<=N<=100.
+;;; Each element X will be such that 0<=X<=100.
+
+(defn reverse-list-1
+  "Recursively reverse list using loop
+   take the first element and cons it
+   to accumulator."
+  [coll]
+  (loop [curr coll reversed []]
+    (if (empty? curr)
+      reversed
+      (recur (rest curr) (cons (first curr) reversed)))))
+
+
+(defn reverse-list-2
+  "Recursively reverse list using loop.
+   Takes the last element and conj it
+   to accumulator. Uses different datastructures
+   as than reverse-list-1"
+  [coll]
+  (loop [curr coll reversed []]
+    (if (empty? curr)
+      reversed
+      (recur (butlast curr) (conj reversed (last curr))))))
+
+
+(defn reverse-list-3
+  "Functionaly reverse list"
+  [coll]
+  (reduce (fn [acc,elem] (into [elem] acc)) [] coll))


[WM] debug log handled electorate.create events

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


Get all the symbols

Get all the symbols

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


cleanup

cleanup

--- src/metabase/api/common/throttle.clj
+++ src/metabase/api/common/throttle.clj
@@ -51,7 +51,7 @@

 (defrecord Throttler [;; Name of the API field/value being checked. Used to generate appropriate API error messages, so they'll be displayed in the
                       ;; right part of the screen
-                      ^Keyword field-name
+                      ^Keyword exception-field-key
                       ;; [Internal] List of attempt entries. These are pairs of [key timestamp (ms)], e.g. ["cam@metabase.com" 1438045261132]
                       ^Atom    attempts
                       ;; Amount of time to keep an entry in ATTEMPTS before dropping it.
@@ -91,9 +91,9 @@

      (require '[metabase.api.common.throttle :as throttle])
      (def email-throttler (throttle/make-throttler :attempts-threshold 10))"
-  [field-name & {:as kwargs}]
+  [exception-field-key & {:as kwargs}]
   (map->Throttler (merge throttler-defaults kwargs {:attempts   (atom '())
-                                                    :field-name field-name})))
+                                                    :exception-field-key exception-field-key})))

 (defn check
   "Throttle an API call based on values of KEYY. Each call to this function will record KEYY to THROTTLER's internal list;
@@ -102,7 +102,7 @@
      (defendpoint POST [:as {{:keys [email]} :body}]
        (throttle/check email-throttler email)
        ...)"
-  [^Throttler {:keys [attempts field-name], :as throttler} keyy]
+  [^Throttler {:keys [attempts exception-field-key], :as throttler} keyy]
   {:pre [(or (= (type throttler) Throttler)
              (println "THROTTLER IS: " (type throttler)))
          keyy]}
@@ -111,7 +111,7 @@
   (when-let [delay-ms (calculate-delay throttler keyy)]
     (let [message (format "Too many attempts! You must wait %d seconds before trying again." (int (math/round (/ delay-ms 1000))))]
       (throw (ex-info message {:status-code 400
-                               :errors      {field-name message}}))))
+                               :errors      {exception-field-key message}}))))
   (swap! attempts conj [keyy (System/currentTimeMillis)]))


Make the WIP InfluxDB 0.9 support work.

Make the WIP InfluxDB 0.9 support work.

There is probably a lot wrong with this, but it works for me.

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


4clojure solvings (1-10)

4clojure solvings (1-10)

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

--- src/sandbox/4clojure.clj
+++ src/sandbox/4clojure.clj
@@ -0,0 +1,31 @@
+(ns sandbox.4clojure)
+
+;;1 Nothing but the Truth
+true
+
+;;2 Simple Math
+4
+
+;;3 Intro to Strings
+"HELLO WORLD"
+
+;;4 Intro to Lists
+:a :b :c
+
+;;5 Lists: conj
+'(1 2 3 4)
+
+;;6 Intro to Vectors
+:a :b :c
+
+;;7 Vectors: conj
+[1 2 3 4]
+
+;;8 Intro to Sets
+#{:a :b :c :d}
+
+;;9 Sets: conj
+2
+
+;;10 Intro to Maps
+20


RS + DM | #7 | Add questions_test.clj

RS + DM | #7 | Add questions_test.clj

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

--- test/objective8/questions_test.clj
+++ test/objective8/questions_test.clj
@@ -0,0 +1,13 @@
+(ns objective8.questions-test
+  (:require [midje.sweet :refer :all]
+            [objective8.questions :as questions]
+            [objective8.storage.storage :as storage]))
+
+(def USER_ID 1)
+(def OBJECTIVE_ID 234)
+
+(fact "Postgresql exceptions are not caught"
+      (questions/store-question! {:question "something"}) => (throws org.postgresql.util.PSQLException)
+      (provided
+        (storage/pg-store! {:entity :question :question "something"}) =throws=> (org.postgresql.util.PSQLException.
+                                                                                (org.postgresql.util.ServerErrorMessage. "" 0))))


should have gone in with last checkin - run a jetty with handler to serve engineered classes to interested clients

error: pathspec 'dada-core/src/main/clojure/org/dada/web.clj' did not match any file(s) known to git

--- dada-core/src/main/clojure/org/dada/web.clj
+++ dada-core/src/main/clojure/org/dada/web.clj
@@ -0,0 +1,39 @@
+(ns
+ #^{:author "Jules Gosnell" :doc "HTTP Class Server for DADA"}
+ org.dada.web
+ (:use [org.dada.core])
+ (:import [org.eclipse.jetty.server
+	   Request Server]
+	  [org.eclipse.jetty.server.handler
+	   AbstractHandler]
+	  [javax.servlet.http
+	   HttpServletRequest HttpServletResponse])
+ )
+
+
+(def *jetty* nil)
+
+(defn start-jetty [port]
+  (let [jetty (Server. port)
+	handler (proxy [AbstractHandler] []
+		    (handle [#^String target
+			     #^Request base-request
+			     #^HttpServletRequest request
+			     #^HttpServletResponse response]
+			    (let [path (.getPathInfo base-request)
+				  name (.substring path (+ (.lastIndexOf path "/") 1))
+				  bytes (@*exported-classes* name)
+				  stream (.getOutputStream response)]
+			    (.setContentType response "application/binary")
+			    (.setContentLength response (count bytes))
+			    (.setStatus response 200)
+			      (println "Serving" name "=" bytes)
+			      (.write stream bytes)
+			      (.close stream))
+			    (.setHandled request true)))]
+    (.setHandler jetty handler)
+    (def *jetty* jetty)
+    (.start jetty)))
+
+(defn stop-jetty []
+  (.stop *jetty*))


Removed sleep

Removed sleep

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


Fix Badge settings call

Fix Badge settings call

--- src/cljs/salava/badge/ui/settings.cljs
+++ src/cljs/salava/badge/ui/settings.cljs
@@ -23,7 +23,7 @@
       (path-for (str "/obpv1/badge/save_settings/" id))
       {:params  {:visibility   visibility
                  :tags         tags
-                 :rating       rating
+                 :rating       (if (pos? rating) rating nil)
                  :evidence-url evidence-url}
        :handler (fn []
                   (.reload js/window.location))})))


refactor badge settings

refactor badge settings

--- src/cljs/salava/badge/ui/settings.cljs
+++ src/cljs/salava/badge/ui/settings.cljs
@@ -11,7 +11,7 @@
             [reagent.session :as session]
             [clojure.string :refer [upper-case replace blank? starts-with?]]
             [salava.core.ui.rate-it :as r]
-            [salava.badge.ui.my :as my]
+            ;[salava.badge.ui.my :as my]
             [salava.core.ui.modal :as mo]
             [salava.badge.ui.evidence :as evidence]
             [salava.badge.ui.endorsement :as endorsement]))
@@ -19,12 +19,21 @@

 (defn set-visibility [visibility state]
   (swap! state assoc-in [:badge-settings :visibility] visibility))
+
+(defn init-badges
+  ([state]
+   (ajax/GET
+     (path-for "/obpv1/badge" true)
+     {:handler (fn [data]
+                 (swap! state assoc :badges (filter #(= "accepted" (:status %)) data)
+                        :pending () ;(filter #(= "pending" (:status %)) data)
+                        :initializing false))})))

 (defn delete-badge [state]
   (ajax/DELETE
     (path-for (str "/obpv1/badge/" (:id @state)))
     {:handler  (fn []
-                 (my/init-data state)
+                 (init-badges state)
                  (navigate-to "/badge"))}))

 (defn export-to-pdf [state]


Add stub for isogram exercise

Add stub for isogram exercise

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

--- exercises/isogram/src/isogram.clj
+++ exercises/isogram/src/isogram.clj
@@ -0,0 +1,5 @@
+(ns isogram)
+
+(defn isogram? [] ;; <- arglist goes here
+  ;; your code goes here
+  )


Modified to create parapgraphs with a specified class

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


add some basic authentication tests against a couple /api/org/* endpoints to ensure we are applying authentication middleware.

--- test/metabase/api/org_test.clj
+++ test/metabase/api/org_test.clj
@@ -1,6 +1,8 @@
 (ns metabase.api.org-test
   (:require [expectations :refer :all]
             [metabase.db :refer :all]
+            [metabase.http-client :as http]
+            [metabase.middleware.auth :as auth]
             (metabase.models [org :refer [Org]]
                              [org-perm :refer [OrgPerm]])
             [metabase.test-data :refer :all]
@@ -13,6 +15,14 @@
   {:pre [(string? org-name)]}
   ((user->client :crowberto) :post 200 "org" {:name org-name
                                               :slug org-name}))
+
+;; ## /api/org/* AUTHENTICATION Tests
+;; We assume that all endpoints for a given context are enforced by the same middleware, so we don't run the same
+;; authentication test on every single individual endpoint
+
+(expect (get auth/response-unauthentic :body) (http/client :get 401 "org"))
+(expect (get auth/response-unauthentic :body) (http/client :get 401 (format "org/%d" (:id @test-org))))
+

 ;; # GENERAL ORG ENDPOINTS


tiny test change

tiny test change

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


Consistency

Consistency

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


initial commit of log

initial commit of log

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


collection抽象

collection抽象

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

--- src/learnclojure/chapt3/core2.clj
+++ src/learnclojure/chapt3/core2.clj
@@ -0,0 +1,45 @@
+(ns learnclojure.chapt3.core2)
+;;Collection
+;;clojure所以的数据结构都实现了Collection接口
+;;核心函数：
+;;用conj来添加一个元素到集合
+;;用seq来获取集合的顺序视图
+;;用count来获取集合元素的个数
+;;用empty来获取一个和提供集合类型一样的空集合
+;;用=来判断两个或多个集合是否相等
+
+;;empty不需知道一个集合的具体类型就能创建一个同类型的集合
+;;例子：一个可以交换顺序集合中两个元素位置的函数
+;;interleave返回包含每个集合的第一个元素，第二个元素，第三个元素......的lazy seq
+(defn swap-pairs
+  [sequential]
+  (into (empty sequential)
+        (interleave
+          (take-nth 2 (drop 1 sequential))
+          (take-nth 2 sequential))))
+;;take-nth返回一个包含传入的集合的第0个元素，第n个元素，第2n个元素....的lazy seq
+(take-nth 2 (range 10))
+;;=(0 2 4 6 8)
+;;由于into的多态性和empty，使swap-pairs返回的类型和参数类型一致
+(swap-pairs (range 10))
+(swap-pairs (apply vector (range 10)))
+
+;;empty对map也一样，传入有序的就返回有序的，传入无序的就传回无序的
+;;for是一个列表推导形式，产生一个lazy seq
+(defn map-map
+  [f m]
+  (into (empty m)
+        (for [[k v] m]
+        [k (f v)])))
+(map-map inc (hash-map :a 3 :b 5))
+;={:b 6, :a 4}
+(map-map inc (sorted-map :a 3 :b 5))
+;={:a 4, :b 6}
+
+;;count返回元素个数
+(count '(1 2 4 5))
+(count #{1 2 4 5})
+(count {:a 1 :b 2 :C 4 :d 5})
+(count [1 2 4 5])
+;;count保证所有对于所有集合操作耗时都是高效的，序列除外（因为它的长度可能是未知的）
+


Add lein-ancient plugin.

Add lein-ancient plugin.

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


init workshop

init workshop

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

--- workshop/index.clj
+++ workshop/index.clj
@@ -0,0 +1,110 @@
+(ns workshop.index)
+
+
+"bibliographie :
+- [http://java.ociweb.com/mark/clojure/article.html](http://java.ociweb.com/mark/clojure/article.html)
+- http://www.braveclojure.com/"
+
+
+[[{:private [
+(require 'clojure.walk)
+
+(defmacro exercice [doc exs result]
+  `(every? true? ~(clojure.walk/postwalk #(if (= %1 '__) result %1) exs)))
+]}]]
+
+
+[[:chapter {:tag "intro" :title "Introduction"}]]
+
+
+"Clojure est un langage de programmtion fonctionnel sur la JVM
+ .. lors de cette introduction, nous allons  ... "
+
+
+[[:chapter {:tag "do-thing" :title "Premiers pas"}]]
+
+
+"ref : http://www.braveclojure.com/do-things/"
+
+
+[[:section {:tag "syntax" :title "La syntaxe de Clojure"}]]
+
+"La syntaxe de Clojure est simple. Comme tous les Lisps, il emploie une structure uniforme,
+une poignée d'opérateurs spéciaux , et un approvisionnement constant de parenthèses livrés par
+les mines de parenthèses cachés sous le Massachusetts Institute of Technology, où Lisp est né."
+
+[[:subsection {:title "Les formes"}]]
+
+"
+Tout le code Clojure est écrit dans une structure uniforme. Clojure comprends :
+1. les représentations litérales des structures de données comme les nombres, les strings, les maps et les vecteurs,
+2. les opérations
+"
+
+"On utilise le terme forme pour désigner le code valide structurellement. Les représentations suivantes sont des formes valides :"
+
+(comment
+  1
+  "a string"
+  ["a" "b" "c"])
+
+
+(exercice
+ "veuillez entrer une forme valide"
+ [(= __ __)]
+ 'yolo)
+
+
+
+"Votre code contiendra rarement des formes littérales flottantes,
+car ils ne font rien de leur propre chef. Au lieu de cela,
+vous allez utiliser des littéraux dans les opérations.
+Les opérations sont la façon dont vous faites les choses.
+Toutes les opérations prennent la forme, \"parenthèse ouvrante ,
+opérateur, opérandes, parenthèse fermante\" :"
+
+(comment (operator operand1 operand2 ... operandn))
+
+
+"En comparaison, voici le code Java équivalent :"
+
+
+[[{:lang "Java"}]]
+[[:code "operator(operand1,operand2, ... , operandn);"]]
+
+
+[[{:private [
+   (defmacro contains-op? [form] (if (list? form) true false))
+]}]]
+
+(exercice
+ "Veuillez entrer une forme qui contient un opérateur et qui évalue vers `2`."
+ [(= __ 2)
+  (contains-op? __)]
+ (+ 1 1))
+
+
+
+
+(exercice
+ "this exercice is an introduction to ...."
+ [(= __ true)]
+ true)
+
+
+(exercice
+ "another equality"
+ [(= __ (+ 1 1))]
+ 2)
+
+
+(exercice
+ "You can test equality of many things"
+ [(= (+ 3 4) 7 (+ 2 __))]
+ 5)
+
+
+(exercice
+ "Simple math"
+ [(= (- 10 (* 2 3)) __)]
+ 4)


Copied csv-to-map from analyze-data, if needed in a third place will pull out into separate project.

error: pathspec 'project/get-data/src/get_data/csv_to_map.clj' did not match any file(s) known to git

--- project/get-data/src/get_data/csv_to_map.clj
+++ project/get-data/src/get_data/csv_to_map.clj
@@ -0,0 +1,13 @@
+; Taken from analyze-data.csv-to-map
+; if duplicated again, pull out into its own project
+(ns get-data.csv-to-map
+  (:require [clojure.data.csv :as csv]))
+
+(defn csv-to-map
+  "Given an io/reader of a csv file, return a lazy sequence of maps from csv
+  header to data."
+  [reader]
+  (let [csv-file (csv/read-csv reader)
+        header-row (first csv-file)
+        data (rest csv-file)]
+    (map (partial zipmap header-row) data)))


Add navigation between tabs

Add navigation between tabs

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


update active subscriptions tab, and make orders and subscriptions DRY

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


provide default value for none-provided

provide default value for none-provided


added sstr function

added sstr function


bidali/aldatu json jaso eta keyword-etara pasa

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


Super simple UI only showing the DB

Super simple UI only showing the DB

error: pathspec 'src/cljs/junto_labs/learn_specter/views.cljs' did not match any file(s) known to git

--- src/cljs/junto_labs/learn_specter/views.cljs
+++ src/cljs/junto_labs/learn_specter/views.cljs
@@ -0,0 +1,11 @@
+(ns junto-labs.learn-specter.views
+  (:require [re-frame.core :as re
+              :refer [subscribe dispatch]]
+            [reagent.core  :as rx]))
+
+(defn root []
+  [:div
+      [:div "Hello!"]
+      [:div [:div "Database is this:"]
+            [:div (pr-str @(subscribe [:db]))]]])
+


feat(handler): use response-headers from core

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


fix namespace used

fix namespace used


netlib backend is passing some minimal 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/thinktopic/netlib-ccm.git/'


add teller to reassign

add teller to reassign


slurp from resources

slurp from resources

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


throw the read errors

throw the read errors

--- sidecar/src/figwheel_sidecar/config.clj
+++ sidecar/src/figwheel_sidecar/config.clj
@@ -336,15 +336,8 @@

 (defn read-edn-file [file-name]
   (let [file (io/file file-name)]
-    (when-let [body (and (.exists file)
-                         (slurp file))]
-      (try
-        (read-string body)
-        (catch Throwable e
-          (println
-           (str "Failed to read file " (pr-str (str file))
-                " : "
-                (.getMessage ^Exception e))))))))
+    (when-let [body (slurp file)]
+      (read-string body))))

 (def get-project-config lm/read-raw-project)

@@ -545,6 +538,13 @@
   ([] (->figwheel-config-source nil "figwheel.edn"))
   ([data] (->figwheel-config-source data nil))
   ([data file] (->FigwheelConfigSource data file)))
+
+(comment
+  (->config-data (->lein-project-config-source))
+  (->config-data (->figwheel-config-source nil "/Users/bhauman/workspace/lein-figwheel/example/figwheel.edn"))
+
+  )
+

 (defn ->lein-project-config-source
   ([] (->lein-project-config-source nil))


Don't need the observable on Server make


seed with source set to default for orders


Fixed skipped keys in controlled components on IE (#127)

--- src/sablono/interpreter.cljc
+++ src/sablono/interpreter.cljc
@@ -19,29 +19,41 @@
         :getInitialState
         (fn []
           (this-as this
-            #js {:value (aget (.-props this) "value")}))
+            #js {"state_value" (aget (.-props this) "value")}))
         :onChange
         (fn [e]
           (this-as this
             (let [handler (aget (.-props this) "onChange")]
               (when-not (nil? handler)
                 (handler e)
-                (.setState this #js {:value (.. e -target -value)})))))
+                (.setState this #js {"state_value" (.. e -target -value)})))))
         :componentWillReceiveProps
         (fn [new-props]
           (this-as this
-            (.setState this #js {:value (aget new-props "value")})))
+            (let [state-value   (aget (.-state this) "state_value")
+                  element       (js/ReactDOM.findDOMNode this)
+                  element-value (.-value element)]
+              ;; on IE, onChange event might come after actual value of an element
+              ;; have changed. We detect this and render element as-is, hoping that
+              ;; next onChange will eventually come and bring our modifications anyways.
+              ;; Ignoring this causes skipped letters in controlled components
+              ;; https://github.com/reagent-project/reagent/issues/253
+              ;; https://github.com/tonsky/rum/issues/86
+              (if (not= state-value element-value)
+                (.setState this #js {"state_value" element-value})
+                (.setState this #js {"state_value" (aget new-props "value")})))))
         :render
         (fn []
           (this-as this
             ;; NOTE: if switch to macro we remove a closure allocation
-            (let [props #js {}]
+            (let [element-props #js {}]
               (gobject/extend
-                  props (.-props this)
-                  #js {:value (or (aget (.-state this) "value") js/undefined)
-                       :onChange (aget this "onChange")
-                       :children (aget (.-props this) "children")})
-              (js/React.createElement element props))))})))
+                element-props
+                (.-props this)
+                #js {:value    (or (aget (.-state this) "state_value") js/undefined)
+                     :onChange (aget this "onChange")
+                     :children (aget (.-props this) "children")})
+              (js/React.createElement element element-props))))})))

 #?(:cljs (def wrapped-input (wrap-form-element "input")))
 #?(:cljs (def wrapped-select (wrap-form-element "select")))


Add a stub test for delay

Add a stub test for delay

See #13.

error: pathspec 'test/icecap/handlers/delay_test.clj' did not match any file(s) known to git

--- test/icecap/handlers/delay_test.clj
+++ test/icecap/handlers/delay_test.clj
@@ -0,0 +1,3 @@
+(ns icecap.handlers.delay-test
+  (:require [icecap.handlers.delay :refer :all]
+            [clojure.test :refer :all]))


added open file command utility

added open file command utility

--- src/spekl_package_manager/util.clj
+++ src/spekl_package_manager/util.clj
@@ -59,3 +59,11 @@
     ))

+(defn get-open-command [file]
+  (let [platform (get-my-platform)]
+    (case platform
+      "windows" (list "cmd" "/c" "start" file)
+      "linux"   (list "xdg-open" file)
+      "osx"     (list "open" file)
+      nil
+      )))


substA

substA

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/carolove/clojure-ring-app.git/'


unit tests for api to check that PUT /api/org/:id returns 403 is user doesn't have perms to update org OR a 404 if org doesn't exist.

--- test/metabase/api/org_test.clj
+++ test/metabase/api/org_test.clj
@@ -155,6 +155,16 @@
                                                             :logo_url upd-name
                                                             :inherits true}))

+;; Check that non-superusers can't modify orgs they don't have permissions to
+(expect "You don't have permissions to do that."
+  (let [org-name (random-name)
+        my-org (create-org org-name)]
+    ((user->client :rasta) :put 403 (format "org/%d" (:id my-org)) {})))
+
+;; Test that invalid org id returns 404
+(expect "Not found."
+  ((user->client :rasta) :put 404 "org/1000" {}))
+

 ;; # MEMBERS ENDPOINTS


atomize sum-over-time

atomize sum-over-time

--- src/riemann/streams.clj
+++ src/riemann/streams.clj
@@ -854,11 +854,10 @@
   stream is called, but with summed metric."
   [& children]
   (deprecated "Use streams/counter"
-              (let [sum (ref 0)]
+              (let [sum (atom 0)]
                 (fn stream [event]
-                  (let [s (dosync
-                            (when-let [m (:metric event)]
-                              (commute sum + (:metric event))))
+                  (let [s (when-let [m (:metric event)]
+                            (swap! sum + (:metric event)))
                         event (assoc event :metric s)]
                     (call-rescue event children))))))


[WM] Add debug log message on msg receive

Even though these messages are empty mags, this is still helpful for
debugging purposes (e.g. what time we received the message vs. the response).

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


Added stub for the test-db-spec module

Added stub for the test-db-spec module

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

--- test/clouseau/test_db_spec.clj
+++ test/clouseau/test_db_spec.clj
@@ -0,0 +1,43 @@
+;;;
+;;;   Clouseau
+;;;
+;;;    Copyright (C) 2015 Pavel Tisnovsky <ptisnovs@redhat.com>
+;;;
+;;; Clouseau is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 2, or (at your option)
+;;; any later version.
+;;;
+;;; Clouseau is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with Clouseau; see the file COPYING.  If not, write to the
+;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+;;; 02110-1301 USA.
+;;;
+;;; Linking this library statically or dynamically with other modules is
+;;; making a combined work based on this library.  Thus, the terms and
+;;; conditions of the GNU General Public License cover the whole
+;;; combination.
+;;;
+;;; As a special exception, the copyright holders of this library give you
+;;; permission to link this library with independent modules to produce an
+;;; executable, regardless of the license terms of these independent
+;;; modules, and to copy and distribute the resulting executable under
+;;; terms of your choice, provided that you also meet, for each linked
+;;; independent module, the terms and conditions of the license of that
+;;; module.  An independent module is a module which is not derived from
+;;; or based on this library.  If you modify this library, you may extend
+;;; this exception to your version of the library, but you are not
+;;; obligated to do so. If you do not wish to do so, delete this
+;;; exception statement from your version.
+;;;
+
+(ns clouseau.test-core
+  (:require [clojure.test :refer :all]
+            [clouseau.db-spec :refer :all]))
+
+


unit tests to validate that we get a 404 when trying to retrieve org by id/slug that doesn't exist.

--- test/metabase/api/org_test.clj
+++ test/metabase/api/org_test.clj
@@ -112,6 +112,9 @@
         my-org (create-org org-name)]
     ((user->client :rasta) :get 403 (format "org/%d" (:id my-org)))))

+;; Test that invalid org id returns 404
+(expect "Not found."
+  ((user->client :rasta) :get 404 "org/1000"))

 ;; ## GET /api/org/slug/:slug
 (expect
@@ -128,6 +131,10 @@
   (let [org-name (random-name)
         my-org (create-org org-name)]
     ((user->client :rasta) :get 403 (format "org/slug/%s" (:slug my-org)))))
+
+;; Test that invalid org slug returns 404
+(expect "Not found."
+  ((user->client :rasta) :get 404 "org/slug/ksdlfkjdkfd"))

 ;; # MEMBERS ENDPOINTS


Teach synthdef-write to resolve tilde paths

--- src/overtone/sc/machinery/synthdef.clj
+++ src/overtone/sc/machinery/synthdef.clj
@@ -153,7 +153,8 @@
   "Write a synth definition to a new file at the given path, which includes
   the name of the file itself.  (e.g. /home/rosejn/synths/bass.scsyndef)"
   [sdef path]
-  (spec-write-file synthdef-file-spec (synthdef-file sdef) path))
+  (let [path (resolve-tilde-path path)]
+    (spec-write-file synthdef-file-spec (synthdef-file sdef) path)))

 (defn synthdef-bytes
   "Produces a serialized representation of the synth definition understood
@@ -255,14 +256,14 @@
   "Create a ugen form."
   [ug]
   (let [uname (real-ugen-name ug)
-        ugen (get-ugen uname)
+        ugen  (get-ugen uname)
         uname (if (and
-                    (zero? (:special ug))
-                    (not= (:rate-name ug) (:default-rate ugen)))
+                   (zero? (:special ug))
+                   (not= (:rate-name ug) (:default-rate ugen)))
                 (str uname (:rate-name ug))
                 uname)
         uname (symbol uname)]
-  (apply list uname (:inputs ug))))
+    (apply list uname (:inputs ug))))

 (defn- ugen-constant-inputs
   "Replace constant ugen inputs with the constant values."
@@ -320,4 +321,3 @@
       (doseq [[uname uform] (drop 1 ugen-forms)]
         (println "       " uname uform))
       (println (str "       ]\n   " (first (last ugen-forms)) ")"))))
-


Add missing linter configuration.

Add missing linter configuration.

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


fixed state updating bug (type confusion)

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/talexand/kittens-gallery.git/'


More fault tolerance.

More fault tolerance.

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


Bit of a reminder of previous thinking

Bit of a reminder of previous thinking

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 implementation for graph/create-vertex

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


add execute, get-more-results and delete-cursor methods to query namespace; implement get-more-results and delete-cursor (untested)


Indexed接口

Indexed接口

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

--- src/learnclojure/chapt3/core5.clj
+++ src/learnclojure/chapt3/core5.clj
@@ -0,0 +1,19 @@
+(ns learnclojure.chapt3.core5)
+;;Indexed接口
+;;到目前为止，我们一直回避讨论怎么直接获取vector的第n个值，或者直接修改vector的第n个值
+;;原因是下标是新的指针
+;;顺序集合的下标对于实现算法很少是必须的，在很多情况下，代码涉及到了下标说明代码过于复杂了
+;;如果实在要用到下标，那么Indexed这个接口提供了操作下标的函数
+;;它只有一个函数，nth，它和get类似，不同之处是对越界下标的处理
+(nth [:a :b :c] 2)
+(get [:a :b :c] 2)
+;;nth在越界的时候会报IndexOutOfBoundsException
+(nth [:a :b :c] 3)
+;;get返回nil，不报错
+(get [:a :b :c] 3)
+
+;;nth和get的意义是很不一样的。首先，nth只能接受数字作为查询的key.它可以作用于很多有下标概念的值。
+;;比如vector、列表。序列、java数组、java列表、字符串、正则表达式的匹配数组等
+;;get则更通用，它可以操作任何关系型的值。
+;;它们另一个区别是，get对错误更容忍，当你传给它一个不支持的数据类型，它也返回nil而不是抛出异常
+(get 42 0)


Add has-campus-addresses bool to partners

This will allow turbovote-web to skip lots of unnecessary API calls which would otherwise happen on the initial page load (i.e. everyone; hard to scale).

This will also allow us to unfork the netlify netlify-prod branches of turbovote-web and get every site on Netlify on the master branch of turbovote-web.


Language tweak for some negative cases

Language tweak for some negative cases

--- spec/freefrog/governance_roles_spec.clj
+++ spec/freefrog/governance_roles_spec.clj
@@ -60,7 +60,7 @@
     (should-not-update-missing-or-empty-roles add-fn
       (str "adding a " type-str) val1)

-    (it (str "refuses to add the same " type-str " twice")
+    (it (str "won't add the same " type-str " twice")
       (should-throw IllegalArgumentException
         (format "%s '%s' already exists on role '%s'" type-str val1 role-name)
         (add-fn coll1 role-name val1)))
@@ -71,7 +71,7 @@
     (it (str "removes the " type-str "s array when there are none left")
       (should= sample-anchor-with-role (remove-fn coll1 role-name val1)))

-    (it (str "refuses to remove a " type-str " that doesn't exist")
+    (it (str "won't remove a " type-str " that doesn't exist")
       (should-throw IllegalArgumentException
         (format "%s '%s' doesn't exist on role '%s'" type-str val2 role-name)
         (remove-fn coll1 role-name val2)))


moved clojure to /src/clojure

moved clojure to /src/clojure

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

--- src/clojure/compose/compose.cljs
+++ src/clojure/compose/compose.cljs
@@ -0,0 +1,14 @@
+(ns compose.compose)
+
+(enable-console-print!)
+
+(defn process-v1 [compose] {:version "2", :services compose})
+
+(defn process-v2 [compose] compose)
+
+(defn process-compose [compose]
+  (if-not (:version compose)
+    (process-v1 compose)
+    (process-v2 compose)))
+
+(defn ^:export mapv2 [x] (clj->js (process-compose (js->clj x :keywordize-keys true))))


Adding button functioning

Adding button functioning


attempt to fix cors

attempt to fix cors

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


a couple functions in a clojure script

a couple functions in a clojure script

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

--- scratch/clojure-scratch/simple_functions.clj
+++ scratch/clojure-scratch/simple_functions.clj
@@ -0,0 +1,33 @@
+;; to run: $ clojure simple_functions.clj
+
+(def start-script (fn [] "Staring Clojure script"))
+(println (start-script))
+
+(defn add [a b]
+      (+ a b))
+
+(defn abs [x]
+ (if (< x 0)
+  (- x)
+  x))
+
+
+(defn factorial [n]
+  (reduce * (range 1 (inc n))))
+
+(println "factorial" (factorial 4))
+
+
+;(println (+ 4 (add 1 2)))
+
+(defn fib-seq [a]
+ (reduce + (range 1 (inc a))))
+
+;fib-seq (- a 1)))
+;   (+ a (fib-seq (- a 1)))))
+
+(println "Fibonacci" (fib-seq 4))
+
+
+;(println (abs -1))
+;(println (abs (+ 4 3)))


more notes re: ejector idea

more notes re: ejector idea

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


Basic keyboard input event handling

Basic keyboard input event handling

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

--- src/cljs/engine/input.cljs
+++ src/cljs/engine/input.cljs
@@ -0,0 +1,50 @@
+(ns chocolatier.engine.input
+  "Handles input from the user"
+  (:use [chocolatier.utils.logging :only [debug info warn error]])
+  ;;(:require-macros [chocolatier.utils.macros :refer [defonce]])
+  )
+
+
+;; TODO use fan out channel to stream the input to multiple sources
+;; Tracks the current state of user input
+(def input-state (atom {}))
+
+(defn debug-watcher [key state old-val new-val]
+  (when (not= old-val new-val)
+    (debug "State changed" key old-val "->" new-val )))
+
+(defn keydown [e]
+  (let [key (String.fromCharCode (aget e "keyCode"))]
+    (swap! input-state assoc (keyword key) "on")
+    (debug "Keydown:" e)))
+
+(defn keyup [e]
+  (let [key (String.fromCharCode (aget e "keyCode"))]
+    (swap! input-state assoc (keyword key) "off")
+    (debug "Keyup:" e)))
+
+(defn init-keyboard!
+  "Adds event listener to keyboard events. Assoc's a removal function to
+   the input-state"
+  []
+  (.addEventListener js/document "keydown" keydown)
+  (swap! input-state
+         assoc
+         :keydown
+         #(.removeEventListener js/document "keydown" keydown))
+  (.addEventListener js/document "keyup" keyup)
+  (swap! input-state
+         assoc
+         :keyup
+         #(.removeEventListener js/document "keyup" keyup)))
+
+(defn start-keyboard! []
+  (init-keyboard!)
+  (add-watch input-state :input-debug debug-watcher))
+
+(defn reset-keyboard! []
+  (doseq [k [:keydown :keyup]]
+    (let [f (k @input-state)]
+      (f)))
+  (remove-watch input-state :input-debug)
+  (start-keyboard!))


Added logging

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


Ammended todo

Ammended todo

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


no comment

no comment

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

--- src/data_obtainer/time.clj
+++ src/data_obtainer/time.clj
@@ -0,0 +1,13 @@
+; REPL working code for time obtaining and formatting while preserving the timezone as UTC (as opposed to an integer of millies since the epoc).
+; This is as opposed to using clojure str just invokes .ToString methods that allways convert to local time.
+; The format string enables flexibility in choosing the format
+; (applying the clojure str translation to the date-formatter object, will NOT change the string held in it, and is 'safe' to use)
+
+;default formatting translates to the local timezone (presumably as known from the OS)
+(let [date-formatter (java.text.SimpleDateFormat. "dd MM yyyy HH:mm:ss.S zzz")]
+     (let [now (java.util.Date.)] (println (.format date-formatter (.getTime now)))))
+
+;setting the timezone to UTC avoids local time translation
+(let [date-formatter (java.text.SimpleDateFormat. "dd MM yyyy HH:mm:ss.S zzz") ]
+     (.setTimeZone date-formatter (java.util.TimeZone/getTimeZone "UTC"))
+		(let [now (java.util.Date.)] (println (.format date-formatter (.getTime now)))))


Refactor, and listen on multiple topics.

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


Felling pretty good about the Schema.

Felling pretty good about the Schema.

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


Add validation specifications

Add validation specifications

error: pathspec 'test/cljs38/validation_test.cljs' did not match any file(s) known to git

--- test/cljs38/validation_test.cljs
+++ test/cljs38/validation_test.cljs
@@ -0,0 +1,73 @@
+(ns cljs38.validation_test
+  (:require-macros [cemerick.cljs.test :refer (is deftest)])
+  (:require [cemerick.cljs.test :as test]
+            [cljs38.validation :as validation]))
+
+;; Test sum function
+
+(deftest sum-10
+  (is (= 10 (validation/sum (list 1 2 3 4)))))
+
+(deftest sum-38
+  (is (= 38 (validation/sum (list 15 10 3 4 6)))))
+
+
+;; Test sum validation
+
+(deftest sum-to-with-4
+  (is (= true (validation/sum-to? 10 (list 1 2 3 4)))))
+
+(deftest sum-to-with-5
+  (is (= true (validation/sum-to? 38 (list 28 1 2 3 4)))))
+
+(deftest not-sum-to-with-4
+  (is (= false (validation/sum-to? 10 (list 1 2 3 5)))))
+
+(deftest not-sum-to-with-5
+  (is (= false (validation/sum-to? 20 (list 28 1 2 3 4)))))
+
+
+;; Test data
+
+(def test-board (list 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
+
+;; Test extract row
+(deftest extract-row
+  (is (= (list 1 3 5)
+         (validation/get-row
+            test-board
+            (list 0 2 4)))))
+
+
+;; Test is valid row
+
+(deftest valid-row-1
+  (is (= true (validation/is-valid-row?
+                38
+                test-board
+                (list 14 13 8)))))
+
+(deftest invalid-row-1
+  (is (= false (validation/is-valid-row?
+                38
+                test-board
+                (list 14 13 7)))))
+
+
+;; Test won game
+
+(deftest won-game
+  (is (= true (validation/won-game?
+                38
+                test-board
+                (list
+                  (list 14 13 8)
+                  (list 14 12 9))))))
+
+(deftest no-twon-game
+  (is (= false (validation/won-game?
+                38
+                test-board
+                (list
+                  (list 14 13 8)
+                  (list 14 12 8))))))


add figwheel repl

add figwheel repl

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

--- sidecar/src/figwheel_sidecar/repl.clj
+++ sidecar/src/figwheel_sidecar/repl.clj
@@ -0,0 +1,52 @@
+(ns figwheel-sidecar.repl
+  (:require
+   [cljs.repl]
+   [cljs.util :refer [debug-prn]]
+   [cljs.env :as env]
+   [clojure.core.async :refer [chan <!! <! put! timeout close! go go-loop]]
+   [figwheel-sidecar.core :as fig]))
+
+(defn eval-js [{:keys [browser-callbacks] :as figwheel-server} js]
+  (let [callback-name (str (gensym "repl_eval_"))
+        out (chan)
+        callback (fn [result]
+                   (swap! browser-callbacks dissoc callback-name)
+                   (put! out result)
+                   (go
+                     (<! (timeout 2000))
+                     (close! out)))]
+    (swap! browser-callbacks assoc callback-name callback)
+    (fig/send-message! figwheel-server :repl-eval {:code js :callback-name callback-name})
+    (<!! out)))
+
+(defn load-javascript [figwheel-server ns url]
+  (fig/send-message! figwheel-server :repl-load-js {:ns ns :url url}))
+
+;; limit how long we wait?
+(defn wait-for-connection [{:keys [connection-count]}]
+  (when (< @connection-count 1)
+    (<!! (go-loop []
+           (when (< @connection-count 1)
+             (timeout 500)
+             (recur))))))
+
+(defrecord FigwheelEnv [figwheel-server]
+  cljs.repl/IJavaScriptEnv
+  (-setup [this opts]
+    (wait-for-connection figwheel-server))
+  (-evaluate [_ _ _ js]
+    (wait-for-connection figwheel-server)
+    (eval-js figwheel-server js))
+  (-load [this ns url]
+    (wait-for-connection figwheel-server)
+    (load-javascript figwheel-server ns url))
+  (-tear-down [_] true))
+
+(defn repl-env [figwheel-server]
+  (FigwheelEnv. figwheel-server))
+
+(defn repl [build figwheel-server]
+  (cljs.env/with-compiler-env (:compiler-env build)
+    (cljs.repl/repl* (repl-env figwheel-server)
+                     (assoc (or (:compiler build) (:build-options build))
+                            :warn-on-undeclared false))))


chore(core): update core to 2.5.1

chore(core): update core to 2.5.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/B2W-Digital/pdg-core.git/'


also removed localrepo plugin

also removed localrepo plugin


Update compojure and ring-swagger-ui deps

fatal: unable to access 'https://github.com/physion/ovation-webapi.git/': The requested URL returned error: 403


Version 101

Version 101

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 142

Version 142


Version 135

Version 135


global-vars for dev profile in project.clj


bump version to 2.8.20

bump version to 2.8.20

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


project version revert

project version revert

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


Update fresh dependency to exclude hidden files

Fixes #15

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


a basic working nattable - now need to add sorting and blinking

error: pathspec 'dada-swt/src/main/clojure/org/dada/swt/nattable.clj' did not match any file(s) known to git

--- dada-swt/src/main/clojure/org/dada/swt/nattable.clj
+++ dada-swt/src/main/clojure/org/dada/swt/nattable.clj
@@ -0,0 +1,117 @@
+(ns
+ org.dada.swt.nattable
+ (:import
+  [java.util ArrayList]
+  [org.eclipse.swt SWT]
+  [org.eclipse.swt.layout GridData GridLayout]
+  [org.eclipse.swt.widgets Display Shell]
+  [net.sourceforge.nattable NatTable]
+  [net.sourceforge.nattable.data ListDataProvider IColumnPropertyAccessor]
+  [net.sourceforge.nattable.grid.data DefaultColumnHeaderDataProvider DefaultCornerDataProvider DefaultRowHeaderDataProvider]
+  [net.sourceforge.nattable.grid.layer ColumnHeaderLayer CornerLayer GridLayer RowHeaderLayer]
+  [net.sourceforge.nattable.layer AbstractLayerTransform DataLayer]
+  [net.sourceforge.nattable.reorder ColumnReorderLayer]
+  [net.sourceforge.nattable.hideshow ColumnHideShowLayer]
+  [net.sourceforge.nattable.selection SelectionLayer]
+  [net.sourceforge.nattable.viewport ViewportLayer]
+  ))
+
+
+(def parent (Shell. (Display.)))
+(.setLayout parent (GridLayout.))
+
+;;--------------------------------------------------------------------------------
+
+;; see http://nattable.org/drupal/docs/basicgrid
+
+;;--------------------------------------------------------------------------------
+;; Plugging data
+
+(def data (ArrayList. [[0 "jules" 1967][1 "jane" 1969][2 "anthony" 2001][3 "alexandra" 2005]]))
+(def property-names (into-array String ["id" "name" "birthDate"]))
+
+;;--------------------------------------------------------------------------------
+
+(def property-name-to-index (apply array-map (interleave property-names (iterate inc 0))))
+(def property-name-to-label (apply array-map (interleave property-names property-names)))
+
+(def property-accessor
+     (proxy
+      [IColumnPropertyAccessor]
+      []
+      ;; IColumnAccessor<T>
+      (#^Object getDataValue [#^Collection rowObject #^int columnIndex] (nth rowObject columnIndex))
+      (#^int getColumnCount [] (count property-names))
+      ;; public void setDataValue(T rowObject, int columnIndex, Object newValue);
+
+      ;;IColumnPropertyResolver
+
+      (#^String getColumnProperty [int columnIndex] (nth property-names columnIndex))
+      (#^int getColumnIndex [#^String propertyName] (property-name-to-index "b"))
+      ))
+
+(def data-provider (ListDataProvider. data property-accessor))
+
+;;--------------------------------------------------------------------------------
+;; Setting up the body region
+
+(def body-data-layer (DataLayer. data-provider))
+
+(def column-reorder-layer (ColumnReorderLayer. body-data-layer))
+
+(def column-hide-show-layer (ColumnHideShowLayer. column-reorder-layer))
+
+(def selection-layer (SelectionLayer. column-hide-show-layer))
+
+(def viewport-layer (ViewportLayer. selection-layer))
+
+(def body-layer-stack (proxy [AbstractLayerTransform] []))
+(.setUnderlyingLayer body-layer-stack viewport-layer)
+
+;;--------------------------------------------------------------------------------
+;; Setting up the column header region
+
+(def column-header-data-provider (DefaultColumnHeaderDataProvider. property-names property-name-to-label))
+(def column-header-layer-stack (proxy [AbstractLayerTransform] []))
+(def column-header-data-layer (DataLayer. column-header-data-provider))
+(def column-header-layer (ColumnHeaderLayer. column-header-data-layer body-layer-stack selection-layer))
+(.setUnderlyingLayer column-header-layer-stack column-header-layer)
+
+;;--------------------------------------------------------------------------------
+;; Setting up the row header layer
+
+(def row-header-data-provider (DefaultRowHeaderDataProvider. data-provider))
+(def row-header-layer-stack (proxy [AbstractLayerTransform] []))
+(def row-header-data-layer (DataLayer. row-header-data-provider 50 20))
+(def row-header-layer (RowHeaderLayer. row-header-data-layer body-layer-stack selection-layer))
+(.setUnderlyingLayer row-header-layer-stack row-header-layer)
+
+;;--------------------------------------------------------------------------------
+;; Setting up the corner layer
+
+
+(def corner-data-provider (DefaultCornerDataProvider. column-header-data-provider row-header-data-provider))
+(def corner-layer (CornerLayer. (DataLayer. corner-data-provider) row-header-layer column-header-layer))
+
+;;--------------------------------------------------------------------------------
+;; Drum roll ...
+
+(def grid-layer (GridLayer. body-layer-stack column-header-layer-stack row-header-layer-stack corner-layer))
+;; define parent...
+(def nat-table (NatTable. parent grid-layer))
+
+(.setLayoutData nat-table (GridData. (SWT/FILL) (SWT/FILL) true true))
+(.pack nat-table)
+(.pack parent)
+(.open parent)
+
+(defn swt-loop [#^Display display #^Shell shell]
+  (loop []
+    (if (.isDisposed shell)
+      (.dispose display)
+      (do
+	(if (not (.readAndDispatch display))
+	  (.sleep display))
+	(recur)))))
+
+(swt-loop (.getDisplay parent)  parent)


Refactors out spec generation code

Refactors out spec generation code

error: pathspec 'test/expound/spec_gen.cljc' did not match any file(s) known to git

--- test/expound/spec_gen.cljc
+++ test/expound/spec_gen.cljc
@@ -0,0 +1,101 @@
+(ns expound.spec-gen
+  (:require [clojure.spec.alpha :as s]
+            [com.stuartsierra.dependency :as deps]
+            [clojure.test.check.generators :as gen]
+            [expound.alpha :as expound])
+  )
+
+;; I want to do something like
+;; (s/def :specs.coll-of/into #{[] '() #{}})
+;; but Clojure (not Clojurescript) won't allow
+;; this. As a workaround, I'll just use vectors instead
+;; of vectors and lists.
+;; FIXME - force a specific type of into/kind one for each test
+;; (one for vectors, one for lists, etc)
+(s/def :specs.coll-of/into #{[] #{}})
+(s/def :specs.coll-of/kind #{vector? list? set?})
+(s/def :specs.coll-of/count pos-int?)
+(s/def :specs.coll-of/max-count pos-int?)
+(s/def :specs.coll-of/min-count pos-int?)
+(s/def :specs.coll-of/distinct boolean?)
+
+(s/def :specs/every-args
+  (s/keys :req-un
+          [:specs.coll-of/into
+           :specs.coll-of/kind
+           :specs.coll-of/count
+           :specs.coll-of/max-count
+           :specs.coll-of/min-count
+           :specs.coll-of/distinct]))
+
+(defn apply-coll-of [spec {:keys [into max-count min-count distinct]}]
+  (s/coll-of spec :into into :min-count min-count :max-count max-count :distinct distinct))
+
+(defn apply-map-of [spec1 spec2 {:keys [into max-count min-count distinct _gen-max]}]
+  (s/map-of spec1 spec2 :into into :min-count min-count :max-count max-count :distinct distinct))
+
+;; Since CLJS prints out entire source of a function when
+;; it pretty-prints a failure, the output becomes much nicer if
+;; we wrap each function in a simple spec
+(expound/def :specs/string string? "should be a string")
+(expound/def :specs/vector vector? "should be a vector")
+(s/def :specs/int int?)
+(s/def :specs/boolean boolean?)
+(expound/def :specs/keyword keyword? "should be a keyword")
+(s/def :specs/map map?)
+(s/def :specs/symbol symbol?)
+(s/def :specs/pos-int pos-int?)
+(s/def :specs/neg-int neg-int?)
+(s/def :specs/zero #(and (number? %) (zero? %)))
+(s/def :specs/keys (s/keys
+                    :req-un [:specs/string]
+                    :req [:specs/map]
+                    :opt-un [:specs/vector]
+                    :opt [:specs/int]))
+
+(def simple-spec-gen (gen/one-of
+                      [(gen/elements [:specs/string
+                                      :specs/vector
+                                      :specs/int
+                                      :specs/boolean
+                                      :specs/keyword
+                                      :specs/map
+                                      :specs/symbol
+                                      :specs/pos-int
+                                      :specs/neg-int
+                                      :specs/zero
+                                      :specs/keys])
+                       (gen/set gen/simple-type-printable)]))
+
+(defn spec-dependencies [spec]
+  (->> spec
+       s/form
+       (tree-seq coll? seq)
+       (filter #(and (s/get-spec %) (not= spec %)))
+       distinct))
+
+(defn topo-sort [specs]
+  (deps/topo-sort
+   (reduce
+    (fn [gr spec]
+      (reduce
+       (fn [g d]
+         ;; If this creates a circular reference, then
+         ;; just skip it.
+         (if (deps/depends? g d spec)
+           g
+           (deps/depend g spec d)))
+       gr
+       (spec-dependencies spec)))
+    (deps/graph)
+    specs)))
+
+
+
+#?(:clj
+   (def spec-gen (gen/elements (->> (s/registry)
+                                    (map key)
+                                    topo-sort
+                                    (filter keyword?)))))
+
+


Moved code near other code like it.

Moved code near other code like 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/couragelabs/coachbot.git/'


parallel log reads

parallel log reads

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/JetBrains/imperative-nodejs.git/'


lein-release plugin: preparing 0.2.7 release

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


Update tomcat stack

Update tomcat stack


Fix bad lib ref

Fix bad lib ref

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


Version 0.5.4-SNAPSHOT

Version 0.5.4-SNAPSHOT

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


bump to 0.5.4-SNAPSHOT

bump to 0.5.4-SNAPSHOT

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


Version 0.3.5-SNAPSHOT

Version 0.3.5-SNAPSHOT


Make clj-time a top-level dependency

Make clj-time a top-level dependency

It was moved to a dev dependency to work around pedantic, but that
prevents building an uberjar since the app depends on it at run time.


Install postgress driver for ci

Install postgress driver for ci

fatal: unable to access 'https://github.com/amedw/mud-server.git/': The requested URL returned error: 403


Version 26

Version 26

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "26-SNAPSHOT"
+(defproject clojars-web "26"
   :min-lein-version "2.0.0"
   :dependencies [[org.clojure/clojure "1.7.0"]
                  [org.clojure/tools.cli "0.2.1"]


school/add completed.

school/add completed.

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

--- clojure/grade-school/school.clj
+++ clojure/grade-school/school.clj
@@ -0,0 +1,5 @@
+(ns school)
+
+(defn add
+  [db name grade]
+  (merge-with concat db {grade [name]}))


Add fireflies sketch

Add fireflies sketch

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

--- spectacles/src/spectacles/fireflies.clj
+++ spectacles/src/spectacles/fireflies.clj
@@ -0,0 +1,95 @@
+(ns spectacals.fireflies
+  (:require [quil.core :as q]
+            [quil.middleware :as m]))
+
+
+(defn generate_fireflies
+  [count]
+
+  {:fireflies (into [] (repeatedly count (fn [] [(q/random 600) (q/random 600)])))
+   :velocity (into [] (repeatedly count (fn [] '[1 1])))
+   :acceleration (into [] (repeatedly count (fn [] '[1 1])))
+   :on (into [] (repeatedly count (fn [] true)))})
+
+(defn setup []
+  (q/smooth)
+  (q/frame-rate 30)
+  (generate_fireflies 25)
+  )
+
+(defn draw-firefly
+  [[[x y] on]]
+
+  (if on
+    (do
+      (q/fill 0 255 0 128)
+      (q/ellipse x y 25 25)
+      (q/fill 100 255 100 128)
+      (q/ellipse x y 15 15)
+      (q/fill 200 255 200 128)
+      (q/ellipse x y 10 10)
+      (q/fill 255 255 255 128)
+      (q/ellipse x y 5 5))
+    (do
+      (q/fill 0 32 0 128)
+      (q/ellipse x y 20 20))))
+
+(defn draw-state [state]
+  (q/background 0)
+  (q/no-stroke)
+
+  (doseq [firefly (map vector (:fireflies state) (:on state))]
+    (draw-firefly firefly)))
+
+(defn update-acceleration
+  [[x y] [ax ay]]
+
+  [(* 0.0005 (- (q/mouse-x) x))
+   (* 0.0005 (- (q/mouse-y) y))])
+
+(defn limit-velocity
+  [a limit]
+
+  (if (< 0 limit)
+    (if (< 0 a)
+      (min a limit)
+      (max a (* -1 limit)))
+    (if (< 0 a)
+      (min a (* -1 limit))
+      (max a limit))))
+
+(defn update-velocity
+  [[x y] [vx vy] [ax ay]]
+
+  (let [new-x (+ vx ax)
+        new-y (+ vy ay)]
+    [(limit-velocity new-x (- (q/mouse-x) x)) (limit-velocity new-y (- (q/mouse-y) y))]))
+
+(defn update-firefly
+  [[x y] [vx vy]]
+
+  [(+ x vx) (+ y vy)])
+
+(defn update-on
+  [on]
+
+  (if on
+    (< (q/random 1000) 950)
+    (< (q/random 100) 5)))
+
+(defn update-state [state]
+  (assoc state :fireflies (into [] (map update-firefly (:fireflies state) (:velocity state)))
+         :velocity (into [] (map update-velocity (:fireflies state) (:velocity state) (:acceleration state)))
+         :acceleration (into [] (map update-acceleration (:fireflies state) (:acceleration state)))
+         :on (into [] (map update-on (:on state)))
+         ))
+
+(q/defsketch practice
+  :title "Fireflies"
+  :size :fullscreen
+  :setup setup
+  :draw draw-state
+  :update update-state
+  :features [:keep-on-top]
+  :middleware [m/fun-mode])
+


Added testing namespace, to allow us to start writing some functions for supplying test datasets.

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

--- src/clj/forma/testing.clj
+++ src/clj/forma/testing.clj
@@ -0,0 +1 @@
+(ns forma.testing)


background

background

fatal: unable to access 'https://github.com/amonks/presence.monks.co.git/': The requested URL returned error: 403