Add docs of the whole-ast structure & helpers

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

--- src/oxcart/passes.clj
+++ src/oxcart/passes.clj
@@ -0,0 +1,73 @@
+;;   Copyright (c) Reid McKenzie, Rich Hickey & contributors. 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 oxcart.passes
+  {:doc "Implements a naive pass manager and dependency system."
+   :author "Reid McKenzie"
+   :added  "0.0.6"})
+
+
+;; Whole-ASTs are maps of this structure:
+;;   {:modules #{symbol}
+;;    :passes  (Option #{Var})
+;;    ∀ m ∈ Modules m → Module
+;;   }
+;;
+;; Where a Module is at least
+;;   {:forms (Vec AST)}
+;;
+;; The rationale for this structure is that loading is done in the
+;; refernce JVM Clojure implementation on a per-module basis where
+;; modules are defined to be single files but compilation and
+;; evaluation occur sequentially over forms in order of
+;; occurrance. Grouping forms from the same namespace together into a
+;; module is pretty obvious choice, as is storing forms in file/load
+;; order.
+
+
+;; Passes are then functions from Whole-ASTs to Whole-ASTs. For user
+;; "friendliness" each pass shall also take an options argument which
+;; may change the behavior of the pass by enabling or disabling a
+;; given transformation or logging output.
+;;
+;; As it is considered good practice for passes to be composed to
+;; achieve some result rather than being monolithic, passes are
+;; expected to depend on other passes, especially when a given
+;; transformation requires previous enabling analysis. To assist this
+;; pattern, when a non-transforming pass completes, it is expected to
+;; conj it's identifier into the :passes set. Other passes may then
+;; elect not to re-run analyses on which they depend if they have
+;; already been run.
+
+
+(defn record-pass
+  [whole-ast pass]
+  (update-in whole-ast [:passes] conj pass))
+
+(defn require-pass
+  [whole-ast pass options]
+  (if (contains? (:passes whole-ast) pass)
+    whole-ast
+    (pass whole-ast options)))
+
+(defn do-passes
+  [ast options & passes]
+  (reduce #(require-pass %1 %2 options)
+          ast passes))
+
+
+;; To enable this pattern however, transforming passes are required to
+;; clobber the :passes key replacing it with #{}. This indicates to
+;; subsequent passes that while information may exist in the program
+;; AST it is likely stale and should (must) be re-analyzed before use.
+
+
+(defn clobber-passes
+  [ast]
+  (assoc ast :passes #{}))


Add a small delay to Jetty thread cleanup test

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


ring-jetty-adapter: send :body in POST request


add tests for /catchup command

add tests for /catchup command

error: pathspec 'test/subrosa/test/plugins/catchup.clj' did not match any file(s) known to git

--- test/subrosa/test/plugins/catchup.clj
+++ test/subrosa/test/plugins/catchup.clj
@@ -0,0 +1,48 @@
+(ns subrosa.test.plugins.catchup
+  (:use [clojure.test]
+        [subrosa.test.expect]))
+
+(use-fixtures :each run-test-server)
+
+(deftest test-catchup
+  (with-connection s1
+    (with-connection s2
+      (transmit s1 "NICK lee")
+      (transmit s1 "USER lee 0 * :Lee Hinmanm")
+      (transmit s1 "JOIN #foo")
+      (Thread/sleep 500)
+      (transmit s1 "PRIVMSG #foo :Hello, World!")
+      (Thread/sleep 500)
+      (transmit s2 "NICK lee2")
+      (transmit s2 "USER lee2 0 * :Lee Hinmanm")
+      (transmit s2 "JOIN #foo")
+      (Thread/sleep 500)
+      (transmit s2 "PRIVMSG #foo :Goodbye, World!")
+      (Thread/sleep 500)
+      (transmit s1 "CATCHUP #foo 1")
+      (Thread/sleep 500)
+      (is (received? s1 #"Goodbye, World!"))
+      (transmit s1 "CATCHUP #foo")
+      (Thread/sleep 500)
+      (is (received? s1 #"Hello, World!"))
+      (transmit s1 "PART #foo")
+      (Thread/sleep 500)
+      (transmit s1 "QUIT"))))
+
+(deftest test-catchup-errors
+  (with-connection s1
+    (transmit s1 "NICK lee")
+    (transmit s1 "USER lee 0 * :Lee Hinmanm")
+    (transmit s1 "JOIN #foo")
+    (Thread/sleep 500)
+    (transmit s1 "PRIVMSG #foo :Hello, World!")
+    (Thread/sleep 500)
+    (transmit s1 "CATCHUP #bar")
+    (is (received? s1 #"No room given or room does not exist"))
+    (Thread/sleep 500)
+    (transmit s1 "CATCHUP #foo not-a-number")
+    (is (received? s1 #"Hello, World!"))
+    (Thread/sleep 500)
+    (transmit s1 "PART #foo")
+    (Thread/sleep 500)
+    (transmit s1 "QUIT")))


Add favicons

Add favicons

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


complete

complete

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/tlight/project-euler.git/'


Add async event system

Add async event system

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


Update to the latest handle-errors

Update to the latest handle-errors

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


More cleanup. Removed unnecessary whitespace.

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


seed applicants

seed applicants

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


[EN] Bump to Clojure 1.7.0

[EN] Bump to Clojure 1.7.0

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


Version 1.4.1-SNAPSHOT

Version 1.4.1-SNAPSHOT


bump version and core version to 3.5.7

bump version and core version to 3.5.7

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


Update compojure-api

Update compojure-api

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


bump version and core version to 3.5.5

bump version and core version to 3.5.5


bump version to 3.6.0

bump version to 3.6.0

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


rm htt-client

rm htt-client

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


bump version to 2.8.6

bump version to 2.8.6


Release version 0.2.1 to Clojars

Release version 0.2.1 to Clojars

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


Added a script for doing the long inventory.

error: pathspec 'scripts/bigfive-long.clj' did not match any file(s) known to git

--- scripts/bigfive-long.clj
+++ scripts/bigfive-long.clj
@@ -0,0 +1,10 @@
+#!/bin/bash lein-exec-p
+(ns scripts.bigfive-short
+ (:require [simulacrum.bigfive :as bigfive]
+           [simulacrum.inventory :as inventory]
+           [simulacrum.util :as util]))
+
+
+(util/clear-screen)
+(inventory/run-inventory :bigfive :long true)
+(util/exit)


Removed unused 'use' statement.

Removed unused 'use' statement.

--- src/notes/handler.clj
+++ src/notes/handler.clj
@@ -7,7 +7,6 @@
         [hiccup.element]
         [hiccup.util]
         [ring.util.response]
-        [clojure.data]
         [clj-time.core :only [now]])
 (:require [clojure.string :as s]
           [compojure.handler :as handler]


Sync up import tests with latest code

Sync up import tests with latest code

I probably dropped this ball when the changes were originally made to
the import code.

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


longest substring

longest substring

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

--- src/clj/xl/longest_substring.clj
+++ src/clj/xl/longest_substring.clj
@@ -0,0 +1,53 @@
+(ns xl.longest-substring)
+"Find longest substrings of k strings.
+Dynamic programming algorithm takes sum(lengths) space and prod(lengths) time.
+Takes n max(length) time using suffix tree"
+
+(defn dynamic-algo
+  "Find longest suffix for all prefix pairs of two strings.
+  p(i, j): if s[i-1] = t[j-1] then p(i-1, j-1) + 1, else 0"
+  [s1 s2]
+  (let [[l1 l2] (map count [s1 s2])
+        [l1-1 l2-1] (map inc [l1 l2])
+        answer-table (make-array Object l1-1 l2-1)
+        empty-answer {:len 0 :ss ""}]
+    ; init answer-table[0][x], answer-table[x][0] to 0
+    (doseq [ii (range l1-1)]
+      (aset answer-table ii 0 empty-answer)
+      )
+    (doseq [ii (range l2-1)]
+      (aset answer-table 0 ii empty-answer)
+      )
+
+    (doall
+      (for [ii (range 1 l1-1) jj (range 1 l2-1)]
+        (let [{:keys [len ss]} (aget answer-table (dec ii) (dec jj))
+              s1-ii (get s1 (dec ii))]
+          (aset answer-table ii jj
+                (if (= s1-ii (get s2 (dec jj)))
+                  {:len (inc len) :ss (str ss s1-ii)}
+                  empty-answer
+                  )
+                  )
+          )
+        )
+      )
+    (apply (partial max-key :len) (flatten (mapv vec answer-table)))
+    )
+  )
+
+(defn- dynamic-samnples []
+  (doseq [[s1 s2]
+            [
+             ["" ""]
+             ["a" "b"]
+             ["abc" "bcd"]
+             ]
+          ]
+    (println "s1: " s1)
+    (println "s2: " s2)
+    (println (dynamic-algo s1 s2))
+    )
+  )
+
+(dynamic-samnples)


Saioa hasi edo erabiltzailea ezabatzean hasierako orrira joan

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


adding code for removing templating

adding code for removing templating

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

--- src/crawler/template_removal.clj
+++ src/crawler/template_removal.clj
@@ -0,0 +1,96 @@
+(ns crawler.template-removal
+  "Generate a preliminary blacklist - comprising template code"
+  (:require [crawler.rich-char-extractor :as extractor]
+            [clj-http.client :as client]
+            [clj-http.cookies :as cookies]))
+
+(def my-cs (cookies/cookie-store))
+
+(defn look-at
+  ([a-link]
+     (look-at a-link (set [])))
+
+  ([a-link blacklist]
+     (try (let [body  (-> a-link (client/get {:cookie-store my-cs}) :body)]
+            (extractor/state-action body a-link blacklist))
+          (catch Exception e nil))))
+
+(defn all-xpaths
+  ([page-src url]
+     (all-xpaths page-src url (set [])))
+
+  ([page-src url blacklist]
+     (let [infos   (extractor/state-action page-src url blacklist)
+           _ (println :infos infos)
+           samples (reduce
+                    (fn [acc {xpath :xpath _ :score hrefs :hrefs}]
+                      (let [picked (take
+                                    2
+                                    (filter
+                                     (fn [a-link]
+                                       (and (not (some #{a-link} (:links acc)))
+                                            (not= a-link url)))
+                                     hrefs))]
+                        (println :xpath xpath :picked picked)
+                        (if picked
+                          {:links (clojure.set/union (:links acc) (set picked))
+                           :content (conj (:content acc) [xpath picked])}
+                          acc)))
+                    {:links (set []) :content (set [])}
+                    (:xpath-nav-info infos))
+
+           sampled (into
+                    {}
+                    (reduce
+                     (fn [acc [x l]]
+                       (let [action-space (do
+                                            (println :sampling l)
+                                            (map (fn [x]
+                                                   (do
+                                                     (Thread/sleep 2000)
+                                                     (look-at x))) l))
+
+                             action-space-map (into
+                                               {}
+                                               (map
+                                                (fn [{xpath :xpath _ :score hrefs :hrefs}]
+                                                  [xpath {:incidence 1 :hrefs (set hrefs)}])
+                                                (reduce
+                                                 concat
+                                                 (map :xpath-nav-info action-space))))]
+                         (merge-with
+                          (fn [x y]
+                            {:incidence (+ (:incidence x)
+                                           (:incidence y))
+                             :hrefs (concat (:hrefs x) (:hrefs y))})
+                          acc action-space-map)))
+                     {}
+                     (:content samples)))
+           res      (map
+                     (fn [{xpath :xpath
+                          _     :score
+                          hrefs :hrefs}]
+                       (let [diff (count (clojure.set/difference
+                                          (set (:hrefs (sampled xpath)))
+                                          (set hrefs)))]
+                         {:xpath    xpath
+                          :changed  diff
+                          :diff-links (clojure.set/difference
+                                       (set (:hrefs (sampled xpath)))
+                                       (set hrefs))
+                          :orig     (set hrefs)
+                          :observed (:incidence (sampled xpath))
+                          :samples  (reduce
+                                     (fn [acc [x ls]]
+                                       (+ acc (count (filter identity ls))))
+                                     0
+                                     (:content samples))}))
+                     (:xpath-nav-info infos))
+
+           cands    (filter
+                     (fn [x]
+                       (and (-> x :changed zero?)
+                            (-> x :observed)
+                            (-> x :observed (>= 5))))
+                     res)]
+       sampled)))


Use a record for exception wrapper

Use a record for exception wrapper

--- src/main/clojure/pigpen/util.clj
+++ src/main/clojure/pigpen/util.clj
@@ -124,6 +124,8 @@

 ;; core.async wrappers

+(defrecord ChannelException [z])
+
 (defn channel? [ch]
   (instance? Channel ch))

@@ -142,7 +144,7 @@
        (a/>! ~chan val#)
        (a/>! ~chan ::nil))
      (catch Throwable z#
-       (a/>! ~chan (with-meta [z#] {::exception true})))))
+       (a/>! ~chan (->ChannelException z#)))))

 (defmacro safe->!!
   "A safe version of clojure.core.async/>!!
@@ -159,7 +161,7 @@
        (do (a/>!! ~chan val#))
        (do (a/>!! ~chan ::nil)))
      (catch Throwable z#
-       (a/>!! ~chan (with-meta [z#] {::exception true})))))
+       (a/>!! ~chan (ChannelException. z#)))))

 (defmacro safe-<!
   "A safe version of clojure.core.async/<!
@@ -174,7 +176,7 @@
   `(let [val# (a/<! ~chan)]
      (cond
        (= val# ::nil) nil
-       (-> val# meta ::exception) (throw (first val#))
+       (instance? ChannelException val#) (throw (:z val#))
        (nil? val#) ::complete
        :else val#)))

@@ -191,7 +193,7 @@
   `(let [val# (a/<!! ~chan)]
      (cond
        (= val# ::nil) nil
-       (-> val# meta ::exception) (throw (first val#))
+       (instance? ChannelException val#) (throw (:z val#))
        (nil? val#) ::complete
        :else val#)))

@@ -210,7 +212,7 @@
        (if-let [result (do ~@body)]
          result
          ::nil)
-     (catch Throwable z# (with-meta [z#] {::exception true})))))
+     (catch Throwable z# (ChannelException. z#)))))

 (defn chan->lazy-seq
   "Pulls values from a channel until the channel is closed.


100 prisoners puzzle.

100 prisoners puzzle.

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

--- Clojure/prisoners.clj
+++ Clojure/prisoners.clj
@@ -0,0 +1,18 @@
+; http://gurmeet.net/puzzles/100-prisoners-and-100-boxes/
+
+(def prisoner-count 100)
+(def boxes-per-prisoner 50)
+(def trial-count 10000)
+
+(defn simulate []
+    (let [
+        assignments (shuffle (range prisoner-count))
+        ids-in-cycle (fn [n] (rest (iterate assignments n)))
+        ]
+        (every? (fn [pid] (some #{pid} (take boxes-per-prisoner (ids-in-cycle pid)))) (range prisoner-count))))
+
+(println "Success rate: "
+    (/
+        (count (filter identity (take trial-count (repeatedly simulate))))
+        trial-count))
+


add test for Fields class

add test for Fields class

error: pathspec 'test/clj/backtype/storm/fields_test.clj' did not match any file(s) known to git

--- test/clj/backtype/storm/fields_test.clj
+++ test/clj/backtype/storm/fields_test.clj
@@ -0,0 +1,40 @@
+(ns backtype.storm.fields-test
+  (:use [clojure test])
+  (:import [backtype.storm.tuple Fields])
+  (:import [java.util List])
+  (:import [java.util Iterator]))
+
+(deftest test-fields-constructor
+  (testing "constructor"
+    (testing "with (String... fields)"
+      (is (instance? Fields (Fields. (into-array String '("foo" "bar")))))
+      (is (thrown? IllegalArgumentException (Fields. (into-array String '("foo" "bar" "foo"))))))
+    (testing "with (List<String> fields)"
+      (is (instance? Fields (Fields. '("foo" "bar"))))
+      (is (thrown? IllegalArgumentException (Fields. '("foo" "bar" "foo")))))))
+
+(deftest test-fields-methods
+  (let [fields (Fields. '("foo" "bar"))]
+    (testing "method"
+      (testing ".size"
+        (is (= (.size fields) 2)))
+      (testing ".get"
+        (is (= (.get fields 0) "foo"))
+        (is (= (.get fields 1) "bar"))
+        (is (thrown? IndexOutOfBoundsException (.get fields 2))))
+      (testing ".fieldIndex"
+        (is (= (.fieldIndex fields "foo") 0))
+        (is (= (.fieldIndex fields "bar") 1))
+        (is (thrown? IllegalArgumentException (.fieldIndex fields "baz"))))
+      (testing ".toList"
+        (is (instance? List (.toList fields)))
+        (is (= (count (.toList fields)) 2))
+        (is (not-any? false? (map = (.toList fields) '("foo" "bar")))))
+      (testing ".iterator"
+        (is (instance? Iterator (.iterator fields)))
+        (is (= (count (iterator-seq (.iterator fields))) 2))
+        (is (not-any? false? (map = (iterator-seq (.iterator fields)) '("foo" "bar")))))
+      (testing ".select"
+        (is (instance? List (.select fields (Fields. '("bar")) '("a" "b" "c"))))
+        (is (= (.select fields (Fields. '("bar")) '("a" "b" "c")) '("b")))))))
+


Remove print-method for JSValue

Remove print-method for JSValue

--- src/sablono/compiler.clj
+++ src/sablono/compiler.clj
@@ -215,12 +215,6 @@
       `(~'into-array ~(vec (compile-seq content)))
       (first forms))))

-;; TODO: Remove when landed in ClojureScript.
-(defmethod print-method JSValue
-  [^JSValue v, ^java.io.Writer w]
-  (.write w "#js ")
-  (.write w (pr-str (.val v))))
-
 (extend-protocol ICompile
   clojure.lang.IPersistentVector
   (compile-react [this]


modified:   loganalyzer/core_test.clj

modified:   loganalyzer/core_test.clj

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


Remove cats.core ns usage from cats.applicative.validation ns.

--- src/cats/applicative/validation.cljc
+++ src/cats/applicative/validation.cljc
@@ -27,7 +27,6 @@
   "The Validation applicative implementation and helper functions
   for validating values. Isomorphic to Either."
   (:require [cats.protocols :as p]
-            [cats.core :as m]
             [cats.monad.either :as either]))

 (declare validation-applicative)
@@ -137,8 +136,11 @@
     p/Semigroup
     (mappend [_ sv sv']
       (cond
-        (and (fail? sv) (fail? sv')) (fail (m/mappend (m/extract sv)
-                                                      (m/extract sv')))
+        (and (fail? sv) (fail? sv'))
+        (fail (let [sv (p/extract sv)
+                    sv' (p/extract sv')]
+                (p/mappend (p/get-context sv) sv sv')))
+
         (ok? sv) sv
         :else sv'))

@@ -169,8 +171,14 @@

     (fapply [_ af av]
       (cond
-        (and (ok? af) (ok? av)) (ok ((m/extract af) (m/extract av)))
-        (and (fail? af) (fail? av)) (fail (m/mappend (m/extract af) (m/extract av)))
+        (and (ok? af) (ok? av))
+        (ok ((p/extract af) (p/extract av)))
+
+        (and (fail? af) (fail? av))
+        (fail (let [af (p/extract af)
+                    av (p/extract av)]
+                (p/mappend (p/get-context af) af av)))
+
         (ok? af) av
         :else af))))


Mild cleanup.

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


correctly diffs catalogs for editing services


remove schema validations for values unused by mail-works or scheduled-message-works

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


add punctuation to extended stop words

add punctuation to extended stop words

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


wrap google matrix math

wrap google matrix math

error: pathspec 'statspop/src/statspop/math/matrix.cljs' did not match any file(s) known to git

--- statspop/src/statspop/math/matrix.cljs
+++ statspop/src/statspop/math/matrix.cljs
@@ -0,0 +1,37 @@
+(ns statspop.math.matrix
+  "This namespace just wraps google closure library matrix math, because I don't want to have to remember to instantiate a bunch of classes and things.
+
+  All functions except the first require matrix input; the first (matrixify) is constructor for matrix type. Constructor can handle nested javascript arrays or clojure vectors."
+  (:require [goog.math.Matrix]))
+
+
+(defprotocol IMatrixer
+  (matrixify [this]))
+
+(extend-type array
+  IMatrixer
+  (matrixify [this]
+    (js/goog.math.Matrix. this)))
+
+(extend-type PersistentVector
+  IMatrixer
+  (matrixify [this]
+    (js/goog.math.Matrix. (clj->js this))))
+
+;; according to this http://stackoverflow.com/questions/11421805/clojurescript-protocol-usage I should be able to
+;; treat matrixify like a regular function here now.
+
+(defn multiply
+  "multiply matrices"
+  [a-matrix another-matrix]
+  (.multiply a-matrix another-matrix))
+
+(defn transpose
+  "transpose matrix"
+  [matrix]
+  (.getTranspose matrix))
+
+(defn invert
+  "invert matrix"
+  [matrix]
+  (.getInverse matrix))


Add rember* tests.

Add rember* tests.

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

--- test/little_clojurer/chapter5_test.clj
+++ test/little_clojurer/chapter5_test.clj
@@ -0,0 +1,11 @@
+(ns little-clojurer.chapter5_test
+  (:require [clojure.test :refer :all]
+            [little-clojurer.chapter5 :refer :all]))
+
+(deftest rember*-test
+  (testing
+    (is (= '() (rember* :x '())))
+    (is (= '(()) (rember* :x '(:x (:x) :x))))
+    (is (= '((() :y)) (rember* :x '(:x ((:x) :y) :x))))
+    (is (= '((() :y) (:z :z (:z))) (rember* :x '(:x ((:x) :y) :x (:z :z (:z :x))))))
+    (is (= '(()) (rember* :x '(()))))))


Created scratch file

Created scratch file

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


added ttable

added ttable

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


Add section tocs

Add section tocs

--- src/catalog/latex.clj
+++ src/catalog/latex.clj
@@ -87,6 +87,7 @@
    "\\fixpdflayout"
    "\\checkandfixthelayout"
    "\\usepackage{graphicx}"
+   "\\usepackage{titletoc}"
    "\\usepackage[ngerman]{babel}"
    "\\def\\languageshorthands#1{}"
    "\\usepackage{fontspec,xunicode,xltxtra}"
@@ -174,7 +175,6 @@
 (defn genre-entry [format genre items]
   (when (genre items)
     [(str "\\subsection{" (translations genre "FIXME") "}")
-     (println genre (-> items genre first))
      (cond
        (#{:kinder-und-jugendbücher} genre) (subgenre-entries (genre items))
        (#{:hörbuch} format) (subgenre-entries (genre items))
@@ -186,6 +186,10 @@
 (defn format-entry [format items]
   (when (format items)
     [(str "\\section{" (translations format "FIXME") "}")
+     ;; start a section toc
+     "\\startcontents"
+     ;; the toc should range from levels 2 to 3 inclusive (i.e. 2 and 3)
+     "\\printcontents{}{2}{\\setcounter{tocdepth}{3}}"
      (case format
        (:hörfilm :ludo) (catalog-entries (format items))
        (genre-entries format (format items)))]))


scaffolding snapshot

scaffolding snapshot

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

--- src/clj/neb/snapshot.clj
+++ src/clj/neb/snapshot.clj
@@ -0,0 +1,17 @@
+(ns neb.snapshot
+  (:import (org.shisoft.neb Trunk)
+           (java.util Map$Entry)
+           (org.shisoft.neb.io CellMeta)
+           (org.shisoft.neb.io type_lengths)))
+
+(defn thaw [^Trunk trunk ^String file-path]
+  (let [cell-index (.getCellIndex trunk)
+        index-pair-size (* 2 type_lengths/longLen)
+        index-record-size ()
+        index-pairs (map
+                      (fn [^Map$Entry entry]
+                        (let [^Integer hash (.getKey entry)
+                              ^CellMeta cell-meta (.getValue entry)
+                              location (.getLocation cell-meta)]
+                          ))
+                      (.entrySet cell-index))]))


Fix frozen autorunner issue on compiler exceptions

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


Add cookie-test from several commits back

I copied a comment test into here several days ago.

error: pathspec 'test/frereth_cp/client/cookie_test.clj' did not match any file(s) known to git

--- test/frereth_cp/client/cookie_test.clj
+++ test/frereth_cp/client/cookie_test.clj
@@ -0,0 +1,14 @@
+(ns frereth-cp.client.cookie-test
+  "Test out pieces involved in client cookie handling"
+  (:require [clojure.test :refer (deftest is testing)]))
+
+
+(deftest url-comparison
+  (testing "Distinct addresses"
+    (let [ca (java.net.InetAddress/getByName "www.google.ca")
+          com (java.net.InetAddress/getByName "www.google.com")]
+      (is (not= ca com))))
+  (testing "Multiple domains at same address"
+    (let [www (java.net.InetAddress/getByName "www.frereth.com")
+          beta (java.net.InetAddress/getByName "beta.frereth.com")]
+      (is (= beta www)))))


Add some poll examples

Add some poll examples

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

--- test/example/poll.clj
+++ test/example/poll.clj
@@ -0,0 +1,19 @@
+(ns example.poll
+  (:use [overtone.live]))
+
+;;With poll you can get scsynth to output debug messages containing the contents of a given stream to stdout.
+;;These messages should appear at the same place you see the scsynth boot info.
+
+
+;;Here we're polling the value of the line ugen at the rate
+;;specified by the impulse ugen - 10 times per second.
+;;We also specify a string to be prepended to the log message:
+(demo (poll:kr (impulse:kr 10) (line:kr 0 1 1) "polled-val:"))
+
+
+;;It's also possible to poll demand ugens with dpoll:
+(demo (duty:kr 0.5 0 0 (dpoll (dseries INF 0 1) -1 "dpolled-val")))
+
+
+;;Poll only when the mouse is on the left hand side of the screen
+(demo 10 (duty:kr 0.5 0 0 (dpoll (dseries INF 0 1) 0 "dpolled-val" (> 0.5 (mouse-x)))))


placeholder: lazy sequence in Clojure

placeholder: lazy sequence in Clojure

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

--- clojure/lazy_seq.clj
+++ clojure/lazy_seq.clj
@@ -0,0 +1,12 @@
+;; Laziness in Clojure
+;; http://clojure-doc.org/articles/language/laziness.html
+
+(defn fib
+  "Lazily generates Fibonacci numbers"
+  ([]
+   (fib 0 1))
+  ([a b]
+   (lazy-seq
+    (cons a (fib b (+ a b))))))
+
+(println (take 20 (fib)))


lein-release plugin: bumped version from 0.1.6 to 0.1.7-SNAPSHOT for next development cycle

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


fixed brace bug

fixed brace bug

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


new project.clj

new project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,19 @@
+(defproject elephantdb/elephantdb-cascading "0.0.4"
+  :source-path "src/clj"
+  :test-path "test/clj"
+  :java-source-path "src/jvm"
+  :java-fork "true"
+  :javac-debug "true"
+  :dependencies [[org.clojure/clojure "1.2.0"]
+                 [org.clojure/clojure-contrib "1.2.0"]
+                 [elephantdb "0.0.4"]
+                 [cascading/cascading-core "1.2-wip-63" :exclusions [org.codehaus.janino/janino]]
+                 ]
+  :repositories {
+                 "conjars" "http://conjars.org/repo"
+                 }
+  :dev-dependencies [
+                     [org.apache.hadoop/hadoop-core "0.20.2-dev"]
+                     [swank-clojure "1.2.1"]
+                    ]
+              )


bump version to 2.9.0 (#132)

bump version to 2.9.0 (#132)

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


Update dependencies

Update dependencies

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


Version 101-SNAPSHOT

Version 101-SNAPSHOT

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


Clojure word count, finally

Clojure word count, finally

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

--- clojure/word_count.clj
+++ clojure/word_count.clj
@@ -0,0 +1,5 @@
+(let [counts (apply merge-with +
+  (map #(frequencies (re-seq #"[a-z']+" (.toLowerCase %)))
+    (line-seq (java.io.BufferedReader. *in*))))]
+  (doseq [[word count] (into (sorted-map) counts)]
+    (println word count)))


Formatting

Formatting

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


maybe use this for better fov code

maybe use this for better fov code

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

--- clojure/src/dnd/util.cljs
+++ clojure/src/dnd/util.cljs
@@ -0,0 +1,11 @@
+(ns dnd.util)
+
+(defn index-of
+  "return the index of the supplied item, or nil"
+  [v item]
+  (let [len (count v)]
+    (loop [i 0]
+      (cond
+        (<= len i)         nil,
+        (= item (get v i)) i,
+        :else              (recur (inc i ))))))


Don't croak on error handling.

Don't croak on error 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/couragelabs/coachbot.git/'


first attack on the fires stuff. With Dan's excellent inspiration, coded up a much better way of doing these big joins on the rain data. What it boils down to is... pixel level manipulations, then chunk reconstitution later if necessary. Turns out the joins are much easier at the pixel level.

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


Link Leiningen to http://leiningen.org instead.

--- src/clojars/web/dashboard.clj
+++ src/clojars/web/dashboard.clj
@@ -18,9 +18,7 @@
        (tag "$") " scp pom.xml mylib.jar clojars@clojars.org:"]]

      "It's the " [:strong "default repository"] " for "
-     (link-to
-      "http://github.com/technomancy/leiningen/blob/master/README.md"
-      "Leiningen")
+     (link-to "http://leiningen.org" "Leiningen")
      ", but you can use it with other build tools like "
      (link-to "http://maven.apache.org/" "Maven") " as well."
      [:div {:class "maven"}


Put the type conversions back in. Ooh, this is feeling nice and comfy now.

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


Remove warning for static-resource routs

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


Probably eval once is enough

Probably eval once is enough

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


bring in the font module

bring in the font module

error: pathspec 'src/cljs/infinitelives/pixi/font.cljs' did not match any file(s) known to git

--- src/cljs/infinitelives/pixi/font.cljs
+++ src/cljs/infinitelives/pixi/font.cljs
@@ -0,0 +1,286 @@
+(ns infinitelives.pixi.font
+  (:require [cljs.core.async :refer [put! chan <! >! alts! timeout close!]]
+            [infinitelives.utils.console :refer [log]]
+            [infinitelives.utils.dom :as dom]
+            [infinitelives.pixi.sprite :as sprite]
+            [infinitelives.pixi.texture :as texture]
+            [PIXI])
+
+)
+
+(def printable-characters
+  " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!?@#$%^&*()-=_+[]{};':\",.<>/`~\\|")
+
+(defn load-font-js-metrics
+  "returns a channel that receives the metrics hashmap
+  once the font is loaded and processed by Font.js.
+  url is either a url to a ttf or otf. Or a system font definition
+  size is in pixels"
+  [url size]
+  (let [f (js/Font.)
+        c (chan)]
+    (set! (.-onload f)
+          #(put! c
+                 (into {}
+                       (for [ch printable-characters]
+                         [
+                          ch
+                          (let [metric (.measureText f ch size)]
+                            {
+                             :width (.-width metric)
+                             :height (.-height metric)
+                             :leading (.-leading metric)
+                             :ascent (.-ascent metric)
+                             :descent (.-descent metric)
+                             :bounds (.-bounds metric)
+                             })]))
+                 ))
+    (set! (.-onerror f) (fn [arg] (log arg) (put! c false)))
+    (set! (.-src f) url)
+    c))
+
+(defn make-text
+  "Make a PIXI.Text object using font and string and default settings"
+  [font str &
+   {:keys [fill align style weight stroke
+           strokeThickness dropShadow dropShadowColor dropShadowDistance
+           x y
+           ]
+    :or {fill "#ffffff" align "left" style "normal" weight 400 stroke "#ffffff"
+         strokeThickness 0 dropShadow false dropShadowColor "#444444"
+         dropShadowDistance 5}
+    }
+   ]
+  (let [spr (PIXI/Text. str
+                           #js {
+                                :font font
+                                :fill fill
+                                :align align
+                                :style style
+                                :weight weight
+                                :stroke stroke
+                                :strokeThickness strokeThickness
+                                :dropShadow dropShadow
+                                :dropShadowColor dropShadowColor
+                                :dropShadowDistance dropShadowDistance
+                                })]
+    (set! (.-anchor.x spr) 0.5)
+    (set! (.-anchor.y spr) 0.5)
+    (when x (set! (.-position.x spr) x))
+    (when y (set! (.-position.y spr) y))
+    spr
+))
+
+;; "400 48px Open Sans"
+(defn font-metrics
+  [font-str]
+  (into
+   {}
+   (for [c printable-characters]
+     (let [t (make-text font-str  c)]
+       [c
+        {
+         :width (.-width t)
+         :height (.-height t)
+         :size [(.-width t) (.-height t)]
+         :texture t
+         }]))))
+
+(defn render-texture-char!
+  "render a char at position [x y] onto a RenderTexture.
+  returns that RenderTexture. Mutates RenderTexture"
+  [rtex metrics char x y]
+  (let [contain (PIXI/DisplayObjectContainer.)
+        c (-> char metrics :texture)]
+    ;(.log js/console c x y)
+    (set! (.-position.x c) x)
+    (set! (.-position.y c) y)
+    (set! (.-anchor c) (sprite/make-point 0 0))
+    (.addChild contain c)
+    (.render rtex contain)
+    rtex))
+
+(defn text-width [metrics text]
+  (reduce + (for [c text] (:width (metrics c)))))
+
+(defn text-height [metrics text]
+  (reduce max (for [c text] (:height (metrics c)))))
+
+(defn x-position
+  "given a string, and the index of the charater to render in
+  the string, return its x position of rendering (by adding up
+  previous characters sizes"
+  [metrics row i]
+  (if (= 0 i)
+    0
+    (text-width metrics (subs row 0 i))))
+
+(defn make-rowset-sizes
+  [metrics chars]
+  (for [charset (partition 10 chars)]
+    [
+     ;; width
+     (reduce +
+             (for [c charset] (:width (metrics c))))
+
+     ;; height
+     (reduce max
+             (for [c charset] (:height (metrics c))))
+     ]
+    ))
+
+(defn calculate-font-layout-size
+  [rows]
+  [(reduce max (for [[w h] rows] w))
+   (reduce + (for [[w h] rows] h))])
+
+
+(defn install-google-webfont-script! []
+  (let [elem (dom/create-element :script)]
+    (dom/insert-before!
+     (-> elem
+         (dom/set-attr! :src (str (if (= "https:" (.-location.protocol js/document)) "https" "http")
+                                    "://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"))
+         (dom/set-attr! :type "text/javascript")
+         (dom/set-attr! :async "true")
+         )
+     (aget (.getElementsByTagName js/document "script") 0))))
+
+(defn install-google-font-stylesheet! [url]
+  (let [elem (dom/create-element :link)]
+    (dom/insert-before!
+     (-> elem
+         (dom/set-attr! :rel "stylesheet")
+         (dom/set-attr! :type "text/css")
+         (dom/set-attr! :href url))
+     (aget (.getElementsByTagName js/document "link") 0))))
+
+(defn install-force-loading-font-div! [fontname]
+  (let [el (dom/create-element :div)]
+    (-> el
+         (dom/set-style! :font-family fontname
+                           :position "absolute"
+                           :left "-50px"
+                           :top "0px"
+                           )
+         (dom/set-text! "."))
+    (dom/append!
+     el
+     js/document.body)))
+
+;(install-force-loading-font-div! "Abel")
+
+(install-google-webfont-script!)
+(install-google-font-stylesheet! "http://fonts.googleapis.com/css?family=Open+Sans:400")
+
+(defn render-row [metrics texture row y]
+  (for [[i c] (partition 2 (interleave (range) row))]
+    (let [tex (render-texture-char!
+               texture metrics
+               c
+               (x-position metrics row i)
+               y)]
+      [c [(x-position metrics row i) y]])))
+
+(defn render-tiled-font-texture [metrics texture line-height]
+  (loop [b texture
+         d {}
+         i 0
+         chars (partition 10 printable-characters)]
+    (if (not (empty? chars))
+      (let [details (render-row
+                     metrics
+                     texture
+                     (apply str
+                            (first chars))
+                     (* i line-height))]
+        (recur
+         b
+         (into d details)
+         (inc i)
+         (rest chars)))
+      d))
+  )
+
+
+(defn make-tiled-font [family weight size]
+  (let [fullname (str weight " " size "px " family)
+        metrics (font-metrics fullname)
+        [w h] (-> metrics
+                  (make-rowset-sizes printable-characters)
+                  calculate-font-layout-size)
+        texture (PIXI/RenderTexture. w h)
+        line-height (text-height metrics printable-characters)
+        ]
+    {
+     :texture texture
+     :fullname fullname
+     :metrics metrics
+     :line-height line-height
+     :positions (render-tiled-font-texture metrics texture line-height)
+     })
+)
+
+(defn font-char-sub-texture [font ch]
+  (texture/sub-texture
+   (:texture font)
+   ((:positions font) ch)
+   (:size ((:metrics font) ch))))
+
+(defn font-make-batch [font text &
+                       {:keys [x y] :or {x 0 y 0} :as options}]
+  (let [buff (:texture font)
+        metrics (:metrics font)
+        sb (PIXI/SpriteBatch. buff)
+
+        ;; handle by center of text
+        _ (set! (.-pivot.x sb) (int (/ (text-width metrics text) 2)))
+        _ (set! (.-pivot.y sb) (int (/ (text-height metrics text) 2)))
+        ]
+    (loop [t text xp x]
+      (let [c (first t)
+            r (rest t)
+            [w h] (:size (metrics c))
+            s (sprite/make-sprite
+               (font-char-sub-texture font c)
+               :x xp
+               :y y
+               :xhandle 0
+               :yhandle 0
+                )]
+        (.addChild sb s)
+        (if (not (empty? r))
+          (recur r (+ xp w))
+          sb)))
+    {
+     :sprite sb
+     :font font
+    }))
+
+(defn font-text-width [font text]
+  (text-width (:metrics font) text))
+
+
+(defn batch-add
+  "starting at position 'pos', add all the letters so that the
+  string text appears. Return the next render position for the next character."
+  [batch [x y] text]
+  (let [font (:font batch)
+        sb (:sprite batch)
+        metrics (:metrics font)]
+    (loop [t text xp 0]
+      (let [c (first t)
+            r (rest t)
+            [w h] (:size (metrics c))
+            s (sprite/make-sprite
+               (font-char-sub-texture font c)
+               :x (+ x xp)
+               :y y
+               :xhandle 0
+               :yhandle 0
+                )]
+        (log c (+ x xp) y)
+        (.addChild sb s)
+        (if (not (empty? r))
+          (recur r (+ xp w))
+          [(+ xp w x) y])))))


CMR-2136 Adds url util namespace.

CMR-2136 Adds url util namespace.

error: pathspec 'umm-spec-lib/src/cmr/umm_spec/url.clj' did not match any file(s) known to git

--- umm-spec-lib/src/cmr/umm_spec/url.clj
+++ umm-spec-lib/src/cmr/umm_spec/url.clj
@@ -0,0 +1,19 @@
+(ns cmr.umm-spec.url
+  "URL utilities for UMM spec"
+  (:import java.net.URL
+           java.net.MalformedURLException))
+
+(defn url
+  [x]
+  (if (isa? x URL)
+    x
+    (try
+      (URL. x)
+      (catch MalformedURLException _
+        nil))))
+
+(defn protocol
+  [x]
+  (or
+   (some-> x url .getProtocol)
+   "http"))


remove extraneous dependencies and functions.

--- src/riemann/transport/websockets.clj
+++ src/riemann/transport/websockets.clj
@@ -4,8 +4,6 @@
   (:require [riemann.query         :as query]
             [riemann.index         :as index]
             [riemann.pubsub        :as p]
-            [aleph.formats         :as formats]
-            [gloss.core            :as gloss]
             [cheshire.core         :as json]
             [interval-metrics.core :as metrics]
             [org.httpkit.server    :as http])
@@ -33,14 +31,6 @@
          (map url-decode
               (mapcat (fn [kv] (split kv #"=" 2))
                       (split string #"&")))))
-
-(defn split-lines
-  "Takes a channel of bytes and returns a channel of utf8 strings, split out by
-  \n."
-  [ch]
-  (formats/decode-channel
-    (gloss/string :utf-8 :delimiters ["\n"])
-    ch))

 (defn ws-pubsub-handler
   "Subscribes to a pubsub channel and streams events back over the WS conn."


Documentation only

Documentation only

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