Added answer box and button.

Added answer box and button.

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


add safeguards to prevent starting moveout without notice/date

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


Take *clojurescript-version* from the backing version of ClojureScript

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


We assume tags already are inferred.

We assume tags already are inferred.


Use explicit ClojureScript namespace

Use explicit ClojureScript namespace

--- src/cljx/cats/types.cljx
+++ src/cljx/cats/types.cljx
@@ -290,7 +290,7 @@
                              ((mf v) c))))))

   #+clj   clojure.lang.IFn
-  #+cljs  IFn
+  #+cljs  cljs.core/IFn
   (invoke [self f]
     (mfn f))


Add maybe spec tests.

Add maybe spec tests.

error: pathspec 'spec/cats/monad/maybe_spec.cljx' did not match any file(s) known to git

--- spec/cats/monad/maybe_spec.cljx
+++ spec/cats/monad/maybe_spec.cljx
@@ -0,0 +1,87 @@
+(ns cats.monad.maybe-spec
+  #+cljs
+  (:require [speclj.core :as s :include-macros true]
+            [cats.builtin :as b]
+            [cats.protocols :as p]
+            [cats.monad.maybe :as maybe]
+            [cats.core :as m :include-macros true])
+  #+clj
+  (:require [speclj.core :as s]
+            [cats.builtin :as b]
+            [cats.protocols :as p]
+            [cats.monad.maybe :as maybe]
+            [cats.core :as m]))
+
+(s/describe "maybe-monad"
+  (s/it "Basic maybe operations."
+    (s/should= 1 (maybe/from-maybe (maybe/just 1)))
+    (s/should= 1 (maybe/from-maybe (maybe/just 1) 42))
+    (s/should= nil (maybe/from-maybe (maybe/nothing)))
+    (s/should= 42 (maybe/from-maybe (maybe/nothing) 42)))
+
+  (s/it "get-value function"
+    (s/should= (p/get-value (maybe/just 1)) 1)
+    (s/should= (p/get-value (maybe/nothing)) nil))
+
+  (s/it "Test predicates"
+    (let [m1 (maybe/just 1)]
+      (s/should (maybe/maybe? m1))
+      (s/should (maybe/just? m1))))
+
+  (s/it "Test fmap"
+    (let [m1 (maybe/just 1)
+          m2 (maybe/nothing)]
+      (s/should= (m/fmap inc m1) (maybe/just 2))
+      (s/should= (m/fmap inc m2) (maybe/nothing))))
+
+  (s/it "The first monad law: left identity"
+    (s/should= (maybe/just 2)
+               (m/>>= (p/mreturn maybe/maybe-monad 2) maybe/just)))
+
+  (s/it "The second monad law: right identity"
+    (s/should= (maybe/just 2)
+               (m/>>= (maybe/just 2) m/return)))
+
+  (s/it "The third monad law: associativity"
+    (s/should= (m/>>= (m/mlet [x  (maybe/just 2)
+                               y  (maybe/just (inc x))]
+                        (m/return y))
+                      (fn [y] (maybe/just (inc y))))
+               (m/>>= (maybe/just 2)
+                      (fn [x] (m/>>= (maybe/just (inc x))
+                                     (fn [y] (maybe/just (inc y)))))))))
+
+(def maybe-vector-transformer (maybe/maybe-transformer b/vector-monad))
+
+(s/describe "maybe-transformer"
+  (s/it "It can be combined with the effects of other monads"
+    (s/should= [(maybe/just 2)]
+               (m/with-monad maybe-vector-transformer
+                 (m/return 2)))
+
+    (s/should= [(maybe/just 1)
+                (maybe/just 2)
+                (maybe/just 2)
+                (maybe/just 3)]
+               (m/with-monad maybe-vector-transformer
+                 (m/mlet [x [(maybe/just 0) (maybe/just 1)]
+                          y [(maybe/just 1) (maybe/just 2)]]
+                   (m/return (+ x y)))))
+
+    (s/should= [(maybe/just 1)
+                (maybe/just 2)
+                (maybe/just 2)
+                (maybe/just 3)]
+               (m/with-monad maybe-vector-transformer
+                 (m/mlet [x (m/lift [0 1])
+                          y (m/lift [1 2])]
+                   (m/return (+ x y)))))
+
+    (s/should= [(maybe/just 1)
+                (maybe/nothing)
+                (maybe/just 2)
+                (maybe/nothing)]
+               (m/with-monad maybe-vector-transformer
+                 (m/mlet [x [(maybe/just 0) (maybe/just 1)]
+                          y [(maybe/just 1) (maybe/nothing)]]
+                   (m/return (+ x y)))))))


0.5.1: pretty-print results of 'alda parse' task

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


Generate a `warning` log instead of `info`

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


New file selfdual2d.clj

New file selfdual2d.clj

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

--- clojure/org/gavrog/clojure/selfdual2d.clj
+++ clojure/org/gavrog/clojure/selfdual2d.clj
@@ -0,0 +1,19 @@
+(ns org.gavrog.clojure.selfdual2d
+  (:use (org.gavrog.clojure [util :only [unique]]
+                            [delaney :only [s v size dim curvature]]))
+  (:import (org.gavrog.jane.fpgroups SmallActionsIterator)
+           (org.gavrog.jane.numbers Whole)
+           (org.gavrog.joss.dsyms.basic DSymbol)
+           (org.gavrog.joss.dsyms.derived FundamentalGroup DSCover)
+           (org.gavrog.joss.dsyms.generators DefineBranching2d))
+  (:gen-class))
+
+(defn self-dual? [ds] (= ds (.dual ds)))
+
+(defn proto-euclidean? [ds] (>= (curvature ds 1) 0))
+
+(defn d-sets [max-size]
+  (let [G (FundamentalGroup. (DSymbol. "1:1,1,1:0,0"))]
+    (filter #(and (self-dual? %) (proto-euclidean? %))
+            (map #(.flat (DSCover. G %))
+                 (SmallActionsIterator. (.getPresentation G) max-size false)))))


memoization

memoization

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

--- src/sandbox/memoization/fib.clj
+++ src/sandbox/memoization/fib.clj
@@ -0,0 +1,9 @@
+(ns sandbox.memorization.fib)
+
+(def mem-fib
+  (memoize
+   (fn [n]
+     (cond
+       (<= n 0) 0
+       (< n 2) 1
+       :else (+ (mem-fib (- n 1)) (mem-fib (- n 2)))))))


Phone number in clojure

Phone number in clojure

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

--- clojure/phone-number/phone.clj
+++ clojure/phone-number/phone.clj
@@ -0,0 +1,34 @@
+(ns phone (:require [clojure.string :as str]))
+
+(def phone-number-length 10)
+
+(defn- clean-number [input]
+  (let [digits (str/replace input #"[^\d]" "")]
+    (if
+      (and
+        (= (count digits) (+ 1 phone-number-length))
+        (= \1 (first digits)))
+      (subs digits 1)
+      digits)))
+
+(defn- is-valid [digits]
+  (= 10 (count digits)))
+
+(defn number [input]
+  (let [digits (clean-number input)]
+    (let [length (count digits)
+          invalid "0000000000"]
+      (if (is-valid digits)
+        digits
+        invalid))))
+
+(defn area-code [input]
+  (let [digits (clean-number input)]
+    (subs digits 0 3)))
+
+(defn pretty-print [input]
+  (let [digits (clean-number input)]
+    (let [area (area-code digits)
+          prefix (subs digits 3 6)
+          line (subs digits 6)]
+      (format "(%s) %s-%s" area prefix line))))


Fix logstash host

Fix logstash host

Need to make sure that we send the host as "source" as well as "host", as
they recently changed the name.

Also, remove references to "graphite" in the logstash (copy-paste fail)

--- src/riemann/logstash.clj
+++ src/riemann/logstash.clj
@@ -61,24 +61,20 @@

 (defn logstash
-  "Returns a function which accepts an event and sends it to Graphite.
-  Silently drops events when graphite is down. Attempts to reconnect
+  "Returns a function which accepts an event and sends it to logstash.
+  Silently drops events when logstash is down. Attempts to reconnect
   automatically every five seconds. Use:

   (logstash {:host \"logstash.local\" :port 2003})

   Options:

-  :path       A function which, given an event, returns the string describing
-              the path of that event in graphite. graphite-path-percentiles by
-              default.
-
   :pool-size  The number of connections to keep open. Default 4.

   :reconnect-interval   How many seconds to wait between attempts to connect.
                         Default 5.

-  :claim-timeout        How many seconds to wait for a graphite connection from
+  :claim-timeout        How many seconds to wait for a logstash connection from
                         the pool. Default 0.1.

   :block-start          Wait for the pool's initial connections to open
@@ -107,11 +103,10 @@
                  (close client))
                {:size                 (:pool-size opts)
                 :block-start          (:block-start opts)
-                :regenerate-interval  (:reconnect-interval opts)})
-        path (:path opts)]
+                :regenerate-interval  (:reconnect-interval opts)})]

     (fn [event]
       (when (:metric event)
         (with-pool [client pool (:claim-timeout opts)]
-                   (let [string (event-to-json event)]
+                   (let [string (event-to-json (merge event {:source (:host event)}))]
                      (send-line client string)))))))


Fix tests

Fix 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/physion/ovation-webapi.git/'


defonce berriz kargatzean ez gainidazteko

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


main.cljs now loads other pages, but breaks history.

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

--- src/ajaxify/main.cljs
+++ src/ajaxify/main.cljs
@@ -0,0 +1,33 @@
+(ns ajaxify.main)
+
+(def main-text-id "#mainText")
+
+(defn ^:export navigational-anchors []
+  (js/jQuery "nav a"))
+
+(defn html [jquery-object]
+  (. jquery-object (html)))
+
+(defn main-text-from-load-container [container]
+  (-> container
+    (.find main-text-id)
+    (html)))
+
+(defn ^:export on-anchor-click [anchor]
+  (let [anchors-href (.attr anchor "href")
+        to-load (str anchors-href " " main-text-id)
+        load-container (js/jQuery "")
+        main-text-element (js/jQuery main-text-id)]
+    (.fadeOut main-text-element "fast" (fn []
+      (.load load-container to-load (fn []
+        (let [new-main-text (main-text-from-load-container load-container)]
+          (console/log (str "new-main-text " new-main-text))
+          (.html main-text-element new-main-text)
+          (.fadeIn main-text-element "fast"))))))))
+
+(defn ^:export main
+  "Entry point for the Clojurescript, to be called on load"
+  [& args]
+  (console/log "this is " this)
+  (.append (js/jQuery "body") "
hello
")
+  "Hi there")


requires

requires

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


use `team_group` for rails

use `team_group` for rails


solved

solved

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

--- src/4clojure/cartesian.clj
+++ src/4clojure/cartesian.clj
@@ -0,0 +1,53 @@
+;; Cartesian Product
+;; http://www.4clojure.com/problem/90
+
+;; Difficulty:	Easy
+;; Topics:	set-theory
+
+
+;; Write a function which calculates the Cartesian product of two sets.
+
+
+;; http://stackoverflow.com/questions/18246549/cartesian-product-in-clojure
+
+(defn __ [xs ys]
+   (set
+     (mapcat (fn [x]
+               (map (fn [y] (list x y)) ys))
+             xs)))
+
+
+(= (__ #{"ace" "king" "queen"} #{"♠" "♥" "♦" "♣"})
+   #{["ace"   "♠"] ["ace"   "♥"] ["ace"   "♦"] ["ace"   "♣"]
+     ["king"  "♠"] ["king"  "♥"] ["king"  "♦"] ["king"  "♣"]
+     ["queen" "♠"] ["queen" "♥"] ["queen" "♦"] ["queen" "♣"]})
+
+(= (__ #{1 2 3} #{4 5})
+   #{[1 4] [2 4] [3 4] [1 5] [2 5] [3 5]})
+
+(= 300 (count (__ (into #{} (range 10))
+                  (into #{} (range 30)))))
+
+
+;; 4clojure copy paste
+(fn [xs ys]
+  (set (mapcat (fn [x] (map (fn [y] (list x y)) ys)) xs)))
+
+
+;; _artem_uv's solution:
+#(into #{} (for [x %1 y %2] [x y]))
+
+;; _pcl's solution:
+(fn [xs ys]
+  (set
+    (mapcat
+      (fn [i] (map #(list i %) ys))
+      xs)))
+
+;; aceeca1's solution:
+(fn [x1 x2] (set (for [i1 x1 i2 x2] [i1 i2])))
+
+;; adereth's solution:
+(fn [s1 s2]
+  (set (for [v1 s1
+             v2 s2] [v1 v2])))


new lang

new lang

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

--- src/ysmiraak/lang.clj
+++ src/ysmiraak/lang.clj
@@ -0,0 +1,198 @@
+(ns ysmiraak.lang)
+
+;; goals
+;; 1. unify exprs and types (basic constructors shared by types and data)
+;; 2. unify composition and application (????)
+;; 3. compositional lambda calculus (variables and their evaluation rules)
+;; 4. asap beta reduction (partial evaluation)
+
+(defrecord V [name])            (defn v? [x] (instance? V x))
+(defrecord A [vars form])       (defn a? [x] (instance? A x))
+(defrecord F [vars expr args])  (defn f? [x] (instance? F x))
+;; vars : Set V
+;; args : Vec V
+;; form : Vec Expr
+
+(defprotocol Expr
+  "an expression satisfies the following protocol.
+
+  - fv returns the set of free variables
+  - ev evaluates the expression given dict, a map of variable bindings
+
+  expression types and evaluation types.
+
+  - V  variable     => Expr
+  - A  application  => Expr
+  - F  function     => F
+  - _  value        => _
+
+  "
+  (fv [this])
+  (ev [this dict]))
+
+(extend-protocol Expr
+  F
+  (fv [this] (:vars this))
+  (ev [{:keys [vars expr args]} dict]
+    (let [dict (reduce dissoc dict args)
+          expr (cond-> expr (some vars (keys dict)) (ev dict))]
+      (if (f? expr) ; uncurries
+        (F. (reduce disj (fv expr) args) (:expr expr) (into args (:args expr)))
+        (F. (reduce disj (fv expr) args)        expr        args))))
+  A
+  (fv [this] (:vars this))
+  (ev [{:keys [vars form]} dict]
+    (let [[head & body :as form] (cond->> form (some vars (keys dict)) (mapv #(ev % dict)))]
+      (if (f? head)
+        (let [{:keys [vars expr args]} head
+              dict (zipmap args body)
+              size (count body)]
+          (case (compare (count args) size) ; beta-reduce or curry
+            0     (ev expr dict)
+            1 (F. (reduce disj vars (keys dict))
+                  (ev expr dict)
+                  (subvec args size))
+            (throw (ex-info "arity error" {:args args :vals body}))))
+        (let [vars (reduce disj vars (keys dict))]
+          (if (seq vars) ; defer application
+            (A. vars form)
+            (apply head body))))))
+  V
+  (fv [this] #{this})
+  (ev [this dict] (dict this this))
+  Object (fv [this] #{}) (ev [this dict] this)
+  nil    (fv [this] #{}) (ev [this dict] this))
+
+(defn ?%
+  "takes a expr and interleaving vars and values, (partially) evaluates
+  the expr according to the binding.
+
+  similar to let, this can be seen as performing a lambda-abstraction
+  immediately followed by a beta reduction (a left-left lambda).
+
+  ```
+  (?% phi a x b y)     (let [a x b y] phi)
+  (? (% phi a b) x y)  ((fn [a b] phi) x y)
+  ```
+
+  "
+  [expr & {:as dict}]
+  (ev expr dict))
+
+(defn ?
+  "funcall, the counit of product-exponential adjunction"
+  ([& form]
+   (-> (apply clojure.set/union (map fv form))
+       (A. (vec form))
+       (ev {})))
+  ([]))
+
+(defn %
+  "forall"
+  ([expr & args] ; currently args can only be vars
+   (-> (reduce disj (fv expr) args)
+       (F. expr (vec args))
+       (ev {})))
+  ([expr] expr))
+
+(defn !
+  "produces a fresh or named var"
+  ([name] (V. name))
+  ;; todo use number instead of gensym
+  ([] (! (. clojure.lang.RT (nextID)))))
+
+(comment
+
+  (def a (! 0))
+  (def b (! 1))
+  (def c (! 2))
+
+  (def phi (? + a b))
+  (def chi (% phi b))
+  (def psi (% chi a))
+
+  ;; uncurrying
+  (= (-> phi (% b) (% a))
+     (-> phi (% a b)))
+
+  ;; currying
+  (= (? (? psi 2) 2)
+     (? psi 2 2)
+     4)
+
+  ;; partial eval
+  (=    (? + a 2)          (? chi 2))
+  (= (% (? + a 2) a)    (% (? chi 2) a))
+  (=    (? + 2 2)    (? (% (? chi 2) a) 2))
+  (= 4 (? (% (? apply ? chi [2]) a) 2))
+
+  ;; swap var
+  (= (?% (? + a b) a b)
+     (? + b b))
+
+  ;; swap var for expr
+  (= (?% (? + a b) a (? * b b))
+     (? + (? * b b) b))
+
+  ;; preserve laziness (which eval doesn't)
+  (? map (partial ? psi) (range) (range))
+
+  ;; non-terminating expr
+  (? (% (? ? a a) a)
+     (% (? ? a a) a))
+
+  ;; todo test recursion
+
+  )
+
+(comment ; todo goal 1
+
+  ;; let
+  ;; - A B C be types
+  ;; - a b c be variables
+  ;; - x y z be values
+
+  ;; types all the way down
+  ($ Type A x nil)
+
+  ;; A -> B
+  ($ Type
+     (%'   A       B)
+     (% ($ A a) ($ B (... a ...)))
+     nil)
+
+  ;; forall (a : A) . C(a)
+  ($ Type
+     (%'   A       Type)
+     (% ($ A a)    (C a))
+     (% ($ A a) ($ (C a) (... a ...)))
+     nil)
+
+  ;; forall (a : A , b : B) . C(a)
+  ($ Type
+     (%'   A       Type    Type)
+     (% ($ A a)    B       (C a))
+     (% ($ A a) ($ B b) ($ (C a) (... a ... b ...)))
+     nil)
+
+  ;; exists (a : A , b : B) . C(a)
+  ($ Type
+     (&'   A       Type    Type)
+     (& ($ A a)    B       (C a))
+     (& ($ A x) ($ B y) ($ (C x) (... x ... y ...)))
+     nil)
+
+  ;; exists (a : A) . C(a)
+  ($ Type
+     (&'   A       Type)
+     (& ($ A a)    (C a))
+     (& ($ A x) ($ (C x) (... x ...)))
+     nil)
+
+  ;; (A, B)
+  ($ Type
+     (&    A       B)
+     (& ($ A x) ($ B y))
+     nil)
+
+  )


added module to detect leaf pages

added module to detect leaf pages

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

--- src/crawler/leaf_pages.clj
+++ src/crawler/leaf_pages.clj
@@ -0,0 +1,340 @@
+(ns crawler.leaf-pages
+  "Code to download and data mine discussion forum leaf pages"
+  (:require [clojure.java.io :as io]
+            [crawler.dom :as dom]
+            [crawler.utils :as utils]
+            [structural-similarity.xpath-text :as xpath-text])
+  (:use [clojure.pprint :only [pprint]]
+        [clj-xpath.core :only [$x $x:node $x:node+ $x:text+ $x:node*]]
+        [clj-ml.utils]
+        [clj-ml.classifiers]
+        [clj-ml.data]
+        [clj-ml.io]))
+
+(def *train-corpus* [["http://www.phpbb.com/community/viewtopic.php?f=65&t=1494875" true]
+                     ["http://www.phpbb.com/community/viewtopic.php?f=65&t=2231006" true]
+                     ["http://www.vbulletin.org/forum/showthread.php?t=309486" true]
+                     ["http://www.vbulletin.org/forum/showthread.php?t=308426" true]
+                     ["http://forums.finalgear.com/the-forums/important-reminder-about-forum-rules-57529/" true]
+                     ["http://forums.finalgear.com/the-forums/top-gear-lost-episodes-53537/" true]
+                     ["http://community.invisionpower.com/" false]
+                     ["http://community.invisionpower.com/forum/305-pre-sales-questions/" false]
+                     ["http://www.vbulletin.org/forum/index.php" false]
+                     ["http://www.vbulletin.org/forum/forumdisplay.php?f=2" false]
+                     ["http://forums.finalgear.com/" false]
+                     ["http://forums.finalgear.com/the-site-itself/" false]
+                     ["http://r.789695.n4.nabble.com/" false]
+                     ["http://r.789695.n4.nabble.com/Trouble-with-difining-random-effects-in-glmm-and-lme-td4687033.html" true]
+                     ["http://r.789695.n4.nabble.com/Thresold-td4687032.html" true]
+                     ["http://r.789695.n4.nabble.com/Correlograms-using-boxes-and-different-variables-on-rows-and-columns-td4631309.html" true]
+                     ["http://r.789695.n4.nabble.com/is-it-possible-to-get-the-coordinate-of-mtext-td4687001.html" true]
+                     ["http://r.789695.n4.nabble.com/Defining-and-Cutoff-Point-in-R-td4687027.html" true]
+                     ["http://r.789695.n4.nabble.com/Beginner-How-do-I-copy-the-results-from-a-for-loop-in-a-csv-file-td4687018.html" true]
+                     ["http://r.789695.n4.nabble.com/Howdens-Kitchens-Reviews-td4687022.html" true]
+                     ["http://r.789695.n4.nabble.com/filter-seq-wise-td4686796.html" true]
+                     ["http://r.789695.n4.nabble.com/survfit-question-Q1-and-Q3-survival-time-td4686863.html" true]
+                     ["http://r.789695.n4.nabble.com/Beginner-How-do-I-copy-the-results-from-a-for-loop-in-a-csv-file-td4687013.html" true]
+                     ["http://r.789695.n4.nabble.com/locpoly-is-returning-NaN-if-bandwidth-is-small-td4687015.html" true]
+                     ["http://r.789695.n4.nabble.com/Reshaping-Data-in-R-Transforming-Two-Columns-Into-One-td4687019.html" true]
+                     ["http://r.789695.n4.nabble.com/Error-Message-Help-td4687017.html" true]
+                     ["http://r.789695.n4.nabble.com/strangely-long-floating-point-with-write-table-td4686858.html" true]
+                     ["http://grails.1312388.n4.nabble.com/" false]
+                     ["http://grails.1312388.n4.nabble.com/Grails-Dynamic-Html-Forms-td4655185.html" true]
+                     ["http://grails.1312388.n4.nabble.com/Database-agnostic-database-migration-syntax-td4640467.html" true]
+                     ["http://grails.1312388.n4.nabble.com/Startup-with-2-3-7-and-cache-ehcache-1-0-1-td4654775.html" true]
+                     ["http://grails.1312388.n4.nabble.com/Howdens-Kitchens-Reviews-td4655182.html" true]
+                     ["http://grails.1312388.n4.nabble.com/Access-denied-for-user-localhost-using-grails-2-3-5-and-mysql-workbench-td4655181.html" true]
+                     ["http://grails.1312388.n4.nabble.com/Static-content-blocked-by-Spring-Security-td4655174.html" true]
+                     ["http://grails.1312388.n4.nabble.com/database-migration-SOS-td4544152.html" true]
+                     ["http://grails.1312388.n4.nabble.com/How-to-Externalize-i18N-folder-td4655172.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/" false]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/Forum-Guidelines-td7586431.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/Howdens-Kitchens-Reviews-td7596891.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/Two-recent-Relic-hunts-finds-td7596878.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/Good-Day-in-Tot-Lot-Land-td7596883.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/Today-on-the-River-17th-march-td7596855.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/COMPASS-XP-PRO-REPAIR-WHO-td7596870.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/Yesterdays-takes-lotsa-wheats-and-a-couple-silver-td7596797.html" true]
+                     ["http://compass-metal-detector-forum.548136.n2.nabble.com/New-old-Compass-toy-td7596785.html" true]
+                     ["http://photography-on-the.net/forum/" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=15" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=17" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=9" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=33" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=35" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=34" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=108" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=110" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=122" false]
+                     ["http://photography-on-the.net/forum/forumdisplay.php?f=23" false]
+                     ["http://hardforum.com/showthread.php?t=1811251" true]
+                     ["http://hardforum.com/showthread.php?t=1811422" true]
+                     ["http://hardforum.com/showthread.php?t=1811417" true]
+                     ["http://www.dgrin.com/showthread.php?t=244757" true]
+                     ["http://www.dgrin.com/showthread.php?t=245710" true]
+                     ["http://www.dgrin.com/showthread.php?t=245450" true]
+                     ["http://www.wilderssecurity.com/showthread.php?t=361318" true]
+                     ["http://www.wilderssecurity.com/showthread.php?t=361082" true]
+                     ["http://www.wilderssecurity.com/showthread.php?t=360570" true]])
+
+(def *test-corpus* [["http://hardforum.com/showthread.php?t=1811251" true]
+                    ["http://hardforum.com/showthread.php?t=1811422" true]
+                    ["http://hardforum.com/showthread.php?t=1811417" true]
+                    ["http://hardforum.com/showthread.php?t=1811263" true]
+                    ["http://hardforum.com/showthread.php?t=1811337" true]
+                    ["http://hardforum.com/showthread.php?t=1811272" true]
+                    ["http://hardforum.com/showthread.php?t=1811321" true]
+                    ["http://hardforum.com/forumdisplay.php?f=116" false]
+                    ["http://www.wilderssecurity.com/" false]
+                    ["http://www.wilderssecurity.com/forumdisplay.php?f=7" false]
+                    ["http://www.wilderssecurity.com/forumdisplay.php?f=87" false]
+                    ["http://www.wilderssecurity.com/forumdisplay.php?f=108" false]
+                    ["http://www.wilderssecurity.com/forumdisplay.php?f=114" false]
+                    ["http://www.wilderssecurity.com/showthread.php?t=334644" true]
+                    ["http://www.wilderssecurity.com/showthread.php?t=251015" true]
+                    ["http://www.wilderssecurity.com/showthread.php?t=358819" true]
+                    ["http://www.wilderssecurity.com/showthread.php?t=361433" true]
+                    ["http://www.wilderssecurity.com/showthread.php?t=361318" true]
+                    ["http://www.wilderssecurity.com/showthread.php?t=361082" true]
+                    ["http://www.wilderssecurity.com/showthread.php?t=360570" true]
+                    ["http://www.dgrin.com/" false]
+                    ["http://www.dgrin.com/forumdisplay.php?f=3" false]
+                    ["http://www.dgrin.com/forumdisplay.php?f=4" false]
+                    ["http://www.dgrin.com/forumdisplay.php?f=7" false]
+                    ["http://www.dgrin.com/forumdisplay.php?f=23" false]
+                    ["http://www.dgrin.com/showthread.php?t=128992" true]
+                    ["http://www.dgrin.com/showthread.php?t=244168" true]
+                    ["http://www.dgrin.com/showthread.php?t=244757" true]
+                    ["http://www.dgrin.com/showthread.php?t=244757" true]
+                    ["http://www.dgrin.com/showthread.php?t=245710" true]
+                    ["http://www.dgrin.com/showthread.php?t=245450" true]
+                    ["http://forum.doom9.org/showthread.php?t=170120" true]
+                    ["http://forum.doom9.org/showthread.php?t=22912" true]
+                    ["http://forum.doom9.org/showthread.php?t=170360" true]
+                    ["http://forum.doom9.org/" false]
+                    ["http://www.thehighroad.org/" false]
+                    ["http://www.thehighroad.org/forumdisplay.php?f=2" false]
+                    ["http://www.thehighroad.org/showthread.php?t=745648" true]
+                    ["http://www.thehighroad.org/showthread.php?t=472825" true]
+                    ["http://www.thehighroad.org/showthread.php?t=747181" true]
+                    ["http://www.thehighroad.org/showthread.php?t=746802" true]
+                    ["http://www.thehighroad.org/showthread.php?t=747140" true]
+                    ["http://www.thehighroad.org/showthread.php?t=747101" true]
+                    ["http://www.thehighroad.org/showthread.php?t=742288" true]
+                    ["http://advrider.com/forums/" false]
+                    ["http://advrider.com/forums/forumdisplay.php?f=2" false]
+                    ["http://advrider.com/forums/forumdisplay.php?f=78" false]
+                    ["http://advrider.com/forums/forumdisplay.php?f=4" false]
+                    ["http://advrider.com/forums/showthread.php?t=935276" true]
+                    ["http://advrider.com/forums/showthread.php?t=961360" true]
+                    ["http://advrider.com/forums/showthread.php?t=957797" true]
+                    ["http://advrider.com/forums/showthread.php?t=961777" true]
+                    ["http://advrider.com/forums/showthread.php?t=956224" true]
+                    ["http://groovy.329449.n5.nabble.com/" false]
+                    ["http://groovy.329449.n5.nabble.com/How-to-detect-acess-to-private-fields-and-methods-td5718863.html" true]
+                    ["http://groovy.329449.n5.nabble.com/Multiple-assignment-underflow-fails-for-arrays-td5718800.html" true]
+                    ["http://groovy.329449.n5.nabble.com/implementing-the-each-method-in-a-java-class-to-accept-groovy-closure-td5718831.html" true]
+                    ["http://groovy.329449.n5.nabble.com/why-is-a-global-AST-transform-applied-in-one-case-but-not-another-td5718794.html" true]])
+
+(def text-formatting-tags [#"/b/" #"/em/" #"/i/" #"/small/" #"/strong/" #"/sub/" #"/sup/" #"/ins/" #"/del/" #"/mark/" #"/p/"])
+
+(defn generate-features
+  [body]
+  (let [xml-doc (dom/html->xml-doc body)
+
+        text-nodes ($x:text+ ".//text()" xml-doc)
+
+        punct (apply
+               +
+               (map
+                (fn [t]
+                  (double
+                   (/ (count (re-seq #"(?![<,>,{,},\[,\]])\p{Punct}" t))
+                      (count t))))
+                text-nodes))
+
+        text-xpaths (xpath-text/page-text-xpaths body)
+        anchor-text-xpaths (filter
+                            (fn [[x cs]]
+                              (re-find #"/a/" x))
+                            text-xpaths)
+
+        text-xs-cs (reduce
+                    (fn [acc [x cs]]
+                      (merge-with concat acc {x [(clojure.string/trim cs)]}))
+                    {}
+                    text-xpaths)
+        anchor-xs-cs (reduce
+                      (fn [acc [x cs]]
+                        (merge-with concat acc {x [(clojure.string/trim cs)]}))
+                      {}
+                      anchor-text-xpaths)
+
+        cs-per-xp-t (map (fn [[x strings]]
+                           (let [n-strings (map count strings)]
+                             (double
+                              (/ (apply + n-strings)
+                                 (count n-strings))))) text-xs-cs)
+
+        cs-per-xp-a      (map (fn [[x strings]]
+                                (let [n-strings (map count strings)]
+                                  (double
+                                   (/ (apply + n-strings)
+                                      (count n-strings))))) anchor-xs-cs)
+
+        text-xs (set (map first text-xpaths))
+        anchor-xs (set (map first anchor-text-xpaths))
+
+        max-text-xp (last
+                     (sort-by #(/ (apply + (map count (second %)))
+                                  (count (second %)))
+                              text-xs-cs))
+
+        num-forms-t (count
+                     (filter
+                      identity
+                      (map
+                       (fn [x]
+                         (some (fn [t] (re-find t x)) text-formatting-tags))
+                       text-xs)))
+
+        num-forms-a (count
+                     (filter
+                      identity
+                      (map
+                       (fn [x]
+                         (some (fn [t] (re-find t x)) text-formatting-tags))
+                       anchor-xs)))
+
+        num-paras  (count ($x:node* ".//p" xml-doc))
+        num-breaks (count ($x:node* ".//br" xml-doc))]
+
+    [(double
+      (/ (apply + cs-per-xp-t)
+         (count cs-per-xp-t)))
+     (double
+      (/ (apply + cs-per-xp-a)
+         (count cs-per-xp-a)))
+     (- (count text-xs)
+        (count anchor-xs))
+     (count anchor-xs)
+     (double
+      (/ (apply + (map count (second max-text-xp)))
+         (count (second max-text-xp))))
+     (- num-forms-t num-forms-a)
+     num-forms-a
+     num-paras
+     num-breaks
+     punct]))
+
+(defn generate-features-map
+  [body]
+  (let [[A B C D E F G H I J] (generate-features body)]
+    {:A A
+     :B B
+     :C C
+     :D D
+     :E E
+     :F F
+     :G G
+     :H H
+     :I I
+     :J J
+     :label 1}))
+
+(defn download-corpus
+  []
+  (let [wrtr (io/writer "leaf-train.clj")]
+    (pprint
+     (reduce
+      (fn [acc [l label]]
+        (do
+          (let [bd (first
+                    (filter identity (repeatedly 5 #(do
+                                                      (Thread/sleep 1000)
+                                                      (utils/download-with-cookie l)))))]
+            (println l)
+            (cons
+            [bd label]
+            acc))))
+      {}
+      *train-corpus*)
+     wrtr)))
+
+(defn download-test-corpus
+  []
+  (let [wrtr (io/writer "leaf-test.clj")]
+    (pprint
+     (reduce
+      (fn [acc [l label]]
+        (do
+          (Thread/sleep 1000)
+          (cons
+           [l (utils/download-with-cookie l) label]
+           acc)))
+      []
+      *test-corpus*)
+     wrtr)))
+
+(defn read-leaf-train-corpus
+  []
+  (let [rdr (io/reader "leaf-train.clj")]
+    (read
+     (java.io.PushbackReader. rdr))))
+
+(defn read-leaf-test-corpus
+  []
+  (let [rdr (io/reader "leaf-test.clj")]
+    (read
+     (java.io.PushbackReader. rdr))))
+
+(defn test-corpus
+  []
+  (let [corpus (read-leaf-test-corpus)
+        classifier (deserialize-from-file "trained.bin")
+        dataset (load-instances :arff "file:///usr0/home/spalakod/Documents/crawler/train.arff")]
+    (do
+      (dataset-set-class dataset 10)
+      (let [res (map
+                 (fn [[link b l]]
+                   (let [fs (generate-features-map b)
+                         instance (make-instance dataset fs)]
+                     [link l (do (classifier-classify classifier instance)
+                                 (pos?
+                                  (Integer/parseInt
+                                   (last
+                                    (clojure.string/split
+                                     (.toString (classifier-label classifier instance))
+                                     #",")))))]))
+                 corpus)]
+        {:accuracy (/ (count (filter #(= (second %) (nth % 2)) res))
+                      (count res))
+         :results res}))))
+
+(defn generate-arff-file
+  []
+  (let [corpus (read-leaf-train-corpus)
+        wrtr (io/writer "train.arff")]
+    (binding [*out* wrtr]
+      (println "@relation ABCDEFGHIJ")
+      (println)
+      (println "@attribute A numeric")
+      (println "@attribute B numeric")
+      (println "@attribute C numeric")
+      (println "@attribute D numeric")
+      (println "@attribute E numeric")
+      (println "@attribute F numeric")
+      (println "@attribute G numeric")
+      (println "@attribute H numeric")
+      (println "@attribute I numeric")
+      (println "@attribute J numeric")
+      (println "@attribute label {1,-1}")
+      (println)
+      (println "@data")
+      (doseq [[b l] corpus]
+        (let [fs (try (generate-features b)
+                      (catch Exception e nil))]
+          (when fs
+            (print (clojure.string/join ", " (map str fs)))
+            (print ", ")
+            (println (if l "1" "-1"))))))))


Jedi Masters have arrived

Jedi Masters have arrived

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

--- test/chazel/jedis.clj
+++ test/chazel/jedis.clj
@@ -0,0 +1,16 @@
+(ns chazel.jedis
+  (:require [chazel :refer [hz-map add-index put-all! select]])
+  (:import [java.io Serializable]))
+
+(defprotocol JediProtocol
+  (getName [this])
+  (getEditor [this]))
+
+(deftype Jedi [name editor]
+  Serializable
+  JediProtocol
+    (getName [_] name)
+    (getEditor [_] editor)
+  Object
+    (toString [_]
+      (str "{:name " name " :editor " editor "}")))


added cider repl example

added cider repl example

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

--- examples/startcidernrepl.clj
+++ examples/startcidernrepl.clj
@@ -0,0 +1,2 @@
+":"; if [ ! -e "$HOME/.rundj" ]; then curl 'https://raw.githubusercontent.com/bmillare/dj3/master/bin/run' > $HOME/.rundj ; fi; exec sh ~/.rundj $0 $@
+(load "dj/init/cidernrepl")


add promote scope to Overtone proper

add promote scope to Overtone proper

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

--- src/overtone/viz/scope.clj
+++ src/overtone/viz/scope.clj
@@ -0,0 +1,263 @@
+(ns
+    ^{:doc "An oscilloscope style waveform viewer"
+      :author "Jeff Rose & Sam Aaron"}
+  overtone.viz.scope
+  (:import
+   (java.awt Graphics Dimension Color BasicStroke)
+   (java.awt.geom Rectangle2D$Float Path2D$Float)
+   (javax.swing JFrame JPanel))
+  (:use
+   [overtone event util time-utils]
+   [overtone.sc core synth ugen buffer node]
+   clojure.stacktrace)
+  (:require [overtone.log :as log]
+            [clojure.set :as set]))
+
+(def SCOPE-BUF-SIZE 4096)
+(def FPS 10)
+(def scopes* (atom {}))
+(def scope-pool* (atom nil))
+(def WIDTH 600)
+(def HEIGHT 400)
+(def X-PADDING 5)
+(def Y-PADDING 10)
+
+;; Some utility synths for signal routing and scoping
+(defsynth bus->buf [bus 20 buf 0]
+  (record-buf (in bus) buf))
+
+(defsynth bus->bus [in-bus 20 out-bus 0]
+  (out out-bus (in in-bus)))
+
+(defn- update-scope [s]
+  (let [{:keys [buf size width height panel y-array x-array panel]} s
+        frames (buffer-data buf)
+        step (int (/ (:size buf) width))
+        y-scale (/ (- height (* 2 Y-PADDING)) -2)
+        y-shift (+ (/ height 2) Y-PADDING)]
+    (dotimes [x width]
+      (aset ^ints y-array x
+            (int (+ y-shift
+                    (* y-scale
+                       (aget ^floats frames (unchecked-multiply x step)))))))
+    (.repaint panel)))
+
+(defn- update-scopes []
+  (doall (map update-scope (vals @scopes*))))
+
+(defn- paint-scope [g id]
+  (if-let [scope (get @scopes* id)]
+    (let [{:keys [background width height color x-array y-array]} scope]
+      (.setColor ^Graphics g ^Color background)
+      (.fillRect ^Graphics g 0 0 width height)
+      (.setColor ^Graphics g ^Color (Color. 100 100 100))
+      (.drawRect ^Graphics g 0 0 width height)
+      (.setColor ^Graphics g ^Color color)
+      (.drawPolyline ^Graphics g ^ints x-array ^ints y-array width))))
+
+(defn- wait-for-buffer [b]
+  (loop [i 0]
+    (cond
+     (= 20 i) nil
+     (not (buffer-ready? b)) (do
+                               (java.lang.Thread/sleep 50)
+                               (recur (inc i))))))
+
+(def SCOPE-BUF-SIZE 4096)
+
+(defn scope-panel [id width height]
+  (let [panel (proxy [JPanel] [true]
+                (paint [g] (paint-scope g id)))
+        _ (.setPreferredSize panel (Dimension. width height))]
+    panel))
+
+(defn- scope-frame
+  "Display scope window. If you specify keep-on-top to be true, the window will stay on top of the other windows in your environment."
+  ([panel title keep-on-top width height]
+     (let [f (JFrame. title)]
+       (doto f
+         (.setPreferredSize (Dimension. width height))
+         (.add panel)
+         (.pack)
+         (.show)
+         (.setAlwaysOnTop keep-on-top)))))
+
+(defn- create-pool-if-necessary []
+  (if-not @scope-pool* (reset! scope-pool* (make-pool))))
+
+
+(defn- start-scopes-runner
+  []
+  (periodic update-scopes (/ 1000 FPS) 0 @scope-pool*))
+
+(defn scopes-start
+  []
+  (create-pool-if-necessary)
+  (start-scopes-runner))
+
+;;  (.cancel (:runner @scope*) true)
+(defn scopes-stop
+  []
+  (stop-and-reset-pool! scope-pool*))
+
+(defn- scope-bus
+  "Set a bus to view in the scope."
+  [s]
+  (let [buf (buffer SCOPE-BUF-SIZE)
+        _ (wait-for-buffer buf)
+        bus-synth (bus->buf :target 0 :position :tail (:num s) buf)]
+
+    (apply-at (+ (now) 1000) update-scope [])
+    (assoc s
+      :size SCOPE-BUF-SIZE
+      :bus-synth bus-synth
+      :buf buf)))
+
+(defn- scope-buf
+  "Set a buffer to view in the scope."
+  [s]
+  (assoc s
+    :size (:size (buffer-info (:num s)))
+    :buf (:num s)))
+
+(defn- mk-scope
+  [num kind keep-on-top width height]
+  (let [id      (str kind ": " num)
+        panel   (scope-panel id width height)
+        frame   (scope-frame panel id keep-on-top width height)
+        x-array (int-array width)
+        _x-init (dotimes [i width]
+                  (aset x-array i i))
+        y-array (int-array width)
+        _y-init (dotimes [i width]
+                  (aset y-array i (/ height 2)))
+        scope   {:id id
+                 :size 0
+                 :num num
+                 :panel panel
+                 :kind kind
+                 :color (Color. 0 130 226)
+                 :background (Color. 50 50 50)
+                 :frame frame
+                 :width width
+                 :height height
+                 :x-array x-array
+                 :y-array y-array}]
+    (case kind
+          :bus (scope-bus scope)
+          :buf (scope-buf scope))))
+
+(defn scope
+  "Create a scope for either a bus or a buffer. Defaults to scoping bus 0.
+   Example use:
+   (scope :bus 1)
+   (scope :buf 10)"
+  ([&{:keys [bus buf keep-on-top]
+      :or {bus 0
+           buf -1
+           keep-on-top false}}]
+     (let [buf (if (buffer? buf) (:id buf) buf)
+           kind (if (= -1 buf) :bus :buf)
+           num  (if (= -1 buf) bus buf)
+           s (mk-scope num kind keep-on-top WIDTH HEIGHT)]
+       (swap! scopes* assoc (:id s) s)
+       (scopes-start))))
+
+(defn pscope
+  "Creates a 'perminent' scope, i.e. one where the window is always kept on top of other OS windows. See scope."
+  ([& args]
+     (apply scope (concat args [:keep-on-top true]))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Testing
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(comment
+  (require 'examples.basic)
+
+  (defonce test-frame (JFrame. "scope"))
+  (defonce _test-scope (do
+                         (.setPreferredSize test-panel (Dimension. 600 400))
+                         (.add (.getContentPane test-frame) test-panel)
+                         (.setScene test-panel (scope))
+                         (.pack test-frame)
+                         (.show test-frame)))
+
+  (defn- go-go-scope []
+    (let [b (buffer 2048)]
+      (Thread/sleep 100)
+      (scope-buf b)
+      (scope-on)
+      (examples.basic/sizzle :bus 20)
+      (bus->buf 20 (:id b))
+      (bus->bus 20 0)))
+
+  (defn- spectrogram [in-bus]
+    (let [fft-buf (buffer 2048)
+          buf (buffer 2048)]
+      (Thread/sleep 100)
+      (freq-scope-zero in-bus fft-buf buf)))
+
+  (defn test-scope []
+    (if (not (connected?))
+      (do
+        (boot)
+        (on :examples-ready go-go-scope))
+      (go-go-scope))
+    (.show test-frame))
+  )
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Spectragraph stuff to be worked on
+(comment
+                                        ; Note: The fft ugen writes into a buffer:
+                                        ; dc, nyquist, real, imaginary, real, imaginary....
+  (comment defn- update-scope []
+           (let [{:keys [buf width height panel]} @scope*
+                 frames  (buffer-data buf)
+                 n-reals (/ (- (:size buf) 2) 2)
+                 step    (int (/ n-reals width))
+                 y-scale (/ (- height (* 2 Y-PADDING)) 2)
+                 y-shift (+ (/ height 2) Y-PADDING)]
+             (dotimes [x width]
+               (aset ^ints y-array x
+                     (int (+ y-shift
+                             (* y-scale
+                                (aget ^floats frames
+                                      (+ 2 (* 2 (unchecked-multiply x step))))))))))
+           (.repaint (:panel @scope*)))
+
+  (defsynth freq-scope-zero [in-bus 0 fft-buf 0 scope-buf 1
+                             rate 4 phase 1 db-factor 0.02]
+    (let [n-samples (* 0.5 (- (buf-samples:kr fft-buf) 2))
+          signal (in in-bus)
+          freqs  (fft fft-buf signal 0.75 :hann)
+                                        ;        chain  (pv-mag-smear fft-buf 1)
+          phasor (+ (+ n-samples 2)
+                    (* n-samples
+                       (lf-saw (/ rate (buf-dur:kr fft-buf)) phase)))
+          phasor (round phasor 2)]
+      (scope-out (* db-factor (ampdb (* 0.00285 (buf-rd 1 fft-buf phasor 1 1))))
+                 scope-buf)))
+
+
+  (defsynth freqs [in-bus 10 fft-buf 0]
+    (let [n-samples (* 0.5 (- (buf-samples:kr fft-buf) 2))
+          signal    (in in-bus 1)]
+      (fft fft-buf signal 0.75 :hann)))
+
+
+
+  (defsynth scoper-outer [buf 0]
+    (scope-out (sin-osc 200) buf))
+  (scope-out)
+
+  (defn freq-scope-buf [buf]
+    )
+
+
+  )
+


Disable the jvm.threads metric set as it confuses influxdb.

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


remove ribbon

remove ribbon

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 a test fixture for brining up a system in integration tests.

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

--- src/cmr/opendap/testing/system.clj
+++ src/cmr/opendap/testing/system.clj
@@ -0,0 +1,34 @@
+(ns cmr.opendap.testing.system
+  (:require
+    [clojusc.dev.system.core :as system-api]
+    [clojusc.twig :as logger]
+    [cmr.opendap.components.testing]))
+
+;; Hide logging as much as possible before the system starts up, which shuld
+;; disable logging entirely for tests.
+(logger/set-level! '[] :fatal)
+
+(def ^:dynamic *mgr* (atom nil))
+
+(defn startup
+  []
+  (alter-var-root #'*mgr* (constantly (atom (system-api/create-state-manager))))
+  (system-api/set-system-ns (:state @*mgr*) "cmr.opendap.components.testing")
+  (system-api/startup @*mgr*))
+
+(defn shutdown
+  []
+  (when *mgr*
+    (let [result (system-api/shutdown @*mgr*)]
+      (alter-var-root #'*mgr* (constantly (atom nil)))
+      result)))
+
+(defn system
+  []
+  (system-api/get-system (:state @*mgr*)))
+
+(defn with-test-system
+  [test-fn]
+  (startup)
+  (test-fn)
+  (shutdown))


changes with positions methods

changes with positions 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/easytaxibr/easy-mapa.git/'


Add either spec tests.

Add either spec tests.

error: pathspec 'spec/cats/monad/either_spec.cljx' did not match any file(s) known to git

--- spec/cats/monad/either_spec.cljx
+++ spec/cats/monad/either_spec.cljx
@@ -0,0 +1,82 @@
+(ns cats.monad.either-spec
+  #+cljs
+  (:require [speclj.core :as s :include-macros true]
+            [cats.builtin :as b]
+            [cats.protocols :as p]
+            [cats.monad.either :as either]
+            [cats.core :as m :include-macros true])
+  #+clj
+  (:require [speclj.core :as s]
+            [cats.builtin :as b]
+            [cats.protocols :as p]
+            [cats.monad.either :as either]
+            [cats.core :as m]))
+
+(s/describe "either-monad"
+  (s/it "Basic either operations."
+    (s/should= 1 (either/from-either (either/right 1)))
+    (s/should= nil (either/from-either (either/left))))
+
+  (s/it "Test predicates"
+    (let [m1 (either/right 1)]
+      (s/should (either/either? m1))
+      (s/should (either/right? m1))))
+
+  (s/it "Test fmap"
+    (let [m1 (either/right 1)
+          m2 (either/left)]
+      (s/should= (m/fmap inc m1) (either/right 2))
+      (s/should= (m/fmap inc m2) (either/left))))
+
+  (s/it "The first monad law: left identity"
+    (s/should= (either/right 2)
+               (m/>>= (p/mreturn either/either-monad 2) either/right)))
+
+  (s/it "The second monad law: right identity"
+    (s/should= (either/right 2)
+               (m/>>= (either/right 2) m/return)))
+
+  (s/it "The third monad law: associativity"
+    (s/should= (m/>>= (m/mlet [x  (either/right 2)
+                               y  (either/right (inc x))]
+                        (m/return y))
+                      (fn [y] (either/right (inc y))))
+               (m/>>= (either/right 2)
+                      (fn [x] (m/>>= (either/right (inc x))
+                                     (fn [y] (either/right (inc y)))))))))
+
+
+(def either-vector-transformer (either/either-transformer b/vector-monad))
+
+(s/describe "either-transformer"
+  (s/it "It can be combined with the effects of other monads"
+    (s/should= [(either/right 2)]
+               (m/with-monad either-vector-transformer
+                 (m/return 2)))
+
+    (s/should= [(either/right 1)
+                (either/right 2)
+                (either/right 2)
+                (either/right 3)]
+               (m/with-monad either-vector-transformer
+                 (m/mlet [x [(either/right 0) (either/right 1)]
+                          y [(either/right 1) (either/right 2)]]
+                   (m/return (+ x y)))))
+
+    (s/should= [(either/right 1)
+                (either/right 2)
+                (either/right 2)
+                (either/right 3)]
+               (m/with-monad either-vector-transformer
+                 (m/mlet [x (m/lift [0 1])
+                          y (m/lift [1 2])]
+                   (m/return (+ x y)))))
+
+    (s/should= [(either/right 1)
+                (either/left)
+                (either/right 2)
+                (either/left)]
+               (m/with-monad either-vector-transformer
+                 (m/mlet [x [(either/right 0) (either/right 1)]
+                          y [(either/right 1) (either/left)]]
+                   (m/return (+ x y)))))))


trying to build select

trying to build select

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


Fixed - Send a message (without logging as a question)

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


Add routing from "/" to /home

Add routing from "/" to /home

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/DajanaStiberova/green-recipes.git/'


tests updated

tests updated

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


not working yet 4Clojure: Palindrome Detector

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

--- src/4clojure/palindrome-detector.clj
+++ src/4clojure/palindrome-detector.clj
@@ -0,0 +1,31 @@
+;; Palindrome Detector
+;; http://www.4clojure.com/problem/27
+
+;; (defn palindrome? [coll]
+;;   (println (int (/ (count coll) 2))))
+
+(defn palindrome? [coll]
+  (loop [c coll
+         r false]
+    (if (not (= (first c) (last c)))
+      false
+      (recur
+        (-> c rest butlast)
+        true))))
+
+
+(false? (palindrome? '(1 2 3 4 5)))
+(true? (palindrome? "racecar"))
+(true? (palindrome? [:foo :bar :foo]))
+(true? (palindrome? '(1 1 3 3 1 1 )))
+(false? (palindrome? '(:a :b :c)))
+
+(def a (take 10 (iterate inc 1)))
+a
+(drop 1 (take (dec (count a)) a))
+; <=>
+(butlast (rest a))
+; <=>
+(-> a (rest) (butlast))
+; <=> - more readable
+(-> a rest butlast)


Talk about language fundamentals

Talk about language fundamentals

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

--- src/bat/02.language_fundamentals.clj
+++ src/bat/02.language_fundamentals.clj
@@ -0,0 +1,75 @@
+;; # Syntax
+;;
+;; Forms = valid code structures, there are two
+
+;; - literal representations of data structures (numbers, strings, maps, vectors, sets, hashmaps)
+;; - operations
+
+;; Some valid literal forms:
+;;
1
+;; "a string"
+;; ["a" "vector" "of" "strings"]
+;;

+
+;; __NOTE:__ All operations take the form _opening parenthesis, operator, operands, closing parenthesis_
+(defn operation-example
+  [& rest]
+  (operator operand1 operand2 ... operandn))
+
+
+;; # Control flow - if do and when
+
+;; __NOTE:__ If you omit the false branch and the Boolean form evaluates to `false` then `nil` is returned.
+(if boolean-form
+  then-form
+  optional-else-form)
+
+;; The `do` operator lets you wrap up multiple forms in parentheses and run each of them:
+(if true
+  (do (println "Success!")
+    "Great success")
+  (do (println "Failure!")
+    "Super fail"))
+
+;; The `when` operator is like a combination of `if` and `do`, but with no else branch:
+(when true
+  (println "Success!")
+  "abra cadabra")
+
+;; __NOTE:__ Use `when` if you want to do multiple things when some condition is true, and you always want to return `nil` when the condition is false.
+
+;; #### nil, true, false, Truthiness, Equality, and Boolean Expressions
+
+;;`true` and `false` are values. `nil` indicates no value.
+
+;; To check whether a value is `nil`:
+(nil? 1)
+
+;; `nil` and `false` represent logical falsiness, __ALL__ other values are logically truthy.
+
+;; #### or and and
+
+;; `or` returns either the first truthy value or the last value:
+(or "i am returned" false nil)
+(or false false :iamreturned)
+
+;; `and` returns the first falsey value or, if no values are falsey, the last truthy value.
+(and "when" "everything" "is" "true" :iamreturned)
+(and nil false "nil is returned")
+
+;; #### Naming values - def
+;;
+;; `def` _binds_ a name to a value:
+(def some-animals
+  ["Wolf" "Bear" "Cat"])
+
+
+(defn error-message
+  "Conditional string concatenation using immutable constructs"
+  [severity]
+  (str "OH GOD! IT'S A DISASTER! WE'RE "
+    (if (= severity :mild)
+      "MILDLY INCONVENIENCED!"
+      "DOOOOOOOMED!")))
+
+(error-message :mild)


Evaluating e^x resolved

Evaluating e^x resolved

error: pathspec 'src/hackerrank/fp/Evaluating' did not match any file(s) known to git
error: pathspec 'e^x.clj' did not match any file(s) known to git


add a way to use Stefon's data-uri helpers

error: pathspec 'frontend/stefon.cljs' did not match any file(s) known to git

--- frontend/stefon.cljs
+++ frontend/stefon.cljs
@@ -0,0 +1,16 @@
+(ns frontend.stefon
+  "Hacks to replicate stefon's .ref helpers"
+  (:require [frontend.utils :as utils :include-macros true]))
+
+(defn data-uri
+  "Returns the data-uri version of the image for the given url.
+   Image must be specified in resources/assets/js/stefon-hack-for-om.coffee.ref!"
+  [url]
+  (let [uri-string (-> js/window
+                       (aget "stefon_hack_for_om")
+                       (aget "data_uris")
+                       (aget url))]
+    (if uri-string
+      uri-string
+      (utils/mwarn "Unable to find data-uri for" url
+                   "Is it defined in resources/assets/js/stefon-hack-for-om.coffee.ref?"))))


Fix comments and code styles

Fix comments and code styles

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


working code.

working code.

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

--- clojure/word-count/word-count.clj
+++ clojure/word-count/word-count.clj
@@ -0,0 +1,19 @@
+(ns phrase
+  (:use [clojure.string :only [lower-case split blank?]]))
+
+(defn- tokenize [str]
+  (split (lower-case str) #"\W"))
+
+(defn- non-blank? [str]
+  (not (blank? str)))
+
+(defn- filter-words [str]
+  (filter non-blank? (tokenize str)))
+
+(defn- count [words counts]
+  (if (empty? words)
+    counts
+    (count (rest words) (assoc counts (first words) (inc (get counts (first words) 0))))))
+
+(defn word-count [str]
+  (count (filter-words str) {}))


defdec helper-macro

defdec helper-macro

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


solved

solved

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

--- src/4clojure/binary_number.clj
+++ src/4clojure/binary_number.clj
@@ -0,0 +1,60 @@
+;; Read a binary number
+;; http://www.4clojure.com/problem/122
+
+;; Difficulty:	Easy
+;; Topics:
+
+
+;; Convert a binary number, provided in the form of a string, to its numerical value.
+
+
+(defn __ [s]
+  (int (reduce +
+          (map #(* (Math/pow 2 (first %)) (second %))
+               (map-indexed #(vector %1 (Integer/parseInt %2))
+                            (remove clojure.string/blank? (reverse (clojure.string/split s #""))))))))
+
+(flatten (partition 1 "111"))
+;; (map-indexed #((Math/pow 2 %2) Integer/parseInt (str %1)) (flatten (partition 1 "111")))
+
+;; (map-indexed #(fn [idx itm] (Math/pow 2 idx)) [1 1 1])
+(reduce + (map #(* (Math/pow 2 (first %)) (second %)) (map-indexed vector [1 0 1])))
+
+(Math/pow 2 1)
+
+
+(= 0     (__ "0"))
+
+(= 7     (__ "111"))
+
+(= 8     (__ "1000"))
+
+(= 9     (__ "1001"))
+
+(= 255   (__ "11111111"))
+
+(= 1365  (__ "10101010101"))
+
+(= 65535 (__ "1111111111111111"))
+
+
+
+;; 4clojure copy paste
+(fn [s]
+  (int (reduce +
+          (map #(* (Math/pow 2 (first %)) (second %))
+               (map-indexed #(vector %1 (Integer/parseInt %2))
+                            (remove clojure.string/blank? (reverse (clojure.string/split s #""))))))))
+
+
+;; _artem_uv's solution:
+#(Integer/parseInt % 2)
+
+;; _pcl's solution:
+(fn [s] (reduce + (map-indexed #(if (= %2 \0) 0 (bit-shift-left 1 %1)) (reverse s))))
+
+;; aceeca1's solution:
+reduce #(+ %1 %1 (- (int %2) 48)) 0
+
+;; adereth's solution:
+#(Integer/parseInt % 2)


remove unnecessary use, add docs for new public session fns

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


adding platform-in-a-box full build config

error: pathspec 'config/projects/platform-full.clj' did not match any file(s) known to git

--- config/projects/platform-full.clj
+++ config/projects/platform-full.clj
@@ -0,0 +1,26 @@
+;;
+;; Author:: Adam Jacob (<adam@opscode.com>)
+;; Author:: Christopher Brown (<cb@opscode.com>)
+;; Copyright:: Copyright (c) 2010 Opscode, Inc.
+;; License:: Apache License, Version 2.0
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License");
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;     http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+;;
+
+(project "platform-full" "1.0.1" "1"
+         :build-order [ "prep" "help2man" "libtool" "autoconf" "automake" "gdbm" "zlib" "libiconv" "readline" "db" "gdbm" "ncurses"
+                        "openssl" "libxml2" "libxslt" "ruby" "rsync" "chef"
+                        "erlang" "icu" "spidermonkey" "curl" "couchdb" "rabbitmq"
+                        "git"
+                      ])
+


also handle errors other than 404

also handle errors other than 404

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


Add dash-astar-simple for bounded

Add dash-astar-simple for bounded

error: pathspec 'src/angelic/search/implicit/dash_astar_simple.clj' did not match any file(s) known to git

--- src/angelic/search/implicit/dash_astar_simple.clj
+++ src/angelic/search/implicit/dash_astar_simple.clj
@@ -0,0 +1,436 @@
+(ns angelic.search.implicit.dash-astar-simple
+  (:require [angelic.util :as util]
+	    [angelic.util.channel :as channel]
+            [angelic.search.summary :as summary]
+            [angelic.search.summary-graphs-new :as sg]
+            [angelic.search.function-sets :as fs])
+  (:import [java.util HashMap ArrayList IdentityHashMap]))
+
+;; Take dash_astar_opt_simple and add back complexities from
+;; dash_astar.clj.
+
+;; Do bounded suboptimal by propagating pessimistic into optimistic, versus
+;; other way?  Issue was that ???
+
+;; One issue is with propagation -- can't just take the min thing, need
+;; to construct a composite summary.
+;; But this doesn't rule out pess-side thing, since the same fn could be used
+;; on either side.
+
+;; Note: ignoring subsumption, communication only needs to happen at leaves.
+;; Problem can just be with aliasing.
+;; Suppose I have A, B.  Opt description of A has 3 branches of output.
+;; Pess has single empty branch.  [-inf -inf] is valid description of this branch.
+;;  i.e., doing things that way is effectively pessimistic about opt.
+
+;; Going other way, spse we have single vacuous opt branch.
+;; Suppose I have some vacuous pessimistic description.  I accumulate
+;; all upper bounds there,
+
+;; Right way to do it is: store the combined info in the opt-pess subsumption links.
+;; Or, just make nodes opt-pess pairs.  But then, we lose out on caching.
+;; Can just add caching on top -- but we may want separate opt-only tree still?
+;; Actually, pretty clear we still want separate trees, so knowledge transfers to
+;; new pess match with a given opt, for example.
+;; So, we actually want to build three trees for now.
+
+;; Are we guaranteed that every pess has an opt parent?  Even in presence
+;; of ouptut collecting, etc. ?
+;; Bridge means: exists some set of sequences that produce this opt, pess set pair.
+
+;; Can try to do this as: separate trees, plus "bridge" superstructure built on
+;; top.  Or, as scaffolding which controls construction of lower trees.
+;; Scaffolding seems preferable.
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;       Options      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(set! *warn-on-reflection* true)
+
+;; These are all bound by the implicit-dash-a* main fn at the end of this file.
+(declare *left-recursive*        ) ;; Use left, not right recursion for seqs (((a . b) . c) . d)
+(declare *collect-equal-outputs* ) ;; Collect descendants with identical output sets
+(declare *decompose-cache*       ) ;; Cache subproblems? Requires *collect-equal-outputs*
+(declare *state-abstraction*     ) ;; Use state abstraction?  Requires *decompose-cache*
+(declare *propagate-subsumption* ) ;; Automatically propagate subsumption links to corresponding children
+
+(defmacro cache-under [ks body]
+  `(if-let [^HashMap dc# *decompose-cache*]
+     (util/cache-with dc# ~ks ~body)
+     ~body))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;       Utilities      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;      Change Scheduling      ;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Trying to keep cached summaries up-to-date while simultaneously modifying the
+;; subproblem graph is quite difficult and potentially error-prone.
+;; This code allows the set of root subproblems with changed summaries to be recorded
+;; during evaluation and tree update, and then played back once the tree is fixed,
+;; decoupling the processes of tree change and summary updates.
+
+;; TODO: get this out of here into sg, get rid of global state.
+
+(def *increases* (ArrayList.))
+(def *decreases* (ArrayList.))
+(def *subsumes* (ArrayList.))
+
+(defn- schedule-increase! [sp] (.add ^ArrayList *increases* sp))
+(defn- schedule-decrease! [sp] (.add ^ArrayList *decreases* sp))
+(defn- schedule-subsumption! [ts subsumed-ts] (.add ^ArrayList *subsumes* [ts subsumed-ts]))
+
+(defn- do-changes! [^ArrayList a f] (doseq [sp a] (f sp)) (.clear a))
+
+(defn expand! [s] ((:expand!-fn s) s))
+
+(defn- expand-and-update! [s]
+  (expand! s)
+  (do-changes! *increases* sg/summary-increased!)
+  (do-changes! *subsumes* (fn [[ts subsumed-ts]] (sg/connect-subsumed! ts subsumed-ts)))
+  (do-changes! *decreases* sg/summary-changed!))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Subproblems  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Subproblem has keys :name :input-set :output-set  :expand! :refine-input-fn
+;; and fns  publish-child! list-children subscribe-children!
+;;  subsuming-sps add-subsuming-sp! sp-ts
+
+(defn- make-subproblem
+  "Make a subproblem with the given name and input-set.  If this is a wrapping
+   subproblem (e.g., output collector or state abstractor), pass tree summarizer
+   of wrapped SP; otherwise, pass nil and a tree summarizer will be created.
+   eval!-fn, ri-fn, and summary-fn specify how to evaluate, refine input, and summarize."
+  [nm inp-set out-set wrapped-ts expand!-fn ri-fn summary-fn]
+  (with-meta (assoc (sg/make-simple-cached-node)
+               :name nm
+               :input-set inp-set
+               :output-set out-set
+               :ts-atom (atom wrapped-ts)
+               :child-channel    (channel/make-channel)
+               :subsuming-sp-set (IdentityHashMap.)
+               :expand!-fn expand!-fn
+               :refine-input-fn ri-fn
+               :summarize-fn summary-fn)
+    {:type ::Subproblem}))
+
+(defn sp-ts [sp]
+  (or @(:ts-atom sp)
+      (reset! (:ts-atom sp)
+              (doto (with-meta (merge {:ts-sp sp :summarize-fn sg/or-summary}
+                                      (sg/make-simple-cached-node))
+                      {:type ::TreeSummarizer})
+                (sg/connect! sp)
+                (schedule-subsumption! sp)))))
+
+(defmethod print-method  ::TreeSummarizer [s o]
+  (print-method (format "#<TS %s>" (print-str (:ts-sp s))) o))
+
+;; Canonical SPs are Atomic and Pair; wrappers use TS of inner SP.
+(defn- canonicalize [sp] (:ts-sp (sp-ts sp)))
+(defn- canonical? [sp] (identical? sp (canonicalize sp)))
+
+
+
+
+(defn list-children        [s] (channel/publications (:child-channel s)))
+
+(defn subscribe-children!  [s w] (channel/subscribe! (:child-channel s) w))
+
+(defn- connect-and-watch! [p c child-f]
+  (sg/connect! p c)
+  (subscribe-children! c child-f))
+
+(defn- connect-ts! [p c]
+  (sg/connect! p (sp-ts c)))
+
+(defn publish-child! [sp child-sp]
+  (when child-sp
+    (util/print-debug 2 "AC" sp child-sp)
+    (util/assert-is (not (identical? sp child-sp)))
+    (if (and *collect-equal-outputs*
+             (fs/=-state-sets (:output-set sp) (:output-set child-sp)))
+      (do (schedule-increase! sp)
+          (connect-and-watch! sp child-sp (partial publish-child! sp)))
+      (do (when (canonical? sp)
+            (schedule-subsumption! (sp-ts sp) (sp-ts child-sp))
+            (sg/connect! (sp-ts sp) (sp-ts child-sp))
+            (schedule-increase! (sp-ts sp)))
+          (channel/publish! (:child-channel sp) child-sp)))))
+
+
+(defn subsuming-sps        [s] (keys (:subsuming-sp-set s)))
+
+(defn add-subsuming-sp! [s subsuming-sp]
+  (util/assert-is (canonical? s))
+  (util/assert-is (canonical? subsuming-sp))
+  (util/assert-is (= (:name s) (:name subsuming-sp)))
+  (let [^IdentityHashMap subsuming-sp-set (:subsuming-sp-set s)]
+  (when-not (or (identical? s subsuming-sp)
+                (.containsKey subsuming-sp-set subsuming-sp))
+    (.put subsuming-sp-set subsuming-sp true)
+    (schedule-subsumption! (sp-ts subsuming-sp) (sp-ts s))
+    (when *propagate-subsumption*  ;; TODO: efficiency, etc.
+      (subscribe-children! s
+        (fn [child]
+          (let [can-child (canonicalize child)]
+            (subscribe-children! subsuming-sp
+              (fn [subsuming-child]
+                (let [can-subsuming-child (canonicalize subsuming-child)]
+                  (when (= (:name can-child) (:name can-subsuming-child))
+                    (add-subsuming-sp! can-child can-subsuming-child))))))))))))
+
+
+(defn refine-input    [s ni]
+  (when-let [ret ((:refine-input-fn s) s ni)]
+    (util/assert-is (= (:name s) (:name ret)))
+    (when (canonical? s) (add-subsuming-sp! ret s))
+    ret))
+
+
+(defn- terminal? [sp]
+  (and (empty? (list-children sp))
+       (not (summary/live? (sg/summary sp)))))
+
+(defn- solved-terminal? [sp]
+  (and (empty? (list-children sp))
+       (summary/solved? (sg/summary sp))))
+
+
+
+(defmethod print-method ::Subproblem [sp o]
+  (print-method (format "#<SP$%8h %s>" (System/identityHashCode sp) (:name sp)) o))
+
+;; Multimethod to get a subproblem by name, or nil for dead.
+(defmulti get-subproblem (fn get-subproblem-dispatch [nm inp] (first nm)))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;     Core Subproblems     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;      Atomic       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Atomic subproblems represent the plans for a single action from an input set.
+
+;; Initially we are evaluated but have no children. (Lazy can be simulated by hierarchy)
+;; Expanding generates and publishes child subproblems, based on children of subsuming if possible.
+
+(defn atomic-name [fs] [:Atomic fs])
+(defn atomic-name-fs [n] (assert (#{:Atomic} (first n))) (second n))
+
+(defn make-summary [rew stat src]
+  (let [b (sg/get-bound src)]
+    (summary/make-simple-summary (if rew (min rew b) b) stat src)))
+
+(declare refinement-names)
+
+(defn get-input-key [fs inp-set]
+  (if *state-abstraction* (fs/extract-context fs inp-set) inp-set))
+
+(defn- make-atomic-subproblem [fs inp-set]
+  (let [nm (atomic-name fs)]
+    (cache-under [nm (get-input-key fs inp-set)]
+     (let [[out-set reward status] (fs/apply-opt fs inp-set)]
+       (when out-set
+         (let [summary-fn (atom #(make-summary reward status %))]
+           (make-subproblem
+            nm inp-set out-set nil
+            (fn expand! [s]
+              (util/print-debug 1 "expand" nm)
+              (reset! summary-fn sg/or-summary)
+              (schedule-decrease! s)
+              (if-let [subsuming-sps (seq (remove terminal? (subsuming-sps s)))]
+                (connect-and-watch! s (apply min-key (comp sg/get-bound sp-ts) subsuming-sps)
+                  (fn [sub-child] (publish-child! s (refine-input sub-child inp-set))))
+                (doseq [ref-name (refinement-names fs inp-set)]
+                  (publish-child! s (get-subproblem ref-name inp-set)))))
+            (fn [s ri]  #_ (assert (not *collect-equal-outputs*))
+              (if (= ri inp-set) s (get-subproblem nm  ri)))
+            (fn summarize [s] (@summary-fn s)))))))))
+
+
+;; TODO: handle state abstraction
+;; TODO: should wrap pairs like this too?
+(defmethod get-subproblem :Atomic [[_ fs] inp-set]
+  (make-atomic-subproblem fs inp-set))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;      Pair      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Pair subproblems represent sequntial composition of two subproblems.
+
+;; Thus, we use the output of the left-sp as input for right-sp,
+;; and output of right-sp as output of the pair.
+
+;; The slightly tricky part is generating children.  Both left-sp and right-sp
+;; may have childen, but to search systematically we branch on only one at a time.
+;; This means that our summary should consist of the sum of summaries of
+;;   - The subproblem whose children we branch on, and
+;;   - The tree summarizer of the other subproblem.
+
+;; For now, always attempt to branch on the left subproblem first, unless the
+;; left subproblem is terminal (no children), in which case we branch right.
+;; Unfortunately, we don't know when we start if the left will be terminal
+;; (under *collect-equal-outputs*), so we assume it's not, then switch if,
+;; at any point, it becomes terminal.
+;; Unfortunately, the only place we can tell if it becomes terminal is while
+;; computing the summary of this node.  But, at that point we don't want to
+;; trigger any tree modifications, since when summary updates and tree modifications
+;; get interleaved arbitrarily, it gets really hard to maintain correctness.
+;; So, if right-sp already has children, we make the SP a leaf and wait for
+;; it to be evaluated to switch; otherwise, we safely switch immediately.
+
+(defn pair-name [l r] [:Pair l r])
+
+(declare make-half-pair-subproblem)
+
+(defn- make-pair-subproblem [left-sp right-sp]
+  (when right-sp
+    (let [nm          (pair-name (:name left-sp) (:name right-sp))
+	  right?-atom (atom false) ;; Expand on right
+	  ss          (sg/make-sum-summarizer)
+	  go-right! (fn [s]
+		      (reset! right?-atom true)
+		      (sg/disconnect! ss (sp-ts right-sp))
+		      (subscribe-children! left-sp (fn [c] (def *bad* [s c]) (assert (not "S + C"))))
+		      (connect-and-watch! ss right-sp
+			#(publish-child! s (make-pair-subproblem left-sp %)))
+		      (sg/summary-changed-local! ss))
+	  ret (make-subproblem nm (:input-set left-sp) (:output-set right-sp) nil
+		(fn expand! [s]
+		  (util/print-debug 1 "expand-pair" nm)
+		  (schedule-decrease! s)
+		  (go-right! s))
+		(fn [s ni]
+		  (if (= ni (:input-set left-sp)) s
+		      (make-half-pair-subproblem (refine-input left-sp ni) #(refine-input right-sp %))))
+		(fn [s]
+		  (or (and (not @right?-atom)
+			   (solved-terminal? left-sp)
+			   (if (empty? (list-children right-sp))
+			     (do (go-right! s) nil)
+			     (let [r (min (summary/max-reward (sg/summary ss)) (sg/get-bound s))]
+			       (make-summary r :live s))))
+		      (sg/or-summary s))))]
+      (sg/connect! ret ss)
+      (connect-and-watch! ss left-sp
+	#(publish-child! ret (make-pair-subproblem % (refine-input right-sp (:output-set %)))))
+      (connect-ts! ss right-sp)
+      ret)))
+
+(defn make-half-pair-subproblem [left-sp right-fn]
+  (when left-sp (make-pair-subproblem left-sp (right-fn (:output-set left-sp)))))
+
+(defmethod get-subproblem :Pair [[_ left-name right-name :as n] inp]
+  (make-half-pair-subproblem (get-subproblem left-name inp) #(get-subproblem right-name %)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;    SA Wrapper     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(defn sa-name [inner-name] [:SA inner-name])
+
+;; Note: subsumed subproblems can have different irrelevant vars
+;; Also note: new input can have subset of variables of old. (=-state-sets does ntthis now).
+(defn- make-state-abstracted-subproblem [fs inner-sp inp-set]
+  (when inner-sp
+    (let [ret (make-subproblem
+               (sa-name (:name inner-sp))
+               inp-set (fs/transfer-effects inp-set (:output-set inner-sp))
+               (sp-ts inner-sp)
+               (fn [_] (throw (RuntimeException.)))
+               (fn [sp ni]
+                 (if (fs/=-state-sets ni inp-set) sp
+                     (let [log-ni (fs/get-logger fs ni)]
+                       (make-state-abstracted-subproblem fs (refine-input inner-sp log-ni) ni))))
+               sg/or-summary)]
+      (connect-and-watch! ret inner-sp
+       #(publish-child! ret (make-state-abstracted-subproblem fs % inp-set)))
+      ret)))
+
+
+(defmethod get-subproblem :SA [[_ inner-n :as n] inp-set]
+  (let [fs (atomic-name-fs inner-n)]
+    (make-state-abstracted-subproblem fs
+      (get-subproblem inner-n (fs/get-logger fs inp-set))
+      inp-set)))
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;     Refinement Names     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn- left-factor [is]
+  (loop [s (next is) ret (first is)]
+    (if s (recur (next s) (pair-name ret (first s))) ret)))
+
+(defn- right-factor [[f & r]]
+  (if (seq r) (pair-name f (right-factor r)) f))
+
+(defn- wrapped-atomic-name [fs]
+  (let [in  (atomic-name fs)]
+    (if *state-abstraction* (sa-name in) in)))
+
+(defn- refinement-names
+  "Generate the names of subproblems representing refinements of fs from inp-set"
+  [fs inp-set]
+  (for [fs-seq (fs/child-seqs fs inp-set)]
+    ((if *left-recursive* left-factor right-factor)
+     (map wrapped-atomic-name fs-seq))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Planning ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(declare *root*)
+
+(defn implicit-dash-a*-opt
+  "Solve this hierarchical env using implicit DASH-A*, or variants thereupon.  Options are:
+    :gather    Don't publish child subproblems with identical outputs?
+    :d         Decomposition: cache and re-use subproblems by [name inp-set] pair?  Requires :gather.
+    :s         State Abstraction: take state abstraction into account when caching?  Requires :d.
+    :choice-fn Choose a child node to evaluate from alternatives (in sequence)
+    :local?    Apply choice-fn recursively at each pair, or to an entire leaf sequence (slower)?
+    :dir       Factor sequences into pairs using :left or :right recursion
+    :prop      Automatically propagate subsumption from parents to matching children?"
+  [henv & {gather :gather d :d  s :s   choice-fn :choice-fn
+           local? :local?  dir :dir   prop :prop :as m
+      :or {gather true   d true s true choice-fn last
+           local? true     dir :right prop true}}]
+  (assert (every? #{:gather :d :s :choice-fn :local? :dir :prop} (keys m)))
+  (when s (assert d))
+  (when d (assert gather))
+  (binding [*collect-equal-outputs* gather
+            *decompose-cache*       (when d (HashMap.))
+            *state-abstraction*     s
+            *left-recursive*        (case dir :left true :right false)
+            *propagate-subsumption* prop]
+    (def *root* (sp-ts (apply make-atomic-subproblem (reverse (fs/make-init-pair henv)))))
+    (summary/solve
+     #(sg/summary *root*)
+     (sg/best-leaf-operator choice-fn local? expand-and-update!)
+     #(let [fs (second (:name %)) n (fs/fs-name fs)] (when-not (= (first n) :noop) fs)))))
+
+
+
+;; (do (use 'angelic.util '[angelic env hierarchy] 'angelic.domains.nav-switch  'angelic.domains.discrete-manipulation 'angelic.search.implicit.dash-astar-opt-simple) (require '[angelic.search.summary-graphs-new :as sg] '[angelic.search.summary :as summary]) (defn s [x]  (sg/summarize x)) (defn sc [x] (summary/children x))  (defn src [x] (summary/source x)) (defn nc [x] (sg/child-nodes x)))
+
+;; (require '[angelic.search.implicit.dash-astar-opt :as dao])
+
+;; (do (use 'clojure.test) (use 'angelic.test.search.implicit.dash-astar-opt-simple) (run-tests 'angelic.test.search.implicit.dash-astar-opt-simple))
+
+;; (dotimes [_ 1] (reset! sg/*summary-count* 0) (debug 0 (let [h (make-nav-switch-hierarchy (make-random-nav-switch-env 20 4 0) true)]  (time (println (run-counted #(identity (implicit-dash-a*-opt h :gather true :d true :s :eager :dir :right))) @sg/*summary-count*)))))
+
+;; (dotimes [_ 1] (reset! sg/*summary-count* 0) (debug 0 (let [h (make-discrete-manipulation-hierarchy  (make-random-hard-discrete-manipulation-env 3 3))]   (time (println (run-counted #(identity (implicit-dash-a*-opt h :gather true :d true :s :eager :dir :right))) @sg/*summary-count*)))))
+
+
+
+
+
+


Removed unnecessary debug statement

Removed unnecessary debug statement


Version 37

Version 37

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


put bang on the sync loops function

put bang on the sync loops function

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


Fix completion errors again

Fix completion errors again

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/bsmr-clojure/Nightcode.git/'


start clojure version

start clojure version

error: pathspec 'Friend-Circles/FC.clj' did not match any file(s) known to git


added interop.clj to onyx-java

added interop.clj to onyx-java

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

--- src/onyx_java/utility/interop.clj
+++ src/onyx_java/utility/interop.clj
@@ -0,0 +1,54 @@
+(ns onyx-java.utility.interop
+  (:gen-class :name onyx-java.utility.interop
+              :methods [^:static [write_batch [clojure.lang.IPersistentMap] clojure.lang.IPersistentMap]
+                        ^:static [read_batch [clojure.lang.IPersistentMap] clojure.lang.IPersistentMap]])
+  (:require [onyx.information-model :refer [model]]))
+
+(defn -write_batch
+  [event]
+  ((resolve 'onyx.peer.function/write-batch) event))
+
+(defn -read_batch
+  [event]
+  ((resolve 'onyx.peer.function/read-batch) event))
+
+(gen-interface
+  :name onyx-java.IPipeline
+  :methods [[writeBatch [clojure.lang.IPersistentMap] clojure.lang.IPersistentMap]])
+
+(def casts
+  {:boolean (fn [x] x)
+   :integer (fn [x] x)
+   :string (fn [x] x)
+   :any (fn [x] x)
+   :keyword (fn [x] (keyword x))
+   :vector (fn [x] (vec x))})
+
+(defn cast-types [section m]
+  (let [section* (keyword section)]
+    (reduce-kv
+     (fn [m* k v]
+       (let [k* (keyword k)
+             type (get-in model [section* :model k* :type])
+             v* ((get casts type identity) v)]
+         (assoc m* k* v*)))
+     {}
+     m)))
+
+(defn coerce-workflow [workflow]
+  (mapv #(mapv (fn [v] (keyword v)) %) workflow))
+
+(defn coerce-catalog [catalog]
+  (mapv #(cast-types :catalog-entry %) catalog))
+
+(defn coerce-lifecycles [lifecycles]
+  (mapv #(cast-types :lifecycle-entry %) lifecycles))
+
+(defn coerce-flow-conditions [fcs]
+  (mapv #(cast-types :flow-conditions-entry %) fcs))
+
+(defn coerce-windows [windows]
+  (mapv #(cast-types :window-entry %) windows))
+
+(defn coerce-trigger [trigger]
+  (mapv #(cast-types :trigger-entry %) trigger))


Steal tests from avec

Steal tests from avec

Should be general enough to test the basic features of any new map
implementation, though of course if it has any special features those
will need to be tested separately.

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

--- test/useful/deftype_test.clj
+++ test/useful/deftype_test.clj
@@ -0,0 +1,44 @@
+(ns useful.deftype-test
+  (:use clojure.test useful.deftype))
+
+(defn is-valid-map [inst]
+  (let [m (into (empty inst)
+                [[1 :a] [:foo [1 2 3]] ["bar" 42] [:none nil]])]
+    (testing "find"
+      (is (= [1 :a]         (find m 1)))
+      (is (= [:foo [1 2 3]] (find m :foo)))
+      (is (= ["bar" 42]     (find m "bar")))
+      (is (= [:none nil]    (find m :none)))
+      (is (= nil            (find m 3))))
+    (testing "get"
+      (is (= :a      (get m 1)))
+      (is (= [1 2 3] (get m :foo)))
+      (is (= 42      (get m "bar")))
+      (is (= nil     (get m 3)))
+      (is (= :nope   (get m 3 :nope)))
+      (is (= :a      (get m 1 :yep)))
+      (is (= nil     (get m :none 42))))
+    (testing "keys"
+      (is (= #{1 :foo "bar" :none} (set (keys m)))))
+    (testing "vals"
+      (is (= #{:a [1 2 3] 42 nil} (set (vals m)))))
+    (testing "assoc"
+      (let [m2 (assoc m 1 :one :b 4 :c 8)]
+        (is (= :one (get m2 1)))
+        (is (= 4    (get m2 :b)))
+        (is (= 8    (get m2 :c)))
+        (is (= #{1 :foo "bar" :none :b :c} (set (keys m2))))
+        (let [m3 (assoc m2 1 nil :b 5)]
+          (is (= nil (get m3 1)))
+          (is (= 5   (get m3 :b)))
+          (is (= #{1 :foo "bar" :none :b :c} (set (keys m3)))))))
+    (testing "dissoc"
+      (let [m2 (dissoc m 1 :foo :bar)]
+        (is (= nil        (find m2 1)))
+        (is (= nil        (find m2 :foo)))
+        (is (= ["bar" 42] (find m2 "bar")))
+        (is (= #{"bar" :none} (set (keys m2))))
+        (is (= #{42 nil}      (set (vals m2))))))))
+
+(deftest test-alist
+  (is-valid-map (alist)))


Removed pasted code.

Removed pasted 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/couragelabs/coachbot.git/'


adding date-utils which i forgot last time

error: pathspec 'src/eatme/client/date_utils.cljs' did not match any file(s) known to git

--- src/eatme/client/date_utils.cljs
+++ src/eatme/client/date_utils.cljs
@@ -0,0 +1,18 @@
+(ns eatme.date-utils)
+
+(defn humanise [timestamp]
+  (.toLocaleFormat (js/Date. timestamp)))
+
+(defn friendly-age [timestamp]
+  (let [seconds (/ (- (js/Date.) (js/Date. timestamp)) 1000)
+        minutes (/ seconds 60)
+        hours (/ minutes 60)
+        days (/ hours 24)
+        weeks (/ days 7)]
+    (cond
+     (> 60 seconds) "less than a minute ago"
+     (= 1 (int minutes)) "a minute ago"
+     (> 1 hours) (str (int minutes) " minutes ago")
+     (> 1 days) (str "about " (int hours) " hours ago")
+     (> 1 weeks) (str "about " (int days) " days ago")
+     :else (str "about " (int weeks) " weeks ago"))))


+ (defn run-benchmark)

+ (defn run-benchmark)

error: pathspec 'src/babel/italiano/benchmark.cljc' did not match any file(s) known to git

--- src/babel/italiano/benchmark.cljc
+++ src/babel/italiano/benchmark.cljc
@@ -0,0 +1,25 @@
+(ns babel.italiano.benchmark
+  (:refer-clojure :exclude [get-in])
+  (:require [babel.italiano.grammar :refer [small medium np-grammar]]
+            [babel.italiano.lexicon :refer [lexicon]]
+            [babel.italiano.morphology :as morph :refer [analyze-regular fo replace-patterns]]
+            [babel.italiano.morphology.nouns :as nouns]
+            [babel.italiano.morphology.verbs :as verbs]
+            [babel.italiano.workbook :refer [analyze generate generate-all parse]]
+            [babel.parse :as parse]
+            #?(:cljs [cljs.test :refer-macros [deftest is]])
+            #?(:clj [clojure.tools.logging :as log])
+            #?(:cljs [babel.logjs :as log])
+            [clojure.string :as string]
+            [dag_unify.core :refer [get-in strip-refs]]))
+
+(defn run-benchmark []
+  (repeatedly #(let [debug (println "starting generation")
+                     expr (time (generate :top))]
+                 (println (str "generated expression: " (fo expr)))
+                 (let [parsed (time (first (take 1 (parse (fo expr)))))]
+                   (println (str "parsed: " (fo parsed)))
+                   (println "")))))
+(defn -main []
+  (take 5 (run-benchmark)))
+


Adding a benchmark to show result combination.

* This benchmark shows how you can project properties from nodes along a path
expression even when the expression crosses a network boundary.

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

--- src/benchmark/remote.clj
+++ src/benchmark/remote.clj
@@ -0,0 +1,58 @@
+(ns benchmark.remote
+  (:use [plasma util url core connection peer viz]
+        [clojure test stacktrace]
+        test-utils)
+  (:require [logjam.core :as log]
+            [plasma.query :as q]))
+
+; Shows the combination of data from local and remote piers when project
+; on both local and remote nodes.
+
+(defn- link-proxy
+  [local remote]
+  (let [net (:id (first (query local (q/path [:net]))))
+        p-root (get-node remote ROOT-ID)
+        p-id (:id p-root)
+        p-port (:port remote)]
+    (make-edge net
+               (make-proxy-node p-id (plasma-url "localhost" p-port))
+               :peer)))
+
+(defn remote-peers [n]
+  (let [peers (make-peers n (+ 2000 (rand-int 10000))
+                (fn [i]
+                  (clear-graph)
+                  (make-edge ROOT-ID (make-node {:name :net}) :net)
+                  (make-edge ROOT-ID (make-node {:value i}) :data)))
+        base (first peers)
+        neighbors (next peers)]
+    (with-peer-graph base
+      (doseq [p neighbors]
+        (link-proxy base p)))
+    peers))
+
+(defn remote-benchmark []
+  (let [peers (remote-peers 5)
+        base (first peers)]
+    (try
+      ; Attach fake latencies
+      (with-peer-graph base
+        (doseq [p (map :id (query base (q/path [:net :peer])))]
+          (node-assoc p :latency (rand-int 120))))
+      (println "peers: " (query base (q/path [:net :peer])))
+
+      (println "vals: " (query base (-> (q/path [d [:net :peer :data]])
+                                      (q/project [d :value]))))
+      (println "peer values: " (query base (-> (q/path [p [:net :peer]
+                                                        d [p :data]])
+                                             (q/project [p :latency]
+                                                        [d :value]))))
+      (finally
+        (close-peers peers)))))
+
+(comment
+(def peers (flood-peers))
+(def base (first peers))
+(close-peers peers)
+
+)


fix initial prompt finish time

fix initial prompt finish time


kata4: simplify parse-line even further

kata4: simplify parse-line even further

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


Formun eremuak gehitu

Formun eremuak gehitu

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


Fix schema for File entities

Fix schema for File entities

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


Add cli helpers ns under uxbox.util ns.

Add cli helpers ns under uxbox.util ns.

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

--- src/uxbox/util/cli.clj
+++ src/uxbox/util/cli.clj
@@ -0,0 +1,12 @@
+(ns uxbox.util.cli
+  "Command line interface helpers.")
+
+(defn exit!
+  ([] (exit! 0))
+  ([code]
+   (System/exit code)))
+
+(defmacro print-err!
+  [& args]
+  `(binding [*out* *err*]
+     (println ~@args)))


first stepst for vscode

first stepst for vscode

error: pathspec 'main/src/dda/pallet/dda_managed_ide/infra/vscode.clj' did not match any file(s) known to git

--- main/src/dda/pallet/dda_managed_ide/infra/vscode.clj
+++ main/src/dda/pallet/dda_managed_ide/infra/vscode.clj
@@ -0,0 +1,39 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+(ns dda.pallet.dda-managed-ide.infra.vscode
+  (:require
+    [clojure.tools.logging :as logging]
+    [schema.core :as s]
+    [pallet.actions :as actions]
+    [dda.config.commons.user-home :as user-env]))
+
+(def Vscode {(s/optional-key :plugins) [{:plugin-name s/Str :plugin-config s/Any}]})
+
+; curl -Lo vscode.deb https://go.microsoft.com/fwlink/?LinkID=760868
+; sudo apt install ./vscode.deb
+
+
+; curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
+; sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
+; sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
+; sudo apt-get install apt-transport-https
+; sudo apt-get update
+; sudo apt-get install code # or code-insiders
+
+; code --install-extension avli.clojure
+
+; # Settings can be found at $HOME/.config/Code/User/settings.json


add remove colon func

add remove colon func

error: pathspec 'sass-dsl/src/sass_dsl/transform.clj' did not match any file(s) known to git

--- sass-dsl/src/sass_dsl/transform.clj
+++ sass-dsl/src/sass_dsl/transform.clj
@@ -0,0 +1,15 @@
+(ns sass-dsl.transform
+  (:require [clojure.zip :as zip]
+            [clojure.string :refer [join split triml] :as srt]
+            [sass-dsl.common :as common]))
+
+(defn has-colon-suffix
+  "Does this element end in a colon - ie is it potentially an attribute key?"
+  [elem]
+  (= \: (last elem)))
+
+(defn drop-colon-suffix
+  "Remove the colon suffix from this string."
+  [input-string]
+  (join (drop-last input-string)))
+


3001 portua probetarako

3001 portua probetarako

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