started implementing sign up users

started implementing sign up users

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

--- src/clj/tsask/frontend/user/crud.clj
+++ src/clj/tsask/frontend/user/crud.clj
@@ -0,0 +1,59 @@
+(ns tsask.frontend.user.crud
+  (:use tsask.env
+        tsask.util
+        tsask.pages.template-pg
+        com.reasonr.scriptjure
+        digest
+        hiccup.page
+        hiccup.core)
+  (:require [clojure.java.jdbc :as j]
+            [clojure.java.jdbc.sql :as sql]
+            [clj-http.client :as client]
+            [net.cgrand.enlive-html :as html]
+            [me.raynes.laser :as l]))
+
+(defn- redirect [url]
+  {:status 302
+   :headers {"Location" url}
+   :body ""})
+
+(defn edit [id]
+  (binding [*js-css-files* user-files]
+    (let [user (first (j/query SQLDB
+                               (sql/select [:id :username :email_address :first_name :last_name] :user
+                                           (sql/where {:id id}))))]
+      (user-design-pages user))))
+
+(defn new []
+  (binding [*js-css-files* user-files]
+    (user-design-pages)))
+
+(defn create [params]
+  (j/insert! SQLDB :user
+             {:username 	(:username params)
+              :email_address	(:email_address params)
+              :first_name 	(:first_name params)
+              :last_name        (:last_name params)
+              :password         (digest/sha-256 (:password params))
+              :created_at	(.getTime (java.util.Date.))
+              :updated_at	(.getTime (java.util.Date.))})
+  (redirect "/users"))
+
+(defn update [params]
+  (if (empty? (:password params))
+    (j/update! SQLDB :user
+               {:username 	(:username params)
+                :email_address	(:email_address params)
+                :first_name 	(:first_name params)
+                :last_name      (:last_name params)
+                :updated_at	(.getTime (java.util.Date.))}
+              (sql/where {:id (:id params)}))
+    (j/update! SQLDB :user
+               {:username 	(:username params)
+                :email_address	(:email_address params)
+                :first_name 	(:first_name params)
+                :last_name      (:last_name params)
+                :password       (digest/sha-256 (:password params))
+                :updated_at	(.getTime (java.util.Date.))}
+              (sql/where {:id (:id params)})))
+  (redirect "/users"))


Cleanup

Cleanup

--- src/clj/salava/badge/assertion.clj
+++ src/clj/salava/badge/assertion.clj
@@ -11,6 +11,7 @@
             [slingshot.slingshot :refer :all]
             [net.cgrand.enlive-html :as html]
             [markdown.core :as md]
+            [salava.badge.png :as p]
             [salava.core.util :refer [hex-digest str->epoch http-get]]))

@@ -181,20 +182,6 @@

 ; See https://github.com/mozilla/openbadges-backpack/wiki/Assertion-Specification-Changes

-#_(def sample-v0.5
-  {:recipient "sha256$6d4956a8aec8d801cebb573282ee47c6988cff9991cd9a5fae745b3362db240e",
-   :badge  {:version "0.5.0"
-            :name "Badges 101"
-            :image "https://github.com/toolness/openbadges.org/raw/master/static/img/index/101badge.png",
-            :description "You really get badges!"
-            :criteria "http://badges-101.openbadges.org/"
-            :issuer {:origin "http://www.openbadges.org"
-                     :name "Open Badges"
-                     :org "Mozilla Foundation"
-                     :contact "hai2u@openbadges.org"}}
-   :verify {:type "hosted"
-            :url "http://poof.hksr.us/jnfmxvyu"}}
-
 (defmethod assertion :v0.5.0 [input]
   (let [q-url (fn [url]
                 (if (re-find #"^/" (str url))
@@ -237,10 +224,6 @@
         (assoc-in [:badge :image] (badge-image input))
         (assoc-in [:badge :issuer] issuer))))

-
-
-
-
 ;;;

 (defmulti assertion-map (fn [input]
@@ -297,5 +280,5 @@
     (with-meta (assertion-map asr) {:image (slurp (:tempfile upload))})))

 (defmethod baked-image :default [_]
-  (log/error "baked-image: unsupported file type" (:content-type _))
+  (log/error "unsupported badge file:" (:content-type _))
   (throw (Exception. "badge/Invalidfiletype")))


Fixed word split regex

Fixed word split regex

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


Factored out with-java-out-str, introducing with-out-str-not-threadsafe

error: pathspec 'jvm-runner/test/codewars/test/utils.clj' did not match any file(s) known to git

--- jvm-runner/test/codewars/test/utils.clj
+++ jvm-runner/test/codewars/test/utils.clj
@@ -0,0 +1,21 @@
+(ns codewars.test.utils
+  "A small collection of utilities for testing"
+  (:import [java.io PrintStream ByteArrayOutputStream StringWriter]))
+
+(defmacro with-java-out-str
+  "A version of clojure.core/with-out-str suitable for wrapping java's System.out"
+  [& body]
+  `(let [original-out# (PrintStream. (. System out))
+         byte-out# (ByteArrayOutputStream.)]
+     (-> byte-out# (PrintStream.) System/setOut)
+     ~@body
+     (System/setOut original-out#)
+     (.toString byte-out#)))
+
+(defmacro with-out-str-not-threadsafe
+  "A version of clojure.core/with-out-str that is not threadsafe"
+  [& body]
+  `(let [s# (StringWriter.)]
+     (with-redefs [*out* s#]
+       ~@body
+       (str s#))))


Introduction

Introduction

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

--- Programming_Clojure/intro.clj
+++ Programming_Clojure/intro.clj
@@ -0,0 +1,8 @@
+(def visitors (atom #{}))
+
+(defn hello
+  ;;; Takes a name and says hello.
+  ;;; Also keeps track if you've been here before.
+  [name]
+  (swap! visitors conj name)
+  (str "Hello " name))


Add version hook.

Add version hook.

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

--- src/cavm/version.clj
+++ src/cavm/version.clj
@@ -0,0 +1,5 @@
+(ns cavm.version
+   (:gen-class))
+
+(defn version []
+  (-> cavm.version .getPackage .getImplementationVersion))


ir bidali txukundu

ir bidali txukundu

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


add handlers lib

add handlers lib

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

--- src/aspire/handlers.clj
+++ src/aspire/handlers.clj
@@ -0,0 +1,34 @@
+(ns aspire.handlers
+  (:require [aspire.templates :as a-tpl]
+            [aspire.util :as a-util]))
+
+
+(defn config-key! [ctx]
+  (spit "/tmp/expectorate.txt" (str ctx))
+  "config-key!")
+
+(def config-page-keys
+  ;; List all the config keys we expect to receive from a particular
+  ;; config page.
+  {:onboarding ["greeting" "steps"]})
+
+(defn- whitelist-config-page-keys
+  "Ensure we do not process browser parameters other than those we expect from a given config page."
+  [page params]
+  (filter
+   (fn [[key val]]
+     (when (some #{key} (page config-page-keys)) true))
+   params))
+
+(defn config-page!
+  "Take in a page of configuration updates for the config table.
+   Apply the updates to the DB and return the map of results from set-config!."
+  [ctx]
+  (let [page (get-in ctx [:request :route-params :page])
+        params (get-in ctx [:request :form-params])]
+    (map (fn do-config-page! [[k v]]
+           (a-util/set-config! (str page "/" k) v))
+         (whitelist-config-page-keys (keyword page) params))))
+
+(defn admin [_]
+  (a-tpl/render (a-tpl/admin (rand-int 100) "http://google.com" "Jo Backson")))


Add some voting-method service tests

Add some voting-method service 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/democracyworks/turbovote-http-api.git/'


remove debug message

remove debug message

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


add extract-resource functions to useful.io

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

--- src/useful/io.clj
+++ src/useful/io.clj
@@ -0,0 +1,20 @@
+(ns useful.io
+  (:use [clojure.java.io :only [copy]])
+  (:import [java.net URL URLConnection JarURLConnection]
+           [java.io File FileInputStream]))
+
+(defn resource-stream [name]
+  (if-let [url (.findResource (.getClassLoader clojure.lang.RT) name)]
+    (let [conn (.openConnection url)]
+      (if (instance? JarURLConnection conn)
+        (let [jar (cast JarURLConnection conn)]
+          (.getInputStream jar))
+        (FileInputStream. (File. (.getFile url)))))))
+
+(defn extract-resource [name dest-dir]
+  (if-let [s (resource-stream name)]
+    (let [dest (File. dest-dir name)]
+      (.mkdirs (.getParentFile dest))
+      (copy s dest)
+      dest)
+    (throw (Exception. (format "unable to find %s on classpath" name)))))


Check that cached VIP data is valid

Check that cached VIP data is valid

This removes `:voter-info-timestamp` from the list of keys that indicate
valid VIP data. Without this change, we would never re-fetch VIP data,
since `:voter-info-timestamp` is present as soon as the noty is created.

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


Use an intercept instead of on-success

Use an intercept instead of on-success

If something goes wrong with our logger, on-success suppresses the
error, intercept does not.

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


correctly get group id

correctly get group id

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 "foo" example

Add "foo" example

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

--- src/examples/foo.clj
+++ src/examples/foo.clj
@@ -0,0 +1,8 @@
+(ns foo
+  (:use com.stuartsierra.lazytest))
+
+(defn foo [] true)
+
+(describe *ns* "The foo namespace"
+          (spec "has a function foo"
+                (is (foo))))


[TH] little more renaming

[TH] little more renaming

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


Code cleanup

Code cleanup


Moved cover image into proper directory when creating a book


Update and clarify in changes document.

Update and clarify in changes document.

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

--- src/re_frame/fx.cljs
+++ src/re_frame/fx.cljs
@@ -0,0 +1,112 @@
+(ns re-frame.fx
+  (:require [re-frame.router :refer [dispatch]]
+            [re-frame.db :refer [app-db]]
+            [re-frame.loggers    :refer [console]]))
+
+
+
+;; -- Registration ------------------------------------------------------------
+;;
+(def ^:private id->handler-fn  (atom {}))
+
+(defn lookup-handler
+  [event-id]
+  (get @id->handler-fn event-id))
+
+
+(defn clear-handlers!
+  "Unregister all effects handlers"
+  []
+  (reset! id->handler-fn {}))
+
+
+(defn register
+  "register a handler fn for an effect."
+  [event-id handler-fn]
+  (when (contains? @id->handler-fn event-id)
+    (console :warn "re-frame: overwriting an effects handler for: " event-id))   ;; allow it, but warn.
+  (swap! id->handler-fn assoc event-id handler-fn))
+
+
+;; -- Standard effets ---------------------------------------------------------
+
+
+(defn dispatch-helper
+  [effect]
+  (cond
+    (list? effect)   (map dispatch effect)
+    (vector? effect) (dispatch effect)
+    :else (console :error "re-frame: expected :dispatch effect to be a list or vector, but got: " effect)))
+
+;; Example:
+;; {:dispatch-later {200  [:event-id "param"]    ;;  in 200ms do this: (dispatch [:event-id "param"])
+;;                   100  [:also :this :in :100ms]
+;;                   250  (list [:do ] [:all ] [:three ])}
+;;
+(register
+  :dispatch-later
+  (fn [effect]
+    (doseq  [[ms events] effect]
+        (js/setTimeout #(dispatch-helper events) ms))))
+
+(register
+  :dispatch
+  (fn [effect]
+    (dispatch-helper effect)))
+
+
+;;
+;; {:forward-events  {:listen      :an-id-for-this-listner
+;;                    :events      #{:event1  :event2}
+;;                    :dispatch-to [:eid "eg. param"]}     ;; the forwared event will be conj to the end of the dispatch.
+;;
+;; {:forward-events  {:unlisten :the-listner-id-I-originally-supplied}}
+;;
+(register
+  :forward-events
+  (let [id->listen-fn (atom {})
+        process-entry (fn [{:keys [listen events dispatch-to unlisten]}]
+                        (if (some? unlisten)
+                          (do
+                            (unregister XXXX)
+                            (swap! id->listen-fn dissoc unlisten))))]
+
+
+    (fn [val]
+      (cond
+        (map? val) (process-entry m)
+        (list? val) (doseq []))
+      (do-dispatches (:dispatch world)))))
+
+
+(register
+  :db
+  (fn [world]
+    (if-let [db (:db world)]
+      (reset! app-db db))))
+
+;; -- Middleware --------------------------------------------------------------
+
+;; XXX a coeffect for jsDate ?
+;; XXX add metadata saying it is fx.
+;; XXX add config
+;; XXX world or branch ??  Return world?
+;; XXX ordering
+;; XXX review other standard middleware
+;; XXX write a gist for :http
+;; XXX think about an undo effect
+;;     :undo
+
+
+(defn fx
+  [handler]
+  (fn fx-handler
+    [app-db event-vec]
+    (let [world   {:db @app-db}
+          result (handler world event-vec)
+          effects (-> result (dissoc :db) keys)
+          handlers (map lookup-handler effects)
+          retult' (reduce #(%2 %1) result handlers)]
+
+      (if-let [db (:db result)]
+        (reset! app-db db)))))


add ritz

add ritz

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


First bar of Varatio 12 - Canone alla Quarta.

error: pathspec 'src/overtunes/songs/variatio-12.clj' did not match any file(s) known to git

--- src/overtunes/songs/variatio-12.clj
+++ src/overtunes/songs/variatio-12.clj
@@ -0,0 +1,33 @@
+(ns overtunes.songs.variatio-12
+  (:use
+    [overtone.live :only [at now]]
+    [overtone.inst.sampled-piano :only [sampled-piano] :rename {sampled-piano piano}]))
+
+(defn sum-n [series n] (reduce + (take n series)))
+(defn scale [intervals]
+  #(if (neg? %)
+     (- ((scale (reverse intervals)) (- %)))
+     (sum-n (cycle intervals) %)))
+
+(def major (scale [2 2 1 2 2 2 1]))
+(def g-major #(-> % major (+ 67)))
+
+(defn bpm [per-minute] #(-> % (/ per-minute) (* 60) (* 1000)))
+(defn after [timing beats] #(-> % (+ beats) timing))
+(defn syncopate [timing durations] #(->> % (sum-n durations) timing))
+(defn from [timing start] #(-> % timing (+ start)))
+
+(def pitches (flatten [-7 0 (range -1 4) (range 2 -1 -1)]))
+(def durations (flatten [1/2 (repeat 2 1/4) 1/2 (repeat 6 1/4)]))
+
+(defn melody# [timing notes]
+  (let [note# #(at (timing %1) (piano (g-major %2)))]
+    (dorun (map-indexed note# notes))))
+
+(defn play# []
+  (let [timing (-> (bpm 120) (from (now)))
+        rhythm-from #(syncopate (after timing %) durations)]
+    (melody# (rhythm-from 0)  pitches)
+    ))
+
+(play#)


Remove stray dev line

Remove stray dev line

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


Update engine dependency

Update engine dependency

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


Version 94

Version 94

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


Version 1.10.2

Version 1.10.2

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


[WM] fix AOT ClassNotFound error

[WM] fix AOT ClassNotFound error

It seems Datomic Pro wants to bring in a different version of the apache
HTTP library.


Update dependencies

Update dependencies

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


Version 0.7.4

Version 0.7.4

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


project.clj

project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,16 @@
+(defproject Watchlist "0.1.0-SNAPSHOT"
+  :description "Find and add movies to your Watchlist"
+  :dependencies [[org.clojure/clojure "1.5.1"]
+                 [ring "1.2.0"]
+                 [hiccup "1.0.3"]
+                 [enlive "1.1.1"]
+                 [compojure "1.1.5"]
+                 [org.clojure/java.jdbc "0.2.3"]
+                 [mysql/mysql-connector-java "5.1.6"]]
+  ;:dev-dependencies[[org.clojure/java.jdbc "0.2.3"] ]
+  ;:java-source-path "src/myjava"
+  :java-source-paths ["src/myjava"]
+             :aot :all
+  :ring {:handler adder.pages/app}
+  :plugins [[lein-ring "0.8.6"]])
+  :resource-path "resources/"


Button & Text Integration done

Button & Text Integration done

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


Limits the prefect count for unsubscribe messages


Stub for new test module: job-data-fetcher

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

--- test/emender_jenkins/job_data_fetcher.clj
+++ test/emender_jenkins/job_data_fetcher.clj
@@ -0,0 +1,25 @@
+;
+;  (C) Copyright 2016  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns emender-jenkins.job-data-fetcher-test
+  (:require [clojure.test :refer :all]
+            [emender-jenkins.job-data-fetcher :refer :all]))
+
+;
+; Common functions used by tests.
+;
+
+(defn callable?
+    "Test if given function-name is bound to the real function."
+    [function-name]
+    (clojure.test/function? function-name))
+


remove done task

remove done 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/fhirbase/fhirplace.git/'


You need to add display_name to the sel statment to fetch implicit fields :unamused:

--- src/metabase/driver/query_processor.clj
+++ src/metabase/driver/query_processor.clj
@@ -69,7 +69,7 @@
     (qp (if (or (not (= ag-type :rows)) breakout fields) query
             (-> query
                 (assoc-in [:query :fields-is-implicit] true)
-                (assoc-in [:query :fields] (->> (sel :many :fields [Field :name :base_type :special_type :table_id :id], :table_id source-table-id, :active true,
+                (assoc-in [:query :fields] (->> (sel :many :fields [Field :name :base_type :special_type :table_id :id :display_name], :table_id source-table-id, :active true,
                                                      :preview_display true, :field_type [not= "sensitive"], :parent_id nil, (k/order :position :asc), (k/order :id :desc))
                                                 (map expand/rename-mb-field-keys)
                                                 (map expand/map->Field)


test for geom

test for geom

error: pathspec 'test/infinitelives/utils/geom_test.cljs' did not match any file(s) known to git

--- test/infinitelives/utils/geom_test.cljs
+++ test/infinitelives/utils/geom_test.cljs
@@ -0,0 +1,169 @@
+(ns infinitelives.utils.geom2-test
+  (:require [cljs.test :refer-macros [deftest is]]
+            [infinitelives.utils.geom2 :as geom2]))
+
+(def on-root-2 (/ 1 (Math/sqrt 2)))
+(def pi-on-2 (/ Math/PI 2))
+
+(deftest create-vec2
+  (let [v2 (vec2/vec2 -1 1)]
+    (is (and
+         (= (aget v2 0) -1)
+         (= (aget v2 1) 1))))
+  (let [v3 (vec2/make)]
+    (is (and
+         (= (aget v3 0) 0)
+         (= (aget v3 1) 0))))
+  (let [v3 (vec2/zero)]
+    (is (and
+         (= (aget v3 0) 0)
+         (= (aget v3 1) 0)))))
+
+(deftest magnitude
+  (let [v (vec2/vec2 on-root-2 on-root-2)]
+    (is (< 0.9999999 (vec2/magnitude v) 1.0000001))
+    (is (< 0.9999999 (vec2/magnitude v) 1.0000001)))
+  (let [v (vec2/vec2 10 -10)]
+    (is (= (Math/sqrt 200) (vec2/magnitude v)))
+    (is (= 200 (vec2/magnitude-squared v)))))
+
+(deftest distance
+  (let [v0 (vec2/vec2 20 10)
+        v1 (vec2/vec2 -20 10)]
+    (is (= 40 (vec2/distance v0 v1)))
+    (is (= 1600 (vec2/distance-squared v0 v1)))))
+
+(deftest equals
+  (is (vec2/equals
+       (vec2/vec2 100 -200)
+       (vec2/vec2 100 -200))))
+
+(deftest almost
+  (binding [vec2/*almost-delta* 1e-5]
+    (is (vec2/almost
+         (vec2/vec2 20 20)
+         (vec2/vec2 20 20)))
+    (is (vec2/almost
+         (vec2/vec2 0 0)
+         (vec2/vec2 1e-6 1e-6)))
+    (is (not (vec2/almost
+              (vec2/vec2 0 0)
+              (vec2/vec2 0 0)
+              (vec2/vec2 0 0)
+              (vec2/vec2 0 0)
+              (vec2/vec2 0 0)
+              (vec2/vec2 0 0)
+              (vec2/vec2 0 0.0001))))))
+
+(deftest add
+  (is (vec2/equals
+       (vec2/vec2 1 1)
+       (vec2/add
+        (vec2/vec2 -1 -2) (vec2/vec2 2 3)))))
+
+(deftest sub
+  (is (vec2/equals
+       (vec2/vec2 1 1)
+       (vec2/sub (vec2/vec2 20 -10) (vec2/vec2 19 -11)))))
+
+(deftest dot
+  (is (= (vec2/dot
+          (vec2/vec2 10 20)
+          (vec2/vec2 5 2))
+         90)))
+
+(deftest scale
+  (is (vec2/equals (vec2/scale (vec2/vec2 1 -1) 5)
+                  (vec2/vec2 5 -5))))
+
+(deftest scale-div
+  (is (vec2/equals (vec2/scale-div (vec2/vec2 5 -5) 5)
+                  (vec2/vec2 1 -1))))
+
+(deftest unit
+  (is (vec2/equals
+       (vec2/unit (vec2/vec2 10 -10))
+       (vec2/vec2 on-root-2 (- on-root-2)))))
+
+(deftest abs
+  (is (vec2/equals
+       (vec2/abs (vec2/vec2 -2 -5))
+       (vec2/vec2 2 5))))
+
+(deftest direction
+  (is (vec2/equals
+       (vec2/direction (vec2/vec2 10 5) (vec2/vec2 10 -5))
+       (vec2/vec2 0 -1))))
+
+(deftest rotate
+  (is (vec2/almost
+       (vec2/rotate (vec2/vec2 1 0) pi-on-2)
+       (vec2/vec2 0 1)))
+  (is (vec2/almost
+       (vec2/rotate (vec2/vec2 20 20) Math/PI)
+       (vec2/vec2 -20 -20)))
+  (is (vec2/almost
+       (vec2/rotate (vec2/vec2 10 10) (- pi-on-2))
+       (vec2/rotate (vec2/vec2 10 10) (* 3 pi-on-2))
+       (vec2/vec2 10 -10))))
+
+(deftest random-unit
+  (loop [tests 20]
+    (let [v1 (vec2/random-unit)
+          v2 (vec2/random-unit)]
+      (is (<= 0.9999999 (vec2/magnitude v1) 1))
+      (is (<= 0.9999999 (vec2/magnitude v2) 1))
+      (is (not (vec2/almost v1 v2)))
+      (when (pos? tests)
+        (recur (dec tests))))))
+
+(deftest random
+  (loop [tests 20]
+    (let [v1 (vec2/random)
+          v2 (vec2/random)]
+      (is (<= (vec2/magnitude v1) 1))
+      (is (<= (vec2/magnitude v2) 1))
+      (is (not (vec2/almost v1 v2)))
+      (when (pos? tests)
+        (recur (dec tests))))))
+
+(deftest lerp
+  (let [v0 (vec2/vec2 -10 -10)
+        v1 (vec2/vec2 10 10)]
+    (is (vec2/equals
+         (vec2/lerp v0 v1 0)
+         v0))
+    (is (vec2/equals
+         (vec2/lerp v0 v1 1)
+         v1))
+    (is (vec2/equals
+         (vec2/lerp v0 v1 0.5)
+         (vec2/zero)))
+    (is (vec2/equals
+         (vec2/lerp v0 v1 0.25)
+         (vec2/vec2 -5 -5)))
+    (is (vec2/equals
+         (vec2/lerp v0 v1 0.75)
+         (vec2/vec2 5 5)))
+    (is (vec2/equals
+         (vec2/lerp v0 v1 2)
+         (vec2/vec2 30 30)))
+    (is (vec2/equals
+         (vec2/lerp v0 v1 -1)
+         (vec2/vec2 -30 -30)))))
+
+(deftest heading
+  (is (= 0 (vec2/heading (vec2/vec2 1 0))))
+  (is (= pi-on-2 (vec2/heading (vec2/vec2 0 1))))
+  (is (= Math/PI (vec2/heading (vec2/vec2 -1 0))))
+  (is (= (* 3 pi-on-2) (vec2/heading (vec2/vec2 0 -1))))
+  (is (= (/ Math/PI 4) (vec2/heading (vec2/vec2 1 1))))
+  (is (= (* 3 (/ Math/PI 4)) (vec2/heading (vec2/vec2 -1 1))))
+  (is (= (* 5 (/ Math/PI 4)) (vec2/heading (vec2/vec2 -1 -1))))
+  (is (= (* 7 (/ Math/PI 4)) (vec2/heading (vec2/vec2 1 -1)))))
+
+(deftest angle-between
+  (is (= 0 (vec2/angle-between (vec2/vec2 1 0) (vec2/vec2 1 0))))
+  (is (= (/ Math/PI 2) (vec2/angle-between (vec2/vec2 1 0) (vec2/vec2 0 1))))
+  (is (= (/ Math/PI 2) (vec2/angle-between (vec2/vec2 -1 0) (vec2/vec2 0 1))))
+  (is (= Math/PI (vec2/angle-between (vec2/vec2 1 0) (vec2/vec2 -1 0)))))


Unify consumer and publisher connection error handling

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


fix indentation

fix indentation


Add X-Frame-Options DENY in middleware.

Add X-Frame-Options DENY in middleware.

--- src/clojars/web.clj
+++ src/clojars/web.clj
@@ -65,6 +65,9 @@
                (when (not (empty? password))
                  {:username user :password password})))))

+(defn wrap-x-frame-options [f]
+  (fn [req] (update-in (f req) [:headers] assoc "X-Frame-Options" "DENY")))
+
 (defroutes clojars-app
   (context "/repo" _
            (-> repo/routes
@@ -81,7 +84,8 @@
         :workflows [(workflows/interactive-form)
                     registration/workflow]})
       (wrap-anti-forgery)
+      (wrap-x-frame-options)
       (wrap-exceptions)
       (site)
       (wrap-resource "public")
-      (wrap-file-info)))+      (wrap-file-info)))


Generic state-abstracted-search in progress.

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

--- src/exp/sahdd.clj
+++ src/exp/sahdd.clj
@@ -0,0 +1,192 @@
+(ns exp.sahdd
+  (:require [edu.berkeley.ai.util :as util]
+            [edu.berkeley.ai.util.queues :as queues]
+            [exp.env :as env]
+            [exp.hierarchy :as hierarchy])
+  (:import  [java.util HashMap]))
+
+; Here, there is no real Seq character.  No real choices.
+; Note: hard (impossible?) to unify down and up.
+; Best: at least have common interface, shared parts, to simplify.
+
+;; Also pass in antagonistic measure ?
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Queues ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(defn make-queue [initial-elements]
+  (let [q (queues/make-graph-search-pq)]
+    (queues/g-pq-add! q :dummy Double/POSITIVE_INFINITY)
+    (queues/pq-add-all! q initial-elements)
+    q))
+
+(defn empty-queue [queue]
+  (queues/pq-remove-all! queue)
+  (queues/g-pq-replace! queue :dummy Double/POSITIVE_INFINITY))
+
+(defn queue-best-reward [queue]
+  (- (nth (queues/g-pq-peek-min queue) 1)))
+
+(defn queue-best-and-next-reward [queue]
+  (let [[best bc] (queues/pq-remove-min-with-cost! queue)
+        next-reward (queue-best-reward queue)]
+    (queues/pq-replace! queue best bc)
+    [best next-reward]))
+
+(defn queue-cutoff? [queue reward-threshold]
+  (let [cutoff (double (queue-best-reward queue))]
+    (or (= cutoff Double/NEGATIVE_INFINITY) (< cutoff reward-threshold))))
+
+(defn refine-open [child-queue goal-atom goal-fn expand-fn reward-fn single-goal? reward-threshold]
+  (when-not (queue-cutoff? child-queue reward-threshold)
+    (let [[best next-best-reward] (queue-best-and-next-reward child-queue)]
+      (if-let [g (goal-fn best)]
+            (do (when single-goal? (empty-queue child-queue))
+                (queues/pq-remove! child-queue best) ;; TODO: Is this always right?
+                (assert (not (contains? @goal-atom g)))
+                (swap! goal-atom assoc g (reward-fn best)))
+          (do (queues/pq-add-all! child-queue
+                                  (for [x (expand-fn best (max next-best-reward reward-threshold))]
+                                    [x (- (reward-fn x))]))
+              (let [r (reward-fn best)]
+                (if (= r Double/NEGATIVE_INFINITY)
+                    (queues/pq-remove! child-queue best)
+                  (queues/pq-replace! child-queue best (- r))))))
+      (recur child-queue goal-atom goal-fn expand-fn reward-fn single-goal? reward-threshold))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Outcome maps ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn stitch-outcome-map [outcome-map state reward-to-state]
+  (util/map-map1
+   (fn [[outcome-state local-reward]]
+     [(vary-meta (env/apply-effects state (env/extract-effects outcome-state)) assoc
+                 :opt (concat (:opt (meta state)) (:opt (meta outcome-state))))
+      (+ reward-to-state local-reward)])
+   outcome-map))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Subproblems ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+(defprotocol Subproblem
+  (sub-reward-threshold [sp last-threshold])
+  (sub-refine           [sp last-threshold new-threshold]))
+
+(declare se-goal se-reward-threshold se-refine)
+
+(defn pretty-state [s]
+  (dissoc (env/as-map (or s {})) :const))
+
+(deftype OpenSubproblem [name child-queue result-atom single-goal?] :as this
+  Subproblem
+  (sub-reward-threshold [last-threshold]
+    (let [queue-reward (queue-best-reward child-queue)]
+      (if (>= last-threshold queue-reward) queue-reward
+          (apply max queue-reward (filter #(< % last-threshold) (vals @result-atom))))))
+  (sub-refine           [last-threshold new-threshold]
+    (println "\nRefining " (second  name) (first name) "\n" (util/map-keys pretty-state @result-atom)  "\n"(map #(cons (pretty-state (:initial-state (first %))) (next %)) (queues/pq-peek-pairs child-queue)))
+;    (println "\nRefining " (second  name) (first name) "\n" (util/map-keys identity @result-atom)  "\n"(map #(cons (identity (first %)) (next %)) (queues/pq-peek-pairs child-queue)))
+    (refine-open child-queue result-atom se-goal se-refine se-reward-threshold single-goal? new-threshold)
+    (println "\nDONE Refining " (second  name) (first name) "\n" (util/map-keys pretty-state @result-atom)  "\n" (map #(cons (pretty-state (:initial-state (first %))) (next %)) (queues/pq-peek-pairs child-queue)))
+    (util/filter-map #(and (<= new-threshold (val %)) (< (val %) last-threshold)) @result-atom)))
+
+(declare make-subproblem-entry)
+
+(defn make-open-subproblem [name state action single-goal?]
+  (if (env/primitive? action)
+    (OpenSubproblem name
+     (make-queue nil)
+     (atom (if-let [[ss r] (and (env/applicable? action state) (env/successor action state))] {ss r} {}))
+     single-goal?)
+    (OpenSubproblem name
+     (make-queue (for [ref (hierarchy/immediate-refinements action state)]
+                   [(make-subproblem-entry state 0.0 ref) 0.0]))
+     (atom {})
+     single-goal?)))
+
+
+(def #^HashMap *subproblem-cache*)
+
+(defmacro get-subproblem-instance [name & body]
+  `(let [name# ~name
+         inst# (find *subproblem-cache* name#)]
+     (if inst# (nth inst# 1)
+       (let [x# (do ~@body)]
+         (.put *subproblem-cache* name# x#)
+         x#))))
+
+(defn create-open-subproblem [state action]
+  (let [context   (env/precondition-context action state)
+        name     [(env/extract-context state context) (env/action-name action)]]
+    (get-subproblem-instance name (make-open-subproblem name (env/get-logger state context) action false))))
+
+; SAS, SAAS, SASAS
+;(defmulti create-subproblem (fn [state action ...])) ?
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Subproblem Entries ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defprotocol SubproblemEntry
+  (se-goal             [se])
+  (se-reward-threshold [se])
+  (se-refine           [se new-threshold]))
+
+(deftype SubproblemSolutionEntry [initial-state reward]
+  Object
+  (equals [y] (= initial-state (:initial-state y)))
+  (hashCode [] (hash initial-state))
+  SubproblemEntry
+  (se-goal             [] initial-state)
+  (se-reward-threshold [] reward)
+  (se-refine           [new-threshold] (throw (RuntimeException. "Not refinable"))))
+
+
+
+(deftype SubproblemPartialEntry [hash-code last-cutoff-atom initial-state reward child-subproblem remaining-actions] :as this
+  Object
+  (equals [y] (or (identical? this y)
+                  (and (identical? child-subproblem (:child-subproblem y))
+                       (= remaining-actions (:remaining-actions y)))))
+  (hashCode [] hash-code)
+  SubproblemEntry
+  (se-goal     [] nil)
+  (se-reward-threshold [] @last-cutoff-atom #_(+ reward (sub-reward-threshold child-subproblem @last-cutoff-atom)))
+  (se-refine           [reward-cutoff]
+    (let [results     (sub-refine child-subproblem @last-cutoff-atom (- reward-cutoff reward))]
+      (reset! last-cutoff-atom (- reward-cutoff reward))
+      (println "got " results " new cutoff " (se-reward-threshold this))
+      (for [[s r] (stitch-outcome-map results initial-state reward)]
+        (make-subproblem-entry s r remaining-actions)))))
+
+(defn make-subproblem-entry [initial-state reward remaining-actions]
+  (if (empty? remaining-actions)
+      (println "DONE"  initial-state reward)
+    (println "PARTIAL" initial-state reward (map env/action-name remaining-actions))
+      )
+  (if-let [[f & r] (seq remaining-actions)]
+    (let [sp (create-open-subproblem initial-state f)]
+      (SubproblemPartialEntry
+       (unchecked-add (int (System/identityHashCode sp))
+                      (unchecked-multiply (int 13) (int (hash r))))
+       (atom Double/POSITIVE_INFINITY) initial-state reward sp r))
+    (SubproblemSolutionEntry initial-state reward)))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Drivers  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn sahucs-simple [henv]
+  (let [e     (hierarchy/env henv)
+        init  (env/initial-logging-state e)]
+    (binding [*subproblem-cache* (HashMap.)]
+      (when-first [p (sub-refine (make-open-subproblem [:init] init
+                                   (hierarchy/TopLevelAction e [(hierarchy/initial-plan henv)]) true)
+                                 Double/POSITIVE_INFINITY Double/NEGATIVE_INFINITY)]
+        (second p)))))
+
+;; For SAHA, nothing is open.
+;  Or strcture is same.
+ ; Goal is: ?
+ ; Can we look at clause-based algs as in-between SAHA and SAHUCS ?


added clojure solution

added clojure solution

error: pathspec 'solutions/day07/solution.clj' did not match any file(s) known to git

--- solutions/day07/solution.clj
+++ solutions/day07/solution.clj
@@ -0,0 +1,58 @@
+(require '[clojure.string :as str])
+
+(def cmd->fn {"OR" #(bit-or %1 %2)
+              "AND" #(bit-and %1 %2)
+              "RSHIFT" #(bit-shift-right %1 %2)
+              "LSHIFT" #(bit-shift-left %1 %2)
+              "NOT" #(bit-not %)
+              "SET" #(identity %)})
+
+(defn parse-input
+  [x]
+  (fn [circuit]
+    (if (re-find #"^[0-9]+$" x)
+      (read-string x)
+      (circuit x))))
+
+(defn instruction->switch
+  [instruction]
+  (let [[input target] (str/split instruction #" -> ")
+        parts (str/split input #" ")
+        commands (set (keys cmd->fn))
+        cmd (or (first (filter commands parts)) "SET")
+        func (cmd->fn cmd)
+        operands (map parse-input (remove commands parts))]
+    {:instruction instruction
+     :fn func
+     :operands operands
+     :target target
+     :inputs (fn [circuit] (map #(% circuit) operands))}))
+
+(def switches (->> (slurp "input.txt")
+                   (str/split-lines)
+                   (map instruction->switch)))
+
+(defn switches->circuit
+  ([switches] (switches->circuit switches {}))
+  ([switches init-circuit]
+    (loop [[switch & more] switches
+           circuit init-circuit]
+      (if switch
+        (if (circuit (:target switch))
+          (recur more circuit)
+          (let [inputs ((:inputs switch) circuit)]
+            (if (every? (complement nil?) inputs)
+              (recur more (assoc circuit (:target switch) (apply (:fn switch) inputs)))
+              (recur (conj (vec more) switch) circuit))))
+        circuit))))
+
+(defn part1
+  [switches]
+  ((switches->circuit switches) "a"))
+
+(defn part2
+  [switches init-circuit]
+  ((switches->circuit switches init-circuit) "a"))
+
+(println "part 1:" (part1 switches))
+(println "part 2:" (part2 switches {"b" (part1 switches)}))


extend notifications to optionally take description and duration


Update example deps

Update example deps

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


sorting added

sorting added

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


bump reactor dep

bump reactor dep


Bumping versions of karma, various karma launchers and phantomjs; Fixing :phantom path for doo

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


added vec of standard NAOqi events

added vec of standard NAOqi events

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

--- src/main/clojure/naojure/events.clj
+++ src/main/clojure/naojure/events.clj
@@ -0,0 +1,166 @@
+(ns naojure.events)
+
+(def standard-events
+  ["ALAnimatedSpeech/EndOfAnimatedSpeech"
+   "ALAudioSourceLocalization/SoundLocated"
+   "ALBasicAwareness/HumanLost"
+   "ALBasicAwareness/HumanTracked"
+   "ALBasicAwareness/StimulusDetected"
+   "ALBehaviorManager/BehaviorAdded"
+   "ALBehaviorManager/BehaviorRemoved"
+   "ALBehaviorManager/BehaviorUpdated"
+   "ALBehaviorManager/BehaviorsAdded"
+   "ALChestButton/DoubleClickOccurred"
+   "ALChestButton/SimpleClickOccurred"
+   "ALChestButton/TripleClickOccurred"
+   "ALMemory/KeyAdded"
+   "ALMemory/KeyRemoved"
+   "ALMemory/KeyTypeChanged"
+   "ALMotion/Safety/ChainVelocityClipped"
+   "ALMotion/Safety/MoveFailed"
+   "ALMotion/Stiffness/restFinished"
+   "ALMotion/Stiffness/restStarted"
+   "ALMotion/Stiffness/wakeUpFinished"
+   "ALMotion/Stiffness/wakeUpStarted"
+   "ALPanoramaCompass/PanoramaConfidence"
+   "ALPanoramaCompass/Setup/Complete"
+   "ALPanoramaCompass/Setup/Diagnosis"
+   "ALSoundLocalization/SoundLocated"
+   "ALSpeechRecognition/IsRunning"
+   "ALSpeechRecognition/Status"
+   "ALStore/SystemImageDownloaded"
+   "ALStore/Updated"
+   "ALSystem/RobotNameChanged"
+   "ALTextToSpeech/CurrentBookMark"
+   "ALTextToSpeech/CurrentSentence"
+   "ALTextToSpeech/CurrentWord"
+   "ALTextToSpeech/PositionOfCurrentWord"
+   "ALTextToSpeech/Status"
+   "ALTextToSpeech/TextDone"
+   "ALTextToSpeech/TextStarted"
+   "ALTracker/BlobDetected"
+   "ALTracker/CloseObjectDetected"
+   "ALTracker/ColorBlobDetected"
+   "ActiveDiagnosisErrorChanged"
+   "AutonomousLife/CompletedActivity"
+   "AutonomousLife/FocusedActivity"
+   "AutonomousLife/LaunchSuggestions"
+   "AutonomousLife/NeedPreload"
+   "AutonomousLife/NextActivity"
+   "AutonomousLife/State"
+   "BacklightingDetection/BacklightingDetected"
+   "BarcodeReader/BarcodeDetected"
+   "BatteryChargeCellVoltageMinChanged"
+   "BatteryChargeChanged"
+   "BatteryChargingFlagChanged"
+   "BatteryDisChargingFlagChanged"
+   "BatteryEmpty"
+   "BatteryFullChargedFlagChanged"
+   "BatteryLowDetected"
+   "BatteryNearlyEmpty"
+   "BatteryNotDetected"
+   "BatteryPowerPluggedChanged"
+   "BehaviorsRun"
+   "BodyStiffnessChanged"
+   "ChestButtonPressed"
+   "ClientConnected"
+   "ClientDisconnected"
+   "CloseObjectDetection/ObjectDetected"
+   "CloseObjectDetection/ObjectNotDetected"
+   "DarknessDetection/DarknessDetected"
+   "DeviceNoLongerHotDetected"
+   "Dialog/Answered"
+   "Dialog/IsStarted"
+   "Dialog/LastInput"
+   "Dialog/NotSpeaking10"
+   "Dialog/NotSpeaking15"
+   "Dialog/NotSpeaking20"
+   "Dialog/NotSpeaking5"
+   "Dialog/NotUnderstood"
+   "Dialog/SpeakLouder"
+   "EngagementZones/MovementsInZonesUpdated"
+   "EngagementZones/PeopleInZonesUpdated"
+   "EngagementZones/PersonApproached"
+   "EngagementZones/PersonEnteredZone1"
+   "EngagementZones/PersonEnteredZone2"
+   "EngagementZones/PersonEnteredZone3"
+   "EngagementZones/PersonMovedAway"
+   "FaceDetected"
+   "FrontTactilTouched"
+   "footContactChanged"
+   "GazeAnalysis/PeopleLookingAtRobot"
+   "GazeAnalysis/PersonStartsLookingAtRobot"
+   "GazeAnalysis/PersonStopsLookingAtRobot"
+   "HandLeftBackTouched"
+   "HandLeftLeftTouched"
+   "HandLeftRightTouched"
+   "HandRightBackTouched"
+   "HandRightLeftTouched"
+   "HandRightRightTouched"
+   "HotDeviceDetected"
+   "HotJointDetected"
+   "LandmarkDetected"
+   "LastWordRecognized"
+   "LeftBumperPressed"
+   "MiddleTactilTouched"
+   "MovementDetection/MovementDetected"
+   "MovementDetection/NoMovement"
+   "NAOqiReady"
+   "Navigation/SafeNavigator/AlreadyAtTarget"
+   "Navigation/SafeNavigator/BlockingObstacle"
+   "Navigation/SafeNavigator/DangerousObstacleDetected"
+   "Navigation/SafeNavigator/Status"
+   "NetworkDefaultTechnologyChanged"
+   "NetworkServiceAdded"
+   "NetworkServiceInputRequired"
+   "NetworkServiceRemoved"
+   "NetworkServiceStateChanged"
+   "NetworkStateChanged"
+   "NetworkTechnologyAdded"
+   "NetworkTechnologyRemoved"
+   "notificationAdded"
+   "notificationRemoved"
+   "PassiveDiagnosisErrorChanged"
+   "PeoplePerception/JustArrived"
+   "PeoplePerception/JustLeft"
+   "PeoplePerception/PeopleDetected"
+   "PeoplePerception/PopulationUpdated"
+   "PictureDetected"
+   "PostureChanged"
+   "PostureFamilyChanged"
+   "preferenceAdded"
+   "preferenceChanged"
+   "preferenceDomainRemoved"
+   "preferenceRemoved"
+   "preferenceSynchronized"
+   "RearTactilTouched"
+   "RightBumperPressed"
+   "redBallDetected"
+   "robotHasFallen"
+   "robotIsWakeUp"
+   "robotPoseChanged"
+   "Segmentation3D/BlobTrackerUpdated"
+   "Segmentation3D/SegmentationUpdated"
+   "Segmentation3D/TrackedBlobNotFound"
+   "SittingPeopleDetection/PersonSittingDown"
+   "SittingPeopleDetection/PersonStandingUp"
+   "SonarLeftDetected"
+   "SonarLeftNothingDetected"
+   "SonarRightDetected"
+   "SonarRightNothingDetected"
+   "SoundDetected"
+   "SpeechDetected"
+   "TemperatureDiagnosisErrorChanged"
+   "TouchChanged"
+   "VisualCompass/Deviation"
+   "VisualCompass/FinalDeviation"
+   "VisualCompass/InvalidReference"
+   "VisualCompass/Match"
+   "VisualCompass/MoveAbort"
+   "VisualCompass/NewReferenceImageSet"
+   "WavingDetection/PersonWaving"
+   "WavingDetection/PersonWavingCenter"
+   "WavingDetection/PersonWavingLeft"
+   "WavingDetection/PersonWavingRight"
+   "WordRecognized"
+   "WordRecognizedAndGrammar"])


Implement initial simplistic engine test

error: pathspec 'test/io/cyanite/engine_test.clj' did not match any file(s) known to git

--- test/io/cyanite/engine_test.clj
+++ test/io/cyanite/engine_test.clj
@@ -0,0 +1,27 @@
+(ns io.cyanite.engine-test
+  (:require [io.cyanite.engine          :as e]
+            [com.stuartsierra.component :as component]
+            [clojure.test               :refer :all]
+            [io.cyanite.test-helper     :refer :all]))
+
+
+(deftest engine-test
+  (with-config
+    {:engine (component/using (e/map->Engine {:rules {"default" ["5s:1h"]}}) [:drift
+                                                                              :queues
+                                                                              :writer])}
+    (let [engine    (:engine *system*)
+          clock     (:clock *system*)
+          writer    (:writer *system*)
+          base-time 1454877020]
+      (doseq [i (range 0 6)]
+        (set-time! clock (* (+ base-time i) 1000))
+        (e/accept! engine {:path "a.b.c" :metric i :time (+ base-time i)}))
+
+      (let [[res] @writer]
+        (is (= "a.b.c" (:path res)))
+        (is (= 2.0 (:mean res)))
+        (is (= 10 (:sum res)))
+        (is (= 4 (:max res)))
+        (is (= 0 (:min res)))
+        (is (= base-time (:time res)))))))


fix very rare test failure

fix very rare test failure

--- src/metabase/driver/mongo/util.clj
+++ src/metabase/driver/mongo/util.clj
@@ -12,9 +12,9 @@
    forever, especially when called with bad details. This translates to our tests
    taking longer and the DB setup API endpoints seeming sluggish.

-   Don't set the timeout too low -- I've have Circle fail when the timeout was 250ms
-   on one occasion."
-  1000)
+   Don't set the timeout too low -- I've have Circle fail when the timeout was 1000ms
+   on *one* occasion."
+  1500)

 (defn- details-map->connection-string
   [{:keys [user pass host port dbname]}]


4Clojure (~50)

4Clojure (~50)

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


add Mike and Tanene

add Mike and Tanene

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


Added Esha to TurboVote signers

Added Esha to TurboVote signers


Update task.clj

Update task.clj

--- storm-core/src/clj/backtype/storm/daemon/task.clj
+++ storm-core/src/clj/backtype/storm/daemon/task.clj
@@ -18,7 +18,7 @@
   (:use [backtype.storm bootstrap])
   (:import [backtype.storm.hooks ITaskHook])
   (:import [backtype.storm.tuple Tuple])
-  (:import [backtype.storm.generated SpoutSpec Bolt StateSpoutSpec])
+  (:import [backtype.storm.generated SpoutSpec Bolt StateSpoutSpec StormTopology])
   (:import [backtype.storm.hooks.info SpoutAckInfo SpoutFailInfo
             EmitInfo BoltFailInfo BoltAckInfo])
   (:require [backtype.storm [tuple :as tuple]])


use nodejs externs to be able to use advanced optimizations

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


Whoops

Whoops

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


basic build.boot for test

basic build.boot for test

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

--- build.boot
+++ build.boot
@@ -0,0 +1,30 @@
+;; use lein to parse the project.clj for the deps
+;; since lein-modules merges from the hierarchy
+(require '[boot.pod :as pod])
+
+(def lein-pod (pod/make-pod
+               (update-in (get-env) [:dependencies]
+                          conj '[leiningen "2.7.1"])))
+
+(def lein-proj (pod/with-eval-in lein-pod
+                 (require '[leiningen.core.project :as p])
+                 (p/read)))
+
+(def deps (:dependencies lein-proj))
+
+(set-env!
+ :wagons       '[[s3-wagon-private "1.2.0"]]
+
+ :repositories #(concat % [["releases" {:url "s3p://yapster-s3-wagon/releases/"
+                                        :username [:env/aws_access_key :gpg]
+                                        :passphrase [:env/aws_secret_key :gpg]}]
+                           ["snapshots" {:url "s3p://yapster-s3-wagon/snapshots/"
+                                         :username [:env/aws_access_key :gpg]
+                                         :passphrase [:env/aws_secret_key :gpg]}]])
+
+ :dependencies deps
+
+ :source-paths #{"src" "test"})
+
+(require
+ '[adzerk.boot-test :refer :all])


Stub for the dictionary + function to find word(s) in it (not optimized)

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

--- src/clj_mrazik/dictionary.clj
+++ src/clj_mrazik/dictionary.clj
@@ -0,0 +1,14 @@
+(ns clj-mrazik.dictionary)
+
+(def terms [
+["1", "abend", "For details, see Wiktionary", "verb", "", "", "", "", "no", "yes", "no", "The Wiktionary"]
+["2", "abend", "For details, see Wiktionary", "noun", "", "", "", "", "no", "yes", "no", "The Wiktionary"]
+["3", "abend", "For details, see Wiktionary", "adjective", "", "", "", "", "no", "yes", "no", "The Wiktionary"]
+])
+
+(defn find-word
+    [terms word]
+    (let [words (filter #(= (second %) word) terms)]
+        (for [w words]
+            (str "class: " (nth w 3) "   source: " (nth w 11) "    description: " (nth w 2)))))
+


more Happy Numbers

more Happy Numbers

Clojure

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


Add vote tomorrow notification functionality

Same functionality as upcoming-elections:
Verify vote tomorrow notifications, log out to .edn files any missing notifications

Also abstracted away some hardcoded values but there is a fair amount of duplication that doesn’t make me super happy…


revise BrowserStack prize info

revise BrowserStack prize 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/clojurecup/cc2014-frontend.git/'


incorporate late fee, add application fee

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 new file

Added a new file

error: pathspec 'src/clojush/problems/software/digits_c.clj' did not match any file(s) known to git

--- src/clojush/problems/software/digits_c.clj
+++ src/clojush/problems/software/digits_c.clj
@@ -0,0 +1,166 @@
+;; digits.clj
+;; Tom Helmuth, thelmuth@cs.umass.edu
+;;
+;; Problem Source:
+;;   C. Le Goues et al., "The ManyBugs and IntroClass Benchmarks for Automated Repair of C Programs,"
+;;   in IEEE Transactions on Software Engineering, vol. 41, no. 12, pp. 1236-1256, Dec. 1 2015.
+;;   doi: 10.1109/TSE.2015.2454513
+;;
+;; Given an integer |x| < 10,000,000,000, print that integer's digits each on
+;; their own line starting with the least significant digit. A negative integer
+;; should have the negative sign printed before the most significant digit.
+;;
+;; input stack has input integer
+
+(ns clojush.problems.software.digits-c
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random util globals]
+        clojush.instructions.tag
+        [clojure.math numeric-tower]
+        ))
+
+; Atom generators
+(def digits-atom-generators
+  (concat (list
+            \newline
+            ;;; end constants
+            (fn [] (- (lrand-int 21) 10))
+            ;;; end ERCs
+            (tag-instruction-erc [:integer :boolean :string :char :exec] 1000)
+            (tagged-instruction-erc 1000)
+            ;;; end tag ERCs
+            'in1
+            ;;; end input instructions
+            )
+          (registered-for-stacks [:integer :boolean :string :char :exec :print])))
+
+(defn my-rand-long
+  "replaces rand-int when need longs"
+  [end]
+  (long (* (lrand) end)))
+
+;; A list of data domains for the problem. Each domain is a vector containing
+;; a "set" of inputs and two integers representing how many cases from the set
+;; should be used as training and testing cases respectively. Each "set" of
+;; inputs is either a list or a function that, when called, will create a
+;; random element of the set.
+(def digits-data-domains
+  [[(list -9495969798 -20008000 -777777 -9876 -482 -97 -20 0 19 620 24068 512000 8313227 30000000 9998887776) 15 0] ;; Edge cases by hand
+   [(fn []
+      (let [digs (inc (lrand-int 10))
+            start (expt 10 (dec digs))
+            end (expt 10 digs)]
+        ((if (< (lrand) 0.5) - +)
+          (+ (my-rand-long (- end start)) start)))) 85 1000] ;; Random cases such that each number of digits between 1 and 10 will be represented evenly, as will negatives and positives
+   ])
+
+;;Can make Digits test data like this:
+;(test-and-train-data-from-domains digits-data-domains)
+
+; Helper function for error function
+(defn digits-test-cases
+  "Takes a sequence of inputs and gives IO test cases of the form
+   [input output]."
+  [inputs]
+  (map (fn [in] (vector in
+                        (apply str ((if (< in 0) #(concat (butlast %) [\- (last %)]) identity)
+                                     (interpose \newline (reverse (str (abs in))))))))
+       inputs))
+
+(defn make-digits-error-function-from-cases
+  [train-cases test-cases]
+  (fn the-actual-digits-error-function
+    ([individual]
+      (the-actual-digits-error-function individual :train))
+    ([individual data-cases] ;; data-cases should be :train or :test
+     (the-actual-digits-error-function individual data-cases false))
+    ([individual data-cases print-outputs]
+      (let [behavior (atom '())
+            state-with-tags (tagspace-initialization (str (:program individual)) 1000 (make-push-state))
+            errors (doall
+                     (for [[input1 correct-output] (case data-cases
+                                                     :train train-cases
+                                                     :test test-cases
+                                                     [])]
+                       (let [final-state (run-push (:program individual)
+                                                   (->> (push-item input1 :input state-with-tags)
+                                                     (push-item "" :output)))
+                             result (stack-ref :output 0 final-state)]
+                         (when print-outputs
+                           (println (format "| Correct output: %s\n| Program output: %s\n" (pr-str correct-output) (pr-str result))))
+                         ; Record the behavior
+                         (swap! behavior conj result)
+                         ; Error is Levenshtein distance of printed strings
+                         (levenshtein-distance correct-output result))))]
+        (if (= data-cases :train)
+          (assoc individual :behaviors @behavior :errors errors)
+          (assoc individual :test-errors errors))))))
+
+(defn get-digits-train-and-test
+  "Returns the train and test cases."
+  [data-domains]
+  (map sort (map digits-test-cases
+                 (test-and-train-data-from-domains data-domains))))
+
+; Define train and test cases
+(def digits-train-and-test-cases
+  (get-digits-train-and-test digits-data-domains))
+
+(defn digits-initial-report
+  [argmap]
+  (println "Train and test cases:")
+  (doseq [[i case] (map vector (range) (first digits-train-and-test-cases))]
+    (println (format "Train Case: %3d | Input/Output: %s" i (str case))))
+  (doseq [[i case] (map vector (range) (second digits-train-and-test-cases))]
+    (println (format "Test Case: %3d | Input/Output: %s" i (str case))))
+  (println ";;******************************"))
+
+(defn digits-report
+  "Custom generational report."
+  [best population generation error-function report-simplifications]
+  (let [best-test-errors (:test-errors (error-function best :test))
+        best-total-test-error (apply +' best-test-errors)]
+    (println ";;******************************")
+    (printf ";; -*- Digits problem report - generation %s\n" generation)(flush)
+    (println "Test total error for best:" best-total-test-error)
+    (println (format "Test mean error for best: %.5f" (double (/ best-total-test-error (count best-test-errors)))))
+    (when (zero? (:total-error best))
+      (doseq [[i error] (map vector
+                             (range)
+                             best-test-errors)]
+        (println (format "Test Case  %3d | Error: %s" i (str error)))))
+    (println ";;------------------------------")
+    (println "Outputs of best individual on training cases:")
+    (error-function best :train true)
+    (println ";;******************************")
+    )) ;; To do validation, could have this function return an altered best individual
+       ;; with total-error > 0 if it had error of zero on train but not on validation
+       ;; set. Would need a third category of data cases, or a defined split of training cases.
+
+
+; Define the argmap
+(def argmap
+  {:error-function (make-digits-error-function-from-cases (first digits-train-and-test-cases)
+                                                          (second digits-train-and-test-cases))
+   :atom-generators digits-atom-generators
+   :max-points 1200
+   :max-genome-size-in-initial-program 150
+   :evalpush-limit 600
+   :population-size 1000
+   :max-generations 300
+   :parent-selection :lexicase
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    }
+   :alternation-rate 0.01
+   :alignment-deviation 10
+   :uniform-mutation-rate 0.01
+   :problem-specific-report digits-report
+   :problem-specific-initial-report digits-initial-report
+   :report-simplifications 0
+   :final-report-simplifications 5000
+   :max-error 5000
+   })
+


Removed JDBC dependencies

Removed JDBC dependencies

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


Remove one-off English instructions dev code

No need for this to live on after the one time we need to run it.

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


Also needed to declare main-screen ahead of time for the on-gl method call in main-screen itself. Otherwise the code would not compile.

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


Add run file for local testing of listener

error: pathspec 'src/in/co/sdslabs/slack_lens/listener/run.clj' did not match any file(s) known to git

--- src/in/co/sdslabs/slack_lens/listener/run.clj
+++ src/in/co/sdslabs/slack_lens/listener/run.clj
@@ -0,0 +1,50 @@
+(ns in.co.sdslabs.slack-lens.listener.run
+  (:require [clojure.tools.cli :refer [parse-opts]]
+            [clojure.string :as string]
+            [in.co.sdslabs.slack-lens.listener.main :as main]))
+
+(def ^:private cli-options
+  [["-t" "--token TOKEN" "Slack Bot Token"]
+   ["-u" "--url URL" "URL for connection to Slack API"
+    :default "https://slack.com/api"]
+   ["-h" "--help HELP" "Help"]])
+
+(defn- usage
+  "Returns a summary of how to use listener"
+  [options-summary]
+  (->> ["Listener: Listens to events from slack indefinitely"
+        ""
+        "Usage: run [options]"
+        ""
+        "Options:"
+        options-summary]
+       (string/join \newline)))
+
+(defn- error-msg
+  "Returns error messages concantanated"
+  [errors]
+  (str "The following errors occurred while parsing your command:\n\n"
+       (string/join \newline errors)))
+
+
+(defn- exit
+  "Exit the script with given status and message"
+  [status msg]
+  (println msg)
+  (System/exit status))
+
+
+(defn -main
+  "Main entry function for listener, takes -t as option for
+   slack bot token
+
+   Run it as
+
+   lein run -m in.co.sdslabs.slack-lens.listener.run -t 'Token here'"
+  [& args]
+  (let [{:keys [options arguments errors summary]} (parse-opts args cli-options)]
+    (cond
+        (:help options) (exit 0 (usage summary))
+        (not (contains? options :token)) (exit 1 (str "You must pass bot token\n" (usage summary)))
+        errors (exit 1 (error-msg errors)))
+    (main/start options)))


Need this hack for js/Date here for now, these will be added manually in rt.

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


Work around dangerous default behaviour of Clojure.

--- src/clojars/main.clj
+++ src/clojars/main.clj
@@ -22,6 +22,7 @@
     (.run (NGServer. (InetAddress/getByName (:nailgun-bin config)) port))))

 (defn -main [& args]
+  (alter-var-root #'*read-eval* (constantly false))
   (configure args)
   (start-jetty)
   (nrepl/start-server :port (:nrepl-port config) :bind "127.0.0.1")


[PATCH] ARM: Add missed AAEC2000 file

[PATCH] ARM: Add missed AAEC2000 file

My scripts missed committing this file.

Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>

error: pathspec 'arch/arm/mach-aaec2000/Makefile.boot' did not match any file(s) known to git

--- arch/arm/mach-aaec2000/Makefile.boot
+++ arch/arm/mach-aaec2000/Makefile.boot
@@ -0,0 +1 @@
+	zreladdr-y := 0xf0008000


delay-minutes was never optional

delay-minutes was never optional


maybe I'll hit clojure while I'm at it

maybe I'll hit clojure while I'm at it

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


add authorization to application/submit resolver

with helper function for readability


reorder requires for alphabeticalization


checkin with-topology-conf macro in new testing ns

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

--- src/clj/marceline/storm/testing.clj
+++ src/clj/marceline/storm/testing.clj
@@ -0,0 +1,12 @@
+(ns marceline.storm.testing
+  (:require [backtype.storm [testing :as t]])
+  (:import [backtype.storm.generated KillOptions]))
+
+
+(defn with-topology-conf* [cluster topo conf body-fn]
+  (t/submit-local-topology (:nimbus cluster) "tester" conf (.build topo))
+  (body-fn)
+  (.killTopologyWithOpts (:nimbus cluster) "tester" (doto (KillOptions.) (.set_wait_secs 0))))
+
+(defmacro with-topology-conf [[cluster topo conf] & body]
+  `(with-topology-conf* ~cluster ~topo ~conf (fn [] ~@body)))


better signup verification page

better signup verification page

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


Latest deps

Latest deps

--- ClojureScript/planck/project.clj
+++ ClojureScript/planck/project.clj
@@ -1,6 +1,5 @@
 (defproject planck "0.1.0"
   :dependencies [[org.clojure/clojure "1.7.0"]
-                 [org.clojure/clojurescript "0.0-3662"]
-                 [org.clojure/tools.reader "0.10.0-SNAPSHOT" :exclusions [org.clojure/clojure]]
+                 [org.clojure/clojurescript "0.0-3665"]
                  [org.omcljs/ambly "0.6.0"]]
   :clean-targets ["out" "target"])


Added loging of api-key

Added loging of api-key

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


Change default refresh rate to 40Hz.

Change default refresh rate to 40Hz.

This is the default rate of the most common DMX interface, and it looks
like we should be able to handle it with our increased parallelism.

--- src/afterglow/show.clj
+++ src/afterglow/show.clj
@@ -49,9 +49,9 @@

 (defonce ^{:doc "How often should frames of DMX data be sent out; this
   should be a supported frame rate for your interface. The default
-  here is 30 Hz, thirty frames per second."}
+  here is 40 Hz, forty frames per second."}
   default-refresh-interval
-  (/ 1000 30))
+  (/ 1000 40))

 (defonce ^:private ^{:doc "If the last attempt to send a message to
   the OLA server failed, this will contain a description of the problem."}


process order wip

process order wip


cache-stress WIP

cache-stress WIP

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


Record metrics in a more correct namespace.

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


0.5.4: allow quantization > 100% for overlapping notes

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


small unit test fix to ensure we clear out existing activity entries before our activity api test.

--- test/metabase/api/activity_test.clj
+++ test/metabase/api/activity_test.clj
@@ -19,7 +19,8 @@
 ;  2. :user and :model_exists are hydrated

 ; NOTE: timestamp matching was being a real PITA so I cheated a bit.  ideally we'd fix that
-(expect-let [activity1 (db/ins Activity
+(expect-let [_         (korma.core/delete Activity)
+             activity1 (db/ins Activity
                          :topic     "install"
                          :details   {}
                          :timestamp (u/parse-iso8601 "2015-09-09T12:13:14.888Z"))


add test format

add test format

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


Implemented a simple test for localizations.

error: pathspec 'app/test/clj_web_example/localization_test.clj' did not match any file(s) known to git

--- app/test/clj_web_example/localization_test.clj
+++ app/test/clj_web_example/localization_test.clj
@@ -0,0 +1,7 @@
+(ns clj-web-example.localization_test
+  (:require [clojure.test :refer :all]
+            [clj-web-example.localization :refer :all]))
+
+(deftest tr-test
+  (testing "Translations are fetched correctly."
+    (is (= (tr :hello) "Hello World!"))))


Txukundu

Txukundu

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


Iruzkinen erantzunentzat taula

Iruzkinen erantzunentzat taula

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


Refactor: move and rename id generating fn to...

... top of file in order to enable earlier usage (nearer the top),
and in order to reflect functionality more accurately.

Also move timestamp fn to top of file, in order to enable nearer-top
usage.

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


Adapt server to jetty's semantics

Adapt server to jetty's semantics

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


Allow Objects to return from POSTS

Allow Objects to return from POSTS

--- src/yada/methods.clj
+++ src/yada/methods.clj
@@ -201,9 +201,9 @@
   Boolean
   (interpret-post-result [b ctx]
     (if b ctx (throw (ex-info "Failed to process POST" {}))))
-  String
-  (interpret-post-result [s ctx]
-    (assoc-in ctx [:response :body] s))
+  Object
+  (interpret-post-result [o ctx]
+    (assoc-in ctx [:response :body] o))
   clojure.lang.Fn
   (interpret-post-result [f ctx]
     (interpret-post-result (f ctx) ctx))


Issue #9 update the parser according to the ast.

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


Initial work on swap in clojure.

Initial work on swap in clojure.

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

--- swap.clj
+++ swap.clj
@@ -0,0 +1,14 @@
+;; swap! already exists in Clojure
+(defmacro my-swap! [x y]
+  `(let [tmp# ~x]
+     (set! ~x ~y)
+     (set! ~y tmp#)))
+
+;; Doesn't yet work because of Clojure's immutable-by-default behaviour
+;; http://stackoverflow.com/a/940946/509706
+(let [a 1 b 2]
+  (my-swap! a b)
+  (pr "a")
+  (pr a)
+  (pr "b")
+  (pr b))


Add stub for grade-school exercise

Add stub for grade-school exercise

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

--- exercises/grade-school/src/grade_school.clj
+++ exercises/grade-school/src/grade_school.clj
@@ -0,0 +1,13 @@
+(ns grade-school)
+
+(defn grade []  ;; <- arglist goes here
+    ;; your code goes here
+)
+
+(defn add []  ;; <- arglist goes here
+    ;; your code goes here
+)
+
+(defn sorted []  ;; <- arglist goes here
+    ;; your code goes here
+)


permutations

permutations

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


Clearing fields on copy

Clearing fields on copy

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


Proxy Access-Control-Allow-* headers

Proxy Access-Control-Allow-* headers

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


Fix rel name

Fix rel name


Refactor work towards having the list items be...

... represented as a map of item-id<>item-content. This also includes
each item-content having a :sort-index, which determines the item's
place in its list. The reason for refactoring from having items in a
vector to a map is because it allows for easier and more succint
(code-wise) addition, removal and editing of items. The only advantage
of having them in a vector is that the vector enforces a specific order,
but I plan to represent this with the :sort-index attribute of
each item. This will enable the user both to sort by certain attributes,
but also to reorder items by hand.

I plan to have all of the todo-items in one map, with each of them
having a reference to the list-id that they belong to. This is because
I did an experiment wherein I used a list of lists to represent the
todo-lists, but this made update logic - for for example editing the
text of a todo-item unnecessarily convoluted.
Therefore, I will simply enable 'todo-list' data provision by creating
'views' on the full list of todo-items, in the shape of re-frame
subscriptions.

I am certain that all of the above design choices will give more
easily understandable, verifiable and succinct code.


Some code cleanup

Some code cleanup

--- src/cljs/aved/core.cljs
+++ src/cljs/aved/core.cljs
@@ -3,12 +3,6 @@
             [om.dom :as dom :include-macros true]))

 (enable-console-print!)
-
-(.log js/console "hello CS")
-(.log js/console "PLOP is here")
-(.log js/console "SOME MORE THINGS")
-(.log js/console "SOME more and more")
-(.log js/console "SOME more and morei 2222222")

 (def canvas (.getElementById js/document "myCanvas"))
 (def ctx (.getContext canvas "2d"))
@@ -43,7 +37,6 @@
     (.take 5)
     (.subscribe (fn [xysin]
                   (.log js/console (str xysin)))))
-

 ;;ctx.beginPath();
 ;;ctx.arc(100,75,50,0,2*Math.PI);
@@ -54,8 +47,7 @@
   (set! (.-lineWidth ctx) 0)
   (.beginPath ctx)
   (.arc ctx x y size 0 (* 2 Math/PI))
-  (.fill ctx)
-  )
+  (.fill ctx))

 (defn fill-rect [x y w h color]
   (set! (.-fillStyle ctx) color)
@@ -182,7 +174,6 @@
   (dotimes [n vertical-lines] (.log js/console "Index: " n)
            (draw-line (+ x1 (* n 100)) y1 (+ x2 (* n 100)) y2)))

-
 (fill-rect 1440 20 40 100 "red")
 (fill-rect 1440 120 40 100 "orange")
 (fill-rect 1440 220 40 100 "#F5D282")
@@ -190,7 +181,6 @@
 (fill-rect 1440 420 40 100 "#B1D8FA")
 (fill-rect 1440 520 40 100 "#3874A8")
 (fill-rect 1440 620 40 100 "#7D4BBF")
-

 (write-text-s1-black "DE" 1450 74)
 (write-text-s1-black "LT" 1450 174)


CLJS-30 use doto in re-pattern

CLJS-30 use doto in re-pattern

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -2368,15 +2368,13 @@
         post-match (subs s (+ match-idx (count match-str)))]
     (when match-data (lazy-seq (cons match-data (re-seq re post-match))))))

-;;; needs doto
 ;;; doesn't work in advanced mode - but might work with js*
 ;;; error: 'goog not defined'
 (defn re-pattern
   "Returns an instance of RegExp which has compiled the provided string."
   [s]
-  (let [re (goog.global.RegExp. s)]
-    (.compile re)
-    re))
+  (doto (goog.global.RegExp. s)
+    (.compile)))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Printing ;;;;;;;;;;;;;;;;


Boot both the tail consumer and webapp in the repl.


Added filter-parser namespace

Added filter-parser namespace

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

--- src/selmer/filter_parser.clj
+++ src/selmer/filter_parser.clj
@@ -0,0 +1,89 @@
+(ns selmer.filter-parser
+  (:require [selmer.filters :refer [get-filter]]
+            [clojure.string :as s]))
+
+;;; More Utils
+(defn escape-html*
+  [s]
+  "HTML-escapes the given string."
+  [^String s]
+  ;; This method is "Java in Clojure" for serious speedups.
+  ;; Stolen from davidsantiago/quoin and modified.
+  (let [sb (StringBuilder.)
+        slength (long (count s))]
+    (loop [idx (long 0)]
+      (if (>= idx slength)
+        (.toString sb)
+        (let [c (char (.charAt s idx))]
+          (case c
+            \& (.append sb "&")
+            \< (.append sb "<")
+            \> (.append sb ">")
+            \" (.append sb """)
+            \™ (.append sb "™")
+            \é (.append sb "é")
+            (.append sb c))
+          (recur (inc idx)))))))
+
+(defn strip-doublequotes
+  [^String s]
+  (if (and (> (count s) 1)
+           (= \" (first s) (.charAt s (dec (count s)))))
+    (.substring s 1 (dec (count s)))
+    s))
+
+(defn escape-html
+  [x]
+  (if (and (vector? x)
+           (= :safe (first x)))
+    (second x)
+    (let [s (str x)]
+      (escape-html* s))))
+
+;;; Compile filters
+(defn fix-accessor
+  [ks]
+  (mapv (fn [^String s]
+          (try (Long/valueOf s)
+               (catch NumberFormatException _
+                 (keyword s))))
+        ks))
+
+(defn split-filter-val
+  [s]
+  (let [ks (s/split s #"\.")]
+    (fix-accessor ks)))
+
+(defn fix-filter-args
+  [args]
+  ;; TODO - figure out what kind of extra args filters can take
+  (map (fn [^String s]
+         (try (Long/valueOf s)
+              (catch NumberFormatException _
+                (strip-doublequotes s))))
+       args))
+
+(defn filter-str->fn
+  [s]
+  (let [[filter-name & args]
+        ;; Ignore colons inside doublequotes
+        (re-seq #"(?:[^:\"]|\"[^\"]*\")+" s)
+        args (fix-filter-args args)
+        filter (get-filter filter-name)]
+    (fn [x]
+      (apply filter x args))))
+
+(defn compile-filter-body
+  [s]
+  (let [[val & filters] (->> s
+                             (s/trim)
+                             ;; Ignore pipes and allow escaped doublequotes inside doublequotes
+                             (re-seq #"(?:[^|\"]|\"[^\"]*\")+"))
+        accessor (split-filter-val val)
+        filters (->> filters
+                      (map filter-str->fn)
+                      (reverse))]
+    (fn [context-map]
+      (let [x (get-in context-map accessor)]
+        ;; Escape by default unless the last filter is 'safe'
+        (escape-html ((apply comp filters) x))))))


GitHub Issue #17 - initial work on touch events for tooltips

--- cljs-client/cljsinfo_client/tooltips.cljs
+++ cljs-client/cljsinfo_client/tooltips.cljs
@@ -36,6 +36,44 @@
   )

 ;;------------------------------------------------------------------------------
+;; Show / Hide Tooltips
+;;------------------------------------------------------------------------------
+
+(def left-arrow-class "left-arr-42ea1")
+(def right-arrow-class "right-arr-d3345")
+(def arrow-classes (str left-arrow-class " " right-arrow-class))
+
+;; NOTE: this value needs to stay in sync with the .tooltip-53ddee class
+;; in /less/main.less
+(def max-tooltip-width 360)
+
+(defn- show-tooltip! [target-el tooltip-id]
+  (let [$target-el ($ target-el)
+        target-height (.height $target-el)
+        target-width (.width $target-el)
+        target-coords (.offset $target-el)
+        target-x (+ (aget target-coords "left") (/ target-width 2))
+        target-y (+ (aget target-coords "top") (/ target-height 2))
+        browser-width (.width ($ js/window))
+        $tooltip-el ($ (str "#" tooltip-id))
+        tooltip-width (.width $tooltip-el)
+        flip? (> (+ target-x max-tooltip-width 50) browser-width)]
+    (.removeClass $tooltip-el arrow-classes)
+    (if flip?
+      (.addClass $tooltip-el right-arrow-class)
+      (.addClass $tooltip-el left-arrow-class))
+    (.css $tooltip-el (js-obj
+      "display" ""
+      "left" target-x
+      "marginLeft" (if flip? (- 0 tooltip-width 30) 18)
+      "top" target-y ))))
+
+(def tooltip-sel ".tooltip-53dde")
+
+(defn- hide-all-tooltips! []
+  (.hide ($ tooltip-sel)))
+
+;;------------------------------------------------------------------------------
 ;; Events
 ;;------------------------------------------------------------------------------

@@ -45,31 +83,9 @@
       (remove-pin! tooltip-id)
       (pin-down! tooltip-id))))

-;; NOTE: this value needs to stay in sync with the .tooltip-53ddee class
-;; in /less/main.less
-(def max-tooltip-width 360)
-
 (defn- on-mouseenter [js-evt]
   (when-let [tooltip-id (evt->tt-num js-evt)]
-    (let [$target-el ($ (aget js-evt "currentTarget"))
-          target-height (.height $target-el)
-          target-width (.width $target-el)
-          target-coords (.offset $target-el)
-          target-x (+ (aget target-coords "left") (/ target-width 2))
-          target-y (+ (aget target-coords "top") (/ target-height 2))
-          browser-width (.width ($ js/window))
-          $tooltip-el ($ (str "#" tooltip-id))
-          tooltip-width (.width $tooltip-el)
-          flip? (> (+ target-x max-tooltip-width 50) browser-width)]
-      (.removeClass $tooltip-el "left-arr-42ea1 right-arr-d3345")
-      (if flip?
-        (.addClass $tooltip-el "right-arr-d3345")
-        (.addClass $tooltip-el "left-arr-42ea1"))
-      (.css $tooltip-el (js-obj
-        "display" ""
-        "left" target-x
-        "marginLeft" (if flip? (- 0 tooltip-width 30) 18)
-        "top" target-y )))))
+    (show-tooltip! (aget js-evt "currentTarget") tooltip-id)))

 ;; TODO: IE fires the mouseleave event while the mouse cursor is still inside
 ;; the tooltip icon, causing a very distracting flicker effect.
@@ -80,9 +96,13 @@
   (if-let [tooltip-id (evt->tt-num js-evt)]
     (hide-el! tooltip-id)))

-(defn- on-touchstart [js-evt]
-  nil
-  )
+(defn- on-touchend-body [js-evt]
+  (hide-all-tooltips!))
+
+(defn- on-touchend-icon [js-evt]
+  (.stopPropagation js-evt)
+  (if-let [tooltip-id (evt->tt-num js-evt)]
+    (show-tooltip! (aget js-evt "currentTarget") tooltip-id)))

 ;;------------------------------------------------------------------------------
 ;; Init and Events
@@ -92,8 +112,8 @@

 (defn- add-touch-events! []
   (doto ($ "body")
-    (.on "touchstart" tt-link-sel on-touchstart)
-    ))
+    (.on "touchend" on-touchend-body)
+    (.on "touchend" tt-link-sel on-touchend-icon)))

 (defn init!
   "Initialize tooltip events."
@@ -102,6 +122,5 @@
     (.on "click" tt-link-sel on-click)
     (.on "mouseenter" tt-link-sel on-mouseenter)
     (.on "mouseleave" tt-link-sel on-mouseleave))
-  ; (when has-touch-events?
-  ;   (add-touch-events!))
-  )+  (when has-touch-events?
+    (add-touch-events!)))


fix(response): return status code 0 when PoolTimeoutException

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


Stub for new module: changes

Stub for new module: changes

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

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


[WM] Bump ext. service timeout to 10s

[WM] Bump ext. service timeout to 10s

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


Add pred arg to test-utils/dummy-response

This allows making assertions about the incoming request message before putting the dummy response on the channel. This allows more robust tests and handling more than one request type with appropriate responses.


lib.zerol.core-tests - Rename test

lib.zerol.core-tests - Rename test

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


add payments table to order detail

add payments table to order detail

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


first pass, working sans lowercase.

first pass, working sans lowercase.

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

--- clojure/etl/etl.clj
+++ clojure/etl/etl.clj
@@ -0,0 +1,15 @@
+(ns etl
+  (:require [clojure.string :as str]))
+
+(defn- merge-scores [map tiles score]
+  (merge map
+         (zipmap tiles (repeat score))))
+
+(defn transform [definitions]
+  (loop [[
+          [score tiles] & others] (seq definitions)
+          acc {}]
+    (if (first others)
+      (recur others (merge-scores acc tiles score))
+      (merge-scores acc tiles score)
+      )))


placeholder: vectors in Clojure

placeholder: vectors in Clojure

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

--- clojure/vectors.clj
+++ clojure/vectors.clj
@@ -0,0 +1,18 @@
+(def my_vector ["abc" false 99])
+(println my_vector)
+
+(println (get my_vector 0))
+(println (get my_vector 1))
+(println (get my_vector 2))
+(println (get my_vector 3))
+
+(println (count my_vector))
+
+(def another_vector (vector 1 2 3))
+(println another_vector)
+
+(println (conj another_vector 4 5 6))
+(println another_vector)
+
+(def another_vector (conj another_vector 4 5 6))
+(println another_vector)


playing with macros

playing with macros

error: pathspec 'src/main/cljc/clojure_club/macros/ryanbelohlavek.cljc' did not match any file(s) known to git

--- src/main/cljc/clojure_club/macros/ryanbelohlavek.cljc
+++ src/main/cljc/clojure_club/macros/ryanbelohlavek.cljc
@@ -0,0 +1,53 @@
+(ns clojure-club.macros.ryanbelohlavek)
+
+;;taken from: http://blog.klipse.tech/clojure/2016/05/09/macro-tutorial-4.html
+
+;;define a macro that defines a function, which when called, will println
+;;its args before evaluating
+
+;;first attempt
+(defmacro defnargprinter [func-name args & body]
+  `(defn ~func-name [& ~args]
+     (println '~func-name "called with" (vec ~args))
+     ~@body))
+
+;;which works...
+(defnargprinter foo [x y] (+ x y 10))
+
+(foo 1 2)
+;(macroexpand-1 '(defnargprinter foo [x y] (+ x y 1)))
+
+;;but when you try to use it with a destructured args (using &) fn...
+(defnargprinter foo2 [w & [x y z & rest]]
+                (println w)
+                (+ x z))
+;;CompilerException java.lang.RuntimeException: Unable to resolve symbol: & in this context
+
+;(macroexpand-1 '(defnargprinter foo [w & [x y z & rest]]
+;                 (println w)
+;                 (+ x z)))
+;(foo2 1 2 3 4 5)
+
+
+;;one way around this is...
+;(defmacro defnargprinter [func-name args & body]
+;  `(defn ~func-name [& args#]
+;     (println '~func-name "called with" (vec args#))
+;     (let [~args args#] ;<--- here, plus auto-gensym
+;       ~@body)))
+
+;;since
+;(let [[w & [x y z & rest]] [1 2 3 4 5 6 7]]
+;  (println w x y z rest))
+
+;;now it works
+;(defnargprinter foo2 [w & [x y z & rest]]
+;                (println w)
+;                (+ x z))
+
+;(foo2 1 2 3 4 5)
+;(foo2 1 2 3 4 5 6 7 8)
+
+;TODO next make this work with multi-arity function defn
+
+


take-when turns out to be exactly what filter is/does. Except worse.

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


finish depth buffer example

finish depth buffer example

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