move schema into clj so we can call schematode constraint fns

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

--- src/navigator/schema.clj
+++ src/navigator/schema.clj
@@ -0,0 +1,70 @@
+(ns navigator.schema
+  (:require [datomic-schematode.constraints :as constraints]))
+
+(def schema
+  [[:comp {:attrs [[:id-sk :string "Shared key for 3rd parties" :db.unique/identity]
+                   [:name :string :indexed] ; not null
+                   [:description :string :indexed]
+
+                   ;; TODO: We need a fn here to ensure that #{:name :version} is unique
+                   [:version :string]               ; not null
+                   [:status :enum [:active :archived :preactive]] ; not null
+                   [:tags :ref :many]]
+           :dbfns [(constraints/unique :comp :name :version)]}]
+   [:comp-tag {:attrs [[:name :string :indexed] ; not null
+                       [:description :string]
+
+                       ;; TODO: We need a fn here to ensure that #{:name :version} is unique
+                       [:version :string]     ; not null
+                       [:type :string :indexed] ; not null
+                       [:isrequestable :boolean] ; default f
+                       [:icon :uri]
+                       [:status :enum [:active :archived]] ; not null
+                       [:isfinal :boolean] ; default f
+                       [:disp-ctxs :ref :many]
+                       [:child-of :ref :many] ; replaces comp_tag2parent
+                       ]}]
+   [:comp-tag-disp-ctx {:attr [[:name :string]]}]
+   [:perf-asmt {:attrs [[:id-sk :string "Shared key for 3rd parties" :db.unique/identity]
+                        [:name :string]
+                        [:version :string] ; not null
+
+                        ;; Example types: :project :course-competency ... TODO: enum?
+                        [:type :string] ; not null
+                        ;; TODO: (:name :version :type) unique
+                        [:duration-rating-days :bigint]
+                        [:comp :ref :many]
+                        [:credit-value-numerator :bigint]
+                        [:credit-value-denominator :bigint]]}]
+   [:task {:attrs [[:id-sk :string :db.unique/identity]
+                   [:name :string]
+                   [:version :string]
+
+                   ;; TODO: is this correct?
+                   [:comp :ref]]}]
+   [:user2comp {:attrs [[:sis-user-id :bigint :indexed]
+                        [:comp :ref :indexed]
+                        [:start-date :instant]
+                        [:iscomplete :boolean] ; default f
+                        [:isoverridden :boolean] ; default f
+                        [:completion-date :instant]
+                        [:proposed-completion-date :instant]
+                        [:current-score :string]
+                        [:final-score :string]
+                        [:score-denominator :bigint]
+                        [:score-type :enum [:numeric :letter :pass-fail :qualitative]] ; enum is what we want here, n'est-ce pas?
+                        [:qualitative-notes :string]]}]
+
+   [:user2perf-asmt {:attrs [[:user :ref]
+                             [:perf-asmt :ref]
+                             ;; TODO: finish this
+                             [:grade :boolean]]}]
+
+   [:user2task {:attrs [[:user :ref]
+                        [:task :ref]
+                        ;; TODO: finish this
+                        [:progress :boolean]]}]
+
+   [:config {:attrs [[:key :string :indexed] ; not null
+                     [:value :string :indexed]]}]
+   ])


Add formatting to campfire messages

Add formatting to campfire messages

--- src/riemann/campfire.clj
+++ src/riemann/campfire.clj
@@ -1,5 +1,6 @@
 (ns riemann.campfire
   "Forwards events to Campfire"
+  (:use [clojure.string :only [join]])
   (:require [clj-campfire.core :as cf]))

 (defn cf-settings
@@ -18,12 +19,12 @@
   "Creates an adaptor to forward events to campfire.
   TODO: write more here once the event formatting is better.
   TODO: tests
-  TODO: fix event formatting - see pagerduty for ideas?
-  Currently doesn't format events properly, but expired events are ok.
   Tested with:
   (streams
     (by [:host, :service]
       (let [camp (campfire \"token\", true, \"sub-domain\", \"room\")]
         camp)))"
   [token ssl sub-domain room-name]
-  (fn [e] (cf/message (room (cf-settings token ssl sub-domain) room-name) (str e))))
+  (fn [e]
+   (let [string (str (join " " ["HOST:" (str (:host e)) "SERVICE:" (str (:service e)) "STATE:" (str (:state e)) "DESC:" (str (:description e))]))]
+   (cf/message (room (cf-settings token ssl sub-domain) room-name) string))))


organization membership methods passing

organization membership methods passing

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


Added cubic bezier curves and adjusted transitions.

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/CommonCreative/vbn-website.git/'


nicer impl of with-mongo-connection that doesn't expand out into a cray cray amount of code in every expansion

--- src/metabase/driver/mongo.clj
+++ src/metabase/driver/mongo.clj
@@ -21,6 +21,21 @@
   "Bound by top-level `with-mongo-connection` so it may be reused within its body."
   nil)

+(defn- -with-mongo-connection
+  "Run F with a new connection (bound to `*mongo-connection*`) to DATABASE.
+   Don't use this directly; use `with-mongo-connection`."
+  [f database]
+  (let [connection-string (if (map? database) (-> database :details :conn_str)
+                              database)
+        _ (assert (string? connection-string) (str "with-mongo-connection failed: connection string is must be a string, got: " connection-string))
+        {conn :conn mongo-connection :db} (mg/connect-via-uri connection-string)]
+    (log/debug (color/cyan "<< OPENED NEW MONGODB CONNECTION >>"))
+    (try
+      (binding [*mongo-connection* mongo-connection]
+        (f *mongo-connection*))
+      (finally
+        (mg/disconnect conn)))))
+
 (defmacro with-mongo-connection
   "Open a new MongoDB connection to DATABASE-OR-CONNECTION-STRING, bind connection to BINDING, execute BODY, and close the connection.
    The DB connection is re-used by subsequent calls to `with-mongo-connection` within BODY.
@@ -35,17 +50,7 @@
   `(let [f# (fn [~binding]
               ~@body)]
      (if *mongo-connection* (f# *mongo-connection*)
-         (let [database# ~database
-               connection-string# (if (map? database#) (-> database# :details :conn_str)
-                                      database#)
-               _ (assert (string? connection-string#) (str "with-mongo-connection failed: connection string is must be a string, got: " connection-string#))
-               {conn# :conn mongo-connection# :db} (mg/connect-via-uri connection-string#)]
-           (log/debug (color/cyan "<< OPENED NEW MONGODB CONNECTION >>"))
-           (try
-             (binding [*mongo-connection* mongo-connection#]
-               (f# *mongo-connection*))
-             (finally
-               (mg/disconnect conn#)))))))
+         (-with-mongo-connection f# ~database))))

 ;;; ### Driver Helper Fns


no need for all this duplication

no need for all this duplication

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


Balidatzeko erabiltzailea gehitu

Balidatzeko erabiltzailea gehitu

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


Use correct urls. Tests pass.

Use correct urls. Tests pass.

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


MySQL driver [WIP]

MySQL driver [WIP]

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


adds leiningen plugin for convenience

adds leiningen plugin for convenience

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

--- src/refactor_nrepl/plugin.clj
+++ src/refactor_nrepl/plugin.clj
@@ -0,0 +1,10 @@
+(ns refactor-nrepl.plugin)
+
+(defn middleware [project]
+  (-> project
+      (update-in [:dependencies]
+                 (fnil into [])
+                 [['refactor-nrepl "0.1.0-SNAPSHOT"]])
+      (update-in [:repl-options :nrepl-middleware]
+                 (fnil into [])
+                 '[refactor-nrepl.refactor/wrap-refactor])))


def is evaluating during the compile time; Hence, changing the cassandra operations to get the connection for each run. Using a global var for db/connection/client should be avoided.

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


refactor VS$expand

refactor VS$expand

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


cleanup

cleanup

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


Added postgress to global dependancies

Added postgress to global dependancies

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


Add core.cache to fix Dave Snowdon issue

--- project.clj
+++ project.clj
@@ -17,6 +17,7 @@
    [camel-snake-kebab "0.3.2"]
    [cheshire "5.5.0"]
    [clj-time "0.11.0"]
+
    [hiccup "1.0.5"]
    [json-html "0.3.6"]
    [manifold "0.1.2-alpha2"]
@@ -24,11 +25,16 @@
    [metosin/ring-swagger "0.22.1" :exclusions [potemkin]]
    [prismatic/schema "1.0.4"]
    [potemkin "0.4.2" :exclusions [riddley]]
+
    [org.clojure/core.async "0.2.374"]
    [org.clojure/data.codec "0.1.0"]
    [org.clojure/tools.reader "0.10.0"]
    [org.clojure/tools.trace "0.7.9"]
    [org.clojars.ikoblik/clj-index "0.0.2"]
+
+   ;; TODO: Find out where this is being excluded, Schema needs it?
+   [org.clojure/core.cache "0.6.4"]
+
    [com.cognitect/transit-clj "0.8.285"]]

   :pedantic? :abort


bump version to 2.8.5

bump version to 2.8.5

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


bump version to 3.2.2

bump version to 3.2.2


Update project dependencies

Update project dependencies


Version 38

Version 38

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


Update deps

Update deps

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


port optional

port optional


-cached-rf-plan for strictly readonly cache should also throw if key is missing

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


fix ordering in db.clj again

fix ordering in db.clj again

--- src/metabase/db.clj
+++ src/metabase/db.clj
@@ -40,6 +40,8 @@
   true)

+;; ## UPD
+
 (defmulti pre-update
   "Like pre-insert but called by `upd` before DB operations happen."
   (fn [entity _] entity))
@@ -60,6 +62,9 @@
     (-> (update entity (set-fields kwargs) (where {:id entity-id}))
         (> 0))))

+
+;; ## DEL
+
 (defn del
   "Wrapper around `korma.core/delete` that makes it easier to delete a row given a single PK value.
    Returns a `204 (No Content)` response dictionary."
@@ -67,6 +72,9 @@
   (delete entity (where (apply assoc {} kwargs)))
   {:status 204
    :body nil})
+
+
+;; ## SEL

 (defmulti post-select
   "Called on the results from a call to `sel`. Default implementation doesn't do anything, but
@@ -124,6 +132,28 @@
    entity fields like `:transforms` or `:table`, if need be."
   {})

+(defmacro -sel-select
+  "Internal macro used by `sel` (don't call this directly).
+   Generates the korma `select` form."
+  [entity & forms]
+  (let [[entity field-keys] (entity-field-keys default-fields entity)
+        forms (->> forms
+                   sel-apply-kwargs
+                   (sel-apply-fields field-keys))]
+    `(do (when *log-db-calls*
+           (println "DB CALL: " ~(str entity) " " ~(str forms)))
+         (select (merge (entity->korma ~entity) *entity-overrides*) ~@forms))))
+
+(defmacro sel-fn
+  "Returns a memoized fn that calls `sel`."
+  [one-or-many entity & forms]
+  `(memoize
+    (fn []
+      (sel ~one-or-many ~entity ~@forms))))
+
+
+;; ## INS
+
 (defmulti pre-insert
   "Gets called by `ins` immediately before inserting a new object immediately before the korma `insert` call.
    This provides an opportunity to do things like encode JSON or provide default values for certain fields.
@@ -149,24 +179,8 @@
                            (clojure.set/rename-keys {(keyword "scope_identity()") :id}))]
       (sel :one entity :id id))))

-(defmacro -sel-select
-  "Internal macro used by `sel` (don't call this directly).
-   Generates the korma `select` form."
-  [entity & forms]
-  (let [[entity field-keys] (entity-field-keys default-fields entity)
-        forms (->> forms
-                   sel-apply-kwargs
-                   (sel-apply-fields field-keys))]
-    `(do (when *log-db-calls*
-           (println "DB CALL: " ~(str entity) " " ~(str forms)))
-         (select (merge (entity->korma ~entity) *entity-overrides*) ~@forms))))

-(defmacro sel-fn
-  "Returns a memoized fn that calls `sel`."
-  [one-or-many entity & forms]
-  `(memoize
-    (fn []
-      (sel ~one-or-many ~entity ~@forms))))
+;; ## EXISTS?

 (defmacro exists?
   "Easy way to see if something exists in the db.


Added heroku transformations for db

Added heroku transformations for db


added smart_sort.clj

added smart_sort.clj

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

--- src/temperaments/smart_sort.clj
+++ src/temperaments/smart_sort.clj
@@ -0,0 +1,29 @@
+;(ns eu.algoholic.smart_sort)
+
+(def n_lst_cmp (comp
+	(fn [a] (if (empty? a) false (< (first (first a)) (second (first a)))))
+	(fn [a] (drop-while #(== (first %) (second %)) a))
+	(fn [a,b] (map vector a b))
+))
+
+(def smart_sort (comp
+	(fn [a] (sort n_lst_cmp a))
+	(fn [a] (reduce concat (map second (sort a))))
+	(fn [a] (zipmap (map #(if (== % 0) Integer/MAX_VALUE %) (keys a)) (map #(sort n_lst_cmp %) (vals a))))
+	(fn [a] (group-by count a))
+	(fn [a] (map-indexed (fn [b,c] (with-meta (map #(Integer/parseInt %) c) {:path (get a b) :idx b})) (map #(re-seq #"[0-9]+" %) a)))
+	vec
+	sort
+))
+
+(defn get_meta [a,k] (map #(get (meta %) k) a))
+
+(defn sort-keywords [kwlist]
+  (let [kwstrs (map str kwlist)
+        kwstrs (map #(subs % 1) kwstrs)
+        sorted (get_meta (smart_sort kwstrs) :path)]
+    (map keyword sorted)))
+
+(defn compare-keywords [a b]
+  (let [[c d] (sort-keywords [a b])]
+    (= a c)))


spaced out

spaced out

--- src/freecoin/blockchain.clj
+++ src/freecoin/blockchain.clj
@@ -31,8 +31,6 @@
    [freecoin.params :as param]
    [freecoin.storage :as storage])
   )
-
-(def (storage/connect

 (defprotocol Blockchain
   ;; account


Nire liburuentzat orria prestatu

Nire liburuentzat orria prestatu

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


Add piano instrument based on mda-piano

Add piano instrument based on mda-piano

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

--- src/overtone/inst/piano.clj
+++ src/overtone/inst/piano.clj
@@ -0,0 +1,37 @@
+(ns overtone.inst.piano
+  (:use overtone.live))
+
+;; IMPORTANT: requires the mda-piano ugen to be available on your system
+
+(definst piano [note 60
+                 gate 1
+                 vel 100
+                 decay 0.8
+                 release 0.8
+                 hard 0.8
+                 velhard 0.8
+                 muffle 0.8
+                 velmuff 0.8
+                 velcurve 0.8
+                 stereo 0.2
+                 tune 0.5
+                 random 0.1
+                 stretch 0.1
+                 sustain 0.1]
+  (let [snd (mda-piano :freq (midicps note)
+                       :gate gate
+                       :vel vel
+                       :decay decay
+                       :release release
+                       :hard hard
+                       :velhard velhard
+                       :muffle muffle
+                       :velmuff velmuff
+                       :velcurve velcurve
+                       :stereo stereo
+                       :tune tune
+                       :random random
+                       :stretch stretch
+                       :sustain sustain)
+        sil (detect-silence snd 0.001 :action :free)]
+    (* 1 snd))) ;;TODO: figure out why this mul is required


Remove tracing

Remove tracing

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


Added session handler

Added session handler

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


Create seperate om_history module.

Create seperate om_history module.

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

--- src-cljs/cljs_workspace/om_history.cljs
+++ src-cljs/cljs_workspace/om_history.cljs
@@ -0,0 +1,146 @@
+(ns cljs-workspace.history
+  (:require [om.core :as om :include-macros true]
+            [om.dom :as dom :include-macros true]
+            [cljs-workspace.morph
+              :as morphic
+              :refer [set-position set-fill set-extent add-morph remove-morph]]))
+
+(enable-console-print!)
+
+(defn pluralize [n w]
+  (if (> n 1)
+      (str w "s")
+      (str w)))
+
+(def diagram-width 400)
+(def branch-height 20)
+
+;; global atom referencing the current state of the app
+(def app-state (atom nil))
+
+;; global atom referencing the total history graph
+(def app-history (atom [@app-state]))
+
+;; global atom referencing the branch that we currently operate on
+(def current-branch (atom @app-history))
+(def branch-count (atom 1))
+
+;; ffd
+(def history-view)
+
+(defn switch-to-branch [branch]
+  (remove-morph history-view (hash @current-branch) "indexMorph")
+  (set-fill history-view (hash @current-branch) "lightgrey")
+  (set-fill history-view (hash branch) "green")
+  (reset! current-branch branch))
+
+(defn nth-history
+  ([i]
+    (nth-history i current-branch))
+  ([i branch]
+    (nth @branch i)))
+
+(def history-indicator
+  {:id "indexMorph"
+   :morph {:Position {:x (/ diagram-width 2) :y 3}}
+   :shape {:Fill "lightgreen"
+           :Extent {:x 4 :y branch-height }}})
+
+(defn branch-morph [posX posY width height branch]
+         {:id (hash branch) ;; use the hashed version of branch for uuid
+          :morph {:Position {:x posX :y posY}
+                  :onClick (fn [e] (switch-to-branch branch))}
+          :shape {:Fill "green"
+                  :BorderColor "darkgreen"
+                  :Extent {:x width :y height}}
+           :submorphs [history-indicator]})
+
+(def history-view
+  (atom {:id "wrapper"
+         :morph {:Position {:x 10 :y 50}}
+         :shape {:BorderColor "black"
+                 :Extent {:x (+ diagram-width 10) :y (+ branch-height 10) }}
+         :submorphs
+         [(branch-morph 5 5 (- diagram-width 0) branch-height @current-branch)]}))
+
+(def history-slider
+  (dom/input #js {:style #js {:position "absolute" :top 5 :left 5}
+                  :type "range" :min 0 :max 100 :defaultValue 100
+                  :onChange #(revert-to (.. % -target -value))}))
+
+(defn move-indicator-to [index]
+  (set-position history-view "indexMorph" {:x (* diagram-width (/ index 100)) :y 3}))
+
+;; this variable indicates that we are currently reverted to an earlier
+;; state of the branch and also which one we have reverted to
+(def reverted-to (atom -1))
+
+(defn revert-to [i]
+  (prn "request revert: " i)
+  (let [index (* (dec (count @(@current-branch :coll))) (/ i 100))]
+    (when-let [state (when (>= index 1) (nth-history index))]
+      (prn "revert to: " index)
+      (reset! app-state state)
+      (reset! reverted-to i)
+      (move-indicator-to i))))
+
+(defn add-new-branch [branch]
+  (let [new-branch-morph (branch-morph
+                          5 (+ 5 (* branch-height @branch-count))
+                         (- diagram-width 0) branch-height branch)]
+    (swap! branch-count inc)
+    (add-morph history-view "wrapper" new-branch-morph)
+    (set-extent history-view "wrapper" {:x diagram-width :y (+ 10 (* branch-height @branch-count))})
+    (switch-to-branch branch)
+    (.log js/console (morphic/dict->js @history-view))))
+
+;; snapshot the state when it is changed:
+
+; The history actually stores each state as a first class object,
+; even after branching happens:
+;
+; -----\----
+;       \------
+;
+; [ . . . . . {new-branch: \ old-val: _ } . . . ] <
+;                           \                      \
+;                            V                      \
+;                           {:offset-index _ :parent | :coll [ . . . .  ] }
+
+(defn branch-at [i n]
+  (prn "Branching at " i)
+  (let [index i
+        new-branch {:offset-index i :coll (atom []) :parent (atom @current-branch)}
+        ; split the current branch
+        coll @(@current-branch :coll)
+        [pre-branch post-branch] [(vec (take index coll)) (vec (drop index coll))]
+        ; insert the branching point into the old branch
+        branched-branch (into [] (concat pre-branch [{:new-branch new-branch :old-value (first post-branch)}] (rest post-branch)))]
+      ; update the old branch with the inserted version
+      (reset! (@current-branch :coll) branched-branch)
+      ; let current branch pointer point to new branch
+      (add-new-branch new-branch)
+      (reset! reverted-to -1)))
+
+(defn save-state [n]
+    (cond (> 100 @reverted-to -1 )
+      ; we have to branch because a modification based on a reverted state:
+      (branch-at @reverted-to n)
+      ; else just append to history
+      :else
+      (let [b @(@current-branch :coll)]
+        (when-not (= (last b) n)
+          (swap! (@current-branch :coll) conj n))
+        (let [c (+ (@current-branch :offset-index) (count b))]
+            (prn (str c " Saved " (pluralize c "State")))))))
+
+
+
+; (om/root
+;   (fn [app owner]
+;     (om/component
+;       (dom/div {}
+;         (om/build morphic/morph app)
+;         history-slider)))
+;   history-view
+;   {:target (. js/document (getElementById "inspector"))})


Initial grid and corridor implementation

error: pathspec 'src/cljc/robinson/dungeons/temple.cljc' did not match any file(s) known to git

--- src/cljc/robinson/dungeons/temple.cljc
+++ src/cljc/robinson/dungeons/temple.cljc
@@ -0,0 +1,290 @@
+;; Functions for randomly generating maps.
+(ns robinson.dungeons.temple
+  (:require [robinson.common :as rc]
+            [clojure.math.combinatorics :as combo]
+            [algotools.algos.graph :as graph]
+            [taoensso.timbre :as timbre]
+            algotools.data.union-find
+            clojure.set))
+
+(timbre/refer-timbre)
+
+(defn canvas
+  "Create a blank grid using `nil` for cell values."
+  [width height]
+  (vec (repeat height (vec (repeat width nil)))))
+
+(defn make-room
+  "A room is a map with
+
+  * an id
+
+  * x and y values for the upper-left corner
+
+  * a width a height"
+  [min-x min-y max-x max-y room-idx]
+  {:id     (keyword (str room-idx))
+   :x      (+ min-x (rand-int max-x))
+   :y      (+ min-y (rand-int max-y))
+   :width  (+ 2 (rand-int 5))
+   :height (+ 2 (rand-int 5))})
+
+(defn rooms-to-edges
+  "Generate a random set of edges between rooms such that each room
+   is traversable from every other room."
+  [nodes]
+  (let [_ (trace "all nodes" nodes)
+        minimum-edges (map vector nodes (rest nodes))
+        all-edges (combo/combinations nodes 2)
+        _ (trace "all edges" all-edges)
+        _ (trace "minimum-edges" minimum-edges)
+        random-edges (map vec (take (/ (count nodes) 2) (shuffle all-edges)))
+        union-edges  (distinct (concat minimum-edges random-edges))]
+    (trace "union-edges" union-edges)
+    union-edges))
+
+(defn edge-to-points
+  "Generate a grid of points (inclusive) that connect the start point with the end point.
+
+   If `orientation` is `true`, the path travels first horizontally then vertically
+   from start to end and vice versa if `false`."
+  [start-x start-y end-x end-y orientation]
+  (let [min-x (min start-x end-x)
+        max-x (max start-x end-x)
+        min-y (min start-y end-y)
+        max-y (max start-y end-y)]
+    (if orientation
+      ;; horizontal first
+      (let [horz [(conj (map (fn [x] [x start-y]) (range min-x max-x)) [max-x start-y])]
+            vert (map (fn [y] [[end-x y]]) (range min-y max-y))
+            points (distinct (concat horz vert))]
+       points)
+      ;; vertial first
+      (let [vert (map (fn [y] [[start-x y]]) (range min-y max-y))
+            horz [(conj (map (fn [x] [x end-y]) (range min-x max-x)) [start-x max-y])]
+            points (distinct (concat vert horz))]
+       points))))
+
+(defn points-to-corridor
+  "Convert a grid of points `[x y]` into `[x y {:type :corridor}]`."
+  [points]
+  (map (fn [line] (map (fn [[x y]] [x y {:type :corridor}]) line)) points))
+
+(defn room-to-cellsxy
+  "Convert the bounds of a room into a grid of points that represent the room."
+  [min-x min-y max-x max-y]
+  (let [top    [(map (fn [x] [x min-y {:type :horizontal-wall}]) (range min-x (inc max-x)))]
+        bottom [(map (fn [x] [x max-y {:type :horizontal-wall}]) (range min-x (inc max-x)))]
+        middle-line (concat [[min-x {:type :vertical-wall}]]
+                            (vec (map (fn [x] [x {:type :floor}]) (range (inc min-x) max-x)))
+                            [[max-x {:type :vertical-wall}]])
+        middle-lines (vec (map (fn [y] (map (fn [[x cell]] [x y cell]) middle-line)) (range (inc min-y) max-y)))
+        lines (concat top middle-lines bottom)]
+    lines))
+
+(defn points-to-fully-connected-graph
+  [points]
+  (reduce (fn [m [from to]]
+            (update m (str from) (fn [old]
+                                   (let [d (rc/distance (apply rc/xy->pos from) (apply rc/xy->pos to))
+                                         d (if (< d 3)
+                                             (+ d (- 3 d))
+                                             d)]
+                                     (conj (or old (list))
+                                           [(str to) d])))))
+          {}
+          (for [from  points
+                to    points
+                :when (not= from to)]
+            [from to])))
+
+(defn graph-to-minimum-spanning-tree
+  [g]
+  (map (fn [[from to]]
+         [(read-string from) (read-string to)])
+       (graph/MST-kruskal g true)))
+
+(defn cellsxy-to-place
+  "Convert a grid of `[x y cell]` to cell."
+  [cells-xy]
+  (let [lines-xy (map (fn [[_ v]] (first v)) (group-by second cells-xy))
+        lines    (map (fn [line] (map last (group-by first line))) lines-xy)]
+    lines))
+
+(defn cellsxy-to-ascii [cells-xy]
+  "Convert a grid of cells into a list of string that can be rendered."
+  (let [contents (map (fn [line] (clojure.string/join
+                                      (map (fn [[x y cell]]
+                                        (if (nil? cell)
+                                            \
+                                            (case (cell :type)
+                                              :floor \.
+                                              :vertical-wall \|
+                                              :horizontal-wall \-
+                                              \?)))
+                                       line))) cells-xy)]
+    contents))
+
+(defn merge-cells
+  "When merging cells, given their types, determine
+   the type of the resulting cell."
+  [cell1 cell2]
+  (case (cell1 :type)
+    :floor (case (cell2 :type)
+             :floor :floor
+             :horizontal-wall :floor
+             :vertical-wall :floor
+             :corridor :close-door
+             :close-door :floor
+             :up-stairs :up-stairs
+             :down-stairs :down-stairs
+             :nil :floor)
+    :horizontal-wall (case (cell2 :type)
+             :floor :floor
+             :horizontal-wall :horizontal-wall
+             :vertical-wall :horizontal-wall
+             :corridor :close-door
+             :close-door :close-door
+             :up-stairs :up-stairs
+             :down-stairs :down-stairs
+             :nil :horizontal-wall)
+    :vertical-wall (case (cell2 :type)
+             :floor :floor
+             :horizontal-wall :horizontal-wall
+             :vertical-wall :vertical-wall
+             :corridor :close-door
+             :close-door :close-door
+             :up-stairs :up-stairs
+             :down-stairs :down-stairs
+             :nil :vertical-wall)
+    :corridor (case (cell2 :type)
+             :floor :floor
+             :horizontal-wall :close-door
+             :vertical-wall :close-door
+             :corridor :corridor
+             :close-door :close-door
+             :up-stairs :up-stairs
+             :down-stairs :down-stairs
+             :nil :corridor)
+    :close-door (case (cell2 :type)
+             :floor :floor
+             :horizontal-wall :close-door
+             :vertical-wall :close-door
+             :corridor :corridor
+             :close-door :close-door
+             :up-stairs :up-stairs
+             :down-stairs :down-stairs
+             :nil :close-door)
+    :up-stairs (case (cell2 :type)
+             :floor :up-stairs
+             :horizontal-wall :up-stairs
+             :vertical-wall :up-stairs
+             :corridor :up-stairs
+             :close-door :up-stairs
+             :nil :up-stairs)
+    :down-stairs (case (cell2 :type)
+             :floor :down-stairs
+             :horizontal-wall :down-stairs
+             :vertical-wall :down-stairs
+             :corridor :down-stairs
+             :close-door :down-stairs
+             :nil :down-stairs)
+    :nil (cell2 :type)))
+
+(defn merge-with-canvas
+  "Merge a grid of `[x y cell]` into an existing grid. The result is a merged grid
+   following the rules of `merge-cells`."
+  [canvas & cells-xy]
+  (let [f (apply comp (map (fn [[x y cell]]
+                             (fn [c] (update-in c [y x]
+                               (fn [canvas-cell]
+                                 {:type (merge-cells (if (nil? cell) {:type :nil} cell)
+                                              (if (nil? canvas-cell) {:type :nil} canvas-cell))}))))
+                           (apply concat (apply concat cells-xy))))]
+   (f canvas)))
+
+(defn rand-int-range [min max]
+  (+ (rand-int (- max min)) min))
+
+(defn random-place
+  "Create a grid of random rooms with corridors connecting them and doors
+   where corridors connect to rooms."
+  [width height]
+  (let [num-rooms 19
+        min-width 3
+        min-height 3
+        max-width 10
+        max-height 8
+        rows (int (/ height max-height))
+        columns (int (/ width max-width))
+        ;; list: [[x y width height] ...]
+        room-bounds  (mapcat (fn [row]
+                               (map (fn [column]
+                                      (let [width (rand-int-range min-width max-width)
+                                            height (rand-int-range min-height max-height)
+                                            x (rand-int-range (* column max-width) (+ (* column max-width) max-width (- width)))
+                                            y (rand-int-range (* row max-height) (+ (* row max-height) max-height (- height)))]
+                                      [x y (+ x width) (+ y height)]))
+                                    (range columns)))
+                             (range rows))
+        rooms        (map #(apply room-to-cellsxy %) room-bounds)
+        room-centers (map (fn [[x1 y1 x2 y2]] [(int (/ (+ x1 x2) 2))
+                                               (int (/ (+ y1 y2) 2))])
+                          room-bounds)
+        fcg          (points-to-fully-connected-graph room-centers)
+        g            (graph-to-minimum-spanning-tree fcg)
+        egraph (graph/get-wtd-edge-graph fcg true)
+        eds    (map first (sort-by second egraph))
+        V  (set (flatten eds))
+        uf (algotools.data.union-find/make-union-find V)
+         MST (reduce (fn [T [x y]]
+                          (if-not (algotools.data.union-find/same-comp? uf x y)
+                                  (do (algotools.data.union-find/union uf x y)
+                                      (conj T [x y]))
+                                  T))
+                    [] eds)
+        _ (println "egraph" egraph)
+        _ (println "eds" eds)
+        _ (println "V" V)
+        _ (println "uf" uf)
+        _ (println "MST" MST)
+        corridors    (map (fn [[[x1 y1] [x2 y2]]]
+                            (points-to-corridor
+                              (edge-to-points x1 y1 x2 y2 (< (rand-int 2) 1))))
+                          g)
+        upstairs     (conj [(first room-centers)] {:type :up-stairs})
+        downstairs   (conj [(last room-centers)] {:type :down-stairs})]
+    (println fcg)
+    (println g)
+    ;(println (vec room-bounds))
+    ;(println (vec rooms))
+    {:place (apply merge-with-canvas (canvas width height)
+                   (concat corridors rooms))
+     :up-stairs upstairs
+     :down-stairs downstairs}))
+
+(defn place-to-ascii
+  "Convert a grid of cells into a list of strings so that it can be rendered."
+  [place]
+  (let [contents (map (fn [line] (clojure.string/join
+                                      (map (fn [cell]
+                                        (if (nil? cell)
+                                            \
+                                            (case (cell :type)
+                                              :floor \.
+                                              :vertical-wall \|
+                                              :horizontal-wall \-
+                                              :close-door \+
+                                              :corridor \#
+                                              :up-stairs \<
+                                              :down-stairs \>
+                                              (str (cell :type)))))
+                                       line))) place)]
+    contents))
+
+(defn -main
+  "Generate a random grid and print it out."
+  [& args]
+  (println "generating...")
+  (doall (map println (place-to-ascii ((random-place 80 25) :place)))))
+


chi square performance

chi square performance

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


set Xms and Xmx

set Xms and Xmx


update :main in project

update :main in project

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


Revert "Remove project.clj"

Revert "Remove project.clj"

This reverts commit 3b0b2f0895779e1f20eca145812bc3e2c60557a3.

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

--- project.clj
+++ project.clj
@@ -0,0 +1,38 @@
+(defproject funcool/promesa "0.1.1"
+  :description "A promise library for ClojureScript"
+  :url "https://github.com/funcool/promise"
+  :license {:name "BSD (2 Clause)"
+            :url "http://opensource.org/licenses/BSD-2-Clause"}
+
+  :dependencies [[cats "0.4.0"]]
+  :deploy-repositories {"releases" :clojars
+                        "snapshots" :clojars}
+
+  :source-paths ["src" "assets"]
+  :test-paths ["test"]
+
+  :cljsbuild {:test-commands {"test" ["node" "output/tests.js"]}
+              :builds [{:id "dev"
+                        :source-paths ["test" "src" "assets"]
+                        :notify-command ["node" "output/tests.js"]
+                        :compiler {:output-to "output/tests.js"
+                                   :output-dir "output/out"
+                                   :source-map true
+                                   :static-fns true
+                                   :cache-analysis false
+                                   :main promesa.core-tests
+                                   :optimizations :none
+                                   :target :nodejs
+                                   :pretty-print true}}]}
+
+  :jar-exclusions [#"\.swp|\.swo|user.clj"]
+  :profiles {:dev {:dependencies [[org.clojure/clojure "1.7.0-beta3"]
+                                  [org.clojure/clojurescript "0.0-3269"]
+                                  [funcool/cljs-testrunners "0.1.0-SNAPSHOT"]]
+                   :codeina {:sources ["src"]
+                             :language :clojurescript
+                             :output-dir "doc/api"}
+                   :plugins [[lein-cljsbuild "1.0.4"]
+                             [funcool/codeina "0.1.0"
+                              :exclusions [org.clojure/clojure]]
+                             [lein-externs "0.1.3"]]}})


Update dependencies again. No unstable immutant anymore.

--- project.clj
+++ project.clj
@@ -13,8 +13,7 @@
                  [org.postgresql/postgresql "9.3-1102-jdbc41"]

                  ;; Web
-                 #_[org.immutant/web "2.0.0-beta1"]
-                 [org.immutant/web "2.x.incremental.465"]
+                 [org.immutant/web "2.0.0-beta2"]
                  [compojure "1.3.1"]
                  [ring/ring-devel "1.3.2"]
                  [com.cognitect/transit-clj "0.8.259"]
@@ -42,12 +41,12 @@
                     :repl-options {:timeout 300000
                                    :init-ns user}}
              ;; We store the cljs-deps here so they won't get added to the uberjar
-             :provided {:dependencies [[org.clojure/clojurescript "0.0-2814"]
+             :provided {:dependencies [[org.clojure/clojurescript "0.0-2850"]
                                        [com.cemerick/piggieback "0.1.6-SNAPSHOT"]
                                        [com.cognitect/transit-cljs "0.8.205"]
                                        [org.omcljs/om "0.8.8"]
                                        [garden "1.2.5"]
-                                       [sablono "0.3.1"]
+                                       [sablono "0.3.3"]
                                        [secretary "1.2.1"]
                                        [weasel "0.6.0-SNAPSHOT"]
                                        [the/parsatron "0.0.7"]]}}


:arrow_up: Upgrade dependencies

:arrow_up: Upgrade dependencies

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


Version 0.1.9

Version 0.1.9

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


Bump version to 0.11.0

Bump version to 0.11.0

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


Version bump

Version bump

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


bioformats metadata code

bioformats metadata code

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@6409 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

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

--- sandbox/bioformats/src/org/micromanager/bioformats.clj
+++ sandbox/bioformats/src/org/micromanager/bioformats.clj
@@ -0,0 +1,90 @@
+(ns org.micromanager.bioformats
+  (:import [loci.common RandomAccessInputStream]
+           [loci.common.services ServiceFactory]
+           [loci.formats ImageWriter]
+           [loci.formats.services OMEXMLService]
+           [loci.formats.tiff TiffParser TiffSaver]
+           [ome.xml.model.enums DimensionOrder PixelType]
+           [ome.xml.model.primitives PositiveInteger]
+           [java.io ByteArrayInputStream])
+  (:require [clojure.xml]))
+
+(def ome-xml-service (. (ServiceFactory.) (getInstance OMEXMLService)))
+
+(defn new-ome-meta []
+  (. ome-xml-service createOMEXMLMetadata))
+
+(defn get-xml-string [m]
+  (.getOMEXML ome-xml-service m))
+
+(defn parse-xml-str [s]
+  (clojure.xml/parse (ByteArrayInputStream. (.getBytes s "UTF-8"))))
+
+(defn xml-to-str [xml]
+  (with-out-str (clojure.xml/emit xml)))
+
+(defn ome-to-xml [m]
+  (-> m get-xml-string parse-xml-str))
+
+(defn +int [n] (PositiveInteger. n))
+
+(defn populate-meta [m w h nslices nchannels nframes ncomponents]
+  (doto m
+    .createRoot
+    (.setImageID "Image:0" 0)
+    (.setPixelsID "Pixels:0" 0)
+    (.setPixelsBinDataBigEndian true 0 0)
+    (.setPixelsDimensionOrder DimensionOrder/XYZCT 0)
+    (.setPixelsSizeX (+int w) 0)
+    (.setPixelsSizeY (+int h) 0)
+    (.setPixelsSizeZ (+int nslices) 0)
+    (.setPixelsSizeC (+int nchannels) 0)
+    (.setPixelsSizeT (+int nframes) 0)
+    (.setPixelsType PixelType/UINT8 0)
+    (.setChannelID "Channel:0:0" 0 0)
+    (.setChannelSamplesPerPixel (+int ncomponents) 0 0)))
+
+(defn write-ome-tiff [filename pixels metadata]
+  (doto (ImageWriter.)
+    (.setMetadataRetrieve metadata)
+    (.setId filename)
+    (.saveBytes 0 pixels)
+    (.close)))
+
+(defn get-tiff-comment [filename]
+  (.getComment (TiffParser. filename)))
+
+(defn read-tiff-xml [filename]
+  (-> filename get-tiff-comment parse-xml-str))
+
+(defn overwrite-comment [filename comment]
+  (.overwriteComment
+    (TiffSaver. filename)
+    (RandomAccessInputStream. filename)
+    comment))
+
+(defn overwrite-tiff-xml [filename xml]
+  (overwrite-comment filename (xml-to-str xml)))
+
+;; testing
+
+(defn rand-byte []
+  (byte (- (rand-int 256) 128)))
+
+(defn rand-bytes [n]
+  (byte-array (repeatedly n rand-byte)))
+
+(defn rand-image [w h nchannels bytes-per-pixel]
+  (rand-bytes (* w h nchannels )))
+
+(def test-meta (populate-meta (new-ome-meta) 512 512 2 2 2 2))
+
+(defn test-write-image []
+  (write-ome-tiff
+    "blah.tiff"
+    (rand-image 512 512 2 2)
+    test-meta))
+
+(defn overwrite-metadata [filename metadata]
+  (overwrite-comment filename (get-xml-string metadata)))
+


[WM] update deps (incl. Clojure)

[WM] update deps (incl. Clojure)

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


add dependencies that seem to have left transitivity land

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


revert "Konexioa pasa"

revert "Konexioa 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.zer.git/'


Plural examples

Plural examples

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


We have to make the annotation doc into a clojure 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/physion/ovation-webapi.git/'


Fixed ns issues.

Fixed ns issues.


If we need to clean up old mount, sleep a bit

Discovered that in this case, without a little sleep,
the subsequent attempt to mount can frequently
fail.

--- Clojure/src/ambly/repl/jsc.clj
+++ Clojure/src/ambly/repl/jsc.clj
@@ -252,7 +252,8 @@
         output-dir (io/file webdav-mount-point)
         webdav-endpoint (str "http://" endpoint-address ":" endpoint-port)]
     (when (.exists output-dir)
-      (sh "umount" webdav-mount-point))
+      (sh "umount" webdav-mount-point)
+      (Thread/sleep 250))
     (.mkdirs output-dir)
     (if (zero? (sh "mount_webdav" webdav-endpoint webdav-mount-point))
       (reset! (:webdav-mount-point repl-env) webdav-mount-point)


Eliminate dead single-argument arity of `setup`

--- Clojure/src/ambly/repl/jsc.clj
+++ Clojure/src/ambly/repl/jsc.clj
@@ -94,69 +94,67 @@
   (form-require-expr-js (str "'" path "'")))

 (defn setup
-  ([repl-env] (setup repl-env nil))
-  ([repl-env opts]
-    (let [output-dir (io/file (:output-dir opts))
-          _    (.mkdirs output-dir)
-          env  (ana/empty-env)
-          core (io/resource "cljs/core.cljs")
-          root-path (.getCanonicalFile output-dir)]
-      ;; TODO: temporary hack, should wait till we can read the start string
-      ;; from the process - David
-      (Thread/sleep 300)
-      (reset! (:socket repl-env)
-        (socket (:host repl-env) (:port repl-env)))
-      ;; compile cljs.core & its dependencies, goog/base.js must be available
-      ;; for bootstrap to load, use new closure/compile as it can handle
-      ;; resources in JARs
-      (let [core-js (closure/compile core
-                      (assoc opts
-                        :output-file
-                        (closure/src-file->target-file core)
-                        ;:static-fns true
-                        ))
-            deps    (closure/add-dependencies opts core-js)]
-        ;; output unoptimized code and the deps file
-        ;; for all compiled namespaces
-        (apply closure/output-unoptimized
-          (assoc opts
-            :output-to (.getPath (io/file output-dir "ambly_repl_deps.js")))
-          deps))
-      ;; Set up CLOSURE_IMPORT_SCRIPT function, injecting path
-      (jsc-eval repl-env
-         (str "CLOSURE_IMPORT_SCRIPT = function(src) {"
-              (form-require-expr-js
-                (str "'" root-path File/separator "goog" File/separator "' + src"))
-              "return true; };"))
-      ;; bootstrap
-      (jsc-eval repl-env
-        (form-require-path-js (io/file root-path "goog" "base.js")))
-      ;; load the deps file so we can goog.require cljs.core etc.
-      (jsc-eval repl-env
-        (form-require-path-js (io/file root-path "ambly_repl_deps.js")))
-      ;; monkey-patch isProvided_ to avoid useless warnings - David
-      (jsc-eval repl-env
-        (str "goog.isProvided_ = function(x) { return false; };"))
-      ;; monkey-patch goog.require, skip all the loaded checks
-      (repl/evaluate-form repl-env env "<cljs repl>"
-        '(set! (.-require js/goog)
-           (fn [name]
+  [repl-env opts]
+  (let [output-dir (io/file (:output-dir opts))
+        _ (.mkdirs output-dir)
+        env (ana/empty-env)
+        core (io/resource "cljs/core.cljs")
+        root-path (.getCanonicalFile output-dir)]
+    ;; TODO: temporary hack, should wait till we can read the start string
+    ;; from the process - David
+    (Thread/sleep 300)
+    (reset! (:socket repl-env)
+      (socket (:host repl-env) (:port repl-env)))
+    ;; compile cljs.core & its dependencies, goog/base.js must be available
+    ;; for bootstrap to load, use new closure/compile as it can handle
+    ;; resources in JARs
+    (let [core-js (closure/compile core
+                    (assoc opts
+                      :output-file
+                      (closure/src-file->target-file core)
+                      ;:static-fns true
+                      ))
+          deps (closure/add-dependencies opts core-js)]
+      ;; output unoptimized code and the deps file
+      ;; for all compiled namespaces
+      (apply closure/output-unoptimized
+        (assoc opts
+          :output-to (.getPath (io/file output-dir "ambly_repl_deps.js")))
+        deps))
+    ;; Set up CLOSURE_IMPORT_SCRIPT function, injecting path
+    (jsc-eval repl-env
+      (str "CLOSURE_IMPORT_SCRIPT = function(src) {"
+        (form-require-expr-js
+          (str "'" root-path File/separator "goog" File/separator "' + src"))
+        "return true; };"))
+    ;; bootstrap
+    (jsc-eval repl-env
+      (form-require-path-js (io/file root-path "goog" "base.js")))
+    ;; load the deps file so we can goog.require cljs.core etc.
+    (jsc-eval repl-env
+      (form-require-path-js (io/file root-path "ambly_repl_deps.js")))
+    ;; monkey-patch isProvided_ to avoid useless warnings - David
+    (jsc-eval repl-env
+      (str "goog.isProvided_ = function(x) { return false; };"))
+    ;; monkey-patch goog.require, skip all the loaded checks
+    (repl/evaluate-form repl-env env "<cljs repl>"
+      '(set! (.-require js/goog)
+         (fn [name]
+           (js/CLOSURE_IMPORT_SCRIPT
+             (aget (.. js/goog -dependencies_ -nameToPath) name)))))
+    ;; load cljs.core, setup printing
+    (repl/evaluate-form repl-env env "<cljs repl>"
+      '(do
+         (.require js/goog "cljs.core")
+         (set-print-fn! js/out.write)))
+    ;; redef goog.require to track loaded libs
+    (repl/evaluate-form repl-env env "<cljs repl>"
+      '(set! (.-require js/goog)
+         (fn [name reload]
+           (when (or (not (contains? *loaded-libs* name)) reload)
+             (set! *loaded-libs* (conj (or *loaded-libs* #{}) name))
              (js/CLOSURE_IMPORT_SCRIPT
-               (aget (.. js/goog -dependencies_ -nameToPath) name)))))
-      ;; load cljs.core, setup printing
-      (repl/evaluate-form repl-env env "<cljs repl>"
-        '(do
-           (.require js/goog "cljs.core")
-           (set-print-fn! js/out.write)))
-      ;; redef goog.require to track loaded libs
-      (repl/evaluate-form repl-env env "<cljs repl>"
-        '(set! (.-require js/goog)
-           (fn [name reload]
-             (when (or (not (contains? *loaded-libs* name)) reload)
-               (set! *loaded-libs* (conj (or *loaded-libs* #{}) name))
-               (js/CLOSURE_IMPORT_SCRIPT
-                 (aget (.. js/goog -dependencies_ -nameToPath) name))))))
-      )))
+               (aget (.. js/goog -dependencies_ -nameToPath) name))))))))

 (defrecord JscEnv [host port socket]
   repl/IJavaScriptEnv


Simplifying namespace in core-test

Simplifying namespace in core-test


Corrected documentation.

Corrected documentation.

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


Iruzkina gehitu ondoren zerrenda jaso

Iruzkina gehitu ondoren zerrenda jaso

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


Adding in a very basic os module

Adding in a very basic os module

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

--- os.clj
+++ os.clj
@@ -0,0 +1,9 @@
+(import 'os)
+
+
+; Get the current working directory
+(def cwd (. os getcwd))
+
+
+; Get a list of the filenames in the current directory
+(def ls (fn* [] (. os (listdir (cwd)))))


Setup test for logging

Setup test for logging

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

--- test/ctia/logger_test.clj
+++ test/ctia/logger_test.clj
@@ -0,0 +1,14 @@
+(ns ctia.logger-test
+  (:require [ctia.events :as c :refer :all]
+            [clojure.test :as t :refer :all]
+            [schema.test :as st]))
+
+(use-fixtures :once st/validate-schemas)
+
+(deftest test-setup
+  (init!)
+  (let [{b :chan-buf c :chan m :mult} @central-channel]
+    (send-create-event "tester" {} "TestModelType" {:data 1})
+    (send-create-event "tester" {} "TestModelType" {:data 2})
+    (send-event {:owner "tester" :http-params {} :data 3})))
+


add lein ns

add lein ns

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

--- src/replify/lein.clj
+++ src/replify/lein.clj
@@ -0,0 +1,7 @@
+(ns replify.lein
+  (:require
+   [alembic.still :as still]
+   [clojure.java.io :as io]))
+
+(defn deps-tree []
+  (still/lein deps :tree))


Add internal sequencer example

Add internal sequencer example

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

--- src/overtone/examples/timing/internal_sequencer.clj
+++ src/overtone/examples/timing/internal_sequencer.clj
@@ -0,0 +1,219 @@
+(ns overtone.examples.internal-sequencer
+  (:use [overtone.live]))
+
+;; A fully server-side sample sequencer.
+;; =====================================
+
+;; This example demonstrates some of the benefits of moving all synth
+;; triggers inside the server itself. For example, it allows you to
+;; modify the synthesis with *immediate* effect (rather than waiting for
+;; the next bar/chunk to be scheduled) and you can use a global pulse to
+;; drive both the timing and to also modulate aspects of the synthesis
+;; so that the modulations are sympathetic to the rhythms being played.
+
+
+;; First, let's create some sequencer buffers for specifying which beat
+;; to trigger a sample. This will be our core data structure for a basic
+;; emulation of an 8-step sequencer. A buffer is like a Clojure vector,
+;; except it lives on the server and may only contain floats. Buffers
+;; are initialised to have all values be 0.0
+(defonce buf-0 (buffer 8))
+(defonce buf-1 (buffer 8))
+(defonce buf-2 (buffer 8))
+(defonce buf-3 (buffer 8))
+
+;; Next let's create some timing busses. These can be visualised as
+;; 'patch cables' - wires that carry pulse signals that may be
+;; arbitrarily forked and fed into any synth that wants to be aware of
+;; the pulses. We have two types of information being conveyed here -
+;; firstly the trg busses contain a stream of 0s with an intermittant 1
+;; every time there is a tick. Secondly we have the cnt busses which
+;; contain a stream of the current tick count. We then have two of each
+;; type of bus - one for a high resolution global metronome, and another
+;; for a division of the global metronome for our beats.
+(defonce root-trg-bus (control-bus)) ;; global metronome pulse
+(defonce root-cnt-bus (control-bus)) ;; global metronome count
+(defonce beat-trg-bus (control-bus)) ;; beat pulse (fraction of root)
+(defonce beat-cnt-bus (control-bus)) ;; beat count
+
+(def BEAT-FRACTION "Number of global pulses per beat" 30)
+
+;; Here we design synths that will drive our pulse busses.
+(defsynth root-trg [rate 100]
+  (out:kr root-trg-bus (impulse:kr rate)))
+
+(defsynth root-cnt []
+  (out:kr root-cnt-bus (pulse-count:kr (in:kr root-trg-bus))))
+
+(defsynth beat-trg [div BEAT-FRACTION]
+  (out:kr beat-trg-bus (pulse-divider (in:kr root-trg-bus) div))  )
+
+(defsynth beat-cnt []
+  (out:kr beat-cnt-bus (pulse-count (in:kr beat-trg-bus))))
+
+;; Now we get a little close to the sounds. Here's four nice sounding
+;; samples from Freesound.org
+(def kick-s (sample (freesound-path 777)))
+(def click-s (sample (freesound-path 406)))
+(def boom-s (sample (freesound-path 33637)))
+(def subby-s (sample (freesound-path 25649)))
+
+;; Here's a synth for playing back the samples with a bit of modulation
+;; to keep things interesting.
+(defsynth mono-sequencer
+  "Plays a single channel audio buffer."
+  [buf 0 rate 1 out-bus 0 beat-num 0 sequencer 0 amp 1]
+  (let [cnt      (in:kr beat-cnt-bus)
+        beat-trg (in:kr beat-trg-bus)
+        bar-trg  (and (buf-rd:kr 1 sequencer cnt)
+                      (= beat-num (mod cnt 8))
+                      beat-trg)
+        vol      (set-reset-ff bar-trg)]
+    (out
+     out-bus (* vol
+                amp
+                (pan2
+                 (rlpf
+                  (scaled-play-buf 1 buf rate bar-trg)
+                  (demand bar-trg 0 (dbrown 200 20000 50 INF))
+                  (lin-lin:kr (lf-tri:kr 0.01) -1 1 0.1 0.9)))))))
+
+;; Here's Dan Stowell's dubstep synth modified to work with the global
+;; pulses
+(definst dubstep [note 40 wobble BEAT-FRACTION hi-man 0 lo-man 0 sweep-man 0 deci-man 0 tan-man 0 shape 0 sweep-max-freq 3000 hi-man-max 1000 lo-man-max 500 beat-vol 0 lag-delay 0.5]
+  (let [bpm     300
+        wob     (pulse-divider (in:kr root-trg-bus) wobble)
+        sweep   (lin-lin:kr (lag-ud wob 0.01 lag-delay) 0 1 400 sweep-max-freq)
+        snd     (mix (saw (* (midicps note) [0.99 1.01])))
+        snd     (lpf snd sweep)
+        snd     (normalizer snd)
+
+        snd     (bpf snd 1500 2)
+        ;;special flavours
+        ;;hi manster
+        snd     (select (> hi-man 0.05) [snd (* 4 (hpf snd hi-man-max))])
+
+        ;;sweep manster
+        snd     (select (> sweep-man 0.05) [snd (* 4 (hpf snd sweep))])
+
+        ;;lo manster
+        snd     (select (> lo-man 0.05) [snd (lpf snd lo-man-max)])
+
+        ;;decimate
+        snd     (select (> deci-man 0.05) [snd (round snd 0.1)])
+
+        ;;crunch
+        snd     (select (> tan-man 0.05) [snd (tanh (* snd 5))])
+
+        snd     (* 0.5 (+ (* 0.8 snd) (* 0.3 (g-verb snd 100 0.7 0.7))))
+        ]
+    (normalizer snd)))
+
+;; Here's a nice supersaw synth
+(definst supersaw2 [freq 440 amp 1 fil-mul 2 rq 0.3]
+  (let [input  (lf-saw freq)
+        shift1 (lf-saw 4)
+        shift2 (lf-saw 7)
+        shift3 (lf-saw 5)
+        shift4 (lf-saw 2)
+        comp1  (> input shift1)
+        comp2  (> input shift2)
+        comp3  (> input shift3)
+        comp4  (> input shift4)
+        output (+ (- input comp1)
+                  (- input comp2)
+                  (- input comp3)
+                  (- input comp4))
+        output (- output input)
+        output (leak-dc:ar (* output 0.25))
+        output (normalizer (rlpf output (* freq fil-mul) rq))]
+
+    (* amp output (line 1 0 10 FREE))))
+
+
+;; OK, let's make some noise!
+
+;; Now, let's start up all the synths:
+(do
+  (def r-cnt (root-cnt))
+  (def b-cnt (beat-cnt))
+  (def b-trg (beat-trg))
+  (def r-trg (root-trg))
+
+  (def kicks (doall
+              (for [x (range 8)]
+                (mono-sequencer :buf kick-s :beat-num x :sequencer buf-0))))
+
+  (def clicks (doall
+               (for [x (range 8)]
+                 (mono-sequencer :buf click-s :beat-num x :sequencer buf-1))))
+
+  (def booms (doall
+              (for [x (range 8)]
+                (mono-sequencer :buf boom-s :beat-num x :sequencer buf-2))))
+
+  (def subbies (doall
+                (for [x (range 8)]
+                  (mono-sequencer :buf subby-s :beat-num x :sequencer buf-3)))))
+
+;; An empty palatte to play with:
+(do
+  (buffer-write! buf-0 [1 0 1 1 0 0 1 0])  ;; kick
+  (buffer-write! buf-1 [0 0 0 0 1 0 0 0])  ;; click
+  (buffer-write! buf-2 [0 0 0 0 0 0 1 0])  ;; boom
+  (buffer-write! buf-3 [0 0 0 0 0 0 0 0])) ;; subby
+
+;; try mixing up the sequences. Evaluate this a few times:
+(do
+  (buffer-write! buf-0 (repeatedly 8 #(choose [0 1])))
+  (buffer-write! buf-1 (repeatedly 8 #(choose [0 1])))
+  (buffer-write! buf-2 (repeatedly 8 #(choose [0 1])))
+  (buffer-write! buf-3 (repeatedly 8 #(choose [0 1]))))
+
+;; and then to something interesting
+(do
+  (buffer-write! buf-0 [1 1 1 1 1 1 1 1])
+  (buffer-write! buf-1 [1 0 1 0 0 1 1 0])
+  (buffer-write! buf-2 [1 1 0 1 0 1 1 0])
+  (buffer-write! buf-3 [1 0 0 0 0 0 1 0]))
+
+;; try changing the rate of the global pulse (everything else will
+;; follow suit):
+(ctl r-trg :rate 75)
+(ctl r-trg :rate 300)
+(ctl r-trg :rate 150)
+
+;; get the dubstep bass involved:
+(dubstep :note 28
+         :wobble (* BEAT-FRACTION 1)
+         :lo-man 1)
+
+;; go crazy - especially with the deci-man
+(ctl dubstep
+     :note 40
+     :wobble (* BEAT-FRACTION 0.1)
+     :lag-delay 0.05
+     :hi-man 0
+     :lo-man 0
+     :deci-man 0)
+
+
+;; Bring in the supersaws!
+
+(def ssaw-rq 0.9)
+(def ssaw-fil-mul 2)
+
+;; Fire at will...
+(supersaw2 (midi->hz 28) :amp 3 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 40) :amp 3 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 45) :amp 2 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 48) :amp 2 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 52) :amp 2 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 55) :amp 2 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 57) :amp 2 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 64) :amp 1 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 67) :amp 1 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+(supersaw2 (midi->hz 69) :amp 1 :fil-mul ssaw-fil-mul :rq ssaw-rq)
+
+;; modify saw params on the fly too...
+;;(ctl supersaw2 :fil-mul 4 :rq 0.2)


fix transaction error

fix transaction error

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


[DG] keehar -> keehar.core unbreaks master

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


Update profiles for AWS environment

Update profiles for AWS environment


Create project.clj

Create project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,14 @@
+(defproject iyye "iyye0.1.0-SNAPSHOT"
+  :description "ai agent experiment"
+  :url "http://github.com/yumzia/iyye"
+  :license {:name "Gnu Affero General Public License"
+            :url "http://www.gnu.org/licenses/agpl.html"}
+  :dependencies [[org.clojure/clojure "1.8.0"]
+                 [org.clojure/tools.logging "0.3.1"]
+                 [org.slf4j/slf4j-log4j12 "1.7.1"]
+                 [log4j/log4j "1.2.17" :exclusions [javax.mail/mail
+                                                    javax.jms/jms
+                                                    com.sun.jmdk/jmxtools
+                                                    com.sun.jmx/jmxri]]
+                 ]
+  :main iyye.core)


bump teller

bump teller


add targets for lein clean

add targets for lein clean

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/shaunlebron/atom-parinfer.git/'


Added Maven-specific settings.

Added Maven-specific settings.

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


Exclude org.apache.httpcomponents/httpclient

See: https://github.com/aws/aws-sdk-java/issues/1919

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


remove buddy again as adding was not the solution to our woes; also see turbovote-admin-http-api PR 4

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


Version 120-SNAPSHOT

Version 120-SNAPSHOT

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


Bumping to version of BitAuth that supports Unicode

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


Version 131

Version 131


Modified dependencies in project.clj

Modified dependencies in project.clj

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


Upgrade kehaar to 0.10.3

Upgrade kehaar to 0.10.3

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


Adds barebones project.clj

Adds barebones project.clj

--- project.clj
+++ project.clj
@@ -0,0 +1,5 @@
+(defproject cljs-introvert "0.1.0-SNAPSHOT"
+  :description "A small utility belt for introspecting into clojurescript."
+  :url "http://github.com/joshuafcole/cljs-introvert"
+  :dependencies [[org.clojure/clojure "1.5.1"]]
+  :cljsbuild {:builds [{}]})


Use the far simpler PGCopyOutputStream.

Use the far simpler PGCopyOutputStream.

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


excel data added

excel data added

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

--- test/clj/fractals/excel_test.clj
+++ test/clj/fractals/excel_test.clj
@@ -0,0 +1,4 @@
+(ns fractals.datalog-test
+  (:require
+   [clojure.test :refer :all]
+   [dk.ative.docjure.spreadsheet :as spreadsheet]))


Update cert expiration warning test

Update cert expiration warning test

A new cert has been added, so this test has been updated to warn when
close to the expiration date of the new cert.


Fix call to `log/log`

Fix call to `log/log`

clojure.tools.logging's `log` function doesn't join string arguments
like the debug/info/warn/etc macros do. It expects a Throwable as the
argument after a string. This was causing that log invocation to
itself throw an exception.


Add PubsubIO source and sink

Add PubsubIO source and sink

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

--- src/datasplash/pubsub.clj
+++ src/datasplash/pubsub.clj
@@ -0,0 +1,42 @@
+(ns datasplash.pubsub
+  (:require [datasplash.core :refer :all])
+  (:import (com.google.cloud.dataflow.sdk.io PubsubIO$Read PubsubIO$Write)
+           (com.google.cloud.dataflow.sdk.values PBegin)
+           (com.google.cloud.dataflow.sdk Pipeline)))
+
+(defn read-from-pubsub
+  "Create an unbounded PCollection from a pubsub stream"
+  [topic options p]
+  (-> p
+      (cond-> (instance? Pipeline p) (PBegin/in))
+      (apply-transform (PubsubIO$Read/subscription topic) {} options)))
+
+(defn write-to-pubsub
+  "Write the contents of an unbounded PCollection to to a pubsub stream"
+  [topic options pcoll]
+  (-> pcoll
+      (apply-transform (PubsubIO$Write/topic topic) {} options)))
+
+; Example
+;(def read-subscription "projects/my-project/subscriptions/my-subscription")
+;(def write-transformed-topic "projects/my-project/topics/my-transformed-topic")
+;(def read-transformed-subscription "projects/my-project/subscriptions/my-transformed-subscription")
+;
+;(defn stream-interactions-from-pubsub
+;  [pipeline]
+;  (->> pipeline
+;       (read-from-pubsub read-subscription {:name "read-interactions-from-pubsub"})
+;       (ds/map (fn [message]
+;                 (do
+;                   (log/info (str "Got message:\n" message))
+;                   message)) {:name "log-message"})
+;       (write-to-pubsub write-transformed-topic {:name "write-forwarded-interactions-to-pubsub"})))
+;
+;(defn stream-forwarded-interactions-from-pubsub
+;  [pipeline]
+;  (->> pipeline
+;       (read-from-pubsub read-transformed-subscription {:name "read-transformed-interactions-from-pubsub"})
+;       (ds/map (fn [message]
+;                 (do
+;                   (log/info (str "Got transformed message:\n" message))
+;                   message)) {:name "log-transformed-message"})))


playing with macros..

playing with macros..

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

--- src/experiments/macro.clj
+++ src/experiments/macro.clj
@@ -0,0 +1,26 @@
+
+;; learn macros
+
+;; create a function to call first, clarify doseq and var args first
+(defn create-frame
+[name abs  & slot-pairs ]
+	(println "-name: " name "abs:" abs (.size slot-pairs))
+	(doseq [pair slot-pairs]
+		(println "  -slot:" pair)))
+
+;(create-frame :test-frame :base  (list :test-slot :slot-type) (list :other-slot :other-type))
+(println "==================")
+
+; do-nothing macro
+(defmacro pass-through [name abs slot-name slot-type]
+	(create-frame name abs (list slot-name slot-type)))
+
+;;(create-frame :name :abs (list :p11 :p12) (list :21 :22))
+(pass-through :name :abs :s1 :v1)
+(println "==================")
+
+
+; more involved macro
+
+; (short-frame :name :abstraction (:slot-name :filler-type)
+;(defmacro short-frame [& parts]


Include TV classic users in tried-to-register

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


feat(request): add error message on response body

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


fixing typo

fixing typo

--- example/project.clj
+++ example/project.clj
@@ -84,7 +84,7 @@

   :profiles { :dev { :dependencies [[com.cemerick/piggieback "0.2.1"]
                                     [com.stuartsierra/component "0.3.0"]
-                                    [figwheel-sidecar "0.4.2-SNAPTSHOT"]
+                                    [figwheel-sidecar "0.4.2-SNAPSHOT"]
                                     #_[org.clojure/tools.nrepl "0.2.10"]]
                     :source-paths ["src" "../sidecar/src"]
                     :plugins [[refactor-nrepl "1.2.0-SNAPSHOT"]


slave resources

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


definitional environment

definitional environment

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

--- src/latte/defenv.clj
+++ src/latte/defenv.clj
@@ -0,0 +1,26 @@
+(ns latte.defenv
+  "The definitional environment."
+  )
+
+;;{
+;; ## Definitional environment
+;;}
+
+(defn latte-definition? [v]
+  (and (map? v)
+       (contains? v :tag)
+       (contains? #{:term :theorem :axiom} (:tag v))))
+
+
+(defn fetch-definition [locals sym]
+  (if-let [ldef (get locals sym)]
+    [:ok ldef]
+    (if-let [gdef (resolve sym)]
+      (if (latte-definition? gdef)
+        [:ok gdef]
+        [:ko {:msg "Not a LaTTe definition" :def sym}])
+      [:ko {:msg "No such definition" :def sym}])))
+
+(defn registered-definition? [locals sym]
+  (let [[status _] (fetch-definition locals sym)]
+    (= status :ok)))


core dokumentatu

core dokumentatu

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


add measures ns

add measures ns

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

--- src/clj/ceres_analytics/measures.clj
+++ src/clj/ceres_analytics/measures.clj
@@ -0,0 +1 @@
+(ns ceres-analytics.measures)


more Time to eat

more Time to eat

Clojure

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/nikai3d/ce-challenges.git/'


[WM] close all the channels

[WM] close all the channels

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


Ring middleware helpers have been added to http artifact.

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

--- http/src/clj/hellhound/components/ring_middleware.clj
+++ http/src/clj/hellhound/components/ring_middleware.clj
@@ -0,0 +1,11 @@
+(ns hellhound.components.ring-middleware)
+
+
+(defn middleware-applier
+  [middlewares]
+  (fn [component value]
+    (let [request (:request value)])))
+
+(defn make-ring-middleware-component
+  [name middlewares]
+  (make-transformer name (middleware-applier middlewares)))


Define around-with-custom-config spec helper.

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

--- spec/incise/spec_helpers.clj
+++ spec/incise/spec_helpers.clj
@@ -0,0 +1,11 @@
+(ns incise.spec-helpers
+  "A namespace for defining helpers which are used in multiple spec namespaces."
+  (:require incise.config
+            [speclj.core :refer [around]]))
+
+(defmacro around-with-custom-config [& {:as custom-config}]
+  `(around [it#]
+     (with-redefs [incise.config/config
+                   (atom (merge @incise.config/config
+                                ~custom-config))]
+       (it#))))


Copy tests from election-notification-http-api

...and update them to use conventions in this project. I deleted the tests for "no response gives gateway timeout" because that's just testing bifrost.

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


fix payment-types

fix payment-types

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


Add multi prototype

Add multi prototype

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

--- src/clojure/clojurewerkz/cassaforte/cql_multi.clj
+++ src/clojure/clojurewerkz/cassaforte/cql_multi.clj
@@ -0,0 +1,157 @@
+(ns clojurewerkz.cassaforte.cql-multi
+  "Key CQL operations interface, prepared statement implementation, convenience functions
+   for key operations built on top of CQL. Includes versions of cassaforte.cql functions that
+   take database as an explicit argument.
+
+   Use these namespace when you need to work with multiple databases or manage database
+   and connection lifecycle explicitly."
+  (:require
+   [qbits.hayt.cql :as cql]
+   [clojurewerkz.cassaforte.query :as query]
+   [clojurewerkz.cassaforte.client :as client])
+  (:import [com.datastax.driver.core Session]))
+
+(defn ^:private execute-
+  [^Session session query-params builder]
+  (let [rendered-query (client/render-query (client/compile-query query-params builder))]
+    (client/execute session rendered-query cql/*prepared-statement*)))
+
+;;
+;; Schema operations
+;;
+
+(defn drop-keyspace
+  [^Session session ks]
+  (execute- session [ks] query/drop-keyspace-query))
+
+(defn create-keyspace
+  [^Session session & query-params]
+  (execute- session query-params query/create-keyspace-query))
+
+(defn create-index
+  [^Session session & query-params]
+  (execute- session query-params query/create-index-query))
+
+(defn drop-index
+  [^Session session & query-params]
+  (execute- session query-params query/drop-index-query))
+
+(defn create-table
+  [^Session session & query-params]
+  (execute- session query-params query/create-table-query))
+
+(def create-column-family create-table)
+
+(defn drop-table
+  [^Session session ks]
+  (execute- session [ks] query/drop-table-query))
+
+(defn use-keyspace
+  [^Session session ks]
+  (execute- session [ks] query/use-keyspace-query))
+
+(defn alter-table
+  [^Session session & query-params]
+  (execute- session query-params query/alter-table-query))
+
+(defn alter-keyspace
+  [^Session session & query-params]
+  (execute- session query-params query/alter-keyspace-query))
+
+;;
+;; DB Operations
+;;
+
+(defn insert
+  [^Session session & query-params]
+  (execute- session query-params query/insert-query))
+
+(defn insert-batch
+  [^Session session table records]
+  (->> (map #(query/insert-query table %) records)
+       (apply query/queries)
+       query/batch-query
+       client/render-query
+       client/execute))
+
+(defn update
+  [^Session session & query-params]
+  (execute- session query-params query/update-query))
+
+(defn delete
+  [^Session session & query-params]
+  (execute- session query-params query/delete-query))
+
+(defn select
+  [^Session session & query-params]
+  (execute- session query-params query/select-query))
+
+(defn truncate
+  [^Session session table]
+  (execute- session [table] query/truncate-query))
+
+;;
+;; Higher level DB functions
+;;
+
+(defn perform-count
+  [^Session session table & query-params]
+  (:count
+   (first
+    (select session
+            table
+            (cons
+             (query/columns (query/count*))
+             query-params)))))
+
+;;
+;; Higher-level helper functions for schema
+;;
+
+(defn describe-keyspace
+  [^Session session ks]
+  (first
+   (select session
+           :system.schema_keyspaces
+           (query/where :keyspace_name ks))))
+
+(defn describe-table
+  [^Session session ks table]
+  (first
+   (select session
+           :system.schema_columnfamilies
+           (query/where :keyspace_name ks
+                        :columnfamily_name table))))
+
+(defn describe-columns
+  [^Session session ks table]
+  (select session
+          :system.schema_columns
+          (query/where :keyspace_name ks
+                       :columnfamily_name table)))
+
+;;
+;; Higher-level collection manipulation
+;;
+
+(defn- get-chunk
+  "Returns next chunk for the lazy world iteration"
+  [^Session session table partition-key chunk-size last-pk]
+  (if (nil? last-pk)
+    (select session
+            table
+            (query/limit chunk-size))
+    (select session
+            table
+            (query/where (query/token partition-key) [> (query/token last-pk)])
+            (query/limit chunk-size))))
+
+(defn iterate-world
+  "Lazily iterates through the collection, returning chunks of chunk-size."
+  ([^Session session table partition-key chunk-size]
+     (iterate-world table partition-key chunk-size []))
+  ([^Session session table partition-key chunk-size c]
+     (lazy-cat c
+               (let [last-pk    (get (last c) partition-key)
+                     next-chunk (get-chunk session table partition-key chunk-size last-pk)]
+                 (iterate-world table partition-key chunk-size next-chunk)))))


Removed dead code

Removed dead code

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


increased ping time

increased ping time

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


Add link to GitHub repo in footer

Add link to GitHub repo in footer

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


fix "8 phantom items" bug

fix "8 phantom items" bug


adding some common things used throughout models such as timezone list and permissions defs.

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

--- src/metabase/models/common.clj
+++ src/metabase/models/common.clj
@@ -0,0 +1,25 @@
+(ns metabase.models.common)
+
+
+(def perms-none 0)
+(def perms-read 1)
+(def perms-readwrite 2)
+
+(def permissions
+  [{:id perms-none :name "None"},
+   {:id perms-read :name "Read Only"},
+   {:id perms-readwrite :name "Read & Write"}])
+
+
+(def timezones
+  ['GMT',
+   'UTC',
+   'US/Alaska',
+   'US/Arizona',
+   'US/Central',
+   'US/Eastern',
+   'US/Hawaii',
+   'US/Mountain',
+   'US/Pacific',
+   'America/Costa_Rica'
+   ])


Bite the bullet and bundle lancet since it's not in any real repo yet.

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

--- src/lancet.clj
+++ src/lancet.clj
@@ -0,0 +1,137 @@
+(ns lancet
+  (:gen-class)
+  (:use [clojure.contrib.except :only (throw-if)]
+        clojure.contrib.shell-out
+        [clojure.contrib.str-utils :only (re-split)])
+  (:import (java.beans Introspector) (java.util.concurrent CountDownLatch)))
+
+(defmulti coerce (fn [dest-class src-inst] [dest-class (class src-inst)]))
+
+(defmethod coerce [java.io.File String] [_ str]
+  (java.io.File. str))
+(defmethod coerce [Boolean/TYPE String] [_ str]
+  (contains? #{"on" "yes" "true"} (.toLowerCase str)))
+(defmethod coerce :default [dest-cls obj] (cast dest-cls obj))
+
+(defn env [val]
+  (System/getenv (name val)))
+
+(defn- build-sh-args [args]
+  (concat (re-split #"\s+" (first args)) (rest args)))
+
+(defn system [& args]
+  (println (apply sh (build-sh-args args))))
+
+(def
+ #^{:doc "Dummy ant project to keep Ant tasks happy"}
+ ant-project
+ (let [proj (org.apache.tools.ant.Project.)
+       logger (org.apache.tools.ant.NoBannerLogger.)]
+   (doto logger
+     (.setMessageOutputLevel org.apache.tools.ant.Project/MSG_INFO)
+     (.setOutputPrintStream System/out)
+     (.setErrorPrintStream System/err))
+   (doto proj
+     (.init)
+     (.addBuildListener logger))))
+
+(defn property-descriptor [inst prop-name]
+  (first
+   (filter #(= prop-name (.getName %))
+           (.getPropertyDescriptors
+            (Introspector/getBeanInfo (class inst))))))
+
+(defn get-property-class [write-method]
+  (first (.getParameterTypes write-method)))
+
+(defn set-property! [inst prop value]
+  (let [pd (property-descriptor inst prop)]
+    (throw-if (nil? pd) (str "No such property " prop))
+    (let [write-method (.getWriteMethod pd)
+          dest-class (get-property-class write-method)]
+      (.invoke write-method inst (into-array [(coerce dest-class value)])))))
+
+(defn set-properties! [inst prop-map]
+  (doseq [[k v] prop-map] (set-property! inst (name k) v)))
+
+(defn instantiate-task [project name props & filesets]
+  (let [task (.createTask project name)]
+    (throw-if (nil? task) (str "No task named " name))
+    (doto task
+      (.init)
+      (.setProject project)
+      (set-properties! props))
+    (doseq [fs filesets]
+      (.add task fs))
+    task))
+
+(defn runonce
+  "Create a function that will only run once. All other invocations
+  return the first calculated value. The function *can* have side effects
+  and calls to runonce *can* be composed. Deadlock is possible
+  if you have circular dependencies.
+  Returns a [has-run-predicate, reset-fn, once-fn]"
+  [function]
+  (let [sentinel (Object.)
+        result (atom sentinel)
+        reset-fn (fn [] (reset! result sentinel))
+        has-run-fn (fn [] (not= @result sentinel))]
+    [has-run-fn
+     reset-fn
+     (fn [& args]
+       (locking sentinel
+         (if (= @result sentinel)
+           (reset! result (function))
+           @result)))]))
+
+(defmacro has-run? [f]
+  `((:has-run (meta (var ~f)))))
+
+(defmacro reset [f]
+  `((:reset-fn (meta (var ~f)))))
+
+(def targets (atom #{}))
+
+(defmacro deftarget [sym doc & forms]
+  (swap! targets #(conj % sym))
+  (let [has-run (gensym "hr-") reset-fn (gensym "rf-")]
+    `(let [[~has-run ~reset-fn once-fn#] (runonce (fn [] ~@forms))]
+       (def ~(with-meta sym {:doc doc :has-run has-run :reset-fn reset-fn})
+            once-fn#))))
+
+(defmacro define-ant-task [clj-name ant-name]
+  `(defn ~clj-name [& props#]
+     (let [task# (apply instantiate-task ant-project ~(name ant-name) props#)]
+       (.execute task#)
+       task#)))
+
+(defmacro define-ant-type [clj-name ant-name]
+  `(defn ~clj-name [props#]
+     (let [bean# (new ~ant-name)]
+       (set-properties! bean# props#)
+       (when (property-descriptor bean# "project")
+         (set-property! bean# "project" ant-project))
+       bean#)))
+
+(defn task-names [] (map symbol (seq (.. ant-project getTaskDefinitions keySet))))
+
+(defn safe-ant-name [n]
+  (if (ns-resolve 'clojure.core n) (symbol (str "ant-" n)) n))
+
+(defmacro define-all-ant-tasks []
+  `(do ~@(map (fn [n] `(define-ant-task ~n ~n)) (task-names))))
+
+(defmacro define-all-ant-tasks []
+  `(do ~@(map (fn [n] `(define-ant-task ~(safe-ant-name n) ~n)) (task-names))))
+
+(define-all-ant-tasks)
+
+(define-ant-type files org.apache.tools.ant.types.resources.Files)
+(define-ant-type fileset org.apache.tools.ant.types.FileSet)
+
+(defn -main [& targs]
+  (load-file "build.clj")
+  (if targs
+    (doseq [targ (map symbol targs)]
+      (eval (list targ)))
+    (println "Available targets: " @targets)))


add back identifiers-schema as it is used in a few places

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


A first implementation of Ryssels Algorithm

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

error: pathspec 'src/conexp/contrib/experimental/ryssel_algorithm.clj' did not match any file(s) known to git

--- src/conexp/contrib/experimental/ryssel_algorithm.clj
+++ src/conexp/contrib/experimental/ryssel_algorithm.clj
@@ -0,0 +1,57 @@
+;; Copyright (c) Daniel Borchmann. All rights reserved.
+;; The use and distribution terms for this software are covered by the
+;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;; which can be found in the file LICENSE at the root of this distribution.
+;; By using this software in any fashion, you are agreeing to be bound by
+;; the terms of this license.
+;; You must not remove this notice, or any other, from this software.
+
+(ns conexp.contrib.experimental.ryssel_algorithm
+  (:use conexp.base
+        conexp.fca.contexts
+        conexp.fca.implications))
+
+(ns-doc "An implementation of Ryssels Algorithm")
+
+;;;
+
+(defn cover [base-set candidates m extent]
+  (apply partial-min
+         subset?
+         (set-of X [X (subsets candidates),
+                    :when (subset? (reduce intersection base-set (map extent X))
+                                   (extent m))])))
+
+(defn ryssel-base
+  "Returns the set of implications computed by Ryssels Algorithm."
+  [ctx]
+  (let [attribute-extent (memoize #(attribute-derivation ctx #{%}))]
+    (loop [implications #{},
+           atts         (attributes ctx)]
+      (if (empty? atts)
+        implications
+        (let [m            (first atts),
+              implications (union implications
+                                  (set-of (make-implication #{m} #{n})
+                                          [n (disj (attributes ctx) m)
+                                           :when (subset? (attribute-extent m)
+                                                          (attribute-extent n))])),
+              candidates   (set-of n
+                                   [n (attributes ctx)
+                                    :when (not (exists [p (attributes ctx)]
+                                                 (and (subset? (intersection (attribute-extent n)
+                                                                             (attribute-extent m))
+                                                               (attribute-extent p))
+                                                      (proper-subset? (attribute-extent p)
+                                                                      (attribute-extent m)))))]),
+              candidates   (disj candidates (attribute-extent m)),
+              covers       (cover (objects ctx) candidates m attribute-extent),
+              implications (union implications
+                                  (set-of (make-implication X #{m})
+                                          [X covers
+                                           :when (not (contains? X m))]))]
+          (recur implications (rest atts)))))))
+
+;;;
+
+nil


clean up

clean up

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