CRUD Event hook

CRUD Event hook

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

--- src/ctia/flows/event_hook.clj
+++ src/ctia/flows/event_hook.clj
@@ -0,0 +1,81 @@
+(ns ctia.flows.event-hook
+  (:require [ctia.flows.hooks :refer [Hook]]
+            [ctia.events.schemas :as vs]
+            [ctia.events.producer :as p]
+            [ctia.lib.time :as t]
+            [ctia.schemas.actor :refer [StoredActor]]
+            [ctia.schemas.campaign :refer [StoredCampaign]]
+            [clojure.data :refer [diff]]))
+
+(defn model-of
+  "given a keyword retrieve the schema.
+
+  We should either use an explicit function in `schemas/disptacher.clj`
+  The problem is that for each new resource we must think to add it.
+
+  Another possibilty is to use only `defrecord` instead of map for the
+  schemas and create a Protocol ModelOf. That way, we won't need to be explicit.
+  But for me this is a problem and a code smell.
+
+  So I propose to use a centralized function that should be updated manually."
+  [object-type]
+  (case object-type
+    :actor StoredActor
+    :campaign StoredCampaign
+    (throw (ex-info (str "unkown object-type: " object-type)
+                    {:error "Unknown object type"
+                     :object-type object-type}))))
+
+(defn gen-create-event
+  [object-type object _]
+  {:owner (:owner object)
+   :model (model-of object-type)
+   :timestamp (t/now)
+   :id (:id object)
+   :type vs/CreateEventType
+   })
+
+(defn diff-to-list-of-triplet
+  [[diff-before diff-after _]]
+  (concat
+   (map (fn [k]
+          (if (contains? diff-after k)
+            [k "modified" {(get diff-before k)
+                           (get diff-after k)}]
+            [k "deleted" {}]))
+        (keys diff-before))
+   (map (fn [k] [k "added" {}])
+        (remove #(contains? diff-before %)
+                (keys diff-after)))))
+
+
+(defn gen-update-event
+  [object-type object prev-object]
+  {:owner (:owner object)
+   :model (model-of object-type)
+   :timestamp (t/now)
+   :id (:id object)
+   :type vs/UpdateEventType
+   :fields (diff-to-list-of-triplet
+            (diff object prev-object))
+   ;; I believe the `metadata` shoudld be `{s/Any s/Any}`
+   ;; in the following schema:
+   ;; `ctia.events.schemas/UpdateTriple`
+   })
+
+(defn gen-delete-event
+  [object-type object _]
+  {:owner (:owner object)
+   :model (model-of object-type)
+   :timestamp (t/now)
+   :id (:id object)
+   :type vs/DeleteEventType})
+
+(defrecord EventHook [to-event]
+  Hook
+  (init [_] :nothing)
+  (destroy [_] :nothing)
+  (handle [_ object-type object prev-object]
+    (p/produce (to-event object-type object prev-object))))
+
+(def CreateEventHook (EventHook. gen-create-event))


Remove UNIQ from indexes on repo

Remove UNIQ from indexes on repo

--- src-clj/acha/db.clj
+++ src-clj/acha/db.clj
@@ -30,8 +30,8 @@
                                          [:level :integer]
                                          [:userid :integer]
                                          [:repoid :integer])
-                       "CREATE UNIQUE INDEX `userid_index` ON `achievement` (`userid` ASC)"
-                       "CREATE UNIQUE INDEX `repoid_index` ON `achievement` (`repoid` ASC)")
+                       "CREATE INDEX `userid_index` ON `achievement` (`userid` ASC)"
+                       "CREATE INDEX `repoid_index` ON `achievement` (`repoid` ASC)")
        (catch Exception e (println e))))

 (defn add-fake-data []


Add stub for meetup

Add stub for meetup

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

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


names changed

names changed

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


Remove stupid debug in 'component?

Remove stupid debug in 'component?

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/kkroening/jackal.git/'


minor correction to comments

minor correction to comments

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/talexand/kittens-gallery.git/'


Version 171-SNAPSHOT

Version 171-SNAPSHOT

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


Adding project.clj

Adding project.clj

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


Added suggestions on spelling output

Added suggestions on spelling output

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


Add oljekorrigert overskudd

Add oljekorrigert overskudd

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

--- src/clj_simple_chart/ssb/oljekorrigert_overskudd.clj
+++ src/clj_simple_chart/ssb/oljekorrigert_overskudd.clj
@@ -0,0 +1,24 @@
+(ns clj-simple-chart.ssb.oljekorrigert-overskudd)
+
+(def data {1996 -22.730                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2002/dokumenter/pdf/gulbok.pdf s.195
+           1997 -20.067                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2003/dokumenter/pdf/gulbok.pdf s.192
+           1998 -17.453                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2004/dokumenter/pdf/gulbok.pdf s.216
+           1999 -12.066                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2005/dokumenter/pdf/gulbok.pdf s.202
+           2000 -7.943                                      ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2006/dokumenter/pdf/gulbok.pdf s.215
+           2001 -1.640                                      ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2007/dokumenter/pdf/gulbok.pdf s.214
+           2002 -62.392                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2008/dokumenter/pdf/gulbok.pdf s.216
+           2003 -66.150                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2009/dokumenter/pdf/gulbok.pdf s.212
+           2004 -79.249                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2010/dokumenter/pdf/gulbok.pdf s.233
+           2005 -64.763                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2011/dokumenter/pdf/gulbok.pdf s.214
+           2006 -44.002                                     ; https://www.statsbudsjettet.no/Upload/Statsbudsjett_2012/dokumenter/pdf/gulbok.pdf s.210
+           2007 -1.342                                      ; https://www.statsbudsjettet.no/upload/Statsbudsjett_2013/dokumenter/pdf/gulbok.pdf s.216
+           2008 -11.797
+           2009 -96.561
+           2010 -104.070                                    ; https://www.statsbudsjettet.no/upload/Statsbudsjett_2013/dokumenter/pdf/gulbok.pdf s.216
+           2011 -79.4                                       ; https://www.statsbudsjettet.no/Statsbudsjettet-2014/Satsinger/?pid=59880#hopp
+           2012 -100.9                                      ; https://www.statsbudsjettet.no/Statsbudsjettet-2015/Satsinger/?pid=65153#hopp
+           2013 -116.5                                      ; https://www.statsbudsjettet.no/Statsbudsjettet-2016/Satsinger/?pid=69114#hopp
+           2014 -160.0                                      ; https://www.statsbudsjettet.no/Statsbudsjettet-2017/Satsinger/?pid=72986
+           2015 -185.3                                      ; https://www.statsbudsjettet.no/Statsbudsjettet-2017/Satsinger/?pid=72986
+           2016 -208.4                                      ; https://www.statsbudsjettet.no/Statsbudsjettet-2018/Satsinger/?pid=83808
+           2017 -232.4})                                    ; https://www.statsbudsjettet.no/Statsbudsjettet-2018/Satsinger/?pid=83808


[TH] configure ssl if specified in config

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/s3-ftp.git/'


remove initialize print

remove initialize print

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


forgot to commit the history source code, ages ago, oops

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

--- src/eatme/client/browser/history.cljs
+++ src/eatme/client/browser/history.cljs
@@ -0,0 +1,47 @@
+(ns ^{:doc "Supports working with [Google Closure's history management object][gch].
+[gch]: http://closure-library.googlecode.com/svn/docs/namespace_goog_history.html"}
+
+  one.browser.history
+  (:require [clojure.browser.event :as event]
+            [goog.History :as history]
+            [goog.history.Html5History :as history5]))
+
+(extend-type goog.History
+
+  event/EventType
+  (event-types [this]
+    (into {}
+          (map
+           (fn [[k v]]
+             [(keyword (. k (toLowerCase)))
+              v])
+           (js->clj goog.history.EventType)))))
+
+(defn history
+  "Create a new history object in user visible mode. This allows users
+to, for example, hit the browser's back button without leaving the
+current page. The current history state is shown in the browser
+address bar as a document location fragment (the portion of the URL
+after the '#'). These addresses can be bookmarked, copied and pasted
+into another browser, and modified directly by the user like any
+other URL.
+
+Any changes to the location hash will call the passed callback
+function."
+  [callback]
+  (let [h (if (history5/isSupported)
+            (goog.history.Html5History.)
+            (goog.History.))]
+    (do (event/listen h "navigate"
+                      (fn [e]
+                        (callback {:token (keyword (.-token e))
+                                   :type (.-type e)
+                                   :navigation? (.-isNavigation e)})))
+        (.setEnabled h true)
+        h)))
+
+(defn set-token
+  "Sets the `history` state. The URL fragment will be set to the
+provided token."
+  [history token]
+  (.setToken history (name token)))


whoops, rabbit-config -> connection

whoops, rabbit-config -> connection

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


don't change the keywords in the context so we can use the same templates

fatal: unable to access 'https://github.com/democracyworks/election-notification-works.git/': The requested URL returned error: 403


Creating a default, centralized metronome.

This way sequencers can use the same metronome by default, rather than
making the user pass it around.

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

--- src/overtone/studio/transport.clj
+++ src/overtone/studio/transport.clj
@@ -0,0 +1,6 @@
+(ns overtone.studio.transport
+  (:use [overtone.music rhythm]))
+
+(def DEFAULT-BPM 128)
+
+(def *clock* (metronome DEFAULT-BPM))


fix issues where sync DB would sometimes see null table names when running in parallel

--- src/metabase/driver/postgres/sync.clj
+++ src/metabase/driver/postgres/sync.clj
@@ -38,16 +38,17 @@
    (This is executed in parallel.)"
   [{:keys [id table-names] :as database}]
   (binding [*log-db-calls* false]
-    (dorun (pmap (fn [table-name]
-                   (let [table (or (sel :one Table :db_id id :name table-name)
-                                   (ins Table
-                                        :db_id id
-                                        :name table-name
-                                        :active true))]
-                     (update-table-row-count database table)
-                     (sync-fields table)
-                     (println table-name)))
-                 @table-names))))
+    (->> (doall @table-names)                                                ; load the whole lazy seq of `table-names` before pmap generates futures
+         (pmap (fn [table-name]
+                 (let [table (or (sel :one Table :db_id id :name table-name)
+                                 (ins Table
+                                   :db_id id
+                                   :name table-name
+                                   :active true))]
+                   (update-table-row-count database table)
+                   (sync-fields table)
+                   (println table-name))))
+         dorun)))

 (defn sync-fields
   "Sync `Fields` for TABLE."


Goodbye Jen

Goodbye Jen

😿


Add puzzle random generation.

Add puzzle random generation.

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

--- src/clj/nonojure/random.clj
+++ src/clj/nonojure/random.clj
@@ -0,0 +1,29 @@
+(ns nonojure.random)
+
+(defn- random-row [size]
+  (let [k (rand-int (inc size))]
+    (shuffle (concat (repeat k "x")
+                     (repeat (- size k) " ")))))
+
+(defn- row-to-numbers [row]
+  (->> (partition-by identity row)
+       (remove #(= " " (first %)))
+       (map count)))
+
+(defn generate-puzzle [n m]
+  (let [rows (repeatedly n #(random-row m))
+        left (map row-to-numbers rows)
+        top (->> (apply map vector rows)
+                 (map row-to-numbers))]
+    {:left left
+     :top top
+     :solution (map #(apply str %) rows)}))
+
+
+(defn test [n m]
+  (let [puzzle (generate-puzzle n m)]
+   (println (format "\nPuzzle %dx%d" n m))
+   (doseq [row (:solution puzzle)] (println row))
+   (println "left:" (:left puzzle))
+   (println "top:" (:top puzzle))))
+


not use mailto links in table

not use mailto links in table

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


make use of rf->ejected

make use of rf->ejected

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


Add Clojure client

Add Clojure client

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

--- src/zap_router/client.clj
+++ src/zap_router/client.clj
@@ -0,0 +1,20 @@
+(ns zap-router.client
+  (:require [aleph.tcp :as tcp]
+            [clojure.core.async :refer [go go-loop >! <!!] :as a]
+            [manifold.stream :as s]))
+
+(defn connect [host port]
+  (let [in (a/chan)
+        out (a/chan)
+        sout (s/->source out)
+        c @(tcp/client {:host "localhost" :port port})]
+    (s/consume #(a/put! in %) c) ;TODO Use consume-async instead
+    (s/connect sout c)
+    [in out]))
+
+(defn send-msg [out target msg arg]
+  (go (>! out (.getBytes (str target ":" msg ":" arg) "UTF-8"))))
+
+(defn read-msg! [in]
+  (let [raw (<!! in)]
+    (String. raw "UTF-8")))


Add ocp-build bytecode

Add ocp-build bytecode

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


Create task.clj

Create task.clj

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

--- src/iyye/bios/task.clj
+++ src/iyye/bios/task.clj
@@ -0,0 +1,26 @@
+; Iyye - AI agent
+; Copyright (C) 2016-2017  Sasha Yumzya
+
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU Affero General Public License as
+; published by the Free Software Foundation, either version 3 of the
+; License, or (at your option) any later version.
+
+; This program 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 Affero General Public License for more details.
+
+; You should have received a copy of the GNU Affero General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(ns iyye.bios.task)
+
+; FIXME Yumzya: to add task trees
+(defn start-task [task]
+  (dosync (ref-set (:task-future task) (future (while (not (Thread/interrupted))
+                                                       (dorun [((:function task))]))))))
+
+(defn stop-task [task]
+  (future-cancel @(:task-future task)))
+


Start stubbing an emitter

Start stubbing an emitter

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

--- src/oxcart/emitter/core.clj
+++ src/oxcart/emitter/core.clj
@@ -0,0 +1,110 @@
+;;   Copyright (c) Reid McKenzie, Rich Hickey & contributors. The use
+;;   and distribution terms for this software are covered by the
+;;   Eclipse Public License 1.0
+;;   (http://opensource.org/licenses/eclipse-1.0.php) which can be
+;;   found in the file epl-v10.html at the root of this distribution.
+;;   By using this software in any fashion, you are agreeing to be
+;;   bound by the terms of this license.  You must not remove this
+;;   notice, or any other, from this software.
+
+(ns oxcart.emitter.core
+  {:doc "Oxcart will wind up with more than one emitter, but we'll
+        start with this for now."
+   :author "Reid McKenzie"
+   :added "0.0.12"}
+  (:require [oxcart
+             [passes :as passes]
+             [pattern :as pattern]]))
+
+
+(defn -emit-as-class
+  "This is an emitter case for handling forms (functions taken as
+  values) which must be implemented as stand alone IFn classes."
+  []
+  )
+
+
+(defn -emit-as-method
+  "This is an emitter case for handling forms (functions of a single
+  arity never taken as values) which may be implemented as static
+  methods on the wrapping namespace class."
+  []
+  )
+
+
+(defn -emit-as-field
+  "(λ Named-ASTs → Named-Classes → Expression) → Named-Classes
+
+  This is an emitter case which works together with -emit-as-class to
+  emit constants (functions of multiple arities taken as values,
+  inline constants) which must be emitted as public static fields in
+  the wrapping namespace class."
+  [named-asts named-classes expr]
+  )
+
+
+(defn emit-classes
+  "(λ Named-ASTs → Entry-Point → Options) → {String → Class}
+
+  This is the entry point for the AOT emitter. This is a function of a
+  pair ({Symbol → AST}, EntryPoint :- Symbol). The emitter will be
+  recursively invoked on the entry point symbol. Returns a map from
+  Strings, being the names of classes, to ASTs representing class
+  bytecode.
+
+  Options
+  -----------
+    This emitter takes no options."
+  [named-asts entry-point options]
+  )
+
+(defn emit-form
+  [{:keys [init] :as form}]
+  {:pre [(pattern/def? form)]}
+  )
+
+(defn merge-classes
+  "Helper function for emit-form
+
+  Takes two class definitions presumed to contain no name conflicts
+  besides <init> and <cinit>, returning a new class having all methods
+  and fields from both class definitions and <init> and <cinit>
+  defined by concatinating the inits of r to those of r."
+  [l r]
+  )
+
+
+(def emit-form
+  "Helper function extracted from emit-aot
+
+  Emits a single form, returning a new partial definition of \"this\",
+  and a sequence of auxiliary classes. This partial definition of
+  \"this\" contains any fields, methods and initializer code required
+  for the above."
+  [[this classes] form]
+  (let [[this' helper-classes] (emit-form form)]
+    [(merge-classes this this')
+     (concat classes
+             helper-classes)]))
+
+
+(def emit-namespace
+  "Helper function extracted from emit-aot
+
+  Emits a single namespace by walking all forms (which can only be
+  defs), emitting each form, and accumulating a \"this\" being the
+  namespace class itself, and a sequence of helper classes. Returns a
+  sequence of classes, including the final \"self\" class and all
+  helpers."
+  [classes namespace]
+  (let [[this classes]
+        (reduce emit-form [this classes] (forms ns))]
+    (conj classes this)))
+
+
+(defn emit-aot
+  "Emits a whole program with reference to a single emtry point."
+  [whole-program entry-name]
+  (let [load (->> entry reach (map .ns) (into #{}))]
+    (reduce emit-namespace [] load)))
+


Add node store shim ns.

Add node store shim ns.

fatal: unable to access 'https://github.com/greglook/merkle-db.git/': The requested URL returned error: 403


Add tests for ns vault.store.

Add tests for ns vault.store.

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

--- test/vault/store_test.clj
+++ test/vault/store_test.clj
@@ -0,0 +1,24 @@
+(ns vault.store-test
+  (:require [clojure.test :refer :all]
+            [vault.blob :as blob]
+            [vault.store :refer :all]))
+
+
+(deftest blob-containment
+  (let [blobref (blob/hash-content :sha1 "foo bar")]
+    (is (false? (contains-blob? (reify BlobStore (stat [this blobref] nil)) blobref)))
+    (is (true? (contains-blob? (reify BlobStore (stat [this blobref] {:size 1})) blobref)))))
+
+
+(deftest blobref-selection
+  (let [a (blob/make-blobref :md5 "37b51d194a7513e45b56f6524f2d51f2")
+        b (blob/make-blobref :md5 "73fcffa4b7f6bb68e44cf984c85f6e88")
+        c (blob/make-blobref :md5 "73fe285cedef654fccc4a4d818db4cc2")
+        d (blob/make-blobref :md5 "acbd18db4cc2f85cedef654fccc4a4d8")
+        e (blob/make-blobref :md5 "c3c23db5285662ef7172373df0003206")
+        blobrefs [a b c d e]]
+    (are [brs opts] (= brs (select-blobrefs opts blobrefs))
+         blobrefs {}
+         [c d e]  {:start "md5:73fd2"}
+         [b c]    {:prefix "md5:73"}
+         [a b]    {:count 2})))


Refactoring towards purer components

Refactoring towards purer components

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


message work

message work

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


parallel algo

parallel algo

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


adjusting fn names

adjusting fn names

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/narkisr/cloujsearch.git/'


make-component test cases moved to component ns

error: pathspec 'core/test/clj/hellhound/component_test.clj' did not match any file(s) known to git

--- core/test/clj/hellhound/component_test.clj
+++ core/test/clj/hellhound/component_test.clj
@@ -0,0 +1,15 @@
+(ns hellhound.component-test
+  (:require [hellhound.component :as sut]
+            [clojure.test :as t :refer [deftest testing is are]]))
+
+
+;; make-component test ---------------------------------------
+(def simple-map {:hellhound.component/name       :component/name
+                 :hellhound.component/start-fn   inc
+                 :hellhound.component/stop-fn    inc
+                 :hellhound.component/depends-on []})
+
+(deftest make-component-test
+  (testing "make-component"
+    (is (= simple-map (sut/make-component :component/name inc inc)))
+    (is (= simple-map (sut/make-component :component/name inc inc [])))))


update example dependency

update example 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/modnakasta/weasel.git/'


equal variance

equal variance


Sessions

Sessions

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/aarkerio/cmsclj.git/'


Remove extra slash breaking href to unsubscribe page in daily emails

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


Add type to response

Add type to response

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


Refactor: merge divs to lessen element clutter...

... since the separation of the two divs named #background
and #app-container served no purpose, it seemed cleaner to join them
into one div by merging together their style maps.


Start multijob test

Start multijob test

error: pathspec 'test/onyx/coordinator/multi_job_test.clj' did not match any file(s) known to git

--- test/onyx/coordinator/multi_job_test.clj
+++ test/onyx/coordinator/multi_job_test.clj
@@ -0,0 +1,122 @@
+(ns onyx.coordinator.multi-job-test
+  (:require [clojure.test :refer :all]
+            [clojure.core.async :refer [chan tap alts!! >!! <!!]]
+            [com.stuartsierra.component :as component]
+            [datomic.api :as d]
+            [onyx.coordinator.async :as async]
+            [onyx.coordinator.extensions :as extensions]
+            [onyx.coordinator.log.datomic :as datomic]
+            [onyx.system :as s]
+            [onyx.coordinator.sim-test-utils :refer [with-system]]))
+
+(deftest plan-two-jobs-two-peers
+  (with-system
+    (fn [coordinator sync log]
+      (let [peer-node-a (extensions/create sync :peer)
+            peer-node-b (extensions/create sync :peer)
+
+            payload-node-a-1 (extensions/create sync :payload)
+            payload-node-b-1 (extensions/create sync :payload)
+
+            payload-node-a-2 (extensions/create sync :payload)
+            payload-node-b-2 (extensions/create sync :payload)
+
+            sync-spy-a (chan 1)
+            sync-spy-b (chan 1)
+            ack-ch-spy (chan 2)
+            offer-ch-spy (chan 10)
+            status-spy (chan 2)
+
+            catalog-a [{:onyx/name :in-a
+                        :onyx/direction :input
+                        :onyx/type :queue
+                        :onyx/medium :hornetq
+                        :onyx/consumption :sequential
+                        :hornetq/queue-name "in-queue"}
+                       {:onyx/name :inc-a
+                        :onyx/type :transformer
+                        :onyx/consumption :sequential}
+                       {:onyx/name :out-a
+                        :onyx/direction :output
+                        :onyx/type :queue
+                        :onyx/medium :hornetq
+                        :onyx/consumption :sequential
+                        :hornetq/queue-name "out-queue"}]
+
+            catalog-b [{:onyx/name :in-b
+                        :onyx/direction :input
+                        :onyx/type :queue
+                        :onyx/medium :hornetq
+                        :onyx/consumption :sequential
+                        :hornetq/queue-name "in-queue"}
+                       {:onyx/name :inc-b
+                        :onyx/type :transformer
+                        :onyx/consumption :sequential}
+                       {:onyx/name :out-b
+                        :onyx/direction :output
+                        :onyx/type :queue
+                        :onyx/medium :hornetq
+                        :onyx/consumption :sequential
+                        :hornetq/queue-name "out-queue"}]
+
+            workflow-a {:in-a {:inc-a :out-a}}
+            workflow-b {:in-b {:inc-b :out-b}}]
+
+        (tap (:ack-mult coordinator) ack-ch-spy)
+        (tap (:offer-mult coordinator) offer-ch-spy)
+
+        (extensions/write-place sync peer-node-a payload-node-a-1)
+        (extensions/on-change sync payload-node-a-1 #(>!! sync-spy-a %))
+
+        (extensions/write-place sync peer-node-b payload-node-b-1)
+        (extensions/on-change sync payload-node-b-1 #(>!! sync-spy-b %))
+
+        (>!! (:born-peer-ch-head coordinator) peer-node-a)
+        (>!! (:born-peer-ch-head coordinator) peer-node-b)
+
+        (<!! offer-ch-spy)
+        (<!! offer-ch-spy)
+
+        (>!! (:planning-ch-head coordinator) {:catalog catalog-a :workflow workflow-a})
+
+        (<!! offer-ch-spy)
+        (<!! sync-spy-a)
+        (<!! sync-spy-b)
+
+        (let [payload-a (extensions/read-place sync payload-node-a-1)
+              payload-b (extensions/read-place sync payload-node-b-1)]
+
+          (let [db (d/db (:conn log))]
+
+            (testing "Payload A is for job A"
+              (let [query '[:find ?job :in $ ?task ?catalog :where
+                            [?job :job/task ?task]
+                            [?job :job/catalog ?catalog]]
+                    result (d/q query db (:db/id (:task payload-a)) (pr-str catalog-a))
+                    jobs (map first result)]
+                (is (= (count jobs) 1))))
+
+            (testing "Payload B is for job A"
+              (let [query '[:find ?job :in $ ?task ?catalog :where
+                            [?job :job/task ?task]
+                            [?job :job/catalog ?catalog]]
+                    result (d/q query db (:db/id (:task payload-b)) (pr-str catalog-a))
+                    jobs (map first result)]
+                (is (= (count jobs) 1)))))
+
+          (extensions/on-change sync (:status (:nodes payload-a)) #(>!! status-spy %))
+          (extensions/on-change sync (:status (:nodes payload-b)) #(>!! status-spy %))
+
+          (extensions/touch-place sync (:ack (:nodes payload-a)))
+          (extensions/touch-place sync (:ack (:nodes payload-b)))
+
+          (<!! ack-ch-spy)
+          (<!! ack-ch-spy)
+
+          (<!! status-spy)
+          (<!! status-spy))))
+
+    {:eviction-delay 50000}))
+
+(run-tests 'onyx.coordinator.multi-job-test)
+


Change test to match new schema

Change test to match new schema

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


Bumping version number for 0.0.5 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject tropefest "0.0.4-SNAPSHOT"
+(defproject tropefest "0.0.5-SNAPSHOT"
             :description "Tropefest! ... While we get a better name..."
             :url "http://numergent.com/"


Added comma to attempt to fix postcss (#349)

--- project.clj
+++ project.clj
@@ -116,30 +116,30 @@
             "postcss-prefixer" ["shell" "node_modules/postcss-cli/bin/postcss" "resources/temp/css/*.css" "resources/temp/css/**/*.css" "resources/temp/css/**/**/*.css"
                                 "--use autoprefixer" "-d" "resources/public/css"]
             "run-local"   ["do"
-                           "install-postcss"
+                           "install-postcss,"
                            ["less" "once"]
                            ["pdo" "clean," ["figwheel" "local"] ["less" "auto"] "postcss-prefixer-w"]]
             "run-dev"     ["do"
-                           "install-postcss"
+                           "install-postcss,"
                            ["less" "once"]
                            ["pdo" "clean," ["figwheel" "dev"]   ["less" "auto"] "postcss-prefixer-w"]]
             "run-lint"    ["pdo" "bikeshed" ["kibit" "src/cljs/wombats_web_client/"]]
             "deploy-dev"  ["do"
-                           "install-postcss"
+                           "install-postcss,"
                            "clean,"
                            "run-lint"
                            ["cljsbuild" "once" "deploy-dev"]
                            ["less" "once"]
                            "postcss-prefixer"]
             "deploy-qa"   ["do"
-                           "install-postcss"
+                           "install-postcss,"
                            "clean,"
                            "run-lint"
                            ["cljsbuild" "once" "deploy-qa"]
                            ["less" "once"]
                            "postcss-prefixer"]
             "deploy-prod" ["do"
-                           "install-postcss"
+                           "install-postcss,"
                            "clean,"
                            "run-lint"
                            ["cljsbuild" "once" "deploy-prod"]


initial import of pathfind project

initial import of pathfind project

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

--- src/cljs/infinitelives/utils/pathfind.cljs
+++ src/cljs/infinitelives/utils/pathfind.cljs
@@ -0,0 +1,113 @@
+(ns infinitelives.utils.pathfind)
+
+(defrecord state [closed-set open-set came-from g-score f-score])
+
+(def diagonal-cost 14)
+(def orthogonal-cost 10)
+
+(defn manhattan [dx dy] (+ (Math/abs dx) (Math/abs dy)))
+
+(defn chebyshev [dx dy] (max (Math/abs dx) (Math/abs dy)))
+
+(defn euclid [dx dy] (.sqrt js/Math (+ (* dx dx) (* dy dy))))
+
+(defn distance-between [func [x1 y1] [x2 y2]]
+  (func
+   (Math/abs (- x1 x2))
+   (Math/abs (- y1 y2))))
+
+(defn state-add-neighbour [{:keys [closed-set open-set came-from]
+                            :as  state} current neighbour]
+  (assoc state
+         :open-set (conj open-set neighbour)
+         :came-from (assoc came-from neighbour current)))
+
+(defn state-add-open [state cell]
+  (update state :open-set conj cell))
+
+(defn state-open-to-closed [state cell]
+  (-> state
+      (update :open-set disj cell)
+      (update :closed-set conj cell)))
+
+(defn reduce-state-over-neighbours [state current neighbours]
+  (reduce
+   (fn [acc item] (state-add-neighbour acc current item))
+   state
+   neighbours))
+
+(defn g-dist [[x1 y1] [x2 y2]]
+  (let [dx (Math/abs (- x1 x2))
+        dy (Math/abs (- y1 y2))]
+    (cond
+      (and (= 1 dx) (= 1 dy))
+      diagonal-cost
+
+      (or (= 1 dx) (= 1 dy))
+      orthogonal-cost)))
+
+(defn calculate-open-fscore [{:keys [f-score g-score open-set] :as state}
+                             parent destination]
+  (let [to-calc (reduce disj open-set (keys f-score))
+        new-g-score (into g-score
+                          (for [cell to-calc]
+                            [cell (+ (g-dist cell parent)
+                                     (get g-score parent))]))
+        new-f-score (into f-score
+                          (for [cell to-calc]
+                            [cell (+ (new-g-score cell)
+                                     (* orthogonal-cost (distance-between manhattan cell destination)))]))]
+    (assoc state :f-score new-f-score :g-score new-g-score)))
+
+(defn neighbors-for [[x y]]
+  (for [dx [-1 0 1] dy [-1 0 1]
+        :when (not (and (zero? dx) (zero? dy)))]
+    [(+ x dx) (+ y dy)]))
+
+(defn lowest-f-score-open-cell [{:keys [f-score open-set]}]
+  (->> f-score
+       (sort-by second)
+       (filter (fn [[k v]] (open-set k)))
+       first
+       first))
+
+(defn backtrack [{:keys [came-from]} end start]
+  (loop [pos end path '()]
+    (if (not= pos start)
+      (recur (came-from pos) (conj path pos))
+      (conj path start))))
+
+(defn A*-step [state passable? current end corner-cut?]
+  (let [
+        neighbors (apply disj (into #{} (neighbors-for current)) (:closed-set state))
+        [xp yp] current
+        passable-neighbors
+        (->> neighbors
+             (filter passable?)
+             (filter (fn [[x y]]
+                       (cond
+                         corner-cut? true
+                         (and (= x (dec xp)) (not (passable? [(dec xp) yp]))) false
+                         (and (= x (inc xp)) (not (passable? [(inc xp) yp]))) false
+                         (and (= y (dec yp)) (not (passable? [xp (dec yp)]))) false
+                         (and (= y (inc yp)) (not (passable? [xp (inc yp)]))) false
+                         :default true))))
+        state (-> state
+                  (reduce-state-over-neighbours current passable-neighbors)
+                  (calculate-open-fscore current end)
+                  (state-open-to-closed current))
+        next-cell (lowest-f-score-open-cell state)]
+    [state next-cell]))
+
+(defn A* [passable? start end & arguments]
+  (let [args (into #{} arguments)
+        corner-cut? (:corner-cut args)
+        state (-> (->state #{} #{start}
+                           {} {start 0}
+                           {start (distance-between manhattan start end)}))]
+    (loop [[state next-cell] (A*-step state passable? start end corner-cut?)]
+      (if (not= next-cell end)
+        (recur (A*-step state passable? next-cell end corner-cut?))
+
+        ;; backtrack
+        (backtrack state end start)))))


some debug output for helpful times

some debug output for helpful times


Problem 0070.

Problem 0070.

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

--- src/project_euler/problem_0070.clj
+++ src/project_euler/problem_0070.clj
@@ -0,0 +1,54 @@
+(ns project-euler.problem_0070)
+
+;; Euler's Totient function, φ(n) [sometimes called the phi function],
+;; is used to determine the number of positive numbers less than or equal to n which are relatively prime to n.
+;; For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6.
+;; The number 1 is considered to be relatively prime to every positive number, so φ(1)=1.
+
+;; Interestingly, φ(87109)=79180, and it can be seen that 87109 is a permutation of 79180.
+
+;; Find the value of n, 1 < n < 10^7, for which φ(n) is a permutation of n and the ratio n/φ(n) produces a minimum.
+
+;;-------------------------------------------------------------------------------------------------------
+;; from problem_0030:
+
+(defn digits
+  [n]
+  (loop [n n, ds []]
+    (let [r (rem n 10)
+          q (quot n 10)
+          new-ds (conj ds r)]
+      (if (== q 0)
+        new-ds
+        (recur q new-ds)
+        ))))
+;;-------------------------------------------------------------------------------------------------------
+
+
+(defn step-totient [totient-set n]
+  (letfn [(next-fact [n] (if (== n 2) 3 (+ n 2)))]
+    (loop [n n, m 2]
+      (let [q (quot n m)]
+        (cond (> m q)           (- n 1)
+              (zero? (rem n m)) (if (zero? (rem q m))
+                                  (* m       (totient-set q))
+                                  (* (- m 1) (totient-set q)))
+              :else             (recur n (next-fact m))
+              )))))
+
+
+
+(defn solution []
+  (->> (range 2 10000000)
+       (reduce (fn [ts n] (assoc ts n (step-totient ts n))) {})
+       (filter (fn [[n t]] (= (sort (digits n)) (sort (digits t)))))
+       (reduce (fn [[r-min n-min t-min] [n t]]
+                 (let [r (/ n t)]
+                   (if (< r r-min)
+                     [r n t]
+                     [r-min n-min t-min])))
+               [1000 nil nil])
+       (second)
+       ))
+
+;;-> 8319823


Add new namespace: buddy.core.mac.hmac

Add new namespace: buddy.core.mac.hmac

error: pathspec 'src/clojure/buddy/core/mac/hmac.clj' did not match any file(s) known to git

--- src/clojure/buddy/core/mac/hmac.clj
+++ src/clojure/buddy/core/mac/hmac.clj
@@ -0,0 +1,169 @@
+;; Copyright 2014 Andrey Antukh <niwi@niwi.be>
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License")
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;     http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
+(ns buddy.core.mac.hmac
+  "Hash-based Message Authentication Codes (HMACs)"
+  (:require [buddy.core.codecs :refer :all]
+            [buddy.core.util :refer [concat-byte-arrays]]
+            [buddy.core.hash :refer [sha512]]
+            [clojure.java.io :as io])
+  (:import javax.crypto.Mac
+           javax.crypto.spec.SecretKeySpec
+           java.security.MessageDigest
+           java.util.Arrays))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Low level private function with all logic for make
+;; hmac for distinct types.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn- make-hmac-for-plain-data
+  [^bytes data, pkey, ^String algorithm]
+  (let [bkey (->byte-array pkey)
+        sks  (SecretKeySpec. bkey algorithm)
+        mac  (Mac/getInstance algorithm)]
+    (.init mac sks)
+    (.doFinal mac data)))
+
+(defn- verify-hmac-for-plain-data
+  [^bytes data, ^bytes signature, pkey, ^String algorithm]
+  (let [sig (make-hmac-for-plain-data data pkey algorithm)]
+    (Arrays/equals sig signature)))
+
+(defn- make-hmac-for-stream
+  [^java.io.InputStream stream, pkey, ^String algorithm]
+  (let [bkey (->byte-array pkey)
+        sks  (SecretKeySpec. bkey algorithm)
+        bfr  (byte-array 5120)
+        mac  (Mac/getInstance algorithm)]
+    (.init mac sks)
+    (loop []
+      (let [readed (.read stream bfr 0 5120)]
+        (when-not (= readed -1)
+          (.update mac bfr 0 readed)
+          (recur))))
+    (.doFinal mac)))
+
+(defn- verify-hmac-for-stream
+  [^java.io.InputStream stream, ^bytes signature, pkey, ^String algorithm]
+  (let [sig (make-hmac-for-stream stream pkey algorithm)]
+    (Arrays/equals sig signature)))
+
+(defprotocol HMac
+  "Unified protocol for calculate a keyed-hash message.
+It comes with default implementations for bytes, String,
+InputStream, File, URL and URI."
+  (make-hmac [data key algorithm] "Calculate hmac for data using key and algorithm.")
+  (verify-hmac [data signature key algorithm] "Verify hmac for data using key and algorithm."))
+
+(alter-meta! #'make-hmac assoc :no-doc true :private true)
+(alter-meta! #'verify-hmac assoc :no-doc true :private true)
+
+(extend-protocol HMac
+  (Class/forName "[B")
+  (make-hmac [^bytes data ^String key ^String algorithm]
+    (make-hmac-for-plain-data data key algorithm))
+  (verify-hmac [^bytes data ^bytes signature ^String key ^String algorithm]
+    (verify-hmac-for-plain-data data signature key algorithm))
+
+  java.lang.String
+  (make-hmac [^String data ^String key ^String algorithm]
+    (make-hmac-for-plain-data (->byte-array data) key algorithm))
+  (verify-hmac [^String data ^bytes signature ^String key ^String algorithm]
+    (verify-hmac-for-plain-data (->byte-array data) signature key algorithm))
+
+  java.io.InputStream
+  (make-hmac [^java.io.InputStream data ^String key ^String algorithm]
+    (make-hmac-for-stream data key algorithm))
+  (verify-hmac [^java.io.InputStream data ^bytes signature ^String key ^String algorithm]
+    (verify-hmac-for-stream data signature key algorithm))
+
+  java.io.File
+  (make-hmac [^java.io.File data ^String key ^String algorithm]
+    (make-hmac-for-stream (io/input-stream data) key algorithm))
+  (verify-hmac [^java.io.File data ^bytes signature ^String key ^String algorithm]
+    (verify-hmac-for-stream (io/input-stream data) signature key algorithm))
+
+  java.net.URL
+  (make-hmac [^java.net.URL data ^String key ^String algorithm]
+    (make-hmac-for-stream (io/input-stream data) key algorithm))
+  (verify-hmac [^java.net.URL data ^bytes signature ^String key ^String algorithm]
+    (verify-hmac-for-stream (io/input-stream data) signature key algorithm))
+
+  java.net.URI
+  (make-hmac [^java.net.URI data ^String key ^String algorithm]
+    (make-hmac-for-stream (io/input-stream data) key algorithm))
+  (verify-hmac [^java.net.URI data ^bytes signature ^String key ^String algorithm]
+    (verify-hmac-for-stream (io/input-stream data) signature key algorithm)))
+
+(defn- make-salted-hmac
+  "Generic function that implement salted variant
+of keyed-hash message authentication code (hmac).
+This is a low level function and always return bytes."
+  [data ^String key salt ^String algorithm]
+  (let [key (concat-byte-arrays (->byte-array key)
+                                (->byte-array salt))]
+    (make-hmac data (sha512 key) algorithm)))
+
+(defn- verify-salted-hmac
+  [data ^bytes signature ^String key salt ^String algorithm]
+  (let [key (concat-byte-arrays (->byte-array key)
+                                (->byte-array salt))]
+    (verify-hmac data signature (sha512 key) algorithm)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; High level interface
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defn hmac
+  [data ^String key ^String algorithm]
+  (make-hmac data key algorithm))
+
+(defn hmac-verify
+  [data ^bytes signature ^String key ^String algorithm]
+  (verify-hmac data signature key algorithm))
+
+(defn shmac
+  "Generic function that exposes a high level
+interface for salted variant of keyed-hash message
+authentication code algorithm."
+  [data, key, salt, ^String algorithm]
+  (make-salted-hmac data key salt algorithm))
+
+(defn shmac-verify
+  "Generic function that exposes a high level
+interface for salted variant of keyed-hash message
+authentication code verification algorithm."
+  [data ^bytes signature ^String key ^String salt ^String algorithm]
+  (verify-salted-hmac data signature key salt algorithm))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Most used aliases
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Alias for hmac + sha2 hash algorithms
+(def hmac-sha256 #(hmac %1 %2 "HmacSHA256"))
+(def hmac-sha384 #(hmac %1 %2 "HmacSHA384"))
+(def hmac-sha512 #(hmac %1 %2 "HmacSHA512"))
+(def hmac-sha256-verify #(hmac-verify %1 %2 %3 "HmacSHA256"))
+(def hmac-sha384-verify #(hmac-verify %1 %2 %3 "HmacSHA384"))
+(def hmac-sha512-verify #(hmac-verify %1 %2 %3 "HmacSHA512"))
+
+;; Alias for salted hmac + sha2 hash algorithms
+(def shmac-sha256 #(shmac %1 %2 %3 "HmacSHA256"))
+(def shmac-sha384 #(shmac %1 %2 %3 "HmacSHA384"))
+(def shmac-sha512 #(shmac %1 %2 %3 "HmacSHA512"))
+(def shmac-sha256-verify #(shmac-verify %1 %2 %3 %4 "HmacSHA256"))
+(def shmac-sha384-verify #(shmac-verify %1 %2 %3 %4 "HmacSHA384"))
+(def shmac-sha512-verify #(shmac-verify %1 %2 %3 %4 "HmacSHA512"))


Add integration tests

Add integration tests

error: pathspec 'test/discuss/integration_test.cljs' did not match any file(s) known to git

--- test/discuss/integration_test.cljs
+++ test/discuss/integration_test.cljs
@@ -0,0 +1,5 @@
+(ns discuss.integration-test
+  (:require [cljs.test :refer-macros [deftest is run-tests]]))
+
+(deftest success
+         (is (= 1 1)))


strip out old activity unit tests which are not relevant any more.

--- test/metabase/models/activity_test.clj
+++ test/metabase/models/activity_test.clj
@@ -1,29 +1,6 @@
 (ns metabase.models.activity-test
   (:require [expectations :refer :all]
             [korma.core :refer [table]]
-            [medley.core :as m]
-            [metabase.db :as db]
-            (metabase.models [activity :refer :all]
-                             [card :refer [Card]]
-                             [interface :refer [defentity]])
-            [metabase.test.data.users :refer :all]
-            [metabase.util :as u]))
+            [metabase.events.activity-feed :refer :all]
+            [metabase.test.data.users :refer :all]))

-
-;;; # REVISIONS + PUSH-REVISION
-
-;; Test valid-activity-topic?
-(expect [false
-         false
-         false
-         true
-         true]
-        [(valid-activity-topic? nil)
-         (valid-activity-topic? {})
-         (valid-activity-topic? [])
-         (valid-activity-topic? "user-create")
-         (valid-activity-topic? :user-create)])
-
-;; Test topic->model
-(expect []
-        [(topic->model :abc)])


Clean up stuff for #42

Clean up stuff for #42

It looks like #42 isn't easy to accomplish, so cleaning
up some of the code for it.

--- Clojure/src/ambly/repl/jsc.clj
+++ Clojure/src/ambly/repl/jsc.clj
@@ -97,18 +97,6 @@
           (.removeServiceListener mdns-service reg-type service-listener)
           (.close mdns-service))))))

-(defn resolve-bonjour [bonjour-name timeout]
-  (let [reg-type "_http._tcp.local."
-        mdns-service (JmDNS/create)]
-    (try
-      (let [info (.getServiceInfo mdns-service reg-type bonjour-name timeout)]
-        (when info
-          {:address (.getAddress info)
-           :port    (.getPort info)}))
-      (finally
-        (future
-          (.close mdns-service))))))
-
 (defn socket [host port]
   (let [socket (doto (Socket. host port) (.setKeepAlive true))
         in     (io/reader socket)
@@ -141,11 +129,6 @@
               (.append sb (char c))
               (recur sb (.read in))))))

-(defn- reconnect-if
-  [repl-env]
-  (when-not @(:torn-down repl-env)
-    (@(:reconnect-fn repl-env))))
-
 (defn start-reading-messages
   "Starts a thread reading inbound messages."
   [repl-env opts]
@@ -154,10 +137,10 @@
       #(try
         (let [rv (read-messages (:in @(:socket repl-env)) (:response-promise repl-env) opts)]
           (when (= :eof rv)
-            (close-socket @(:socket repl-env))
-            (reconnect-if repl-env)))
-        (catch IOException _
-          (reconnect-if repl-env))))))
+            (close-socket @(:socket repl-env))))
+        (catch IOException e
+          (when-not (.isClosed (:socket @(:socket repl-env)))
+            (.printStackTrace e)))))))

 (defn stack-line->canonical-frame
   "Parses a stack line into a frame representation, returning nil
@@ -194,23 +177,18 @@
   (let [{:keys [out]} @(:socket repl-env)
         response-promise (promise)]
     (reset! (:response-promise repl-env) response-promise)
-    (try
-      (write out js)
-      (let [response @response-promise]
-        (if (= :eof response)
-          (do
-            (reconnect-if repl-env)
-            {:status :error
-             :value  "Connection closed."})
-          (let [result (json/read-str response
-                         :key-fn keyword)]
-            (merge
-              {:status (keyword (:status result))
-               :value  (:value result)}
-              (when-let [raw-stacktrace (:stacktrace result)]
-                {:stacktrace raw-stacktrace})))))
-      (catch Exception _
-        (reconnect-if repl-env)))))
+    (write out js)
+    (let [response @response-promise]
+      (if (= :eof response)
+        {:status :error
+         :value  "Connection to JavaScriptCore closed."}
+        (let [result (json/read-str response
+                       :key-fn keyword)]
+          (merge
+            {:status (keyword (:status result))
+             :value  (:value result)}
+            (when-let [raw-stacktrace (:stacktrace result)]
+              {:stacktrace raw-stacktrace})))))))

 (defn load-javascript
   "Load a Closure JavaScript file into the JSC REPL process."
@@ -258,17 +236,6 @@
     (socket address port))
   ;; Start dedicated thread to read messages from socket
   (start-reading-messages repl-env opts))
-
-(defn reconnect [repl-env opts]
-  ((print-fn opts) "Reconnecting ...")
-  (let [bonjour-name @(:bonjour-name repl-env)
-        endpoint (resolve-bonjour bonjour-name 15000)]
-    (if endpoint
-      (let [endpoint-address (.getHostAddress (:address endpoint))
-            endpoint-port (:port endpoint)]
-        (mount-webdav repl-env bonjour-name endpoint-address endpoint-port)
-        (set-up-socket repl-env opts endpoint-address (dec endpoint-port)))
-      ((print-fn opts) "Failed to reconnect."))))

 (defn setup
   [repl-env opts]
@@ -283,7 +250,6 @@
           env (ana/empty-env)
           core (io/resource "cljs/core.cljs")]
       ((println-fn opts) "\nConnecting to" (bonjour-name->display-name bonjour-name) "...\n")
-      (reset! (:reconnect-fn repl-env) (partial reconnect repl-env opts))
       (set-up-socket repl-env opts endpoint-address (dec endpoint-port))
       (when (= "true" (:value (jsc-eval repl-env "typeof cljs === 'undefined'")))
         ;; compile cljs.core & its dependencies, goog/base.js must be available
@@ -343,7 +309,7 @@
       (tear-down repl-env)
       (throw t))))

-(defrecord JscEnv [response-promise bonjour-name webdav-mount-point socket torn-down reconnect-fn options]
+(defrecord JscEnv [response-promise bonjour-name webdav-mount-point socket options]
   repl/IReplEnvOptions
   (-repl-options [this]
     {:require-foreign true})
@@ -374,11 +340,10 @@
   (-load [repl-env provides url]
     (load-javascript repl-env provides url))
   (-tear-down [repl-env]
-    (reset! torn-down true)
     (tear-down repl-env)))

 (defn repl-env* [options]
-  (JscEnv. (atom nil) (atom nil) (atom nil) (atom nil) (atom nil) (atom nil) options))
+  (JscEnv. (atom nil) (atom nil) (atom nil) (atom nil) options))

 (defn repl-env
   [& {:as options}]


Expose safe file navigation to apps via yada ns

--- src/yada/yada.clj
+++ src/yada/yada.clj
@@ -29,4 +29,5 @@
  [yada.resource resource as-resource]
  [yada.test request-for response-for]
  [yada.util get-host-origin]
+ [yada.resources.file-resource safe-relative-path safe-relative-file]
  [yada.wrappers routes])


set card to default source for orders

set card to default source for orders

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


version bump

version bump

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


Update Jetty max-threads to 100

Update Jetty max-threads to 100

This allows us to make more out of the HTTP API, since we are giving it
4GiB of RAM in production. Since this service is spending the vast
(vast) majority of its time waiting for IO, this number could easily be
further adjusted upward, however, the more RabbitMQ producers we have
available the better throughput we can get if specific channels become
busy.

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


formatting

formatting

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


call shutdown-agents as the last step in microbench -main


add validation tests

add validation tests

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

--- test/navigator/test_validation.clj
+++ test/navigator/test_validation.clj
@@ -0,0 +1,31 @@
+(ns navigator.test-validation
+  (:require [clojure.test :refer :all]
+            [navigator.validation :refer :all]))
+
+(deftest valid?-test
+  (testing "valid?"
+    (is (= (valid? (validate-task-in {}) false)))))
+
+(deftest validate-task-in-test
+  (testing "validate-task-in"
+    (is (= (validate-task-in {}) '{:task/description ["must be present"], :task/version ["must be present"], :task/name ["must be present"], :task/id-sk-origin ["must be present"], :task/id-sk ["must be present"]}))))
+
+(deftest validate-comp-in-test
+  (testing "validate-comp-in"
+    (is (= (validate-comp-in {}) '{:comp/tags ["must be present"], :comp/status ["must be present"], :comp/version ["must be present"], :comp/description ["must be present"], :comp/name ["must be present"], :comp/id-sk ["must be present"]}))))
+
+(deftest validate-comp-tag-in-test
+  (testing "validate-comp-tag-in"
+    (is (= (validate-comp-tag-in {}) '{:comp-tag/isfinal ["must be present"], :comp-tag/isrequestable ["must be present"], :comp-tag/version ["must be present"], :comp-tag/icon ["must be present"], :comp-tag/child-of ["must be present"], :comp-tag/name ["must be present"], :comp-tag/disp-ctxs ["must be present"], :comp-tag/type ["must be present"], :comp-tag/description ["must be present"], :comp-tag/status ["must be present"]}))))
+
+(deftest validate-perf-asmt-in-test
+  (testing "validate-perf-asmt-in"
+    (is (= (validate-perf-asmt-in {}) '{:perf-asmt/credit-value-denominator ["must be present"], :perf-asmt/credit-value-numerator ["must be present"], :perf-asmt/comps ["must be present"], :perf-asmt/duration-rating-days ["must be present"], :perf-asmt/type ["must be present"], :perf-asmt/version ["must be present"], :perf-asmt/name ["must be present"], :perf-asmt/id-sk-origin ["must be present"], :perf-asmt/id-sk ["must be present"]}))))
+
+(deftest validate-user2comp-in-test
+  (testing "validate-user2comp-in"
+    (is (= (validate-user2comp-in {}) '{:user2comp/score-type ["must be present"], :user2comp/score-denominator ["must be present"], :user2comp/final-score ["must be present"], :user2comp/current-score ["must be present"], :user2comp/proposed-completion-date ["must be present"], :user2comp/start-date ["must be present"], :user2comp/comp ["must be present"], :user2comp/sis-user-id ["must be present"]}))))
+
+(deftest validate-user2perf-asmt-in-test
+  (testing "validate-user2perf-asmt-in"
+    (is (= (validate-user2perf-asmt-in {}) '{:user2perf-asmt/grade ["must be present"], :user2perf-asmt/perf-asmt ["must be present"], :user2perf-asmt/user ["must be present"]}))))


add g2

add g2

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

--- src/life/g2.cljs
+++ src/life/g2.cljs
@@ -0,0 +1,90 @@
+(ns life.g2
+  (:require [jayq.core :as j :refer [$]]
+            [yolk.bacon :as b]
+            [life.bj :as bj]
+            [life.templates :as t]))
+
+(defn render [$c]
+  (fn [v]
+    (if v
+      (j/add-class $c "alive")
+      (j/remove-class $c "alive"))))
+
+(defn add-life [point]
+  (fn [world]
+    (set (cons point world))))
+
+(defn remove-life [point]
+  (fn [world]
+    (set (remove #{point} world))))
+
+(defn toggle [p w]
+  (fn [_]
+    (if ((set (bj/get-value w)) p)
+      (bj/modify w (remove-life p))
+      (bj/modify w (add-life p)))))
+
+(defn cell [vw w p t]
+  (let [$c (t/table-cell)
+        click (bj/clickE $c)
+        changes (-> w
+                    b/changes
+                    (b/map #((set %) p))
+                    b/skip-duplicates)]
+    (b/on-value changes (render $c))
+    (b/on-value click (toggle p w))
+    {:$elem $c}))
+
+(defn get-neighbors [p]
+  ((apply juxt
+          (for [a [-1 0 1]
+                b  [-1 0 1]
+                :when (not= [0 0] [a b])]
+            (fn [[x y]] [(+ x a) (+ y b)]))) p))
+
+(defn sustain [w]
+  (remove nil?
+          (for [p w
+                :let [neighbors (filter (set w) (get-neighbors p))]]
+            (condp > (count neighbors)
+              2 nil
+              4 p
+              9 nil))))
+
+(defn reproduce [w]
+  (remove nil?
+          (for [p (set (mapcat get-neighbors w))
+                :let [nneighbors (filter (set w) (get-neighbors p))]]
+            (if (= 3 (count nneighbors))
+              p
+              nil))))
+
+(defn iteration [w]
+  (set (concat (sustain w) (reproduce w))))
+
+(defn build [h w]
+  (into {}
+        (for [x (range w)
+              y (range h)
+              :let [p [x y]]]
+          [p (b/bus)])))
+
+(defn game [h w]
+  (let [visible-world (build h w)
+        world (bj/model #{})
+        $t (t/table)
+        tick (b/bus)]
+    (doseq [y (range h)
+            :let [$r (t/table-row)]]
+      (j/append $t $r)
+      (doseq [x (range w)
+              :let [c (cell visible-world
+                            world
+                            [x y]
+                            tick)
+                    $c (:$elem c)]]
+        (j/append $r $c)))
+    (b/on-value tick #(bj/modify world iteration))
+    {:$elem $t
+     :tick tick
+     :world world}))


Working so far.

Working so far.

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/psy-q/vinylla.git/'


add helpers for setting mat4s, opengl/lwjgl matrices are column major so this unwinds the potential counter-intuitiveness

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


[WM] Write a better NewRelic wrapper for site.list

The old one was broken. This one might not be?

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


Allow static content to be cached.

Allow static content to be cached.

--- src/clojars/web.clj
+++ src/clojars/web.clj
@@ -188,8 +188,9 @@
   (GET "/"
     (html-doc (session :account) nil [:h1 "Hello World"]))
   (ANY "/*"
-    (or (serve-file (params :*))
-        :next))
+       (if-let [f (serve-file (params :*))]
+         [{:headers {"Cache-Control" "max-age=3600"}} f]
+         :next))
   (ANY "*"
     [404 (html-doc (session :account) "Page not found" (not-found-doc))]))


Removed all logging

Removed all logging

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


changed new-reliquary version

changed new-reliquary version

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


added download with progress example

added download with progress example

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

--- examples/progress_download.clj
+++ examples/progress_download.clj
@@ -0,0 +1,72 @@
+;; extra required dependencies for this example:
+;; :dependencies [[commons-io "2.4"]]
+
+(ns clj-http.examples.progress-download
+  (:require [clj-http.client :as http]
+            [clojure.java.io :refer [output-stream]])
+  (:import (org.apache.commons.io.input CountingInputStream)))
+
+(defn print-progress-bar
+  "Render a simple progress bar given the progress and total. If the total is zero
+   the progress will run as indeterminated."
+  ([progress total] (print-progress-bar progress total {}))
+  ([progress total {:keys [bar-width]
+                    :or   {bar-width 50}}]
+   (if (pos? total)
+     (let [pct (/ progress total)
+           render-bar (fn []
+                        (let [bars (Math/floor (* pct bar-width))
+                              pad (- bar-width bars)]
+                          (str (clojure.string/join (repeat bars "="))
+                               (clojure.string/join (repeat pad " ")))))]
+       (print (str "[" (render-bar) "] "
+                   (int (* pct 100)) "% "
+                   progress "/" total)))
+     (let [render-bar (fn [] (clojure.string/join (repeat bar-width "-")))]
+       (print (str "[" (render-bar) "] "
+                   progress "/?"))))))
+
+(defn conj-at [v idx val]
+  "Addes value into a vector at an specific index."
+  (-> (subvec v 0 idx)
+      (conj val)
+      (concat (subvec v idx))))
+
+(defn conj-after [v needle val]
+  "Finds an item into a vector and adds val just after it.
+   If needle is not found, the input vector will be returned."
+  (let [index (.indexOf v needle)]
+    (if (neg? index)
+      v
+      (conj-at v (inc index) val))))
+
+(defn wrap-downloaded-bytes-counter
+  "Middleware that provides an CountingInputStream wrapping the stream output"
+  [client]
+  (fn [req]
+    (let [resp (client req)
+          counter (CountingInputStream. (:body resp))]
+      (merge resp {:body                     counter
+                   :downloaded-bytes-counter counter}))))
+
+(defn download-with-progress [url target]
+  (http/with-middleware
+    (-> http/default-middleware
+        (conj-after http/wrap-redirects wrap-downloaded-bytes-counter)
+        (conj http/wrap-lower-case-headers))
+    (let [request (http/get url {:as :stream})
+          length (Integer. (get-in request [:headers "content-length"] 0))
+          buffer-size (* 1024 10)]
+      (println)
+      (with-open [input (:body request)
+                  output (output-stream target)]
+        (let [buffer (make-array Byte/TYPE buffer-size)
+              counter (:downloaded-bytes-counter request)]
+          (loop []
+            (let [size (.read input buffer)]
+              (when (pos? size)
+                (.write output buffer 0 size)
+                (print "\r")
+                (print-progress-bar (.getByteCount counter) length)
+                (recur))))))
+      (println))))


Create days_checker.clj

Create days_checker.clj

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

--- clj/days_checker.clj
+++ clj/days_checker.clj
@@ -0,0 +1,20 @@
+(ns clj180.core
+  (:require [clojure.data.json :as json]))
+
+(defn -main
+  [& args]
+  (def days (json/read-str (slurp "./resources/days.json")))
+
+  (defn count-absence
+    [start end]
+    (def out-days
+      (filter
+       (fn [day]
+         (not (some #{"GB"} (get day "locations"))))
+       (subvec days start end)))
+
+    (printf "%s: %s\n" (get (nth days start) "date") (count out-days))
+
+  (doseq [x (range 1853)]
+    (count-absence x (min (+ 366 x) 1853))))
+


Add specutils

Add specutils

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

--- src/bluebell/utils/specutils.clj
+++ src/bluebell/utils/specutils.clj
@@ -0,0 +1,12 @@
+(ns bluebell.utils.specutils
+  (:require [clojure.spec.alpha :as spec]))
+
+(defn force-conform [dst-spec x]
+  (let [y (spec/conform dst-spec x)]
+    (if (= y ::spec/invalid)
+      (throw (ex-info "Failed to conform to spec"
+                      {:spec dst-spec
+                       :x x}))
+      y)))
+
+


adding first implementation of websocket tunnel (via sente & http-kit)

error: pathspec 'src/cljc/ow/starbuck/tunnels/websocket.cljc' did not match any file(s) known to git

--- src/cljc/ow/starbuck/tunnels/websocket.cljc
+++ src/cljc/ow/starbuck/tunnels/websocket.cljc
@@ -0,0 +1,69 @@
+(ns ow.starbuck.tunnels.websocket
+  #?(:cljs (:require-macros [cljs.core.async.macros :refer [go-loop]]))
+  (:require [taoensso.timbre :refer [trace debug info warn error fatal]]
+            #?(:clj  [clojure.core.async :refer [go-loop] :as a]
+               :cljs [cljs.core.async :as a])
+            [taoensso.sente :as sente]
+            #?(:clj  [taoensso.sente.server-adapters.http-kit :refer [get-sch-adapter]])
+            [ow.starbuck.protocols :as p]))
+
+#?(:clj  (defn- make-sente-channel! [{:keys [userid-fn] :as this}]
+           (sente/make-channel-socket! (get-sch-adapter)
+                                       (merge {}
+                                              (and userid-fn
+                                                   {:user-id-fn userid-fn}))))
+
+   :cljs (defn- make-sente-channel! [{:keys [path] :as this}]
+           (sente/make-channel-socket! path
+                                       {:wrap-recv-evs? false})))
+
+(defn- handle-inbound-sentemsg [{:keys [recv-fn] :as this} {:keys [id ?data] :as sentemsg}]
+  (debug "got inbound message:" id ?data)
+  ;;; TODO: add auth checking
+  ;;; TODO: maybe add msg shaping
+  (recv-fn ?data))
+
+(defn- start-inbound-msg-handler! [{:keys [senteobjs] :as this}]
+  (let [ch-recv (:ch-recv senteobjs)]
+    (go-loop [sentemsg (a/<! ch-recv)]
+      (when-not (nil? sentemsg)
+        (when (not= (namespace (:id sentemsg)) "chsk")
+          (handle-inbound-sentemsg this sentemsg))
+        (recur (a/<! ch-recv))))))
+
+(defn- do-send [{:keys [senteobjs] :as this} msg]
+  ;;; TODO: maintain queue of pending msgs, to make sure they are sent in the correct order
+  (go-loop [_ nil]
+    (let [open? (some-> senteobjs :state .-state :open?)
+          send-fn (:send-fn senteobjs)]
+      (if open?
+        (do (debug "sending message to remote:" msg)
+            (send-fn msg))
+        (do (debug "channel not open yet, delaying:" msg)
+            (recur (a/<! (a/timeout 500))))))))
+
+(defrecord WebsocketTunnel [recv-fn    ;; server & client
+                            path       ;; client
+                            userid-fn  ;; server
+                            senteobjs  ;; start/stop
+                            ]
+
+  p/Tunnel
+
+  (send [this msg]
+    (do-send this msg)))
+
+(defn websocket-tunnel [recv-fn & {:keys [path userid-fn]}]
+  (map->WebsocketTunnel {:recv-fn recv-fn
+                         :path path
+                         :userid-fn userid-fn}))
+
+(defn start [this]
+  (let [this (assoc this
+                    :senteobjs (make-sente-channel! this))]
+    (start-inbound-msg-handler! this)
+    this))
+
+(defn stop [this]
+  ;;;(a/close! this ch-recv)
+  (assoc this :senteobjs nil))


refactoring to set

refactoring to set

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/mprokopov/privat24-manager.git/'


move read up so comment about "from here below is upsert related" is true


Add wrap function.

Add wrap function.

High order function that gives one normal function and returns
an other that returns a Try monad.

--- src/cljx/cats/monad/exception.cljx
+++ src/cljx/cats/monad/exception.cljx
@@ -112,6 +112,18 @@
   (or (success? v)
       (failure? v)))

+(defn wrap
+  "Wrap a function in a try monad.
+
+  Is a high order function that accept a function
+  as parameter and returns an other that returns
+  success or failure depending of result of the
+  first function."
+  [func]
+  (let [metadata (meta #'func)]
+    (-> (fn [& args] (try-on (apply func args)))
+        (with-meta metadata))))
+
 #+clj
 (defmacro try-on
   "Wraps a computation and return success of failure."


Add the call program from test.benchmark

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

--- src/call.clj
+++ src/call.clj
@@ -0,0 +1,15 @@
+(ns call
+  (:gen-class))
+
+(defn vcall ^long [^long i]
+  (inc i))
+
+(defn bench [^long reps]
+  (loop [i 0
+         accum 0]
+    (when (< i reps)
+      (recur (inc i) (vcall accum)))))
+
+(defn -main [& args]
+  (dotimes [_ 10]
+    (time (bench 10000000))))


Problem 0038

Problem 0038

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

--- src/project_euler/problem_0038.clj
+++ src/project_euler/problem_0038.clj
@@ -0,0 +1,36 @@
+(ns project-euler.problem_0038)
+
+;; Take the number 192 and multiply it by each of 1, 2, and 3:
+
+;; 192 × 1 = 192
+;; 192 × 2 = 384
+;; 192 × 3 = 576
+;; By concatenating each product we get the 1 to 9 pandigital, 192384576.
+;; We will call 192384576 the concatenated product of 192 and (1,2,3)
+
+;; The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5,
+;; giving the pandigital, 918273645, which is the concatenated product of 9 and (1,2,3,4,5).
+
+;; What is the largest 1 to 9 pandigital 9-digit number that can be formed as
+;; the concatenated product of an integer with (1,2, ... , n) where n > 1?
+
+(defn n->digits
+  [n]
+  (loop [n n ds []]
+    (if (== 0 n)
+      ds
+      (recur (quot n 10) (conj ds (rem n 10))))))
+
+(def digits-from-1-to-9 (set (n->digits 123456789)))
+
+(defn solution []
+  (->> (range 9183 10000)
+       (map #(* 100002 %))
+       (filter #(= (set (n->digits %)) digits-from-1-to-9))
+       (last)
+       ))
+
+(solution)
+
+;;-> 932718654
+


dynamic shaders! will optimize later with File watchers


Add compare flow for tnseq

Add compare flow for tnseq

error: pathspec 'Jobs/tnseq-compare-job-template.clj' did not match any file(s) known to git

--- Jobs/tnseq-compare-job-template.clj
+++ Jobs/tnseq-compare-job-template.clj
@@ -0,0 +1,10 @@
+
+{:nodes
+ {:comp
+  {:name "calc-tnseq-fitness",
+   :type "tool",
+   :args []}
+  :prn1 {:type "func",
+         :name "prn"}},
+ :edges
+ {:comp [:prn1]}}


[DG] Log the messages that cause NPEs in the underlying libs

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


assets pipeline core added

assets pipeline core added

error: pathspec 'src/hell_hound/assets-pipeline/core.clj' did not match any file(s) known to git

--- src/hell_hound/assets-pipeline/core.clj
+++ src/hell_hound/assets-pipeline/core.clj
@@ -0,0 +1,6 @@
+(ns hell-hound.assets-pipeline.core)
+
+(defn middleware
+  "A middleware to manage the assets of the handler"
+  [handler]
+  (fn [request]) handler)


chore: change pool defaults

chore: change pool defaults

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


Removed comments

Removed comments

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


try 2

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


curl options

curl options

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


Re-instate lein profile for cider.

Re-instate lein profile for cider.

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

--- lein/.lein/profiles.clj
+++ lein/.lein/profiles.clj
@@ -0,0 +1,10 @@
+{:repl {:plugins [[cider/cider-nrepl "0.18.0"]
+                  [refactor-nrepl "2.4.0-SNAPSHOT"]]
+        :dependencies
+        [[acyclic/squiggly-clojure "0.1.9-SNAPSHOT"
+          :exclusions [org.clojure/tools.reader]]
+         [compliment "0.3.5"]]}
+ :env {:squiggly
+       "{:checkers [:eastwood]
+         :eastwood-exclude-linters [:unlimited-use :no-ns-form-found]}"}}
+


Create defalias method.

Create defalias method.

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

--- src/manners/utils.clj
+++ src/manners/utils.clj
@@ -0,0 +1,7 @@
+(ns manners.utils)
+
+(defmacro defalias
+  [name value]
+  `(let [doc-str# (str "This is an alias of " (var ~value)\.)]
+     (def ~name ~value)
+     (alter-meta! (var ~name) assoc :doc doc-str#)))


Added function for linear regression

Added function for linear regression

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

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

--- src/conexp/math/statistics.clj
+++ src/conexp/math/statistics.clj
@@ -0,0 +1,18 @@
+(ns conexp.math.statistics
+  (:use conexp.base
+	conexp.math.util)
+  (:import [org.apache.commons.math.stat.regression SimpleRegression]))
+
+(defn linear-regression
+  "Computes the linear regression of the given sequence of points
+  (at least 2). Returns the pair of intercept and slope of the linear
+  regression, i.e. for y = a + b*x the pair [a b] is returned."
+  [points]
+  (if (> 2 (count points))
+    (illegal-argument "linear-regression needs at least 2 points."))
+  (let [regression (SimpleRegression.)]
+    (doseq [[x y] points]
+      (.addData regression (double x) (double y)))
+    [(.getIntercept regression) (.getSlope regression)]))
+
+nil


Gabor stuff to be cleaned up.

Gabor stuff to be cleaned up.

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

--- src/funimage/filters/gabor.clj
+++ src/funimage/filters/gabor.clj
@@ -0,0 +1,95 @@
+(ns src.funimage.filters.gabor
+  (:use [funimage imp project utils]
+        [funimage.imp calculator roi]
+        [funimage.segmentation utils]))
+
+
+(defn abs [n] (max n (- n)))
+
+(defn make-odd [n] (if (not (odd? n))
+                     (+ n 1)
+                     n))
+(defn gauss-0
+  [x y sigma]
+  (java.lang.Math/exp (/ (- 0 (+ (* x x) (* y y))) (* 2 sigma sigma))))
+
+(defn gauss
+  [x y x-sigma y-sigma]
+  (java.lang.Math/exp (* -1 (+ (/ (* x x) x-sigma) (/ (* y y) y-sigma)))))
+
+(defn gabor-0
+  "takes wavelength, direction, returns kernel"
+  [wavelength direction]
+  (let [octave 1
+        sigma (* wavelength (/ 1 Math/PI) (Math/sqrt (/ (Math/log 2) 2)) (/ (+ (Math/pow 2 octave) 1) (+ (Math/pow 2 octave) -1)))
+        x (java.lang.Math/ceil (Math/sqrt (* -2 sigma sigma (Math/log 0.005))))
+        row (+ (* 2 x) 1)
+        columns row
+        row-center (/ (- row 1) 2)
+        col-center (/ (- columns 1) 2)
+        y-range (map #(+ (- 0 row-center) %) (flatten (map #(repeat columns %) (range row))))
+        x-range (map #(+ (- 0 col-center) %) (flatten (repeat row (range columns))))
+        gaussian (map #(gauss-0 %1 %2 sigma) x-range y-range)
+        theta (map #(+ %1 %2) (map #(* (java.lang.Math/cos direction) %) x-range) (map #(* (java.lang.Math/sin direction) %) y-range))
+        fourier (map #(java.lang.Math/cos %) (map #(* 2 Math/PI (/ % wavelength))theta))
+        gabor (map #(* %1 %2) gaussian fourier)]
+    [(float-array gabor) (int row)]))
+
+(defn gabor-fixed
+  "takes wavelength, direction, aspect; returns kernel"
+  [wavelength direction gamma]
+  (let [psi 0
+        x-sigma (* wavelength 2 Math/PI)
+        y-sigma (/ x-sigma gamma)
+        nstds 0.5
+        row (max (java.lang.Math/ceil
+                   (max 1
+                        (max (abs (* nstds x-sigma (java.lang.Math/cos direction)))
+                             (abs (* nstds y-sigma (java.lang.Math/sin direction))))))
+
+                 (java.lang.Math/ceil
+                   (max 1
+                        (max (abs (* nstds x-sigma (java.lang.Math/sin direction)))
+                             (abs (* nstds y-sigma (java.lang.Math/cos direction)))))))
+        columns row
+        row-center (/ (+ row 1) 2)
+        col-center (/ (+ columns 1) 2)
+        x-range (map #(+ (- 0 col-center) %) (flatten (repeat row (range columns))))
+        y-range (map #(+ (- 0 row-center) %) (flatten (map #(repeat columns %) (range row))))
+        x-theta (map #(+ %1 %2) (map #(* (java.lang.Math/cos direction) %) x-range) (map #(* (java.lang.Math/sin direction) %) y-range))
+        y-theta (map #(+ %1 %2) (map #(* (java.lang.Math/sin direction) %) (map unchecked-negate x-range)) (map #(* (java.lang.Math/cos direction) %) y-range))
+        gaussian (map #(gauss %1 %2 x-sigma y-sigma) x-theta y-theta)
+
+        true-size (make-odd (int (java.lang.Math/ceil (java.lang.Math/sqrt (count (remove #(< % 0.001) gaussian))))))
+        row true-size
+        columns true-size
+        row-center (/ (- row 1) 2)
+        col-center (/ (- columns 1) 2)
+        x-range (map #(+ (- 0 col-center) %) (flatten (repeat row (range columns))))
+        y-range (map #(+ (- 0 row-center) %) (flatten (map #(repeat columns %) (range row))))
+        x-theta (map #(+ %1 %2) (map #(* (java.lang.Math/cos direction) %) x-range) (map #(* (java.lang.Math/sin direction) %) y-range))
+        y-theta (map #(+ %1 %2) (map #(* (java.lang.Math/sin direction) %) (map unchecked-negate x-range)) (map #(* (java.lang.Math/cos direction) %) y-range))
+        gaussian (map #(gauss %1 %2 x-sigma y-sigma) x-theta y-theta)
+
+        fourier (map #(java.lang.Math/cos %) (map #(* 2 Math/PI (/ % wavelength)) (map #(+ psi %) x-theta)))
+        gabor (map #(* %1 %2) gaussian fourier)]
+    [(float-array gabor) (int row)]))
+
+(defn gabor
+  "takes wavelength, direction, returns kernel"
+  [wavelength direction sigma psi gamma dim]
+  (let [x-sigma sigma
+        y-sigma (/ x-sigma gamma)
+        row dim
+        columns row
+        row-center (/ (+ row 1) 2)
+        col-center (/ (+ columns 1) 2)
+        x-range (map #(+ (- 0 col-center) %) (flatten (repeat row (range columns))))
+        y-range (map #(+ (- 0 row-center) %) (flatten (map #(repeat columns %) (range row))))
+        x-theta (map #(+ %1 %2) (map #(* (java.lang.Math/cos direction) %) x-range) (map #(* (java.lang.Math/sin direction) %) y-range))
+        y-theta (map #(+ %1 %2) (map #(* (java.lang.Math/sin direction) %) (map unchecked-negate x-range)) (map #(* (java.lang.Math/cos direction) %) y-range))
+        gaussian (map #(gauss %1 %2 x-sigma y-sigma) x-theta y-theta)
+        fourier (map #(java.lang.Math/cos %) (map #(* 2 Math/PI (/ % wavelength)) (map #(+ psi %) x-theta)))
+        gabor (map #(* %1 %2) gaussian fourier)]
+    [(float-array gabor) (int row)]))
+


app.cljs tests

app.cljs tests

error: pathspec 'test/re_complete/app_test.cljs' did not match any file(s) known to git

--- test/re_complete/app_test.cljs
+++ test/re_complete/app_test.cljs
@@ -0,0 +1,42 @@
+(ns re-complete.app-test
+  (:require [re-complete.app :as app]
+            [cljs.test :refer-macros [deftest is]]))
+
+(def previous-input "appricot ( tomato")
+
+(def input-text "appricot (b tomato")
+
+(def word-to-autocomplete "broccolini")
+
+(def options {:exclude-chars "()"
+              :sort-fn count})
+
+(def dictionary '("appricot" "broccolini" "tomato" "bok choy" "bell peppers" "amaranth" "leek"))
+
+(deftest items-to-autocomplete
+  (is (= (app/items-to-autocomplete dictionary "b") '("broccolini" "bok choy" "bell peppers"))))
+
+(deftest index
+  (is (= (app/index previous-input input-text) 10)))
+
+(deftest current-word
+  (is (= (app/current-word input-text (app/index previous-input input-text)) "(b")))
+
+(deftest completions
+  (is (= (app/completions (app/current-word input-text (app/index previous-input input-text)) dictionary options) ["bok choy" "broccolini" "bell peppers"])))
+
+(deftest words-to-index
+  (is (= (app/words-to-index (app/index previous-input input-text) input-text) ["appricot" "(b"])))
+
+(deftest index-of-word
+  (is (= (app/index-of-word (app/index previous-input input-text) input-text) 1)))
+
+(deftest index-in-word
+  (is (= (app/index-in-word (app/index previous-input input-text) input-text) 1)))
+
+(deftest autocomplete-word-with-excluded-chars
+  (let [change-index (app/index previous-input input-text)]
+    (is (= (app/autocomplete-word-with-excluded-chars (app/index-in-word change-index input-text) (app/current-word input-text change-index) word-to-autocomplete (:exclude-chars options)) "(broccolini"))))
+
+(deftest autocomplete-word-to-string
+  (is (= (app/autocomplete-word-to-string (app/index previous-input input-text) (:exclude-chars options) input-text word-to-autocomplete) "appricot (broccolini tomato")))


Add spotify auth link helper (in globals for now)

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

--- src/trak/globals.cljs
+++ src/trak/globals.cljs
@@ -0,0 +1,26 @@
+(ns trak.globals
+  (:require-macros [trak.config :refer [cljs-env]])
+  (:require [trak.utils :as utils])
+  (:import goog.Uri
+           goog.Uri.QueryData
+           goog.string))
+
+
+
+(defn build-query-params [kws]
+  (utils/info kws)
+  (utils/info (.createFromKeysValues QueryData (map name (keys kws)) (vals kws)))
+  (reduce #(.add %1
+                 (.urlEncode string (name (first %2)))
+                 (.urlEncode string (second %2)))
+          (QueryData.)
+          kws)
+  )
+
+(defn spotify-authorization-link [scope]
+  (doto (Uri. "https://accounts.spotify.com/authorize")
+    (.setQuery (build-query-params {:response_type "code"
+                                    :client_id     (cljs-env :spotify-client-id)
+                                    :scope         scope
+                                    :redirect_uri  (cljs-env :spotify-redirect-url)
+                                    :state         (.getRandomString string)}))))


add a generic util ns

add a generic util ns

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

--- src/whatsoup/util.clj
+++ src/whatsoup/util.clj
@@ -0,0 +1,3 @@
+(ns whatsoup.util)
+
+(defn throw-unexpected-cond [] (throw (RuntimeException. "uncovered cond branch")))


no longer need to require client library!

--- sidecar/project.clj
+++ sidecar/project.clj
@@ -17,6 +17,7 @@
    [compojure "1.3.3"]
    [clj-stacktrace "0.2.8"]
    [cljsbuild "1.0.5"]
+   [figwheel "0.2.8-SNAPSHOT"]

    [com.cemerick/piggieback "0.1.5"]
    [cider/cider-nrepl "0.8.2"]


Bump db version

Bump db version

--- src-clj/acha/db.clj
+++ src-clj/acha/db.clj
@@ -9,7 +9,7 @@
     [acha.achievement-static :as static])
   (:import com.mchange.v2.c3p0.ComboPooledDataSource))

-(def ^:const ^:private db-version "0.2.0")
+(def ^:const ^:private db-version "0.2.1")

 (def ^:private gen-id-key (keyword "last_insert_rowid()"))


add datomic core functionality

add datomic core functionality

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

--- src/clj/lese/db.clj
+++ src/clj/lese/db.clj
@@ -0,0 +1,102 @@
+(ns lese.db
+  (require [datomic.api :as d]
+           [clojure.java.io :as io])
+  (:import datomic.Util))
+
+(def db-uri-base "datomic:free://0.0.0.0:4334")
+
+(defn scratch-conn
+  "Create a connection to an anonymous, in-memory database."
+  []
+  (let [uri (str "datomic:mem://" (d/squuid))]
+    (d/delete-database uri)
+    (d/create-database uri)
+    (d/connect uri)))
+
+
+(defn persistent-conn
+  "Create connection to persistent datomic database"
+  []
+  (let [uri (str db-uri-base "/haushalt")]
+    (d/create-database uri)
+    (d/connect uri)))
+
+
+(defn initialize-db [conn path]
+  (doseq [txd (-> path io/resource io/reader Util/readAll)]
+    (d/transact conn txd))
+  :done)
+
+
+(defn get-schema-elements
+  "Get identifiers of schema elements"
+  [db]
+  (sort
+   (d/q '[:find [?ident ...]
+          :where [_ :db/ident ?ident]]
+        db)))
+
+
+(defn add-user
+  "Add new user"
+  [conn {:keys [email]}]
+  (d/transact
+   conn
+   [{:db/id (d/tempid :db.part/user)
+     :user/email email}])
+  :done)
+
+
+(defn get-user-id
+  "Find user id given an email"
+  [conn email]
+  (let [query '[:find ?e
+               :in $ ?email
+               :where
+                [?e :user/email ?email]]
+        db (d/db conn)]
+    (ffirst (d/q query db email))))
+
+(defn get-tag-id
+  "Find tag id given a tag name"
+  [conn tag-name]
+  (let [query '[:find ?e
+                :in $ ?tname
+                :where
+                [?e :tag/name ?tname]]
+        db (d/db conn)]
+    (ffirst (d/q query db tag-name))))
+
+
+(defn add-bookmark
+  "Add new bookmark"
+  [conn {:keys [url title email tags]}]
+  (let [uid (get-user-id conn email)
+        tids (map (partial get-tag-id conn) tags)]
+    (d/transact
+     conn
+     [{:db/id (d/tempid :db.part/user)
+       :bookmark/tags tids
+       :bookmark/user uid
+       :bookmark/url url
+       :bookmark/title title}])
+    ))
+
+
+(defn get-user-bookmarks
+  "retrieve all bookmarks of a given user"
+  [email]
+
+  )
+
+
+(comment
+
+  (def conn (scratch-conn))
+
+  (def db (d/db conn))
+
+  (initialize-db conn "schema.edn")
+
+
+  )


0.4.5: turn off debug logging by default

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


basic function

basic function

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


test tinyweb

test tinyweb

error: pathspec 'src/mbfpp/oo/tinyweb/example.clj' did not match any file(s) known to git

--- src/mbfpp/oo/tinyweb/example.clj
+++ src/mbfpp/oo/tinyweb/example.clj
@@ -0,0 +1,46 @@
+(ns mbfpp.oo.tinyweb.example
+  (:use [mbfpp.oo.tinyweb.core])
+  (:require [clojure.string :as str]))
+
+(def request {:path "/greeting"
+              :body "Mike,Joe,John,Steve"})
+
+;控制器的代码
+(defn make-greeting[name]
+  (let [greetings ["Hello" "Greetings" "Salutations" "Hola"]
+        greeting-count (count greetings)]
+    (str (greetings (rand-int greeting-count)) "," name)))
+
+(defn handle-greeting [http-request]
+  {:greetings (map make-greeting (str/split (:body http-request) #","))})
+
+;运行测试请求，并返回合适的模型map
+(handle-greeting request)
+
+;该代码将模型渲染到HTML，他也是一个函数，以合适的模型map作为入参，并返回一个字符串
+(defn render-greeting [greeting]
+  (str "
" greeting "
"))
+
+;\newline使用换行符连接
+(defn greeting-view [model]
+  (let [rendered-greetings (str/join \newline (map render-greeting (:greetings model)) )]
+    (str "
Friendly Greetings
" rendered-greetings )))
+
+(greeting-view (handle-greeting request))
+
+;这是一个用于在请求返回前记录其访问路径的简单函数
+(defn logging-filter [http-request]
+  (println (str "In logging Filter -request for path: "
+                (:path http-request))) http-request)
+
+(def request-handlers
+  {"/greeting" {:controller handle-greeting
+                :view greeting-view}})
+
+(def filters [logging-filter])
+
+(def tinyweb-instance (tinyweb request-handlers filters))
+
+
+(tinyweb-instance request)
+


add create 404 test

add create 404 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/fhirbase/fhirplace.git/'


Macro bat laburtzeko

Macro bat laburtzeko

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


simplified meta associations

simplified meta associations

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


Move LLVM stuff into run-component

Move LLVM stuff into run-component

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/kkroening/jackal.git/'


Some error handling for sending results.

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


Add test case for issue #63, input tag without type attribute

--- test/sablono/core_test.cljs
+++ test/sablono/core_test.cljs
@@ -175,6 +175,14 @@
                     [:li "bar"]
                     [:li "baz"])])))

+(deftest test-input
+  (is (= (html-vec [:input])
+         [:input {}])))
+
+(deftest test-input-with-extra-atts
+  (is (= (html-vec [:input {:class "classy"}])
+         [:input {:class "classy"}])))
+
 (deftest test-hidden-field
   (is (= (html-vec (html/hidden-field :foo "bar"))
          [:input {:type "hidden" :name "foo" :id "foo" :value "bar"}])))