Reagent integration for Semantic UI React components

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

--- src/semantic_reagent/core.cljs
+++ src/semantic_reagent/core.cljs
@@ -0,0 +1,282 @@
+(ns semantic-reagent.core
+  (:refer-clojure :exclude [List])
+  (:require [reagent.core :as r]
+            [cljsjs.semantic-ui-react]))
+
+;; See also: http://react.semantic-ui.com
+
+(def semantic-ui js/semanticUIReact)
+
+;;
+;; Elements
+;;
+
+;; Button
+(def jsButton (.-Button semantic-ui))
+(def Button (r/adapt-react-class jsButton))
+(def ButtonContent (r/adapt-react-class (.-Content jsButton)))
+(def ButtonGroup (r/adapt-react-class (.-Group jsButton)))
+(def ButtonOr (r/adapt-react-class (.-Or jsButton)))
+
+;; Container
+(def Container (r/adapt-react-class (.-Container semantic-ui)))
+
+;; Divider
+(def Divider (r/adapt-react-class (.-Container semantic-ui)))
+
+;; Flag
+(def Flag (r/adapt-react-class (.-Flag semantic-ui)))
+
+;; Header
+(def jsHeader (.-Header semantic-ui))
+(def Header (r/adapt-react-class jsHeader))
+(def HeaderContent (r/adapt-react-class (.-Content jsHeader)))
+(def HeaderSubheader (r/adapt-react-class (.-Subheader jsHeader)))
+
+;; Icon
+(def jsIcon (.-Icon semantic-ui))
+(def Icon (r/adapt-react-class jsIcon))
+(def IconGroup (r/adapt-react-class (.-Group jsIcon)))
+
+;; Image
+(def jsImage (.-Image semantic-ui))
+(def Image (r/adapt-react-class jsImage))
+(def ImageGroup (r/adapt-react-class (.-Group jsImage)))
+
+;; Input
+(def Input (r/adapt-react-class (.-Input semantic-ui)))
+
+;; Label
+(def jsLabel (.-Label semantic-ui))
+(def Label (r/adapt-react-class jsLabel))
+(def LabelDetail (r/adapt-react-class (.-Detail jsLabel)))
+(def LabelGroup (r/adapt-react-class (.-Group jsLabel)))
+
+;; List
+(def jsList (.-List semantic-ui))
+(def List (r/adapt-react-class jsList))
+(def ListContent (r/adapt-react-class (.-Content jsList)))
+(def ListHeader (r/adapt-react-class (.-Header jsList)))
+(def ListIcon (r/adapt-react-class (.-Icon jsList)))
+(def ListItem (r/adapt-react-class (.-Item jsList)))
+(def ListList (r/adapt-react-class (.-List jsList)))
+
+;; Loader
+(def Loader (r/adapt-react-class (.-Loader semantic-ui)))
+
+;; Rail
+(def Rail (r/adapt-react-class (.-Rail semantic-ui)))
+
+;; Reveal
+(def jsReveal (.-Reveal semantic-ui))
+(def Reveal (r/adapt-react-class jsReveal))
+(def RevealContent (r/adapt-react-class (.-Content jsReveal)))
+
+;; Segment
+(def jsSegment (.-Segment semantic-ui))
+(def Segment (r/adapt-react-class jsSegment))
+(def SegmentGroup (r/adapt-react-class (.-Group jsSegment)))
+
+;; Step
+(def jsStep (.-Step semantic-ui))
+(def Step (r/adapt-react-class jsStep))
+(def StepContent (r/adapt-react-class (.-Content jsStep)))
+(def StepDescription (r/adapt-react-class (.-Description jsStep)))
+(def StepGroup (r/adapt-react-class (.-Group jsStep)))
+(def StepTitle (r/adapt-react-class (.-Title jsStep)))
+
+
+;;
+;; Collections
+;;
+
+;; Breadcrumb
+(def jsBreadcrumb (.-Breadcrumb semantic-ui))
+(def Breadcrumb (r/adapt-react-class jsBreadcrumb))
+(def BreadcrumbDivider (r/adapt-react-class (.-Divider jsBreadcrumb)))
+(def BreadcrumbSection (r/adapt-react-class (.-Section jsBreadcrumb)))
+
+;; Form
+(def jsForm (.-Form semantic-ui))
+(def Form (r/adapt-react-class jsForm))
+(def FormField (r/adapt-react-class (.-Field jsForm)))
+(def FormButton (r/adapt-react-class (.-Button jsForm)))
+(def FormCheckbox (r/adapt-react-class (.-Checkbox jsForm)))
+(def FormDropdown (r/adapt-react-class (.-Dropdown jsForm)))
+(def FormGroup (r/adapt-react-class (.-Group jsForm)))
+(def FormInput (r/adapt-react-class (.-Input jsForm)))
+(def FormRadio (r/adapt-react-class (.-Radio jsForm)))
+(def FormSelect (r/adapt-react-class (.-Select jsForm)))
+(def FormTextArea (r/adapt-react-class (.-TextArea jsForm)))
+
+;; Grid
+(def jsGrid (.-Grid semantic-ui))
+(def Grid (r/adapt-react-class jsGrid))
+(def GridColumn (r/adapt-react-class (.-Column jsGrid)))
+(def GridRow (r/adapt-react-class (.-Row jsGrid)))
+
+;; Menu
+(def jsMenu (.-Menu semantic-ui))
+(def Menu (r/adapt-react-class jsMenu))
+(def MenuHeader (r/adapt-react-class (.-Header jsMenu)))
+(def MenuItem (r/adapt-react-class (.-Item jsMenu)))
+(def MenuMenu (r/adapt-react-class (.-Menu jsMenu)))
+
+;; Message
+(def jsMessage (.-Message semantic-ui))
+(def Message (r/adapt-react-class jsMessage))
+(def MessageContent (r/adapt-react-class (.-Content jsMessage)))
+(def MessageHeader (r/adapt-react-class (.-Header jsMessage)))
+(def MessageList (r/adapt-react-class (.-List jsMessage)))
+(def MessageItem (r/adapt-react-class (.-Item jsMessage)))
+
+;; Table
+(def jsTable (.-Table semantic-ui))
+(def Table (r/adapt-react-class jsTable))
+(def TableBody (r/adapt-react-class (.-Body jsTable)))
+(def TableCell (r/adapt-react-class (.-Cell jsTable)))
+(def TableFooter (r/adapt-react-class (.-Footer jsTable)))
+(def TableHeader (r/adapt-react-class (.-Header jsTable)))
+(def TableHeaderCell (r/adapt-react-class (.-HeaderCell jsTable)))
+(def TableRow (r/adapt-react-class (.-Row jsTable)))
+
+;;
+;; Views
+;;
+
+;; Card
+(def jsCard (.-Card semantic-ui))
+(def Card (r/adapt-react-class jsCard))
+(def CardContent (r/adapt-react-class (.-Content jsCard)))
+(def CardDescription (r/adapt-react-class (.-Description jsCard)))
+(def CardGroup (r/adapt-react-class (.-Group jsCard)))
+(def CardHeader (r/adapt-react-class (.-Header jsCard)))
+(def CardMeta (r/adapt-react-class (.-Meta jsCard)))
+
+;; Comment
+(def jsComment (.-Comment semantic-ui))
+(def Comment (r/adapt-react-class jsComment))
+(def CommentAuthor (r/adapt-react-class (.-Author jsComment)))
+(def CommentAction (r/adapt-react-class (.-Action jsComment)))
+(def CommentActions (r/adapt-react-class (.-Actions jsComment)))
+(def CommentAvatar (r/adapt-react-class (.-Avatar jsComment)))
+(def CommentContent (r/adapt-react-class (.-Content jsComment)))
+(def CommentGroup (r/adapt-react-class (.-Group jsComment)))
+(def CommentMetadata (r/adapt-react-class (.-Metadata jsComment)))
+(def CommentText (r/adapt-react-class (.-Text jsComment)))
+
+;; Feed
+(def jsFeed (.-Feed semantic-ui))
+(def Feed (r/adapt-react-class jsFeed))
+(def FeedContent (r/adapt-react-class (.-Content jsFeed)))
+(def FeedDate (r/adapt-react-class (.-Date jsFeed)))
+(def FeedEvent (r/adapt-react-class (.-Event jsFeed)))
+(def FeedExtra (r/adapt-react-class (.-Extra jsFeed)))
+(def FeedLabel (r/adapt-react-class (.-Label jsFeed)))
+(def FeedLike (r/adapt-react-class (.-Like jsFeed)))
+(def FeedMeta (r/adapt-react-class (.-Meta jsFeed)))
+(def FeedSummary (r/adapt-react-class (.-Summary jsFeed)))
+(def FeedUser (r/adapt-react-class (.-User jsFeed)))
+
+;; Item
+(def jsItem (.-Item semantic-ui))
+(def Item (r/adapt-react-class jsItem))
+(def ItemContent (r/adapt-react-class (.-Content jsItem)))
+(def ItemDescription (r/adapt-react-class (.-Description jsItem)))
+(def ItemExtra (r/adapt-react-class (.-Extra jsItem)))
+(def ItemGroup (r/adapt-react-class (.-Group jsItem)))
+(def ItemHeader (r/adapt-react-class (.-Header jsItem)))
+(def ItemImage (r/adapt-react-class (.-Image jsItem)))
+(def ItemMeta (r/adapt-react-class (.-Meta jsItem)))
+
+;; Statistic
+(def jsStatistic (.-Statistic semantic-ui))
+(def Statistic (r/adapt-react-class jsStatistic))
+(def StatisticGroup (r/adapt-react-class (.-Group jsStatistic)))
+(def StatisticLabel (r/adapt-react-class (.-Label jsStatistic)))
+(def StatisticValue (r/adapt-react-class (.-Value jsStatistic)))
+
+;;
+;; Modules
+;;
+
+;; Accordion
+(def jsAccordion (.-Accordion semantic-ui))
+(def Accordion (r/adapt-react-class jsAccordion))
+(def AccordionContent (r/adapt-react-class (.-Content jsAccordion)))
+(def AccordionTitle (r/adapt-react-class (.-Title jsAccordion)))
+
+;; Checkbox
+(def Checkbox (r/adapt-react-class (.-Checkbox semantic-ui)))
+
+;; Dimmer
+(def jsDimmer (.-Dimmer semantic-ui))
+(def Dimmer (r/adapt-react-class jsDimmer))
+(def DimmerDimmable (r/adapt-react-class (.-Dimmable jsDimmer)))
+
+;; Dropdown
+(def jsDropdown (.-Dropdown semantic-ui))
+(def Dropdown (r/adapt-react-class jsDropdown))
+(def DropdownDivider (r/adapt-react-class (.-Divider jsDropdown)))
+(def DropdownHeader (r/adapt-react-class (.-Header jsDropdown)))
+(def DropdownItem (r/adapt-react-class (.-Item jsDropdown)))
+(def DropdownMenu (r/adapt-react-class (.-Menu jsDropdown)))
+
+;; Embed
+(def Embed (r/adapt-react-class (.-Embed semantic-ui)))
+
+;; Modal
+(def jsModal (.-Modal semantic-ui))
+(def Modal (r/adapt-react-class jsModal))
+(def ModalHeader (r/adapt-react-class (.-Header jsModal)))
+(def ModalContent (r/adapt-react-class (.-Content jsModal)))
+(def ModalDescription (r/adapt-react-class (.-Description jsModal)))
+(def ModalActions (r/adapt-react-class (.-Actions jsModal)))
+
+;; Popup
+(def jsPopup (.-Popup semantic-ui))
+(def Popup (r/adapt-react-class jsPopup))
+(def PopupContent (r/adapt-react-class (.-Content jsPopup)))
+(def PopupHeader (r/adapt-react-class (.-Header jsPopup)))
+
+;; Progress
+(def Progress (r/adapt-react-class (.-Progress semantic-ui)))
+
+;; Rating
+(def jsRating (.-Rating semantic-ui))
+(def Rating (r/adapt-react-class jsRating))
+(def RatingIcon (r/adapt-react-class (.-Icon jsRating)))
+
+;; Search
+(def jsSearch (.-Search semantic-ui))
+(def Search (r/adapt-react-class jsSearch))
+(def SearchCategory (r/adapt-react-class (.-Category jsSearch)))
+(def SearchResult (r/adapt-react-class (.-Result jsSearch)))
+(def SearchResults (r/adapt-react-class (.-Results jsSearch)))
+
+;; Sidebar
+(def jsSidebar (.-Sidebar semantic-ui))
+(def Sidebar (r/adapt-react-class jsSidebar))
+(def SidebarPushable (r/adapt-react-class (.-Pushable jsSidebar)))
+(def SidebarPusher (r/adapt-react-class (.-Pusher jsSidebar)))
+
+
+;;
+;; Addons
+;;
+
+;; Confirm
+(def Confirm (r/adapt-react-class (.-Confirm semantic-ui)))
+
+;; Portal
+(def Portal (r/adapt-react-class (.-Portal semantic-ui)))
+
+;; Radio
+(def Radio (r/adapt-react-class (.-Radio semantic-ui)))
+
+;; Select
+(def Select (r/adapt-react-class (.-Select semantic-ui)))
+
+;; TextArea
+(def TextArea (r/adapt-react-class (.-TextArea semantic-ui)))
+


added form label comp

added form label comp

#55

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

--- src/cljs/swarmpit/component/service/form_labels.cljs
+++ src/cljs/swarmpit/component/service/form_labels.cljs
@@ -0,0 +1,80 @@
+(ns swarmpit.component.service.form-labels
+  (:require [material.component :as comp]
+            [swarmpit.component.state :as state]
+            [rum.core :as rum]))
+
+(enable-console-print!)
+
+(def cursor [:page :service :wizard :labels])
+
+(def headers [{:name  "Name"
+               :width "35%"}
+              {:name  "Value"
+               :width "35%"}])
+
+(def empty-info
+  (comp/form-value "No labels defined for the service."))
+
+(defn- form-name [value index]
+  (comp/form-list-textfield
+    {:name     (str "form-name-text-" index)
+     :key      (str "form-name-text-" index)
+     :value    value
+     :onChange (fn [_ v]
+                 (state/update-item index :name v cursor))}))
+
+(defn- form-value [value index]
+  (comp/form-list-textfield
+    {:name     (str "form-value-text-" index)
+     :key      (str "form-value-text-" index)
+     :value    value
+     :onChange (fn [_ v]
+                 (state/update-item index :value v cursor))}))
+
+(defn- render-labels
+  [item index]
+  (let [{:keys [name
+                value]} item]
+    [(form-name name index)
+     (form-value value index)]))
+
+(defn- form-table
+  [labels]
+  (comp/form-table headers
+                   labels
+                   nil
+                   render-labels
+                   (fn [index] (state/remove-item index cursor))))
+
+(defn- add-item
+  []
+  (state/add-item {:name  ""
+                   :value ""} cursor))
+
+(def render-item-keys
+  [[:name] [:value]])
+
+(defn- render-item
+  [item]
+  (val item))
+
+(rum/defc form-create < rum/reactive []
+  (let [labels (state/react cursor)]
+    [:div
+     (comp/form-add-btn "Add label" add-item)
+     (if (not (empty? labels))
+       (form-table labels))]))
+
+(rum/defc form-update < rum/reactive []
+  (let [labels (state/react cursor)]
+    (if (empty? labels)
+      empty-info
+      (form-table labels))))
+
+(rum/defc form-view < rum/static [labels]
+  (if (empty? labels)
+    empty-info
+    (comp/form-info-table headers
+                          labels
+                          render-item
+                          render-item-keys)))


no-title? setting for markdown page parts

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/20centaurifux/my-website.git/'


Update tests with pgp_key field.

Update tests with pgp_key field.

--- test/clojars/test/unit/db.clj
+++ test/clojars/test/unit/db.clj
@@ -14,8 +14,9 @@
         name "testuser"
         password "password"
         ssh-key "asdf"
+        pgp-key "aoeu"
         ms (long 0)]
-      (is (db/add-user email name password ssh-key))
+      (is (db/add-user email name password ssh-key pgp-key))
       (are [x] (submap {:email email
                         :user name
                         :ssh_key ssh-key}
@@ -32,20 +33,23 @@
         name "testuser"
         password "password"
         ssh-key "asdf"
+        pgp-key "aoeu"
         ms (long 0)
         email2 "test2@example.com"
         name2 "testuser2"
         password2 "password2"
-        ssh-key2 "asdf2"]
+        ssh-key2 "asdf2"
+        pgp-key2 "aoeu2"]
     (binding [db/get-time (fn [] (java.sql.Timestamp. ms))]
       ;;TODO: What should be done about the key-file?
-      (is (db/add-user email name password ssh-key))
+      (is (db/add-user email name password ssh-key pgp-key))
       (binding [db/get-time (fn [] (java.sql.Timestamp. (long 1)))]
         ;;TODO: What should be done about the key-file?
-        (is (db/update-user name email2 name2 password2 ssh-key2))
+        (is (db/update-user name email2 name2 password2 ssh-key2 pgp-key2))
         (are [x] (submap {:email email2
                           :user name2
                           :ssh_key ssh-key2
+                          :pgp_key pgp-key2
                           :created ms}
                          x)
              (db/find-user name2)
@@ -57,9 +61,10 @@
   (let [email "test@example.com"
         name "testuser"
         password "password"
-        ssh-key "asdf"]
+        ssh-key "asdf"
+        pgp-key "aoeu"]
     ;;TODO: What should be done about the key-file?
-    (is (db/add-user email name password ssh-key))
+    (is (db/add-user email name password ssh-key pgp-key))
     (is (= ["testuser"]
            (db/group-membernames (str "org.clojars." name))))
     (is (= ["org.clojars.testuser"]
@@ -69,9 +74,10 @@
   (let [email "test@example.com"
         name "testuser"
         password "password"
-        ssh-key "asdf"]
+        ssh-key "asdf"
+        pgp-key "aoeu"]
     ;;TODO: What should be done about the key-file?
-    (is (db/add-user email name password ssh-key))
+    (is (db/add-user email name password ssh-key pgp-key))
     (is (db/add-member "test-group" name))
     (is (= ["testuser"]
            (db/group-membernames "test-group")))


add test for stream

add test for stream

--- test/riemann/test/streams.clj
+++ test/riemann/test/streams.clj
@@ -79,7 +79,16 @@
            (is (= (deref r) {:metric 0}))))

 (deftest smap-test
-         (test-stream (smap inc) [6 3 -1] [7 4 0]))
+  (test-stream (smap inc) [6 3 -1] [7 4 0]))
+
+(deftest stream-test
+  (let [vals1   (atom [])
+        vals2   (atom [])
+        add1    #(swap! vals1 conj %)
+        add2    #(swap! vals2 conj %)]
+    (run-stream (stream add1 add2) [1 2 3])
+    (is (= @vals1 [1 2 3]))
+    (is (= @vals2 [1 2 3]))))

 (deftest sreduce-test
          (testing "explicit value"


(PDB-5022) eastwood: ignore expected deprecations

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

--- eastwood.clj
+++ eastwood.clj
@@ -0,0 +1,8 @@
+
+(disable-warning
+ {:linter :deprecations
+  :symbol-matches
+  #{#"^#'puppetlabs\.puppetdb\.jdbc/call-with-array-converted-query-rows$"
+    #"^#'puppetlabs\.trapperkeeper\.testutils\.logging/atom-appender$"
+    #"^#'puppetlabs\.trapperkeeper\.testutils\.logging/atom-logger$"
+    #"^#'puppetlabs\.trapperkeeper\.testutils\.logging/logs-matching$"}})


More robust image endpoint handling.

More robust image endpoint handling.

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/jagtalon/what-the-fuck-do-you-want-to-listen-to.git/'


[WM EN] make tests more robust

[WM EN] make tests more robust

This should hopefully ensure that we (almost?) never freeze the test suite on a blocked core.async channel operation.

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


Add stub for luhn

Add stub for luhn

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

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


increased image size

increased image size

--- src/gif_to_html/convert.clj
+++ src/gif_to_html/convert.clj
@@ -25,7 +25,7 @@
     (.toString sb)))

 (defn scale [a b]
-  (int (* (/ 100 a) b)))
+  (int (* (/ 150 a) b)))

 (defn find-delay [rdr]
   (try
@@ -50,15 +50,15 @@
           h           (.getHeight rdr 0)
           [w h]       (cond
                        (and (< w 150) (< h 150)) [w h]
-                       (> w h) [100 (scale w h)]
-                       :else [(scale h w) 100])]
+                       (> w h) [150 (scale w h)]
+                       :else [(scale h w) 150])]
       {:data
        (html5
          [:div.animation
           (map (fn [i]
                   [:pre
                    {:id (str "frame-" i)
-                    :style "font-size:5pt;line-height:5pt;letter-spacing:1px;font-weight:bold;display:none;font-family:monospace;"}
+                    :style "font-size:4pt;line-height:4pt;letter-spacing:1px;font-weight:bold;display:none;font-family:monospace;"}
                    (to-ascii (scale-image (.read ^ImageReader rdr i) w h) w h)])
                (range frame-count))])
        :delay  (* 10 (if (pos? frame-delay) frame-delay 10))


Oops; forgot a file.

Oops; forgot a file.

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

--- src/leiningen/util/file.clj
+++ src/leiningen/util/file.clj
@@ -0,0 +1,13 @@
+(ns leiningen.util.file
+  (:use [clojure.java.io :only [file delete-file]]))
+
+;; grumble, grumble; why didn't this make it into clojure.java.io?
+(defn delete-file-recursively
+  "Delete file f. If it's a directory, recursively delete all its contents.
+Raise an exception if any deletion fails unless silently is true."
+  [f & [silently]]
+  (let [f (file f)]
+    (if (.isDirectory f)
+      (doseq [child (.listFiles f)]
+        (delete-file-recursively child silently)))
+    (delete-file f silently)))


add low level tests of dalap.walk

add low level tests of dalap.walk

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

--- test/dalap/test/walk.clj
+++ test/dalap/test/walk.clj
@@ -0,0 +1,33 @@
+(ns dalap.test.walk
+  (:use [clojure.test])
+
+  (:use [dalap.walk :only
+         [IWalkerState get-state conj-state update-state update-in-state
+          gen-walker walk]])
+  (:import [dalap.walk Walker]))
+
+(def identity-visitor (fn [x _] x))
+
+(defn test-ident-walker [w]
+  (is (= 1 (w 1)))
+  (is (= (get-state w) {}))
+  (is (satisfies? IWalkerState w))
+  (is (= (.visitor w) identity-visitor)))
+
+(deftest test-constructors
+  (doseq [w [(Walker. identity-visitor {})
+             (gen-walker identity-visitor)
+             (gen-walker identity-visitor {})]]
+    (test-ident-walker w)))
+
+(deftest test-state-management
+  (doseq [st [{} {:a 1234} {:a 1234 :b 99}]]
+    (let [w (gen-walker identity-visitor st)]
+      (is (= (get-state w) st))
+      (let [w2 (conj-state w {:c 12})]
+        (is (:c w2) 12)
+        (not= w w2)
+        (= (update-state w2 #(dissoc % :c)) w)
+        (= (update-in-state w :c #(do % 12)) w2)
+        (= (conj-state w2 {:d 1 :e 2})
+           (update-state w2 #(conj % {:d 1 :e 2})))))))


ensure that a customer is connected to a property when creating src

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


update list of team members

update list of team members

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


helper function for submit which avoid casting

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


Add article written for PragPub December 2013 with kind permission from the publishers.

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

--- src/overtone/examples/getting_started/pragpub-article.clj
+++ src/overtone/examples/getting_started/pragpub-article.clj
@@ -0,0 +1,586 @@
+;; Making Music with Clojure
+;; Live Coding is all the Rage at Raves
+;; By Sam Aaron
+;; Originally published in PragPub, December 2013
+;; Copyright 2014 Sam Aaron
+
+
+;; The laser beams sliced through the wafts of smoke as the subwoofer
+;; pumped bass deep into the bodies of the crowd. The atmosphere was
+;; ripe with a heady mix of synths and dancing. However something wasn't
+;; quite right in this nightclub. Projected in bright colours above the
+;; DJ booth was futuristic text, moving, dancing flashing. This wasn't
+;; fancy visuals, it was merely a projection of a terminal containing
+;; Emacs. The occupants of the DJ booth weren't spinning disks, they
+;; were writing, editing and evaluating code. This was a Meta-eX
+;; (http://meta-ex.com) gig. The code was their musical interface and
+;; they were playing it live.
+
+;; This wasn't a scene from a cheesy sci-fi film. Coding music like this
+;; is a growing trend and is often described as Live Coding
+;; (http://toplap.org). One of the recent directions this approach to
+;; music making has taken is the Algorave (http://algorave.com) - events
+;; where artists code music for people to dance to. However, you don't
+;; need to be in a nightclub to Live Code - you can do it anywhere you
+;; can take your laptop and a pair of headphones. In this article, we'll
+;; explore one of the most powerful Live Coding toolkits available:
+;; Overtone (http://overtone.github.io). Once you reach the end, you'll
+;; be programming your own beats and modifying them live. Where you go
+;; afterwards will only be constrained by your imagination.
+
+;; Installation
+
+;; To follow along, you'll need a couple of dependencies
+;; installed. Firstly you'll need a JVM (https://java.com/getjava)
+;; (v1.6+) and you'll also need a handy tool called Leiningen
+;; (http://leiningen.org) (v2.0+). Both links provide installation
+;; instructions, but ultimately you'll want to be able to run the `lein`
+;; command on a terminal/command window and see a list of options.
+
+;; Once you have a JVM and `lein`, create a new project with:
+
+;; lein new insane-sounds
+
+;; You then need to fire up your trusty text editor, open
+;; `insane-sounds/project.clj` and add Overtone as a dependency. The file
+;; should look as follows:
+
+(defproject foo "0.1.0-SNAPSHOT"
+  :description "FIXME: write description"
+  :url "http://example.com/FIXME"
+  :license {:name "Eclipse Public License"
+            :url "http://www.eclipse.org/legal/epl-v10.html"}
+  :dependencies [[org.clojure/clojure "1.5.1"]
+                 [overtone "0.9.1"]])
+
+;; Save the file, then `cd` into the `insane-sounds` directory and run:
+
+;; lein repl
+
+;; This may take some time depending on the speed of your internet
+;; connection as it will download all of Overtone's dependencies
+;; (including the SuperCollider synthesis server) and then boot you into
+;; a Clojure REPL. You should see the following prompt:
+
+;; user=>
+
+;; Now you can start and boot Overtone by typing and entering:
+
+(use 'overtone.live)
+
+;; Evaluating this will start up an audio synthesis server and connect to
+;; it for you. Once this process has finished, you should see the following
+;; on your console:
+
+;; --> Loading Overtone...
+;; --> Booting internal SuperCollider server...
+;;
+;;    _____                 __
+;;   / __  /_  _____  _____/ /_____  ____  ___
+;;  / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
+;; / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
+;; \____/ |___/\___/_/   \__/\____/_/ /_/\___/
+;;
+;;  Collaborative Programmable Music. v0.9.1
+;;
+;; Hello Sam. Do you feel it? I do. Creativity is rushing through your veins today!
+
+;; Let's make a simple sound:
+
+(demo (pan2 (sin-osc)))
+
+;; Beeep! Testing, testing, 1, 2, 3! We can go crazy and change the
+;; frequency:
+
+(demo (pan2 (sin-osc 220)))
+
+;; Play around with changing the frequency to different values. How high
+;; can you go and still hear it? How low can you go? Try it with some
+;; decent headphones/speakers and hear the deep bass pump out...
+
+;; We can even swap out the oscillator generator. Try replacing
+;; `sin-osc` with the following: `saw`, `square`,
+;; `lf-tri`. Additionally, try removing the `pan2` and replacing the
+;; frequency number with a vector of two values:
+
+(demo (saw [55 55.2]))
+
+;; Try different values for `saw`, `100` and `101`. Don't worry too much
+;; about what any of this *means* just experiment and have fun! Come
+;; back when you've finished giving all your friends a headache...
+
+;; Hello again. Enough with that new fangled synth nonsense. Let's play
+;; something more traditional. Pull in the piano synth:
+
+(use 'overtone.inst.piano)
+
+;; We can now trigger a piano sound by calling the `piano` function:
+
+(piano)
+
+;; We can even call it with a MIDI number as an argument to specify the
+;; piano note to play:
+
+(piano 63)
+
+;; Luckily, for those that haven't memorised all the MIDI
+;; numbers, Overtone provides a handy function:
+
+(note :C4)
+
+;; This then brings us to our first use of Clojure's datastructures for
+;; music - we can represent a chord using a vector:
+
+(def c4-minor [(note :C4) (note :Eb4) (note :G4)])
+
+;; This can easily be rendered as audio:
+
+(doseq [note c4-minor]
+  (piano note))
+
+;; Or played as a simple arpegio:
+
+(doseq [note c4-minor]
+  (piano note)
+  (Thread/sleep 200))
+
+;; With the information provided so far in this section, it is
+;; completely plausible to imagine piano compositions that consist of
+;; interposed calls to `piano` and `Thread/sleep`:
+
+(do
+  (piano 50)
+  (Thread/sleep 100)
+  (piano 72)
+  (Thread/sleep 50)
+  (piano 49)
+  (Thread/sleep 190)
+  (piano 68)
+  ;;.
+  ;;.
+  ;;. etc...)
+
+;; The main drawback to defining our composition in such a procedural
+;; manner is not only inelegant but also restricts creative flexibility
+;; and freedom. Instead, it's often better to use Clojure's
+;; datastructures to represent the composition in a declarative
+;; style. This then opens us up to using Clojure's powerful set of
+;; higher order functions to directly manipulate our compositions. This
+;; is something which is explicitly explored in Chris Ford's [Leipzig]
+;; (http://github.com/ctford/leipzig) library which can be used to
+;; succinctly represent Bach's canons at a very high level. However,
+;; rather than look towards Bach, today we're going to consider more
+;; contemporary electronic music - live dance and dubstep.
+
+;; Let's drop our piano and introduce some drums. First up, the mighty
+;; kick drum:
+
+(def dirty-kick (freesound 30669))
+
+;; You will notice that evaluating this form for the first time may take
+;; a few moments to complete. This is because this kick drum is actually
+;; a recording of a kick drum in wav format which is available on the
+;; fantastic Freesound website (http://freesound.org) and released under
+;; a creative commons license. The `freesound` function takes the unique
+;; ID of the sound (in this case 30669) and then downloads it on a
+;; separate thread caching the file to your hard drive under
+;; `~/.overtone`. Therefore the next time you access this particular
+;; sound, it will retrieve it from your local file system rather than
+;; from the Freesound server.
+
+;; Once this form has completed evaluation, the var `dirty-kick` now
+;; references a function which can be used to trigger the sound:
+
+(dirty-kick)
+
+;; Let's define a few more sounds:
+
+(def ring-hat (freesound 12912))
+(def snare (freesound 26903))
+(def click (freesound 406))
+(def wop (freesound 85291))
+(def subby (freesound 25649))
+
+;; Feel free to add some of your own. Just navigate to
+;; http://freesound.org search around for a sound, make sure it's either
+;; a wav or aiff find the ID of the sound (you can see it in the URL)
+;; and then pass it as a parameter to the `freesound` function.
+
+;; Let's make a driving beat:
+
+(defonce cont? (atom true))
+
+(future
+  (while @cont?
+    (subby)
+    (Thread/sleep 300)
+    (snare)
+    (Thread/sleep 300)))
+
+;; OK, so it's more like something out of a marching band than a driving
+;; dubstep beat, but it's a good start. To stop it just reset the atom
+;; to false:
+
+(reset! cont? false)
+
+;; There's a significant technical issue with this approach related to
+;; timing - `Thread/sleep` can never be relied on for strongly timed
+;; programs. The main issue here is that it defines a *minimum* amount
+;; of time for the current thread to pause not the *precise* amount of
+;; time. So, a call to `(Thread/sleep 200)` actually pauses the current
+;; thread for `(+ 200 delay-t)` milliseconds where `delay-` is dependent
+;; on the internal behaviour and workload of the scheduler and any GC
+;; pauses. It can therefore be assumed that `delay-t` is
+;; non-deterministic. This means that basing timing on top of
+;; `Thread/sleep` will cause temporal drifting which is less than ideal
+;; if you want to generate a steady rhythm or beat.
+
+;; Overtone has an excellent solution for this issue - temporal
+;; recursion. This is similar to recursion, except for applying the
+;; current function at the tail position, we instead schedule it to
+;; execute at some future time:
+
+(defn scheduled-hello-world [curr-t sep-t]
+  (println "hello world")
+  (let [new-t (+ curr-t sep-t)]
+    (apply-at new-t #'scheduled-hello-world [new-t sep-t])))
+
+;; Here we create a standard Clojure function which accepts two
+;; arguments, the current time and a separation time. The function
+;; greets the world and then schedules itself to be executed in the
+;; future where the time for execution is the current time plus the
+;; separation time. This new time is then passed on to the new function
+;; invocation along with the unmodified separation time. When we run
+;; this function, with `(now)` and 200 as parameters we'll immediately
+;; see our friendly greeting appear on the console every 200ms:
+
+(scheduled-hello-world (now) 200)
+
+;; Luckily this scheduled function honours the `stop` function, so to
+;; cease the persistent and repeated friendliness just issue:
+
+(stop)
+
+;; Of course, we can perform any action inside this function, so instead
+;; of printing to the console, let's make some sound. However, before we
+;; do this, we need just one more time-related concept - the `at`
+;; macro. As we saw above, `apply-at` will apply the specified function
+;; at the specified time. However, this approach is completely
+;; susceptible to similar timing issues as `Thread/sleep`. Through the
+;; explicit handling of time, we won't see any cumulative drift
+;; effect. However, each individual execution of the scheduled function
+;; itself is arbitrarily delayed due to our non-deterministic friend
+;; `delay-t`. Luckily we can combat this issue via a two-pronged
+;; attack. Firstly, we can use `apply-by` in place of `apply-at`, this
+;; will execute our function slightly ahead of our specified time to
+;; give room for any execution delay. We then wrap any sound-making
+;; triggers or controls within the `at` macro which instructs the audio
+;; server to enact the trigger exactly at the specified time:
+
+;; Play the piano 2 seconds from now
+(at (+ (now) 2000) (piano))
+
+;; As the audio server is written in highly optimised C++ it can do a
+;; far better job of ensuring the action is performed at precisely the
+;; correct time. Therefore, by calling our `at` macro sufficiently ahead
+;; of time, we can ensure that we suffer no time delays or drift:
+
+(defn beat [curr-t sep-t]
+  (at curr-t (subby))
+  (let [new-t (+ curr-t sep-t)]
+    (apply-by new-t #'beat [new-t sep-t])))
+
+(beat (now) 600)
+
+;; Again we can stop this by calling the stop fn:
+
+(stop)
+
+;; Given this sound-playing and strongly-timed scheduling functionality,
+;; we now have the full power of Clojure to build the sound system of
+;; our dreams. Let's start by building a simple 8-step sequencer. We can
+;; represent the state of a single sequence with a simple vector:
+
+[1 0 0 0 0 0 0 0] ;; One beat at the start of the bar
+[1 1 1 1 1 1 1 1] ;; Eight beats per bar
+[1 0 1 1 0 0 0 1] ;; A more interesting rhythm
+
+(defn simple-sequencer [curr-t sep-t pattern]
+  (at curr-t (when (= 1 (first pattern))
+               (subby)))
+  (let [new-t (+ curr-t sep-t)]
+    (apply-by new-t #'simple-sequencer [new-t sep-t (rest pattern)])))
+
+
+(simple-sequencer (now) 200 (cycle [1 1 0 1 0 1 0 0]))
+(stop) ;; Stop the beat
+
+;; Our simple sequencer lets us play different patterns represented by
+;; Clojure vectors. We also take advantage of laziness by creating an
+;; infinite lazy sequence of cycles of the pattern to keep the beat
+;; rolling on. However, there are a few limitations to this
+;; approach. For example, we can only play one pattern at a time, it's
+;; hard-coded to play the subby sound and we can't modify it at
+;; run-time. Let's tackle each of these issues.
+
+;; One way of representing multiple patterns with arbitrary sounds is to
+;; use a map for our representation. For example, the vals within our
+;; map could be the patterns and the correspdonding keys the sound
+;; functions themselves:
+
+(def pats {subby [1 1 0 1 0 1 0 0]
+           snare [1 0 0 1 0 0 1 0]
+           wop   [1 0 0 0 0 0 0 1]})
+
+;; For this, we can modify our simple sequencer to work with arbitrary
+;; sounds:
+
+(defn play-pattern [curr-t sep-t pattern sound]
+  (at curr-t (when (= 1 (first pattern))
+               (sound)))
+  (let [new-t (+ curr-t sep-t)]
+    (apply-by new-t #'play-pattern [new-t sep-t (rest pattern) sound])))
+
+;; We can then create a multi-patterned sequencer:
+
+(defn sequencer [sep-t sequences]
+  (let [t (+ (now) 200)]
+    (doseq [[sound pattern] sequences]
+      (play-pattern t sep-t (cycle pattern) sound))))
+
+(sequencer 200 pats)
+(stop)
+
+;; In order to allow us to live-modify the patterns whilst the sequencer
+;; is playing, we need to make some modifications. The key change is to
+;; store our patterns in an atom. We also need to move away from
+;; representing our patterns as an infinite lazy sequence which is
+;; defined when the sequencer is created and closed for
+;; modification. Instead we can explicitly store the current beat number
+;; and on each temporally recursive call into the scheduling function,
+;; we can look up the appropriate patten index (which is a mod of the
+;; beat number and the size of the pattern). If the value of the pattern
+;; at this index is 1 we can then schedule the matching sound to be
+;; played. Each time round the temporal recursion we simply need to
+;; update the schedule time and increment the beat count.
+
+(def live-pats (atom pats))
+
+(defn live-sequencer
+  ([curr-t sep-t live-patterns] (live-sequencer curr-t sep-t live-patterns 0))
+  ([curr-t sep-t live-patterns beat]
+     (doseq [[sound pattern] @live-patterns
+             :when (= 1 (nth pattern (mod beat (count pattern))))]
+       (at curr-t (sound)))
+     (let [new-t (+ curr-t sep-t)]
+       (apply-by new-t #'live-sequencer [new-t sep-t live-patterns (inc beat)]))))
+
+;; Once we have implemented this new live-sequencer function, we can
+;; trigger it and then start modifying our live-pats atom:
+
+(live-sequencer (+ 200 (now)) 200 live-pats)
+
+(swap! live-pats assoc subby [1 1 0 1 0 0 1 1])
+(swap! live-pats assoc snare [1 1 0 0 0 1 0 0])
+(swap! live-pats assoc wop   [1 0 1 0 0 0 1 1])
+(stop)
+
+;; Try changing the pattern vector (swapping 1s for 0s and visa versa)
+;; and have fun live jamming! When you've had enough, just issue a
+;; `(stop)` command.
+
+;; So, how can we have more fun than this? Typically in Overtone land,
+;; the feeling that more fun could be had usually indicates that there's
+;; an opportunity for us to add more control. One clear way to give us
+;; greater control is to allow our patterns to convey information richer
+;; than just 1s and 0s to represent on and off. For example, we might
+;; want to specify the amplitude or the rate of each individual
+;; beat. Luckily our sound function already provides this via keyword
+;; arguments:
+
+(subby :rate 2 :amp 0.5)
+
+;; Given this new knowledge, we can now increase our pattern
+;; representation from using just 1s and 0s to also include argument
+;; maps through the use of the following simple helper fn:
+
+(defn flatten1
+  "Takes a map and returns a seq of all the key val pairs:
+      (flatten1 {:a 1 :b 2 :c 3}) ;=> (:b 2 :c 3 :a 1)"
+  [m]
+  (reduce (fn [r [arg val]] (cons arg (cons val r))) [] m))
+
+;; We can now call our synth fn using `apply` and our flattened arg
+;; list:
+
+(apply subby (flatten1 {:rate 2 :amp 0.5}))
+
+;; Armed with this, let's improve our sequencer yet again:
+
+(defn live-sequencer
+  ([curr-t sep-t live-patterns] (live-sequencer curr-t sep-t live-patterns 0))
+  ([curr-t sep-t live-patterns beat]
+     (doseq [[sound pattern] @live-patterns
+             :let [v (nth pattern (mod beat (count pattern)))
+                   v (cond
+                      (= 1 v)
+                      []
+
+                      (map? v)
+                      (flatten1 v)
+
+                      :else
+                      nil)]
+             :when v]
+       (at curr-t (apply sound v)))
+     (let [new-t (+ curr-t sep-t)]
+       (apply-by new-t #'live-sequencer [new-t sep-t live-patterns (inc beat)]))))
+
+(def a {:rate 0.5})
+(def b {:rate 3})
+(def c {:rate 10})
+
+(live-sequencer (+ 200 (now)) 200 live-pats)
+
+(swap! live-pats assoc subby [1 1 0 b 0 1 a c])
+(swap! live-pats assoc snare [1 1 c c 1 a b c])
+(swap! live-pats assoc wop   [c c 1 0 0 0 a c])
+
+(stop)
+
+;; This creates a much richer and interesting rhythm and is already a lot
+;; more fun to play with. Let's control one more dimension: time.
+
+;; So far, each sequencer implementation has maintained a constant timed
+;; delay between each beat. What if the time for a whole pattern was
+;; constant, and the time between each beat a division of that time over
+;; the number of beats in the pattern. For example, we could represent a
+;; pattern with three beats per bar with:
+
+(def three-beats-per-bar [1 1 1])
+
+;; and a pattern with 9 beats per bar with:
+
+(def nine-beats-per-bar [1 1 1 1 1 1 1 1 1])
+
+;; Therefore, an alternative yet semantically identical version of
+;; `three-beats-per-bar` could be:
+
+(def three-beats-per-bar-alt [1 0 0 1 0 0 1 0 0])
+
+;; Let's modify our live-sequencer function to support this new
+;; behaviour. First, we need to move to passing the time the full
+;; pattern should take to play rather than the separation time between
+;; beats. This separation time can them be calculated by dividing the
+;; full pattern time by the number of beats within it. We also no longer
+;; need to thread a beat count through the temporal recursion as we'll
+;; now schedule a whole pattern at once.
+
+(defn normalise-beat-info
+  [beat]
+  (cond
+   (= 1 beat)         {}
+   (map? beat)        beat
+   (sequential? beat) beat
+   :else              {}))
+
+(defn schedule-pattern
+  [curr-t pat-dur sound pattern]
+  {:pre [(sequential? pattern)]}
+  (let [beat-sep-t (/ pat-dur (count pattern))]
+    (doseq [[beat-info idx] (partition 2 (interleave pattern (range)))]
+      (let [beat-t    (+ curr-t (* idx beat-sep-t))
+            beat-info (normalise-beat-info beat-info)]
+        (if (sequential? beat-info)
+          (schedule-pattern beat-t beat-sep-t sound beat-info)
+          (at beat-t (apply sound (flatten1 beat-info))))))))
+
+(defn live-sequencer
+  [curr-t pat-dur live-patterns]
+  (doseq [[sound pattern] @live-patterns]
+    (schedule-pattern curr-t pat-dur sound pattern))
+  (let [new-t (+ curr-t pat-dur)]
+    (apply-by new-t #'live-sequencer [new-t pat-dur live-patterns])))
+
+
+(live-sequencer (now) 2000 live-pats)
+(swap! live-pats assoc subby [1 1 0 b 0 1 [1 1 1] [1 1 1 1 1 1 1]])
+(swap! live-pats assoc snare [1 1 c c 1 a [1 a c 1] c])
+(swap! live-pats assoc wop   [c a 0 0 a c c c])
+
+(stop)
+
+;; Finally we need a wobbly bass sound:
+
+(defsynth wobble-bass [amp 1 note 52 wobble 1 detune 1.01 wob-lo 200 wob-hi 20000 pan 0]
+  (let [saws          (mix (saw [note (* note detune)]))
+        wob-freq      (lin-exp (lf-saw wobble) -1 1 wob-lo wob-hi)
+        wob-freq      (lag wob-freq 0.05)
+        filtered-saws (lpf saws wob-freq)
+        normalized    (normalizer filtered-saws)
+        amplified     (* amp normalized)]
+    (out 0 (pan2 amplified pan))))
+
+;; Before you freak out too much, we don't expect you to understand how
+;; this works any any detail. Suffice to say that `defsynth` is a macro
+;; which represents a synthesiser design. If you're interested in
+;; further details, you can genrate a more traditional visual
+;; representation of this design:
+
+(show-graphviz-synth wobble-bass)
+
+;; The first detail about the `defsynth` macro that is useful to know
+;; here is that it creates a function in the current namespace with the
+;; same name as the synth - in this case `wobble-bass`. We can use this
+;; function to create new running (and therefore audible) instances of
+;; the synth:
+
+(wobble-bass)
+
+;; To stop this (and all other running synths) you can use the `stop`
+;; function:
+
+(stop)
+
+;; The second useful detail is the vector of symbol value pairs
+;; immediately after the synth name represents the controllable
+;; parameters. Our `wobble-bass` function allows us to specify these
+;; using a named-argument style:
+
+(wobble-bass :amp 0.5 :note 30 :wob-hi 2000)
+(stop)
+
+;; The final handy piece of knowledge is that the return value of the
+;; `wobble-bass` function is a record which represents the running synth
+;; created via the call. This record can be used to directly maniulate
+;; the synth live whilst it is running using the `ctl` function which is
+;; short for control:
+
+(def wb (wobble-bass))
+(ctl wb :amp 0.5 :note 50 :wobble 2)
+(ctl wb :amp 0.5 :note 62 :wobble 1)
+(ctl wb :note 40)
+(ctl wb :wobble 0.1)
+(ctl wb :amp 1)
+(ctl wb :wob-hi 5000)
+(ctl wb :wob-lo 100)
+
+;; bring back the beats!
+
+(live-sequencer (now) 2000 live-pats)
+(swap! live-pats assoc subby [1 1 0 b 0 1 [1 1 1] [1 1 1 0 1 1 1]])
+(swap! live-pats assoc snare [1 1 c c 1 a [1 a c 1] c])
+(swap! live-pats assoc wop   [c a 0 0 a c c c])
+
+(stop) ;; stop the insanity!
+
+;; So, there you have it - we just coded from scratch a mini
+;; live-modifiable drum patten DSL. How fun is that! This was clearly
+;; just a small taster of the fantastic power that the heady combination
+;; of Clojure and SuperCollider can offer you. Try playing with
+;; different rhythms, different samples (any wav file from Freesound is
+;; just but a call to `freesound` away) and let your imagination run
+;; riot.
+
+;; If you stick at it, perhaps you'll find yourself programming in a
+;; nightclub too...


reorg

reorg

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


Argh! Finally

Argh! Finally

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


handle nil values in markdown processor

handle nil values in markdown processor

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


New searcher file (old code) for clojure

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

--- clojure/cljsearch/src/cljsearch/searcher.clj
+++ clojure/cljsearch/src/cljsearch/searcher.clj
@@ -0,0 +1,212 @@
+;;; search.clj: Recursive file search utility
+
+;; by Cary Clark
+;; April 10, 2010
+
+(ns cljsearch.searcher
+  #^{:author "Cary Clark",
+     :doc "Recursive file search utility"}
+  (:import (java.io File)
+           (java.util.jar JarFile)
+           (java.util.zip ZipFile))
+  (:use [clojure.java.io :only (reader)])
+  (:use [elocale.file :as file])
+  (:use [elocale.utils :as utils]))
+
+(defn printlines? [opts]
+  (get opts :p))
+
+(defn print-search-result
+  "Prints a search-result"
+  [file line linenum pattern opts]
+  (if (> (count (get opts :s)) 1)
+    (print (str pattern ": ")))
+  (if (> linenum 0)
+    (println (format "%s: %d: %s" (get-path file) linenum (.trim line)))
+    (println (format "%s has match" (get-path file)))))
+
+(defn save-search-result
+  "Creates a search-result struct and conjoins it to the search-results vector ref"
+  [file line linenum pattern opts]
+  (dosync
+    (alter search-results conj (struct search-result file line linenum pattern)))
+  (if (printlines? opts)
+    (print-search-result file line linenum pattern opts)))
+
+(defn search-text-file-line [file line linenum opts]
+  (if line
+    (loop [patterns (get opts :s)]
+      (if (> (count (re-seq (first patterns) line)) 0)
+        (save-search-result file line linenum (first patterns) opts))
+      (if (second patterns)
+        (recur
+          (rest patterns))))))
+
+(defn search-reader [rdr file opts]
+  (loop [lines (line-seq rdr)
+         linenum 1]
+    (search-text-file-line file (first lines) linenum opts)
+    (if (second lines)
+      (recur
+        (rest lines)
+        (inc linenum)))))
+
+(defn search-text-file [file opts]
+  ;(println "search-text-file" file)
+  (with-open [rdr (get-reader file)]
+    (search-reader rdr (get-path file) opts)))
+
+(defn search-binary-file [file opts]
+  ;(println "search-binary-file" file)
+  (let [contents (get-contents file)]
+    (loop [patterns (get opts :s)]
+      (if (> (count (re-seq (first patterns) contents)) 0)
+        (save-search-result file "" 0 (first patterns) opts))
+      (if (second patterns)
+        (recur
+          (rest patterns))))))
+
+(defn search-binary? [opts]
+  (get opts :b))
+
+(defn get-zip-file-entries [zipfile opts]
+  (let [entries (filter #(not (.isDirectory %)) (enumeration-seq (.entries zipfile)))]
+    (filter-out-by-ext (concat NOSEARCH-EXTS (get opts :X))
+      (filter-in-by-ext (get opts :x) entries))))
+
+(defn search-zip-file [zipfile opts]
+  (doseq [zipentry (get-zip-file-entries zipfile opts)]
+    (if (text-file? zipentry)
+      (with-open [rdr (reader (.getInputStream zipfile zipentry))]
+        (search-reader rdr (str (.getName zipfile) "[" (.getName zipentry) "]") opts)))))
+
+(defn search-compressed-file [file opts]
+  (cond (has-ext? "zip" file) (search-zip-file (ZipFile. file) opts)
+        (has-ext? "jar" file) (search-zip-file (JarFile. file) opts)))
+
+(defn search-compressed? [opts]
+  (get opts :z))
+
+(defn search-file [file opts]
+  (cond (text-file? file) (search-text-file file opts)
+        (compressed-file? file) (search-compressed-file file opts)
+        ;(binary-file? file) (search-binary-file file opts)))
+        :else (if-not (no-search-file? file) (search-binary-file file opts))))
+
+(defn get-exclude-exts [opts]
+  (let [exclude-exts (set (get opts :X))]
+    (if (> (count exclude-exts) 0)
+      (set
+        (concat
+          exclude-exts
+          NOSEARCH-EXTS
+          (if (search-binary? opts)
+            #{}
+            BINARY-EXTS)
+          (if (search-compressed? opts)
+            #{}
+            COMPRESSED-EXTS)))
+      #{})))
+
+(defn get-include-exts [opts]
+  (let [include-exts (set (get opts :x))]
+    (if (> (count include-exts) 0)
+      (set
+        (concat
+          include-exts
+          (if (search-compressed? opts)
+            COMPRESSED-EXTS
+            #{})))
+      #{})))
+
+(defn filtered-files [startdir opts]
+  (let [files (filter #(file? %) (get-file-seq startdir))
+        exclude-exts (get-exclude-exts opts)
+        include-exts (get-include-exts opts)]
+    ;(println "exclude-exts: " exclude-exts)
+    ;(println "include-exts: " include-exts)
+    (filter-out-by-ext exclude-exts
+      (filter-in-by-ext include-exts
+        (filter-out-by-pattern (get opts :F)
+          (filter-in-by-pattern (get opts :f) files))))))
+
+(defn print-search-results [opts]
+  (loop [patterns (get opts :s)]
+    (println
+      (format
+        "Matches for \"%s\": %d"
+        (first patterns)
+        (count (for [result @search-results :when (= (:pattern result) (first patterns))] result))))
+    (if (second patterns)
+      (recur
+        (rest patterns)))))
+
+(defn search [startdir opts]
+  (doseq [file (filtered-files startdir opts)]
+    (search-file file opts))
+  (print-search-results opts))
+
+(defn indexed [coll] (map vector (iterate inc 0) coll))
+
+(defn get-args-for-opt [coll o]
+  (if ((set coll) o)
+    (vec
+      (set
+        (for [[i elem] (indexed coll)
+              :when (and (= elem o) (> (count coll) (+ i 1)))]
+          (nth coll (inc i)))))
+    []))
+
+(defn get-opts [coll]
+  (let [a (not (contains? (set coll) "-1"))   ; flag for all matches vs. first match only per file
+        b (not (contains? (set coll) "-B"))   ; flag for searching binary files
+        f (vec (map #(re-pattern %) (get-args-for-opt coll "-f"))) ; inclusive file name patterns
+        F (vec (map #(re-pattern %) (get-args-for-opt coll "-F"))) ; exclusive file name patterns
+        filelist (contains? (set coll) "--filelist")   ; flag for listing the files with matches
+        linelist (contains? (set coll) "--linelist")   ; flag for listing the lines with matches
+        p (not (contains? (set coll) "-P"))   ; flag for printing results as found
+        s (vec (map #(re-pattern %) (get-args-for-opt coll "-s"))) ; search strings
+        x (get-args-for-opt coll "-x")        ; the extensions to include
+        X (get-args-for-opt coll "-X")        ; the extensions to exclude
+        z (not (contains? (set coll) "-Z"))]  ; flag for searching compressed files
+    {:a a, :b b, :f f, :F F, :filelist filelist, :linelist linelist, :p p, :s s, :x x, :X X, :z z}))
+
+(defn print-linelist
+  "print the unique list of lines with matches"
+  []
+  (let [lines (sort (set (for [result @search-results :when (not (= (get result :line) ""))] (get result :line))))]
+    (println (format "Lines with matches (%d lines):" (count lines)))
+    (doseq [line lines]
+      (println line))))
+
+(defn print-filelist
+  "print the unique list of files with matches"
+  []
+  (let [files (sort (set (for [result @search-results] (get result :file))))]
+    (println (format "Files with matches (%d files):" (count files)))
+    (doseq [file files]
+      (println file))))
+
+(defn has-errors [opts startdir]
+  (cond
+    (< (count (get opts :s)) 1) true
+    (contains? (set (concat (vals opts))) startdir) true
+    :else false))
+
+(defn main []
+  (if (or (nil? *command-line-args*) (< (count *command-line-args*) 3))
+    (usage))
+  (let [opts (get-opts (butlast *command-line-args*))
+        startdir (last *command-line-args*)]
+    ;(println (format "*command-line-args*: %s" *command-line-args*))
+    (println (format "opts: %s" opts))
+    ;(println (format "startdir: %s" startdir))
+    (if (has-errors opts startdir)
+      (usage))
+    (search startdir opts)
+    (if (get opts :filelist)
+      (print-filelist))
+    (if (get opts :linelist)
+      (print-linelist))))
+
+(time (main))


Increased button sizes and some cleanup

Increased button sizes and some cleanup

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


sort view

sort view

error: pathspec 'Clojure-Websockets/MainApp/src/cljs/birdwatch/ui/sort.cljs' did not match any file(s) known to git

--- Clojure-Websockets/MainApp/src/cljs/birdwatch/ui/sort.cljs
+++ Clojure-Websockets/MainApp/src/cljs/birdwatch/ui/sort.cljs
@@ -0,0 +1,28 @@
+(ns birdwatch.ui.sort
+  (:require [birdwatch.util :as util]
+            [reagent.core :as r :refer [atom]]))
+
+(def sort-orders [[:by-id "latest"][:by-followers "followers"]
+                  [:by-retweets "retweets"][:by-rt-since-startup "retweets2"]
+                  [:by-reach "reach"][:by-favorites "favorites"]])
+
+(defn- btn-class? [p] (if p " pure-button-primary" " sort-button"))
+
+(defn- sort-view [app put-fn]
+  (let [curr-order (:sorted @app)]
+    [:div
+     [:button.pure-button.not-rounded
+      {:class (btn-class? (:live @app)) :on-click #(put-fn [:toggle-live])} "Live"]
+     [:button.pure-button.not-rounded.sort-button "Sort by:"]
+     (for [[k text] sort-orders :let [btn-class (btn-class? (= k curr-order))]]
+       ^{:key text} [:button.pure-button.not-rounded
+                     {:class btn-class :on-click #(put-fn [:set-sort-order k])} text])]))
+
+(defn init-component
+  "Mounts search-view component. Takes put-fn as the function that can be called when some message
+   needs to be sent back to the switchboard. Returns a function that handles incoming messages."
+  [put-fn]
+  (let [app (atom {})]
+    (r/render-component [sort-view app put-fn] (util/by-id "sort-buttons"))
+    (fn [[_ state-snapshot]]
+      (reset! app state-snapshot))))


[WM] lookup polling place in vote-tomorrow handler


updated to make sure the google-civics API data plays nicely with our vote-tomorrow notys.  In particular, the google-election-id needs to default to 6000 in order to return a valid election.  Also, we limit the number of polling-places and dropoff-locations to what we can use in the notys.


Still more tests.

Still more tests.

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


fix intermittent failures in task_test

fix intermittent failures in task_test

--- test/metabase/task_test.clj
+++ test/metabase/task_test.clj
@@ -67,16 +67,16 @@
          :restarted]
   [(do
      (stop-task-runner!)
-     (with-redefs [metabase.task/hourly-task-delay (constantly 30)
+     (with-redefs [metabase.task/hourly-task-delay (constantly 40)
                    metabase.task/hourly-tasks-hook mock-hourly-tasks-hook]
        (add-hook! #'hourly-tasks-hook inc-task-test-atom-counter-by-system-hour)
        (reset! task-test-atom-counter 0)
        (start-task-runner!)

        [@task-test-atom-counter      ; should be 0, since not enough time has elaspsed for the hook to be executed
-        (do (Thread/sleep 45)
-            @task-test-atom-counter) ; should have been called once (~15ms ago)
         (do (Thread/sleep 60)
+            @task-test-atom-counter) ; should have been called once (~20ms ago)
+        (do (Thread/sleep 80)
             @task-test-atom-counter) ; should have been called two more times
         (do (stop-task-runner!)
             :stopped)]))


Add `ss-spec-sequence-example` ns

Add `ss-spec-sequence-example` ns

error: pathspec 'test/com/nomistech/clojure_the_language/c_200_clojure_basics/s_600_clojure_spec/ss_spec_sequence_example.clj' did not match any file(s) known to git

--- test/com/nomistech/clojure_the_language/c_200_clojure_basics/s_600_clojure_spec/ss_spec_sequence_example.clj
+++ test/com/nomistech/clojure_the_language/c_200_clojure_basics/s_600_clojure_spec/ss_spec_sequence_example.clj
@@ -0,0 +1,27 @@
+(ns com.nomistech.clojure-the-language.c-200-clojure-basics.s-600-clojure-spec.ss-spec-sequence-example
+  (:require [clojure.spec.alpha :as s]
+            [midje.sweet :refer :all]))
+
+;;;; Example from https://clojure.org/about/spec
+
+(s/def ::even? (s/and integer? even?))
+(s/def ::odd? (s/and integer? odd?))
+(s/def ::a integer?)
+(s/def ::b integer?)
+(s/def ::c integer?)
+
+(def s (s/cat :forty-two #{42}
+              :odds      (s/+ ::odd?)
+              :m         (s/keys :req-un [::a ::b ::c])
+              :oes       (s/* (s/cat :o ::odd? :e ::even?))
+              :ex        (s/alt :odd ::odd? :even ::even?)))
+
+(fact
+  (s/conform s [42 11 13 15 {:a 1 :b 2 :c 3} 1 2 3 42 43 44 11])
+  => {:forty-two 42
+      :odds      [11 13 15]
+      :m         {:a 1 :b 2 :c 3}
+      :oes       [{:o 1  :e 2}
+                  {:o 3  :e 42}
+                  {:o 43 :e 44}]
+      :ex        [:odd 11]})


Fix small indentation issue

Fix small indentation issue

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


fix(request): get request headers from :with-headers

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


seq comprehension

seq comprehension

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

--- src/sandbox/iterator/comprehension.clj
+++ src/sandbox/iterator/comprehension.clj
@@ -0,0 +1,15 @@
+(ns sandbox.iterator.comprehnsion)
+
+(def close-zip? #{19123 19103})
+
+(defn generate-greetings [people]
+  (for [{:keys [name address]} people :when (close-zip? (address :zip-code))]
+    (str "Hello, " name)))
+
+(defn print-greetings [people]
+  (doseq [{:keys [name address]} people :when (close-zip? (address :zip-code))]
+    (println "log -> " name)))
+
+(def people [{:name "Richard" :address {:zip-code 30000}}
+             {:name "John" :address {:zip-code 19123}}
+             {:name "Robert" :address {:zip-code 19103}}])


badge-grid

badge-grid

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

--- src/cljs/salava/core/ui/badge_grid.cljs
+++ src/cljs/salava/core/ui/badge_grid.cljs
@@ -0,0 +1,122 @@
+(ns salava.core.ui.badge-grid
+  (:require [salava.badge.ui.helper :as bh]
+            [salava.core.ui.helper :as h :refer [unique-values navigate-to path-for js-navigate-to]]
+            [salava.core.i18n :as i18n :refer [t]]
+            [salava.admin.ui.admintool :refer [admin-gallery-badge]]
+            [salava.core.ui.modal :as mo]
+            [reagent-modals.modals :as m]
+            [salava.admin.ui.helper :refer [admin?]]
+            [salava.core.ui.ajax-utils :as ajax]
+            [salava.social.ui.follow :refer [follow-badge]]))
+
+
+(defn num-days-left [timestamp]
+  (int (/ (- timestamp (/ (.now js/Date) 1000)) 86400)))
+
+(defn delete-badge [id state init-data]
+  (ajax/DELETE
+    (path-for (str "/obpv1/badge/" id))
+    {:handler
+      (fn []
+        (init-data state)
+        (navigate-to (str "/badge")))}))
+
+(defn delete-badge-modal [id state init-data]
+  [:div#delete-modal
+   [:div.modal-header
+    [:button {:type "button"
+              :class "close"
+              :data-dismiss "modal"
+              :aria-label "OK"}
+     [:span {:aria-hidden "true"
+             :dangerouslySetInnerHTML {:__html "×"}}]]]
+   [:div.modal-body
+    [:div {:class (str "alert alert-warning")}
+     (t :badge/Confirmdelete)]]
+   [:div.modal-footer
+    [:button {:type "button"
+              :class "btn btn-primary"
+              :data-dismiss "modal"}
+     (t :core/Cancel)]
+    [:button {:type "button"
+              :class "btn btn-warning"
+              :data-dismiss "modal"
+              :on-click #(delete-badge id state init-data)}
+     (t :core/Delete)]]])
+
+(defn badge-grid-element [element-data state badge-type init-data]
+  (let [{:keys [id image_file name description visibility expires_on revoked issuer_content_name issuer_content_url recipients badge_id]} element-data
+        expired? (bh/badge-expired? expires_on)
+        badge-link (path-for (str "/badge/info/" id))]
+    [:div {:class "media grid-container"}
+     (cond
+       (= "basic" badge-type)
+       (if (or expired? revoked)
+         [:div {:class (str "media-content " (if expired? "media-expired") (if revoked " media-revoked"))}
+          (cond
+            revoked [:div.icons
+                     [:div.lefticon [:i {:class "fa fa-ban"}] (t :badge/Revoked)]
+                     [:a.righticon {:class "righticon revoked" :on-click (fn [] (m/modal! [delete-badge-modal id state init-data]
+                                                                                {:size :lg})) :title (t :badge/Delete)} [:i {:class "fa fa-trash"}]]]
+            expired? [:div.icons
+                      [:div.lefticon [:i {:class "fa fa-history"}] (t :badge/Expired)]
+                      [:a.righticon {:class "righticon expired" :on-click (fn [] (m/modal! [delete-badge-modal id state init-data]
+                                                                                {:size :lg})) :title (t :badge/Delete)} [:i {:class "fa fa-trash"}]]])
+          (if image_file
+            [:div.media-left
+             [:img.badge-img {:src (str "/" image_file)
+                              :alt name}]])
+          [:div.media-body
+           [:div.media-heading
+            [:p.heading-link name]]
+           [:div.media-issuer
+            [:p issuer_content_name]]]
+          ]
+         [:div {:class (str "media-content " (if expired? "media-expired") (if revoked " media-revoked"))}
+          [:a {:href "#" :on-click #(mo/open-modal [:badge :info] {:badge-id id})}
+           [:div.icons
+            [:div.visibility-icon
+             (case visibility
+               "private" [:i {:class "fa fa-lock"}]
+               "internal" [:i {:class "fa fa-group"}]
+               "public" [:i {:class "fa fa-globe"}]
+               nil)]
+            (if expires_on
+              [:div.righticon
+               [:i {:title (str (t :badge/Expiresin) " " (num-days-left expires_on) " " (t :badge/days))
+                    :class "fa fa-hourglass-half"}]])]
+
+           (if image_file
+             [:div.media-left
+              [:img.badge-img {:src (str "/" image_file)
+                               :alt name}]])
+           [:div.media-body
+            [:div.media-heading
+             [:p.heading-link name]]
+            [:div.media-issuer
+             [:p issuer_content_name]]]
+           ]])
+
+       (= "gallery" badge-type) [:div
+                                 [:a {:href "#" :on-click #(mo/open-modal [:gallery :badges] {:badge-id badge_id})
+                                      :title name}
+                                  [:div.media-content
+                                   (if image_file
+                                     [:div.media-left
+                                      [:img {:src (str "/" image_file)
+                                             :alt name}]])
+                                   [:div.media-body
+                                    [:div.media-heading
+                                     [:p.heading-link name]]
+                                    [:div.media-issuer
+                                     [:p issuer_content_name]]
+                                    (if recipients
+                                      [:div.media-recipients
+                                       recipients " " (if (= recipients 1)
+                                                        (t :gallery/recipient)
+                                                        (t :gallery/recipients))])
+                                    [:div.media-description description]]]]
+                                 [:div.media-bottom
+                                  [:div {:class "pull-left"}
+                                   ]
+                                  (admin-gallery-badge badge_id "badges" state init-data)]])]))


start rewriting java jms client

start rewriting java jms client

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

--- dada-core/src/main/clojure/org/dada/core/jms/Client.clj
+++ dada-core/src/main/clojure/org/dada/core/jms/Client.clj
@@ -0,0 +1,136 @@
+(ns org.dada.core.jms.Client
+    (:import
+     [java.io
+      IOException ObjectInputStream ObjectOutputStream Serializable]
+     [java.lang.reflect
+      InvocationHandler Method Proxy]
+     [java.util
+      Map UUID]
+     [javax.jms
+      Destination JMSException Message ObjectMessage Session MessageConsumer MessageListener MessageProducer Queue]
+     [org.dada.slf4j
+      Logger LoggerFactory]
+     [org.dada.jms
+      SynchronousClient]
+     )
+    (:gen-class
+     :implements [java.lang.reflect.InvocationHandler java.io.Serializable] ;;  MessageListener
+     :constructors {[javax.jms.Session javax.jms.Destination Class Long Boolean] []}
+     :methods []
+     :init init
+     :state state
+     )
+    )
+
+;; TODO: need getDestination method
+
+(defn -init [#^Session session
+	     #^Destination destination
+	     #^Class interface
+	     #^Long timeout
+	     #^Boolean true-async]
+
+  [ ;; super ctor args
+   []
+   ;; instance state
+   (let [invoke (fn []
+		    ;; public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+		    ;; 	ObjectMessage message = session.createObjectMessage();
+		    ;; 	Integer methodIndex = mapper.getKey(method);
+		    ;; 	if (methodIndex == null) {
+		    ;; 		// log.warn("unproxied method invoked: {}", method);
+		    ;; 		return method.invoke(this, args);
+		    ;; 	}
+		    ;; 	message.setObject(new Invocation(methodIndex, args));
+
+		    ;; 	// TODO: whether a method is to be used asynchronously should be stored with it to save runtime overhead...
+		    ;; 	boolean async = trueAsync && method.getReturnType().equals(Void.TYPE) && method.getExceptionTypes().length == 0;
+
+		    ;; 	if (async) {
+		    ;; 		LOGGER.trace("SENDING ASYNC: {} -> {}", method, destination);
+		    ;; 		producer.send(destination, message);
+		    ;; 		return null;
+		    ;; 	} else {
+		    ;; 		String correlationId = "" + count++;
+		    ;; 		LOGGER.trace(System.identityHashCode(this) + ": setting correlationId: {}:{}", System.identityHashCode(this), correlationId);
+		    ;; 		message.setJMSCorrelationID(correlationId);
+		    ;; 		message.setJMSReplyTo(resultsQueue);
+		    ;; 		Exchanger<Results> exchanger = new Exchanger<Results>();
+		    ;; 		correlationIdToResults.put(correlationId, exchanger);
+		    ;; 		LOGGER.trace("SENDING SYNC: {} -> {}", method, destination);
+		    ;; 		producer.send(destination, message);
+		    ;; 		long start = System.currentTimeMillis();
+		    ;; 		try {
+		    ;; 			Results results = exchanger.exchange(null, timeout, TimeUnit.MILLISECONDS);
+		    ;; 			Object value = results.getValue();
+		    ;; 			if (results.isException())
+		    ;; 				throw (Exception) value;
+		    ;; 			else
+		    ;; 				return value;
+		    ;; 		} catch (TimeoutException e) {
+		    ;; 			long elapsed = System.currentTimeMillis() - start;
+		    ;; 			correlationIdToResults.remove(correlationId);
+		    ;; 			LOGGER.warn("timeout was: {}", timeout);
+		    ;; 			LOGGER.warn("timed out, after " + elapsed + " millis, waiting for results from invocation: " + method + " on " + destination); // TODO: SLF4j-ise
+		    ;; 			throw e;
+		    ;; 		}
+		    ;; 	}
+
+		    ;; }
+		    )
+
+	 readObject (fn [#^ObjectInputStream ois]
+			;; mutable state should go into an atom
+			(let [session :todo
+			      ;; Session session = getCurrentSession();
+			      destination (.readObject ois)
+			      interface (.readObject ois)
+			      timeout (.readLong ois)
+			      true-async (.readBoolean ois)]
+			  ;; now mutate our own state to match this...
+			  )
+			)
+
+	 writeObject (fn [#^ObjectOutputStream oos]
+			 (.writeObject destination)
+			 (.writeObject interface)
+			 (.writeLong timeout)
+			 (.writeBoolean true-async))
+
+	 equals (fn [#^Object object]
+		    (and (not (nil? object))
+			 (let [that (if (Proxy/isProxyClass (.getClass object)) (Proxy/getInvocationHandler object) object)]
+			   (and (instance? SynchronousClient that)
+				(.equals (.getDestination that) destination)))))
+
+	 hashCode (fn [] (.hashCode destination))
+
+	 toString (fn [this]
+		      "Client"
+		      ;;return "<" + getClass().getSimpleName() + ": " + destination + ">";
+		      )
+	 ]
+     [invoke readObject equals hashCode toString])
+   ])
+
+
+(defn #^Object -invoke [#^org.dada.core.jms.Client this #^Object proxy #^Method method #^"[Object]" args]
+  (let [[invoke] (.state this)]		;should just use a Clojure (proxy) - would it serialise ?
+    (invoke proxy method args)))
+
+(defn -readObject [#^org.dada.core.jms.Client this #^ObjectInputStream ois]
+  (let [[_ readObject] (.state this)]
+    (readObject ois)))
+
+(defn #^boolean -equals [#^org.dada.core.jms.Client this #^Object that]
+  (let [[_ _ equals] (.state this)]
+    (equals that)))
+
+(defn #^int -hashCode [#^org.dada.core.jms.Client this]
+  (let [[_ _ _ hashCode] (.state this)]
+    (hashCode)))
+
+;; (defn #^String -toString [#^org.dada.core.jms.Client this]
+;;   (let [[_ _ _ _ toString] (.state this)]
+;;     (toString this)))
+


concat_files 작성중

concat_files 작성중

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

--- src/concat_files.clj
+++ src/concat_files.clj
@@ -0,0 +1,10 @@
+(ns concat-files)
+
+(require '[clojure.string :as str])
+
+(def log
+  (with-open [rdr (clojure.java.io/reader "log.md")]
+    (doall (line-seq rdr))))
+
+(def easy-problems
+  (map read-string (str/split (nth log 6) #" ")))


Add Monad{Zero,Plus} impl for either

Add Monad{Zero,Plus} impl for either

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


Added examples file

Added examples file

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

--- src/clj_flotr/examples.clj
+++ src/clj_flotr/examples.clj
@@ -0,0 +1,98 @@
+(ns clj-flotr.examples)
+
+(require '[hiccup.page         :as page])
+(require '[clj-flotr.generator :as generator])
+
+(defn test-pie-charts
+    "Creates HTML page with various types of pie-charts."
+    []
+    (let [data [{:values 10 :label "foo"}
+                {:values 10 :label "bar"}
+                {:values 30 :label "baz"}]]
+        (spit "test-pie-charts.html" (page/xhtml
+            [:head
+                [:title "Test Pie Charts"]
+                [:meta {:name "Generator" :content "Clojure"}]
+                [:meta {:http-equiv "Content-type" :content "text/html; charset=utf-8"}]
+                (generator/flotr-scripts nil nil nil)
+            ]
+            [:body
+                [:h1 "Test Pie Charts"]
+                [:table
+                    [:tr
+                        [:td (generator/pie-chart "chart1" "300px" "300px" data)]
+                        [:td (generator/pie-chart "chart2" "300px" "300px" data
+                                :vertical-lines true)]
+                        [:td (generator/pie-chart "chart3" "300px" "300px" data
+                                :horizontal-lines true)]
+                        [:td (generator/pie-chart "chart4" "300px" "300px" data
+                                :horizontal-lines true
+                                :vertical-lines true)]
+                    ] ; </tr>
+                    [:tr
+                        [:td (generator/pie-chart "chart5" "300px" "300px" data
+                                 :show-legend true)]
+                        [:td (generator/pie-chart "chart6" "300px" "300px" data
+                                 :show-legend true
+                                 :legend-position "sw")]
+                        [:td (generator/pie-chart "chart7" "300px" "300px" data
+                                 :show-legend true
+                                 :legend-position "ne"
+                                 :legend-background "#D2E8FF")]
+                        [:td (generator/pie-chart "chart8" "300px" "300px" data
+                                 :show-legend true
+                                 :legend-position "sw"
+                                 :legend-background "#FFFFFF")]
+                    ] ; </tr>
+                ] ; </table>
+                [:h1 "done"]]))))
+
+(defn test-stacked-bars
+    "Creates HTML page with various types of stacked-bars chart."
+    []
+    (let [data [{:values [[0 1] [1 2] [2 3] [3 3]] :label "foo"}
+                {:values [[0 1] [1 4] [2 6] [3 6]] :label "bar"}
+                {:values [[0 0] [1 1] [2 0] [3 0]] :label "baz"}]]
+        (spit "test-stacked-bars.html" (page/xhtml
+            [:head
+                [:title "Test Stacked Bars"]
+                [:meta {:name "Generator" :content "Clojure"}]
+                [:meta {:http-equiv "Content-type" :content "text/html; charset=utf-8"}]
+                (generator/flotr-scripts nil nil nil)
+            ]
+            [:body
+                [:h1 "Test Stacked Bars"]
+                [:table
+                    [:tr
+                        [:td (generator/stacked-bars "chart1" "300px" "300px" data)]
+                        [:td (generator/stacked-bars "chart2" "300px" "300px" data
+                                :vertical-lines true)]
+                        [:td (generator/stacked-bars "chart3" "300px" "300px" data
+                                :horizontal-lines true)]
+                        [:td (generator/stacked-bars "chart4" "300px" "300px" data
+                                :horizontal-lines true
+                                :vertical-lines true)]
+                    ] ; </tr>
+                    [:tr
+                        [:td (generator/stacked-bars "chart5" "300px" "300px" data
+                                 :show-legend true)]
+                        [:td (generator/stacked-bars "chart6" "300px" "300px" data
+                                 :show-legend true
+                                 :legend-position "sw")]
+                        [:td (generator/stacked-bars "chart7" "300px" "300px" data
+                                 :show-legend true
+                                 :legend-position "ne"
+                                 :legend-background "#D2E8FF"
+                                 :bar-width "0.1")]
+                        [:td (generator/stacked-bars "chart8" "300px" "300px" data
+                                 :show-legend true
+                                 :legend-position "sw"
+                                 :legend-background "#FFFFFF"
+                                 :bar-width "1")]
+                    ] ; </tr>
+                ] ; </table>
+                [:h1 "done"]]))))
+
+;(test-pie-charts)
+;(test-stacked-bars)
+


buy/sell

buy/sell

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


NOJIRA: Added Clojure REST client example

git-svn-id: 996c6d7d570f9e8d676b69394667d4ecb3e4cdb3@18796 1580c273-15eb-1042-8a87-dc5d815c88a0

error: pathspec 'openregistry-webapp/src/etc/OpenRegistryActivationRESTClient.clj' did not match any file(s) known to git

--- openregistry-webapp/src/etc/OpenRegistryActivationRESTClient.clj
+++ openregistry-webapp/src/etc/OpenRegistryActivationRESTClient.clj
@@ -0,0 +1,49 @@
+(require ['com.twinql.clojure.http :as 'http])  ; clj-apache-http module. For installation instructions see: http://github.com/rnewman/clj-apache-http
+(require ['clojure.contrib.base64 :as 'base64])
+(require ['clojure.contrib.str-utils2 :as 'str-utils])
+(require ['clojure.contrib.duck-streams :as 'streams])
+
+(defn set-credentials [headers user password]
+	(assoc headers
+		"Authorization"
+		(str "Basic " (base64/encode-str (str user ":" password)))))
+
+(defn default-httpclient-params []
+	(http/map->params {:handle-redirects false}))
+
+(defn generate-activation-key
+	"Generates activation key and returns new activation key resource URI"
+	[]
+	(let [response (http/post "https://dev-registry.rutgers.edu/api/v1/people/NETID/HR01/activation"
+							 :headers-as :map
+							 :parameters (default-httpclient-params)
+							 :headers (set-credentials {} "rats" "RAT1234"))]
+		(println "Generate Activation Key call status:" (:code response))
+		(println "New Activation Key resource Location:" (first ((:headers response) "Location")))
+		(println "New Activation Key value:" (str-utils/tail (first ((:headers response) "Location")) 8))
+		(first ((:headers response) "Location"))))
+
+(defn verify-and-invalidate-activation-key [activation-resource-uri]
+	(println "\nProcessing the activation key..............\n")
+
+	;; Verify - HTTP GET
+	 (let [response (http/get activation-resource-uri
+	 						 :parameters (default-httpclient-params)
+	 						 :headers (set-credentials {} "rats" "RAT1234"))]
+	 	(if (== (:code response) 204)
+	 		(println "The activation code is valid!")
+			;; this is the 'else' part
+			(do (streams/copy (.getContent (:content response)) *out*)
+			  	 (println)
+			 )))
+	;; Now invalidate - HTTP DELETE
+	(let [response (http/delete activation-resource-uri
+							 :parameters (default-httpclient-params)
+							 :headers (set-credentials {} "rats" "RAT1234"))]
+		(println "The invalidation of the key returned HTTP status code:" (:code response))))
+
+;; Main call stack - 'generate-activation-key' and 'verify-and-invalidate-activation-key' function calls
+(verify-and-invalidate-activation-key (generate-activation-key))
+
+
+


kata5: add locking around BitSet methods

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


introduced fast kernels for GEMV

introduced fast kernels for GEMV

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/ddosic/neanderthal-clblast.git/'


Even less paranoia

Even less paranoia

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


move version to its own namespace

move version to its own namespace

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

--- src/overtone/sc/version.clj
+++ src/overtone/sc/version.clj
@@ -0,0 +1,15 @@
+(ns overtone.sc.version)
+
+(def OVERTONE-VERSION {:major 0
+                       :minor 6
+                       :patch 0
+                       :snapshot true})
+
+(def OVERTONE-VERSION-STR
+  (let [version OVERTONE-VERSION]
+    (str "v"
+         (:major version)
+         "."
+         (:minor version)
+         (if-not (= 0 (:patch version)) (:patch version) "")
+         (if (:snapshot version) "-dev" ""))))


new class for generic UI components

new class for generic UI components

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


Added file to test string stack.

Added file to test string stack.

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

--- src/string_tests.clj
+++ src/string_tests.clj
@@ -0,0 +1,6 @@
+(ns string_tests
+  (:require [clojush] [clojure.contrib.math])
+  (:use [clojush] [clojure.contrib.math]))
+
+; Test string-rand
+(println (run-push '(string-rand string-rand string-rand) (make-push-state)  false false))


stacking: ongoing

stacking: ongoing

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


[WM] small whitespace fix

[WM] small whitespace fix

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


[EN] Remove unneeded partial.

[EN] Remove unneeded partial.


Adding insertion point lib.

Adding insertion point lib.

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

--- src/overtone/insertion_point.clj
+++ src/overtone/insertion_point.clj
@@ -0,0 +1,149 @@
+;    Initially from Christophe Grand's code.  Need to figure out where to put
+;    this kind of thing in the source tree, and how licensing works.  For now
+;    it's in the overtone namespace, but it should probably be under Grand's.
+
+;   Copyright (c) Christophe Grand, 2009. 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 epl-v10.html 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 overtone.insertion-point
+ "Provides an insertion-point based on zippers."
+  (:refer-clojure :exclude [next])
+  (:require [clojure.zip :as z]))
+
+;;; core functions
+;; constructor
+(defn insertion-point
+ "Returns an insertion point around the given loc, or nil.
+  bias can take one of these 4 values:
+  :right or :left when loc is not at the root,
+  :append or :prepend when loc is at a branch."
+ [loc bias]
+  (condp = bias
+    :right (when-let [r (or (z/right loc) (z/up loc))] [loc r])
+    :left  (when-let [l (or (z/left loc) (z/up loc))] [l loc])
+    :append [(or (when-let [d (z/down loc)] (z/rightmost d)) loc) loc]
+    :prepend [loc (or (z/down loc) loc)]))
+
+;; accessors
+(defn right-loc
+ "Returns the loc to the right of the insertion-point or nil."
+ [[l r]]
+  (when-not (or (= (z/up l) r) (= l r)) r))
+
+(defn left-loc
+ "Returns the loc to the left of the insertion-point or nil."
+ [[l r]]
+  (when-not (or (= l (z/up r)) (= l r)) l))
+
+(defn up-loc
+ "Returns the parent loc of the insertion-point."
+ [[_ r :as ip]]
+  (if-let [r (right-loc ip)] (z/up r) r))
+
+
+;;; other functions
+(defn right
+ "Returns the insertion-point to the right of the right loc, or nil."
+ [ip]
+  (when-let [r (right-loc ip)]
+    (insertion-point r :right)))
+
+(defn left
+ "Returns the insertion-point to the left of the left loc, or nil."
+ [ip]
+  (when-let [l (left-loc ip)]
+    (insertion-point l :left)))
+
+(defn down-right
+ "Returns the insertion-point that prepends to the right loc, or nil."
+ [ip]
+  (when-let [r (right-loc ip)]
+    (insertion-point r :prepend)))
+
+(defn down-left
+ "Returns the insertion-point that appends to the left loc, or nil."
+ [ip]
+  (when-let [l (left-loc ip)]
+    (insertion-point l :append)))
+
+(defn up-right
+ "Returns the insertion-point to the right of the parent loc, or nil."
+ [ip]
+  (-> ip up-loc (insertion-point :right)))
+
+(defn up-left
+ "Returns the insertion-point to the left of the parent loc, or nil."
+ [ip]
+  (-> ip up-loc (insertion-point :left)))
+
+(defn next
+ "Returns the next insertion-point to the right (depth-first), or nil."
+ [ip]
+  (if-let [r (right-loc ip)]
+    (insertion-point r (if (z/branch? r) :prepend :right))
+    (up-right ip)))
+
+(defn prev
+ "Returns the previous insertion-point to the left (depth-first), or nil."
+ [ip]
+  (if-let [l (left-loc ip)]
+    (insertion-point l (if (z/branch? l) :append :left))
+    (up-left ip)))
+
+(defn insert-left
+ "Inserts to the left of the insertion-point, without moving."
+ [ip item]
+  (if-let [r (right-loc ip)]
+    (-> r (z/insert-left item) (insertion-point :left))
+    (-> ip up-loc (z/append-child item) (insertion-point :append))))
+
+(defn insert-right
+ "Inserts to the right of the insertion-point, without moving."
+ [ip item]
+  (if-let [l (left-loc ip)]
+    (-> l (z/insert-right item) (insertion-point :right))
+    (-> ip up-loc (z/insert-child item) (insertion-point :prepend))))
+
+(defn- remove-loc [l]
+  (let [lefts (z/lefts l)
+        rights (z/rights l)
+        u (z/up l)
+        n (z/make-node u (z/node u) (concat lefts rights))]
+    (loop [ip (-> u (z/replace n) (insertion-point :prepend)) s (seq lefts)]
+      (if s
+        (recur (right ip) (clojure.core/next s))
+        ip))))
+
+(defn remove-left
+ "Removes the item to the left of the insertion-point, if any."
+ [ip]
+  (if-let [l (left-loc ip)] (remove-loc l) ip))
+
+(defn remove-right
+ "Removes the item to the right of the insertion-point, if any."
+ [ip]
+  (if-let [r (right-loc ip)] (remove-loc r) ip))
+
+(comment
+  (defn show-ip [ip] (-> ip (insert-left '*) first z/root))
+  (def e (-> [] z/vector-zip (insertion-point :append)))
+  (-> e show-ip) ; [*]
+  (-> e (insert-left 1) show-ip) ; [1 *]
+  (-> e (insert-left 1) (insert-right 2) show-ip) ; [1 * 2]
+  (-> e (insert-left 1) (insert-right 2) left show-ip) ; [* 1 2]
+  (-> e (insert-left [1 2]) show-ip) ; [[1 2] *]
+  (-> e (insert-left [1 2]) left show-ip) ; [* [1 2]]
+  (-> e (insert-left [1 2]) left right show-ip) ; [[1 2] *]
+  (-> e (insert-left [1 2]) left next show-ip) ; [[* 1 2]]
+  (-> e (insert-left [1 2]) left next next show-ip) ; [[1 * 2]]
+  (-> e (insert-left [1 2]) left next next next show-ip) ; [[1 2 *]]
+  (-> e (insert-left [1 2]) left next next next next show-ip) ; [[1 2] *]
+  (-> e (insert-left [1 2]) left next next next next prev show-ip) ; [[1 2 *]]
+)


forgot whole refactored file :)

forgot whole refactored file :)

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

--- sidecar/src/figwheel_sidecar/javascript_reloading.clj
+++ sidecar/src/figwheel_sidecar/javascript_reloading.clj
@@ -0,0 +1,62 @@
+(ns figwheel-sidecar.javascript-reloading
+  (:require
+   [clojure.java.io :as io]
+   [cljs.build.api :as bapi]
+   [cljs.closure]))
+
+;; live javascript reloading
+
+(defn get-foreign-lib [{:keys [foreign-libs]} file-path]
+  (when foreign-libs
+    (let [file (io/file file-path)]
+      (first (filter (fn [fl]
+                       (= (.getCanonicalPath (io/file (:file fl)))
+                          (.getCanonicalPath file)))
+                     foreign-libs)))))
+
+(defn js-file->namespaces [{:keys [foreign-libs] :as state} js-file-path]
+  (if-let [foreign (get-foreign-lib state js-file-path)]
+    (:provides foreign)
+    (:provides (bapi/parse-js-ns js-file-path))))
+
+(defn cljs-target-file-from-foreign [output-dir file-path]
+  (io/file (str output-dir java.io.File/separator (.getName (io/file file-path)))))
+
+(defn closure-lib-target-file-for-ns [output-dir namesp]
+  (let [path (cljs.closure/lib-rel-path {:provides [namesp]})]
+    (io/file output-dir path)))
+
+(defn get-js-copies [{:keys [output-dir] :as state} changed-js]
+  (keep
+   (fn [f]
+     (if-let [foreign (get-foreign-lib state f)]
+       {:output-file (cljs-target-file-from-foreign output-dir f)
+        :file f}
+       (when-let [namesp (first (js-file->namespaces state f))]
+         {:output-file (closure-lib-target-file-for-ns output-dir namesp)
+          :file f})))
+   changed-js))
+
+(defn make-copies [copies]
+  (doseq [{:keys [file output-file]} copies]
+    (spit output-file (slurp file))))
+
+(defn copy-changed-js [state changed-js]
+  ;; TODO there is an easy way to do this built into the clojurescript
+  ;; compiler source
+  ;; the idea here is we are only copying files that make sense to
+  ;; copy i.e. they have a provide
+  (when-not (empty? changed-js)
+    (make-copies (get-js-copies state changed-js))))
+
+(defn build-hook [build-fn]
+  (fn [{:keys [figwheel-server build-config changed-files] :as build-state}]
+    (if-let [changed-js-files (filter #(.endsWith % ".js") changed-files)]
+      (let [build-options (or (:build-options build-config) (:compiler build-config))
+            additional-changed-ns   ;; add in js namespaces
+            (mapcat (partial js-file->namespaces build-options)
+                    changed-js-files)]
+        (copy-changed-js build-options changed-js-files)
+        (build-fn (update-in
+                   build-state [:additional-changed-ns] concat additional-changed-ns)))
+      (build-fn build-state))))


Add tests for inky.env

Add tests for inky.env

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

--- test/clj/inky/env_test.clj
+++ test/clj/inky/env_test.clj
@@ -0,0 +1,17 @@
+(ns inky.env-test
+  (:require [inky.env :as env]
+            [clojure.test :refer :all]))
+
+(deftest test-clj->env
+  (are [kw result] (= result (env/clj->env kw))
+       :path "PATH"
+       :foo-bar "FOO_BAR"))
+
+(deftest test-env
+  (is (env/str :path))
+  (is (nil? (env/str :some-random-env-var)))
+  (is (= "foo" (env/str :some-random-env-var "foo"))))
+
+(deftest test-env-defaults
+  (is (not (nil? (env/str :some-random-env-var "foo"))))
+  (is (= 10 (env/int :some-random-env-var 10))))


more Strings and arrows

more Strings and arrows

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


test inspired by CLJ-829

test inspired by CLJ-829

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

--- src/examples/clojure/clojure/test/hash_test.clj
+++ src/examples/clojure/clojure/test/hash_test.clj
@@ -0,0 +1,43 @@
+;   Copyright (c) Rich Hickey, Stuart Halloway, and contributors.
+;   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 epl-v10.html 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 clojure.test.hash-test
+  (:use clojure.test.generative)
+  (:require [clojure.test.generative.generators :as gen]))
+
+(defn hash-obj
+  [h]
+  (reify Object (hashCode [_] h)))
+
+(defn poorly-keyed-map
+  [vals distinct]
+  (zipmap
+   (map #(hash-obj (mod (hash %) distinct)) vals)
+   vals))
+
+(defn verify-key-removal
+  [m kset]
+  (loop [c (count kset)
+         [k & more] (seq kset)
+         tmap (transient m)]
+    (if k
+      (do
+        (assert (= (count tmap) c))
+        (recur (dec c)
+               more
+               (dissoc! tmap k)))
+      (do
+        (assert (zero? (count tmap)))
+        (assert (zero? (count (persistent! tmap))))))))
+
+(defspec transient-maps-with-key-collision
+  poorly-keyed-map
+  [^{:tag (vec long (uniform 0 1000))} vals
+   ^{:tag (uniform 1 100)} distinct]
+  (verify-key-removal % (into #{} (keys %))))


added test for html-escaping plugin

added test for html-escaping plugin

error: pathspec 'test/blog/text_plugin/escape_html_impl_test.clj' did not match any file(s) known to git

--- test/blog/text_plugin/escape_html_impl_test.clj
+++ test/blog/text_plugin/escape_html_impl_test.clj
@@ -0,0 +1,31 @@
+(ns blog.text-plugin.escape-html-impl-test
+  (:use blog.text-plugin.plugin
+        blog.text-plugin.escape-html)
+  (:require [clojure.test :refer :all]
+            [blog.text-plugin.escape-html-impl :refer :all]))
+
+
+(deftest smiley
+  (testing "process"
+    (let [plugin (map->EscapeHTMLPlugin {})]
+      (are [in out] (is (= out (process-impl plugin in)))
+        "title"
+        "<a href="image.png">title</a>"
+
+        "title"
+        "<a href="image.png?a=1&b=3">title</a>"
+
+        "![title](image.png?a=1&b=3)"
+        "![title](image.png?a=1&b=3)")))
+
+  (testing "process (preserving ampersand)"
+    (let [plugin (map->EscapeHTMLPlugin {:preserve-ampersand? true})]
+      (are [in out] (is (= out (process-impl plugin in)))
+        "title"
+        "<a href="image.png">title</a>"
+
+        "title"
+        "<a href="image.png?a=1&b=3">title</a>"
+
+        "![title](image.png?a=1&b=3)"
+        "![title](image.png?a=1&b=3)"))))


Suppress channel closing error logging

Suppress channel closing error logging

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


Use generative testing of (· demunge munge)

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

--- test/grimoire/util_test.clj
+++ test/grimoire/util_test.clj
@@ -0,0 +1,11 @@
+(ns grimoire.util-test
+  (:require [grimoire.util :as util]
+            [clojure.test :refer :all]
+            [clojure.test.check.clojure-test :refer [defspec]]
+            [clojure.test.check :as tc]
+            [clojure.test.check.generators :as gen]
+            [clojure.test.check.properties :as prop]))
+
+(defspec munge-unmunge-is-isomorphism 1000
+  (prop/for-all [s gen/string]
+    (= s (-> s util/munge util/demunge))))