finish clojure version

finish clojure version

error: pathspec 'Longest-String-Prefix/LSP.clj' did not match any file(s) known to git

--- Longest-String-Prefix/LSP.clj
+++ Longest-String-Prefix/LSP.clj
@@ -0,0 +1,28 @@
+(def alphabet {	"a" 1 "b" 2 "c" 3 "d" 4	"e" 5 "f" 6 "g" 7 "h" 8 "i" 9  "j" 10 "k" 11 "l" 12 "m" 13 "n" 14 "o" 15 "p" 16 "q" 17 "r" 18 "s" 19 "t" 20 "u" 21 "v" 22 "w" 23 "x" 24 "y" 25 "z" 26})
+
+(defn longest-prefix [s]
+  (loop [strseq (seq s)
+         stack 0
+         templong 0
+         longest 0]
+    ;println (first strseq) stack templong longest)
+    (cond (= strseq '())
+          (if (and (= 0 longest) (not (= 0 templong))) templong longest)
+          (>= (get alphabet (str (first strseq))) stack)
+          (recur (rest strseq) (get alphabet (str (first strseq))) (inc templong) longest)
+          :else
+          (recur (rest strseq)
+                 (get alphabet (str (first strseq)))
+                 1
+                 (if (> templong longest) templong longest)))))
+
+(println (longest-prefix "knotty"))
+(println (longest-prefix "apple"))
+(println (longest-prefix "excel"))
+
+
+
+
+
+
+


Added dummy test file for Leiningen

Added dummy test file for Leiningen

so «lein test» now works as expected.

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

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

--- test/conexp_tests.clj
+++ test/conexp_tests.clj
@@ -0,0 +1,19 @@
+;; Copyright (c) Daniel Borchmann. All rights reserved.
+;; The use and distribution terms for this software are covered by the
+;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;; which can be found in the file LICENSE 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 conexp-tests
+  (:use conexp.main))
+
+;;;
+
+(tests-to-run conexp.tests
+              conexp.contrib.tests)
+
+;;;
+
+nil


Added movie identification and database updating utility

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

--- update_movies.clj
+++ update_movies.clj
@@ -0,0 +1,145 @@
+(require 'leiningen.exec)
+(leiningen.exec/deps '[[org.clojure/clojure "1.7.0"]
+                       [enlive "1.1.6"]
+                       [environ "1.0.1"]
+                       [korma "0.4.2"]
+                       [org.xerial/sqlite-jdbc "3.8.11.2"]
+                       [adamwynne/feedparser-clj "0.5.2"]
+                       [clj-http "2.0.0"]
+                       [throttler "1.0.0"]])
+(import 'java.net.URL)
+(require '[feedparser-clj.core :as feedparser]
+         '[net.cgrand.enlive-html :as html]
+         '[environ.core :refer [env]]
+         '[korma.db :as kdb]
+         '[korma.core :as kcore]
+         '[clojure.java.io :as io]
+         '[clojure.pprint :refer :all]
+         '[clj-http.client :as http]
+         '[throttler.core :refer [throttle-fn]])
+
+(def sqll (kdb/sqlite3 {:db "movies_test.db"}))
+(kdb/defdb db sqll)
+(kcore/defentity movies)
+
+(def rt-api-key (env :rt-api-key))
+
+(defn episode-exists? [id]
+  ((complement empty?)
+    (kcore/select movies
+      (kcore/where
+        {:episode_id id}))))
+
+(defn sanitize-title [title]
+  (-> title
+      (clojure.string/replace #"(?i:at nerdtacular \d+)" "")
+      (clojure.string/replace #"(?i:live (watch|sack|viewing)( of)?)" "")
+      (clojure.string/replace #"(?:\(?LIVE\)?)" "")
+      (clojure.string/replace #"(?:NEWER)" "")
+      (clojure.string/replace #"(?i:commentary track( edition)?)" "")
+      (clojure.string/replace #"(?i:(: )?bonus sack:?)" "")
+      (clojure.string/replace #"(?i:the one about)" "")
+      (clojure.string/replace #"\s+" " ")
+      (clojure.string/trim)))
+
+(defn parse-title [ep]
+  (let [normal-title
+          #"Film Sack \#?(\d+):\s*[\"|“]?([^\"\!”]+)[\!]?[\"|”]?\s*"
+        bonus-sack-title
+          #"BONUS SACK:  Commentary Track for ()[\"|“]?([^\"\!”]+)[\!]?[\"|”]?\s*"
+        commentary-title
+          #"Film Sack COMMENTARY TRACK: ()[\"|“]?([^\"\!”]+)[\!]?[\"|”]?\s*"
+        title (:title ep)
+        parsed (or
+                 (re-matches normal-title title)
+                 (re-matches bonus-sack-title title)
+                 (re-matches commentary-title title))]
+    (when parsed
+      (assoc
+        ep
+        :episode_id (when
+                      (not= (second parsed) "")
+                      (Integer. (second parsed)))
+        :media-title (sanitize-title (last parsed))))))
+
+(defn get-episodes []
+  (->> "http://feeds.frogpants.com/filmsack_feed.xml"
+       feedparser/parse-feed
+       :entries
+       (map #(select-keys % [:title]))
+       (keep parse-title)))
+
+(defn trunc [s n]
+  (subs s 0 (min (count s) n)))
+
+(defn display-options [options]
+  (print
+    (apply str
+      (flatten
+        (map-indexed
+          (fn [idx option]
+            (list "  [" idx "] " (:title option)
+                  " (" (:year option) ") - "
+                  (first (:abridged_cast option)) ", "
+                  (second (:abridged_cast option)) "\n"))
+          options))))
+  (println (str "  [" (count options) "] No Match")))
+
+(defn get-cisi-from-imdb [imdb-id]
+  (let [url (str "http://www.canistream.it/external/imdb/" imdb-id "?l=default")
+        resource (html/html-resource (URL. url))
+        cisi-id (-> resource
+                    (html/select [:div.search-result])
+                    first
+                    :attrs
+                    :rel)]
+    cisi-id))
+
+(defn find-ids [title]
+  (let [resp (http/get
+               "http://api.rottentomatoes.com/api/public/v1.0/movies.json"
+               {:query-params {:apikey rt-api-key
+                               :q title}
+                :accept :json
+                :as :json})
+        options (->> resp
+                     :body
+                     :movies
+                     (map #(select-keys % [:title
+                                           :year
+                                           :id
+                                           :abridged_cast
+                                           :alternate_ids]))
+                     (map #(update-in % [:abridged_cast] (partial map :name))))]
+    (println "\n  Adding" title)
+    (display-options options)
+    (print "> ")
+    (flush)
+    (let [choice (Integer. (read-line))]
+      (when (and ((complement neg?) choice) (< choice (count options)))
+        (-> options
+            (nth choice)
+            (clojure.set/rename-keys {:id :rt_id})
+            (#(assoc % :imdb_id (->> % :alternate_ids :imdb (str "tt"))))
+            (#(assoc % :cisi_id (-> % :imdb_id get-cisi-from-imdb)))
+            (select-keys [:title :imdb_id :rt_id :cisi_id]))))))
+
+(defn update-database []
+  (let [missing-eps (->> (get-episodes)
+                         (remove #(nil? (:episode_id %)))
+                         (remove
+                           #(episode-exists? (Integer. (:episode_id %)))))
+        movie-ids (doall (map (comp find-ids :media-title) missing-eps))]
+    (dorun
+      (map
+        (fn [ep ids]
+          (when ids
+            (kcore/insert movies
+              (kcore/values
+                (select-keys
+                  (merge ep ids)
+                  [:title :imdb_id :rt_id :cisi_id :episode_id])))))
+        missing-eps movie-ids))))
+
+(update-database)
+


Add lein eastwood plugin.

Add lein eastwood plugin.

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


fixes determination of whether or not a bank account is verified

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


Add sample from Clojure Applied

Add sample from Clojure Applied

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

--- src/clojure/cjapplied/ch08.clj
+++ src/clojure/cjapplied/ch08.clj
@@ -0,0 +1,25 @@
+;; See: https://clojuredocs.org/clojure.test/deftest
+(ns cjapplied.ch08)
+(use 'clojure.test)
+
+(deftest addition
+  (is (= 4 (+ 2 2)))
+  (is (= 7 (+ 3 4))))
+
+(deftest subtraction
+  (is (= 1 (- 4 3)))
+  (is (= 3 (- 7 4))))
+
+;; composing tests
+(deftest arithmetic
+  (addition)
+  (subtraction))
+
+(deftest test-range
+  (is (= '(0 1 2 3 4) (range 5))))
+
+(run-tests 'cjapplied.ch08)
+;; {:test 6, :pass 9, :fail 0, :error 0, :type :summary}
+
+(run-all-tests) ;;
+{:test 9, :pass 10, :fail 1, :error 1, :type :summary}


Functions to select word class ID and source ID

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

--- src/clj_mrazik/db_interface.clj
+++ src/clj_mrazik/db_interface.clj
@@ -0,0 +1,49 @@
+;
+;  (C) Copyright 2017  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns clj-mrazik.db-interface
+    "Namespace that contains interface to the database.")
+
+(require '[clojure.java.jdbc  :as jdbc])
+
+(require '[clj-mrazik.db-spec :as db-spec])
+
+(defn select-word-class-id
+    [input]
+    (-> (jdbc/query db-spec/mrazik-db
+             ["select id from classes where class=?" input])
+        first
+        :id))
+
+(defn select-source-id
+    [input]
+    (-> (jdbc/query db-spec/mrazik-db
+             ["select id from sources where source=?" input])
+        first
+        :id))
+
+(defn insert-word-into-dictionary
+    [term description word-class use-it incorrect-forms correct-forms
+     see-also internal verified copyrighted source]
+    (jdbc/insert! db-spec/mrazik-db
+        :product_names {:term            term
+                        :description     description
+                        :class           word-class
+                        :use             use-it
+                        :incorrect_forms incorrect-forms
+                        :correct_forms   correct-forms
+                        :see_also        see-also
+                        :internal        internal
+                        :verified        verified
+                        :copyrighted     copyrighted
+                        :source          source}))
+


balance per channel

balance per channel

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/m1dnight/clojbot.git/'


fixing up predicate fetching some more

fixing up predicate fetching some more

--- sidecar/src/figwheel_sidecar/config_check/type_check.clj
+++ sidecar/src/figwheel_sidecar/config_check/type_check.clj
@@ -158,16 +158,13 @@
      (group-by (fn [x] [:parent (second x) (first (nth x 2))]) (filter #(#{:?- :-} (second %)) spc))
      (group-by (juxt second first) spc))))

-
-
 (defn fetch-pred [pred-type parent-type]
-  (first (not-empty (schema-rules [pred-type parent-type])))
-)
+  (schema-rules [pred-type parent-type]))

 (defn leaf-pred? [parent-type]
-  (or (fetch-pred :=  parent-type)
-      (fetch-pred :== parent-type)
-      (fetch-pred :=> parent-type)))
+  (concat (fetch-pred :=  parent-type)
+          (fetch-pred :== parent-type)
+          (fetch-pred :=> parent-type)))

 (defn descendent-typs [t]
   (distinct
@@ -198,7 +195,7 @@
   (doall (descendent-typs 'B)))

 (defn all-predicates [parent-type]
-  (keep leaf-pred? (cons parent-type (descendent-typs parent-type))))
+  (keep identity (mapcat leaf-pred? (cons parent-type (descendent-typs parent-type)))))

 #_(with-schema (index-spec (spec 'Integer integer?)
                          (spec 'AnotherInt string?)
@@ -230,9 +227,9 @@
                    :value value
                    :type-sig (:type-sig state)
                    :path     (:path state)}]
-        [(if (not= (-> state :type-sig first)
-                   typ)
-           (assoc error :sub-type typ) error)])
+        [(if (not= (-> state :type-sig first) typ)
+           (assoc error :sub-type typ)
+           error)])
       {:success-type typ})))

 ;; TODO this allows a OR reloationship??
@@ -248,7 +245,7 @@
     (throw (Exception. (str "parent-type " parent-type "has no predicate.")))))

 (defn compound-type? [parent-type]
-  (#{:SEQQ :MAPP} (last (fetch-pred :=> parent-type))))
+  (#{:SEQQ :MAPP} (last (first (fetch-pred :=> parent-type)))))

 (defn get-types-from-key-parent [parent-type ky]
   (map (comp last last)


CMR-1375: Adding migrationg to improve sync delete work table performance

error: pathspec 'metadata-db-app/src/migrations/012_add_sync_delete_work_indexes.clj' did not match any file(s) known to git

--- metadata-db-app/src/migrations/012_add_sync_delete_work_indexes.clj
+++ metadata-db-app/src/migrations/012_add_sync_delete_work_indexes.clj
@@ -0,0 +1,15 @@
+(ns migrations.012-add-sync-delete-work-indexes
+  "Creates indexes to improve performance working with sync delete work table"
+  (:require [config.mdb-migrate-helper :as h]))
+
+(defn up
+  []
+  (println "migrations.012-add-sync-delete-work-indexes")
+  (h/sql "CREATE INDEX sdw_cid_rid ON sync_delete_work(concept_id, revision_id)")
+  (h/sql "CREATE INDEX sdw_deleted ON sync_delete_work(deleted)"))
+
+(defn down
+  []
+  (println "migrations.012-add-sync-delete-work-indexes")
+  (h/sql "DROP INDEX sdw_cid_rid")
+  (h/sql "DROP INDEX sdw_deleted"))


rev markers

rev markers

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


define syntax: extracted the code to turn literals to keywords, as we'll need it for the scheme templates to change

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/parenode/clojure-cup-2015.git/'


removes hard-coded Google Election ID

removes hard-coded Google Election ID

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


[#264 #209] Clear query and form params on 301-303 redirects (@jruthe)

Fixes #209 and problems with some POST-redirect-GET setups

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


Updated for Google App Engine.

Updated for Google App Engine.

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/danielfm/licensator.git/'


Add project.clj

Add project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,63 @@
+(defproject funcool/catacumba "0.2.0-SNAPSHOT"
+  :description "Asynchronous web toolkit for Clojure build on top of Ratpack."
+  :url "http://github.com/funcool/catacumba"
+  :license {:name "BSD (2-Clause)"
+            :url "http://opensource.org/licenses/BSD-2-Clause"}
+
+  :source-paths ["src/clojure"]
+  :java-source-paths ["src/java"]
+
+  :jar-exclusions [#"\.swp|\.swo|user.clj"]
+  :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
+
+  ;; :mirrors {"central" {:name "central"
+  ;;                      :url "http://oss.jfrog.org/artifactory/repo"}}
+
+  :dependencies [[org.clojure/clojure "1.7.0-RC1"]
+                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
+                 [io.ratpack/ratpack-core "0.9.16"]
+                 [org.slf4j/slf4j-simple "1.7.12"]
+                 [cheshire "5.5.0"]
+                 [com.stuartsierra/component "0.2.3"]
+                 [buddy/buddy-core "0.5.0"]
+                 [buddy/buddy-auth "0.5.3"]
+                 [funcool/cuerdas "0.4.0"]
+                 [funcool/futura "0.2.0"]
+                 [environ "1.0.0"]
+                 [potemkin "0.3.13" :exclusions [riddley]]]
+  :profiles {:dev {:global-vars {*warn-on-reflection* true}
+                   :source-paths ["src"]
+                   :codeina {:sources ["src/clojure"]
+                             :exclude [catacumba.impl.context
+                                       catacumba.impl.helpers
+                                       catacumba.impl.parse
+                                       catacumba.impl.handlers
+                                       catacumba.impl.server
+                                       catacumba.impl.http
+                                       catacumba.impl.routing
+                                       catacumba.impl.streams
+                                       catacumba.impl.websocket
+                                       catacumba.impl.sse
+                                       catacumba.impl.types
+                                       catacumba.handlers.core
+                                       catacumba.handlers.cors
+                                       catacumba.handlers.parsing
+                                       catacumba.handlers.security
+                                       catacumba.handlers.session
+                                       catacumba.handlers.interceptor
+                                       catacumba.experimental.stomp
+                                       catacumba.experimental.stomp.parser
+                                       catacumba.experimental.stomp.broker]
+                             :language :clojure
+                             :output-dir "doc/api"
+                             :src-dir-uri "http://github.com/funcool/catacumba/blob/master/"
+                             :src-linenum-anchor-prefix "L"}
+                   :plugins [[funcool/codeina "0.1.0"
+                              :exclusions [org.clojure/clojure]]]
+                   :dependencies [[clj-http "1.1.2"]
+                                  [aleph "0.4.0"]
+                                  [org.clojure/tools.namespace "0.2.10"]
+                                  [ring/ring-core "1.3.2"
+                                   :exclusions [javax.servlet/servlet-api
+                                                clj-time
+                                                org.clojure/clojure]]]}})


Version 1.3.1

Version 1.3.1


Add missing lein-midje dep to 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/terrancesnyder/engulf.git/'


no longer need a :test-path

no longer need a :test-path

--- project.clj
+++ project.clj
@@ -12,8 +12,7 @@
                  [slingshot "0.10.2"]
                  [cheshire "2.2.2"]]
   :profiles {:dev {:dependencies [[ring/ring-jetty-adapter "1.0.2"]
-                                  [ring/ring-devel "1.0.2"]]
-                   :test-path ["test"]}
+                                  [ring/ring-devel "1.0.2"]]}
              :1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}
              :1.4 {:dependencies [[org.clojure/clojure "1.4.0-beta1"]]}}
   :aliases {"all" ["with-profile" "dev,1.2:dev:dev,1.4"]}


lein-release plugin: preparing 0.1.7 release

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


Bump version to 0.7.2-SNAPSHOT

Bump version to 0.7.2-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "0.7.1"
+(defproject clojars-web "0.7.2-SNAPSHOT"
   :dependencies [[org.clojure/clojure "1.3.0"]
                  [org.clojure/java.jdbc "0.1.3"]
                  [org.clojure/tools.cli "0.2.1"]


augment :clean-targets

augment :clean-targets

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


Add Specter for nested data manipulation

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/robottokauf3/cia.git/'


Remove log4j dep

Remove log4j dep


Version 0.2.2-SNAPSHOT

Version 0.2.2-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/nathanielksmith/trapperkeeper-status.git/'


Bump deps

Bump deps


Add explicit ring-jetty-adapter

Add explicit ring-jetty-adapter

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


kehaar 0.8.0

kehaar 0.8.0

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


Bump noir-async/aleph deps

Bump noir-async/aleph deps


Removed direct linking

Removed direct linking

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


Whoops - sytnax error in project.clj

Whoops - sytnax error in project.clj


Version 1.2.3

Version 1.2.3

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


update clojurescript and core.async

update clojurescript and core.async

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


bump version to 3.4.0

bump version to 3.4.0

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


Version 75-SNAPSHOT

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


Update ClojureScript and Rum

Update ClojureScript and Rum

--- project.clj
+++ project.clj
@@ -9,7 +9,7 @@
                  [cljsjs/react-dom "15.0.1-1" :scope "provided"]
                  [cljsjs/react-dom-server "15.0.1-1" :scope "provided"]
                  [org.clojure/clojure "1.8.0" :scope "provided"]
-                 [org.clojure/clojurescript "1.8.40" :scope "provided"]]
+                 [org.clojure/clojurescript "1.8.51" :scope "provided"]]
   :aliases {"ci" ["do"
                   ["clean"]
                   ["test" ":default"]
@@ -59,7 +59,7 @@
                                   [figwheel-sidecar "0.5.2"]
                                   [hickory "0.6.0"]
                                   [reagent "0.6.0-alpha"]
-                                  [rum "0.8.0"]]
+                                  [rum "0.8.2"]]
                    :plugins [[lein-cljsbuild "1.1.3"]
                              [lein-doo "0.1.6"]
                              [lein-figwheel "0.5.2"]]


Update dependencies

Update dependencies

--- project.clj
+++ project.clj
@@ -7,12 +7,12 @@
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[com.facebook/react "0.11.1"]
                  [org.clojure/clojure "1.6.0"]
-                 [org.clojure/clojurescript "0.0-2280" :scope "provided"]]
+                 [org.clojure/clojurescript "0.0-2311" :scope "provided"]]
   :deploy-repositories [["releases" :clojars]]
   :cljsbuild {:builds []}
   :profiles {:dev {:dependencies [[reagent "0.4.2"]
                                   [crate "0.2.5"]
-                                  [prismatic/dommy "0.1.2"]]
+                                  [prismatic/dommy "0.1.3"]]
                    :plugins [[com.keminglabs/cljx "0.4.0" :exclusions [org.clojure/clojure]]
                              [com.cemerick/austin "0.1.4"]
                              [com.cemerick/clojurescript.test "0.3.1"]


Version 81-SNAPSHOT

Version 81-SNAPSHOT


Version 0.2.19

Version 0.2.19

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


Added lein asset minifier

Added lein asset minifier

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/uris77/6pedos-web.git/'


upgrade core.async from 0.2.395 to 0.4.474

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


0.8.2-wip13

--- project.clj
+++ project.clj
@@ -3,7 +3,7 @@
   (do (println (str "ERROR: requires Leiningen 1.x but you are using " lein-version))
     (System/exit 1)))

-(defproject storm "0.8.2-wip12"
+(defproject storm "0.8.2-wip13"
   :source-path "src/clj"
   :test-path "test/clj"
   :java-source-path "src/jvm"


Version bump

Version bump


upgrade to kryo 2.17, hopefully fixing linkageerror bug

--- project.clj
+++ project.clj
@@ -21,7 +21,7 @@
                  [org.clojure/tools.logging "0.2.3"]
                  [org.clojure/math.numeric-tower "0.0.1"]
                  [org.slf4j/slf4j-log4j12 "1.5.8"]
-                 [storm/carbonite "1.4.0"]
+                 [storm/carbonite "1.5.0"]
                  [org.yaml/snakeyaml "1.9"]
                  [org.apache.httpcomponents/httpclient "4.1.1"]
                  [storm/tools.cli "0.2.2"]


Version 0.7.3

Version 0.7.3

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


Add project.clj

Add project.clj

--- project.clj
+++ project.clj
@@ -0,0 +1,25 @@
+(defproject funcool/datoteka "1.0.0"
+  :description "Filesystem utilities and Storage abstraction for Clojure."
+  :url "https://github.com/funcool/datoteka"
+  :license {:name "BSD (2-Clause)"
+            :url "http://opensource.org/licenses/BSD-2-Clause"}
+  :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
+                 [funcool/promesa "1.6.0"]]
+
+  :deploy-repositories {"releases" :clojars
+                        "snapshots" :clojars}
+  :source-paths ["src"]
+  :test-paths ["test"]
+  :jar-exclusions [#"\.swp|\.swo|user.clj"]
+
+  :codeina {:sources ["src"]
+            :reader :clojurescript
+            :target "doc/dist/latest/api"
+            :src-uri "http://github.com/funcool/datoteka/blob/master/"
+            :src-uri-prefix "#L"}
+
+  :profiles
+  {:dev {:dependencies [[commons-io/commons-io "2.5"]
+                        [org.clojure/tools.namespace "0.2.11"]]
+         :plugins [[funcool/codeina "0.5.0"]
+                   [lein-ancient "0.6.10"]]}})


Upgrade to clojure 1.4.0

Upgrade to clojure 1.4.0


Added a project file for Clojure.

Added a project file for Clojure.

--- project.clj
+++ project.clj
@@ -0,0 +1,16 @@
+(defproject clj-simulacrum "0.5.0-SNAPSHOT"
+  :description "A Clojure library for exploring personality modeling in
+                simulated populations"
+  :url "https://github.com/oubiwann/clj-simulacrum"
+  :license {:name "The BSD 3-Clause License"
+            :url "http://opensource.org/licenses/BSD-3-Clause"}
+  :dependencies [[org.clojure/clojure "1.5.1"]
+                 [co.paralleluniverse/pulsar "0.3.0"]]
+  :java-agents [[co.paralleluniverse/quasar-core "0.3.0"]]
+  :plugins [[lein-exec "0.3.1"]]
+  :profiles {
+    :dev {
+      :dependencies [[org.clojure/tools.namespace "0.2.3"]
+                     [org.clojure/java.classpath "0.2.0"]]}
+    :testing {
+      :dependencies [[leiningen "2.3.3"]]}})


Version 35

Version 35

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


Version 0.1.3-SNAPSHOT

Version 0.1.3-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject replumb/replumb "0.1.2"
+(defproject replumb/replumb "0.1.3-SNAPSHOT"
   :description "ClojureScript plumbing for your bootstrapped REPLs."
   :url "https://github.com/clojurex/replumb"
   :license {:name "Eclipse Public License"


Add project.clj

Add project.clj

--- project.clj
+++ project.clj
@@ -0,0 +1,7 @@
+(defproject org.clojars.gguthe/phpass "1.0.1"
+  :description "Fork of PHPass"
+  :url "https://github.com/RJMetrics/PHPass.git"
+  :license {:name "Eclipse Public License"
+            :url "http://www.eclipse.org/legal/epl-v10.html"}
+  :java-source-paths ["src/main"]
+  :dependencies [])


0.8.2-wip7

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject storm "0.8.2-wip6"
+(defproject storm "0.8.2-wip7"
   :source-path "src/clj"
   :test-path "test/clj"
   :java-source-path "src/jvm"


Change version to 0.5.0

Change version to 0.5.0

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


bump reader and cheshire deps, remove unneeded repo, turn on warn-on-reflection

--- project.clj
+++ project.clj
@@ -4,8 +4,7 @@
   :license {:name "The MIT License"
             :url "http://opensource.org/licenses/mit-license.php"
             :distribution :repo}
-  :repositories {"sona" "http://oss.sonatype.org/content/repositories/snapshots"}
-  :warn-on-reflection false
+  :global-vars {*warn-on-reflection* true}
   :min-lein-version "2.0.0"
   :dependencies [[org.apache.httpcomponents/httpcore "4.2.4"]
                  [org.apache.httpcomponents/httpclient "4.2.5"]
@@ -13,9 +12,9 @@
                  [commons-codec "1.7"]
                  [commons-io "2.4"]
                  [slingshot "0.10.3" :exclusions [org.clojure/clojure]]
-                 [cheshire "5.1.1"]
+                 [cheshire "5.2.0"]
                  [crouton "0.1.1" :exclusions [org.clojure/clojure]]
-                 [org.clojure/tools.reader "0.7.3"
+                 [org.clojure/tools.reader "0.7.4"
                   :exclusions [org.clojure/clojure]]]
   :profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
                                   [ring/ring-jetty-adapter "1.1.8"]


insert-rows-into-db

insert-rows-into-db

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


Time out files after 6h if we do not see any new entries.

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


[#532] backend visualisation filter wip

[#532] backend visualisation filter wip

error: pathspec 'backend/src/akvo/lumen/lib/visualisation/filter.clj' did not match any file(s) known to git

--- backend/src/akvo/lumen/lib/visualisation/filter.clj
+++ backend/src/akvo/lumen/lib/visualisation/filter.clj
@@ -0,0 +1,111 @@
+(ns akvo.lumen.lib.visualisation.filter
+  (:require [clojure.string :as str])
+  (:import [java.sql.Timestamp]))
+
+(defmulti filter-sql (fn [filter]
+                       (get filter "strategy")))
+
+(defn parse-number [s]
+  (try
+    (Double/parseDouble s)
+    (catch NumberFormatException e
+      (throw (ex-info "Not a number" {:string s})))))
+
+(defn parse-date [s]
+  (try
+    (java.sql.Timestamp. (Long/parseLong s))
+    (catch NumberFormatException e
+      (throw (ex-info "Not a timestamp" {:string s})))))
+
+(defn escape-sql-str [s]
+  (str/replace s "'" "''"))
+
+(defmethod filter-sql "isHigher"
+  [{:strs [column operation value]}]
+  (let [op (if (= operation "keep") ">" "<=")]
+    (condp = (get column "type")
+      "number" (format "%s %s %s"
+                       (get column "columnName")
+                       op
+                       (parse-number value))
+      "date" (format "%s %s '%s'::timestamptz"
+                     (get column "columnName")
+                     op
+                     (parse-date value))
+      (throw (ex-info "Invalid type" {:type (get column "type")})))))
+
+(defmethod filter-sql "is"
+  [{:strs [column operation value]}]
+  (let [op (if (= operation "keep") "=" "<>")]
+    (condp = (get column "type")
+      "number" (format "%s %s %s"
+                       (get column "columnName")
+                       op
+                       (parse-number value))
+      "date" (format "%s %s '%s'::timestamptz"
+                     (get column "columnName")
+                     op
+                     (parse-date value))
+      "text" (format "%s %s '%s'"
+                     (get column "columnName")
+                     op
+                     (escape-sql-str value))
+      (throw (ex-info "Invalid type" {:type (get column "type")})))))
+
+(defmethod filter-sql "isEmpty"
+  [{:strs [column operation]}]
+  (if (= (get column "type") "text")
+    (format "coalesce(%s, '') %s ''"
+            (get column "columnName")
+            (if (= operation "keep") "<>" "="))
+    (format "%s IS %s"
+            (get column "columnName")
+            (if (= operation "keep")
+              "NULL"
+              "NOT NULL"))))
+
+(defmethod filter-sql :default [filter]
+  (throw (ex-info "Invalid filter" {:filter filter}))
+  (prn filter))
+
+(defn find-column [columns column-name]
+  (first (filter #(= (get % "columnName") column-name) columns)))
+
+(defn sql-str [columns filters]
+  (let [filters (map #(assoc % "column" (find-column columns (get % "column")))
+                     filters)]
+    (str/join " AND " (map filter-sql filters))))
+
+(comment
+  (def columns [{"columnName" "c1"
+                 "type" "text"}
+                {"columnName" "c2"
+                 "type" "number"}
+                {"columnName" "c3"
+                 "type" "date"}])
+
+  (def filters
+    [{"column" "c1"
+      "columnType" "text"
+      "value" nil
+      "operation" "remove"
+      "strategy" "isEmpty"}
+     {"column" "c1"
+      "columnType" "text"
+      "value" "Male"
+      "operation" "keep"
+      "strategy" "is"}
+     {"column" "c2"
+      "columnType" "number"
+      "value" "5"
+      "operation" "remove"
+      "strategy" "is"}
+     {"column" "c2"
+      "columnType" "number"
+      "value" "10"
+      "operation" "remove"
+      "strategy" "isHigher"}])
+
+  (sql-str columns filters)
+
+  )


placeholder: exception handling in Clojure

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

--- clojure/exceptions.clj
+++ clojure/exceptions.clj
@@ -0,0 +1,41 @@
+(println (try
+  (/ 3 2)
+  (catch ArithmeticException e
+    false)
+  (finally
+    (println "-- cleanup"))))
+
+(println (try
+  (/ 5 2)
+  (catch ArithmeticException e
+    false)
+  (finally
+    (println "-- cleanup"))))
+
+(println (try
+  (/ 7 0)
+  (catch ArithmeticException e
+    false)
+  (finally
+    (println "-- cleanup"))))
+
+(println (try
+  (throw (Exception. "something went wrong"))
+  (catch Exception e (.getMessage e))))
+
+(println (try
+  (throw (ex-info "There was a problem" {:detail 42}))
+  (catch Exception e
+    (ex-data e))))
+
+(let [f (clojure.java.io/writer "/tmp/new")]
+  (try
+    (.write f "some text")
+    (finally
+      (.close f))))
+;; the above can be written as:
+(with-open [f (clojure.java.io/writer "/tmp/new")]
+  (.write f "some text again"))
+
+(println (with-open [f (clojure.java.io/reader "/tmp/new")]
+  (reduce conj [] (line-seq f))))


Remove unused test fns in upcoming-election-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/democracyworks/election-notification-works.git/'


The system components are of type bolts

The system components are of type bolts

--- storm-core/src/clj/backtype/storm/stats.clj
+++ storm-core/src/clj/backtype/storm/stats.clj
@@ -883,6 +883,7 @@
   (let [bolts (.get_bolts topology)
         spouts (.get_spouts topology)]
     (cond
+      (Utils/isSystemId id) :bolt
       (.containsKey bolts id) :bolt
       (.containsKey spouts id) :spout)))


rev field name

rev field name

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


An explanation of how the Window-ID paper works.

[ci skip]

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

--- src/onyx/windowing/window_id.clj
+++ src/onyx/windowing/window_id.clj
@@ -0,0 +1,144 @@
+(ns onyx.windowing.window-id)
+
+;; An implementation of the Window-ID specification, as discussed
+;; in http://web.cecs.pdx.edu/~tufte/papers/WindowAgg.pdf.
+;;
+;; Window-ID (WID) reduces memory space and execution time for
+;; sliding, fixed, and landmark windows. All mistakes in this
+;; implementation are our own.
+
+;; WID uses two main algorithms - `extents` and `wids`.
+;; `extents` takes a window extent ID and returns the windowing
+;; attribute values for which it accepts segments.
+;;
+;; `wids` is the inverse. `wids` takes a segment with a windowing
+;; attribute and returns the window extent IDs to which it belongs.
+
+;; Let's draw a picture to show how WID buckets segments, regardless
+;; of what the windowing attribute is. Below is a table. On the left
+;; hand side running vertically 0 - 14 the natural numbers - these
+;; are window IDs. Running horizontally across the top are multiples of
+;; 5. Our window will slide by units of 5. The bars denotes |---| represent
+;; windows across the respective values. The span of the window is denoted
+;; on the right side of the table, running vertically. Notice that the WID
+;; algorithms make "partial" windows for the minimum possible value. The first
+;; 3 window IDs are of length 5, 10, and 15 respectively. You can imagine that
+;; the rest of the window is on the left-hand-side (not seen) of the X axis.
+;; The ranges (right hand side) are inclusive on both sides. That is, the bucket
+;; [0 - 4] captures all values between 0.0 and 4.999999...
+
+;;   1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75
+;;0  |--|                                                         [0  - 4]
+;;1  |-----|                                                      [0  - 9]
+;;2  |---------|                                                  [0  - 14]
+;;3  |-------------|                                              [0  - 19]
+;;4     |--------------|                                          [5  - 24]
+;;5        |---------------|                                      [10 - 29]
+;;6            |---------------|                                  [15 - 34]
+;;7                |---------------|                              [20 - 39]
+;;8                    |---------------|                          [25 - 44]
+;;9                        |---------------|                      [30 - 49]
+;;10                           |---------------|                  [35 - 54]
+;;11                               |---------------|              [40 - 59]
+;;12                                   |---------------|          [45 - 64]
+;;13                                       |---------------|      [50 - 69]
+;;14                                           |---------------|  [55 - 74]
+
+;; Now we implement the `extents` function from the paper in section 3.3.
+
+(defn extent-lower [min-windowing-attr w-range w-slide w]
+  (max min-windowing-attr (- (+ min-windowing-attr (* w-slide (inc w))) w-range)))
+
+(defn extent-upper [min-windowing-attr w-slide w]
+  (+ min-windowing-attr (* w-slide (inc w))))
+
+(defn extents [min-windowing-attr w-range w-slide w]
+  (range (extent-lower min-windowing-attr w-range w-slide w)
+         (extent-upper min-windowing-attr w-slide w)))
+
+;; WID requires that a strict lower-bound of the windowing attribute
+;; be defined. In our example, this will be 0. We will use a window
+;; range of 20, and a slide value of 5. `extents` tells of which values
+;; of `:window-attr` fall into their respect windows via:
+;;
+;; (doseq [n (range 20)]
+;;  (println n ": " (extents 0 20 5 n)))
+
+;; We now see the first 20 window IDs, and which windowing values
+;; they capture. This matches up with the table above
+;;
+;; 0 => (0 1 2 3 4)
+;; 1 => (0 1 2 3 4 5 6 7 8 9)
+;; 2 => (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14)
+;; 3 => (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
+;; 4 => (5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
+;; 5 => (10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29)
+;; 6 => (15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34)
+;; 7 => (20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39)
+;; 8 => (25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44)
+;; 9 => (30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49)
+;; 10 => (35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54)
+;; 11 => (40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59)
+;; 12 => (45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64)
+;; 13 => (50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69)
+;; 14 => (55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74)
+;; 15 => (60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79)
+;; 16 => (65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84)
+;; 17 => (70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89)
+;; 18 => (75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94)
+;; 19 => (80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99)
+
+;; Now we need to implement the inverse, `wids`. `wids` lets us take
+;; segment and directly find the window IDs that it corresponds to.
+;; `wids` is defined in section 3.4 of the paper.
+(defn wids-lower [min-windowing-attr t]
+  (dec (int (Math/floor (/ (- (:window-attr t)
+                              min-windowing-attr) w-slide)))))
+
+(defn wids-upper [min-windowing-attr t]
+  (dec (int (Math/floor (/ (- (+ (:window-attr t) w-range)
+                              min-windowing-attr) w-slide)))))
+
+(defn wids [min-windowing-attr t]
+  (let [lower (wids-lower min-windowing-attr t)
+        upper (wids-upper min-windowing-attr t)]
+    (range (inc lower) (inc upper))))
+
+;; The follow code runs through 30 segments with
+;; windowing attributes 0-30 in sequence, producing
+;; which windows the segments belongs to. This matches
+;; up with both tables we looked at above.
+;;
+;; (doseq [n (range 30)]
+;;   (println n "=>" (wids 0 {:window-attr n})))
+
+;; 0 => (0 1 2 3)
+;; 1 => (0 1 2 3)
+;; 2 => (0 1 2 3)
+;; 3 => (0 1 2 3)
+;; 4 => (0 1 2 3)
+;; 5 => (1 2 3 4)
+;; 6 => (1 2 3 4)
+;; 7 => (1 2 3 4)
+;; 8 => (1 2 3 4)
+;; 9 => (1 2 3 4)
+;; 10 => (2 3 4 5)
+;; 11 => (2 3 4 5)
+;; 12 => (2 3 4 5)
+;; 13 => (2 3 4 5)
+;; 14 => (2 3 4 5)
+;; 15 => (3 4 5 6)
+;; 16 => (3 4 5 6)
+;; 17 => (3 4 5 6)
+;; 18 => (3 4 5 6)
+;; 19 => (3 4 5 6)
+;; 20 => (4 5 6 7)
+;; 21 => (4 5 6 7)
+;; 22 => (4 5 6 7)
+;; 23 => (4 5 6 7)
+;; 24 => (4 5 6 7)
+;; 25 => (5 6 7 8)
+;; 26 => (5 6 7 8)
+;; 27 => (5 6 7 8)
+;; 28 => (5 6 7 8)
+;; 29 => (5 6 7 8)


Apply the transformations in reverse order - that way later transformations can depend on earlier ones.

--- src/overtunes/pitch.clj
+++ src/overtunes/pitch.clj
@@ -38,7 +38,7 @@
      (+ offset (* octave-number octave)))
     ([octave-number chord & transformations]
      (let [octave-offset (* octave-number octave)
-          transform (apply comp transformations)
+          transform (apply comp (reverse transformations))
           transformed-chord (transform chord)]
        (map #(+ offset octave-offset %) (vals transformed-chord))))))


add registration status URLs to entity->ocd-division so they will be included in reads

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


fake amounts and channel

fake amounts and channel

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

--- src/bitsplit_cli/client.cljs
+++ src/bitsplit_cli/client.cljs
@@ -0,0 +1,31 @@
+(ns bitsplit-cli.client
+    (:use
+        [cljs.core.async :only (chan put!)]
+        [bitsplit.client.protocol :only
+        (Queries addresses unspent-amounts unspent-channel
+         Operations send-amounts! new-address!)]))
+
+(defrecord FakeClient [info]
+    Queries
+    (addresses [this]
+        ["dke98di398fdjr98feijr3oifsoij"
+         "kdi9d9ekdkjeufjeueudjudd"
+         "83dkm3mde030dk3kd3jdmjewkdi"])
+    (unspent-amounts [this]
+        (vec
+            (map (fn [address amount] {"address" address "amount" amount})
+            (addresses this) [0.23 2 1.8])))
+    (unspent-channel [this]
+        (let [amounts (unspent-amounts this)
+              index (atom 0)
+              return (chan)]
+            (js/setInterval
+                (fn []
+                    (put! return (amounts @index))
+                    (swap! index inc)
+                    (swap! index #(mod % 3)))
+                1000)))
+    Operations
+    (send-amounts! [this amounts])
+    (new-address! [this]))
+


remove unreferenced requires in main controller

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


Interactive environment for C.B

Interactive environment for C.B

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

--- src/play.clj
+++ src/play.clj
@@ -0,0 +1,7 @@
+; boot up my standard Computer.Build playground
+
+(load "instructions")
+(use 'computer-build 'computer-build.vhdl :reload-all)
+(defn play [] (load "play"))
+(def states (make-states instructions))
+(def control-signals (set (apply concat (map (fn [[_ body]] (:control-signals body)) states))))


rely on project.clj to set *warn-on-reflection* w.r.t. dev profile


Problem 0046

Problem 0046

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

--- src/project_euler/problem_0046.clj
+++ src/project_euler/problem_0046.clj
@@ -0,0 +1,52 @@
+(ns project-euler.problem_0046)
+
+;; It was proposed by Christian Goldbach that every odd composite number
+;; can be written as the sum of a prime and twice a square.
+
+;; 9 = 7 + 2×1^2
+;; 15 = 7 + 2×2^2
+;; 21 = 3 + 2×3^2
+;; 25 = 7 + 2×3^2
+;; 27 = 19 + 2×2^2
+;; 33 = 31 + 2×1^2
+
+;; It turns out that the conjecture was false.
+
+;; What is the smallest odd composite that cannot be written
+;; as the sum of a prime and twice a square?
+
+;; from problem 0007 ----------------------------------
+;;....................................................
+
+(defn prime?
+  [n]
+  {:pre [(integer? n) (> n 0)]}
+  (or (== 2 n)
+      (let [mmax (+ (Math/sqrt n) 1)]
+        (not (some #(== 0 (rem n %)) (concat [2] (range 3 mmax 2))))
+        )))
+
+(defn is-int-sqrt? [x]
+  (let [y (int (+ 0.5 (Math/sqrt x)))]
+    (== x (* y y))
+    ))
+
+(defn solution []
+  (->> (iterate #(+ 2 %) 3)
+       (remove prime?)
+       (map (fn [c]
+              (->> (cons 2  (iterate #(+ 2 %) 3))
+                   (filter prime?)
+                   (map #(- c %))
+                   (filter even?)
+                   (take-while #(> % 1))
+                   (map #(/ % 2))
+                   ((fn [x] (when (not (some is-int-sqrt? x)) c)))
+                   )))
+       (some identity)
+       ))
+
+(solution)
+
+;;-> 5777
+


copyediting minutia

copyediting minutia

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


friend circles

friend circles

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

--- src/clj/xl/friends.clj
+++ src/clj/xl/friends.clj
@@ -0,0 +1,215 @@
+(ns xl.friends
+  (:require [clojure.spec :as s]
+            [clojure.spec.gen :as g]
+            [clojure.test.check :as tc]
+            [clojure.test.check.generators :as tcg]
+            [clojure.set :as set]
+            ))
+
+"Given number of friends and their relationship, return number of friends circles"
+
+(defn- root
+  "return root and depth from query node to root"
+  [arr a]
+  (loop [k a depth 0]
+    (let [v (nth arr k)]
+      (if (= k v) [k depth] (recur v (inc depth))
+        )
+      )
+    )
+  )
+
+(defn- init-arr [n]
+      (let [arr (make-array Integer/TYPE n)]
+        (doseq [i (range n)]
+          (aset arr i i))
+        arr
+        )
+      )
+
+(defn- mk-tree
+  "returns a tree in array representation. Simpler than mk-tree 2, but tree may degenerate a chain because balance is done only by
+  checking depth from search node to root"
+  [n rels]
+      (let [arr (init-arr n)
+            _
+            (reduce
+              (fn [_ [a b]]
+                (let [[[root-a depth-a] [root-b depth-b]] (map (partial root arr) [a b])]
+                  ; try to balance to minimize root seeking cost
+                  (if (<= depth-a depth-b) (aset arr root-a root-b) (aset arr root-b root-a))
+                  )
+                )
+              nil
+              rels)
+            ]
+        arr
+        )
+      )
+
+; use heuristicly balanced tree
+(defn count-circles [n rels]
+  (let [arr (mk-tree n rels)]
+    (apply + (map-indexed #(if (= %1 (nth arr %2)) 1 0) arr))
+    )
+  )
+
+(defn- root2
+  "return root"
+  [arr a]
+  (loop [k a]
+    (let [v (nth arr k)]
+      (if (= k v) k (recur v)
+                  )
+      )
+    )
+  )
+
+(defn- mk-tree2
+  "returns a tree in array representation."
+  [n rels]
+  (let [arr (init-arr n)
+        _
+        (reduce
+          (fn [depth-map [a b]]
+            (let [[root-a root-b] (map (partial root2 arr) [a b])
+                  [depth-a depth-b] (map
+                                      #(let [depth (depth-map %)]
+                                         (if depth depth 0))
+                                      [a b])
+                  use-root-a? (> depth-a depth-b)]
+              ; try to balance to minimize root seeking cost
+              (if use-root-a? (aset arr root-b root-a) (aset arr root-a root-b))
+              (if use-root-a?
+                (assoc depth-map root-a (max (inc depth-b) depth-a))
+                (assoc depth-map root-b (max (inc depth-a) depth-b))
+                )
+              )
+            )
+          {}                                                ;map from node to tree depth
+          rels)
+        ]
+    arr
+    )
+  )
+
+; use perfect balancing tree
+(defn count-circles2 [n rels]
+  (let [arr (mk-tree2 n rels)]
+    (apply + (map-indexed #(if (= %1 (nth arr %2)) 1 0) arr))
+    )
+  )
+
+
+(defn naive-count [n rels]
+  (let [
+        find-set (fn [sets a] (first (filter #(% a) sets)))
+        sets
+        (reduce
+          (fn [sets [a b]]
+            (let [remove-from-sets (fn [removed] (remove #(removed %) sets))
+                  [set-a set-b] (map (partial find-set sets) [a b])]
+              (conj
+                (remove-from-sets (if (= set-a set-b) #{set-a} #{set-a set-b}))
+                (set/union #{a} #{b} set-a set-b))
+              )
+            )
+          []
+          rels
+          )
+        loners-cnt
+          (count (filter (complement #(find-set sets %)) (range n)))
+        ]
+        (+ loners-cnt (count sets))
+    )
+  )
+
+
+; spec def for automatic test check
+(s/def ::people-count (s/with-gen nat-int? #(s/gen (s/int-in 7 10))))
+
+(s/def ::g0-7s (s/tuple (s/int-in 0 7) (s/int-in 0 7)))
+
+(s/def ::rels (s/with-gen (s/coll-of (s/tuple nat-int? nat-int?))
+                          #(s/gen (s/coll-of ::g0-7s))))
+
+(s/fdef count-circles
+        :args (s/cat :n ::people-count :rels ::rels)
+        :ret nat-int?
+        :fn (s/and #(= (:ret %) (naive-count (-> % :args :n) (-> % :args :rels)))
+                   ))
+
+(s/fdef count-circles2
+        :args (s/cat :n ::people-count :rels ::rels)
+        :ret nat-int?
+        :fn (s/and #(= (:ret %) (naive-count (-> % :args :n) (-> % :args :rels)))
+                   ))
+
+
+
+
+
+; tests
+(defn- samples []
+  (doseq [[n rels]
+          [
+            [4 [[1 2]]]
+           [4 [[1 2] [0 1]]]
+           [6 [[0 1] [1 2] [2 3] [3 4]]]
+           [8 [[0 1] [1 2] [2 3] [3 4]]]
+           [8 [[0 1] [1 2] [2 3] [3 4] [7 0] [6 5]]]
+           ]
+          ]
+    (let [cnt (count-circles n rels)]
+      (println "\nn: " n ", rels: " rels)
+      (println "circles: " cnt)
+      (println "naive count: " (naive-count n rels))
+      )
+    )
+  )
+
+; tests
+;(samples)
+
+; commented tests
+(comment
+
+  (defn- sample-trees []
+    (doseq [[n rels]
+            [
+             ; [4 [[1 2]]]
+             ;[4 [[1 2] [0 1]]]
+             [6 [[0 1] [1 2] [2 3] [3 4]]]
+             ]
+            ]
+      (let [tree (mk-tree n rels)]
+        (println "\nn: " n ", rels: " rels)
+        (doall
+          (map #(print (nth tree %) ", ") (range n))
+          )
+        )
+      )
+    )
+
+  (defn- sample-trees2 []
+    (doseq [[n rels]
+            [
+             ; [4 [[1 2]]]
+             ;[4 [[1 2] [0 1]]]
+             [6 [[0 1] [1 2] [2 3] [3 4]]]
+             ]
+            ]
+      (let [tree (mk-tree2 n rels)]
+        (println "\nn: " n ", rels: " rels)
+        (doall
+          (map #(print (nth tree %) ", ") (range n))
+          )
+        )
+      )
+    )
+
+  (sample-trees2)
+
+
+  )
+


test fix

test fix

--- test/metabase/test_data/load.clj
+++ test/metabase/test_data/load.clj
@@ -12,8 +12,7 @@
                              [org :refer [Org]]
                              [org-perm :refer [OrgPerm]])))

-(declare create-table
-         with-test-db)
+(declare create-and-populate-tables)

 (def ^:private db-name "Test Database")
 (def ^:private org-name "Test Organization")
@@ -39,9 +38,7 @@
   (binding [*log-db-calls* false]
     (or (sel :one Database :name db-name)
         (do (when-not (.exists (clojure.java.io/file (str test-db-filename ".h2.db"))) ; only create + populate the test DB file if needed
-              (with-test-db
-                (dorun (map create-table
-                            data/test-data))))
+              (create-and-populate-tables))
             (println "Creating new metabase Database object...")
             (let [db (ins Database
                           :organization_id (:id (test-org))
@@ -113,7 +110,7 @@
        (interpose ", ")
        (apply str)))

-(defn- create-table
+(defn- create-and-populate-table
   "Create a Table named TABLE-NAME and load its data."
   [[table-name {:keys [fields rows]}]]
   {:pre [(keyword? table-name)
@@ -130,3 +127,8 @@
           (insert (values (map (partial zipmap fields-for-insert) ; data rows look like [name last-login]
                                rows))))                           ; need to convert to {:name name :last_login last-login} for insert
       (println (format "Inserted %d rows." (count rows))))))
+
+(defn- create-and-populate-tables []
+  (with-test-db
+    (dorun (map create-and-populate-table
+                data/test-data))))


Kehaar 0.7.0 with bounded thread pools

Kehaar 0.7.0 with bounded thread pools

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


Version 1.15.5

Version 1.15.5

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


initial working

initial working

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/gavilancomun/mozart-clj.git/'


more and more config

more and more 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/dagda1/i-cal.git/'


Updated dependencies

Updated dependencies

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


Added Yesql and Ragtime.

Added Yesql and Ragtime.

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


Hard-coding joda-time version.

Hard-coding joda-time 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/couragelabs/coachbot.git/'


Update Clojure dependencies

Update Clojure dependencies

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


added environ plugin

added environ plugin

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


Version 1.13.0-SNAPSHOT

Version 1.13.0-SNAPSHOT


Upgrade to latest version of ActiveMQ

Upgrade to latest version of ActiveMQ

The previous version of ActiveMQ was retracted due to this:

https://issues.apache.org/jira/browse/AMQ-3491

This version includes a proper fix.

Signed-off-by: Deepak Giridharagopal <d11186354d1ef01ca06ae37d7e23e827da13e85f@puppetlabs.com>

--- project.clj
+++ project.clj
@@ -29,7 +29,7 @@
                  [clojureql "1.0.3"]
                  ;; MQ connectivity
                  [clamq "0.3"]
-                 [org.apache.activemq/activemq-core "5.5.0"]
+                 [org.apache.activemq/activemq-core "5.5.1"]
                  ;; WebAPI support libraries.
                  [net.cgrand/moustache "1.1.0"]
                  [clj-http "0.1.3"]


Version 1.15.3

Version 1.15.3


Kontua ezabatzeko formularioa

Kontua ezabatzeko formularioa

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


Erabiltzailea aipatu

Erabiltzailea aipatu


re-added

re-added

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

--- src/cljs/cloj/web/utils.cljs
+++ src/cljs/cloj/web/utils.cljs
@@ -0,0 +1,10 @@
+(ns cloj.web.utils
+  (:require
+    [cljs-http.client       :as http]
+    [hipo.core              :as hipo  :include-macros true]
+    [dommy.core             :as dommy :include-macros true]  ))
+
+(defn id-ize   [v] (str "#" v))
+(defn by-id    [v] (-> (id-ize v) (dommy/sel1)))
+(defn get-dims [e] (mapv e [:width :height]))
+(defn log-js   [v] (.log js/console v))


WIP on jenny

WIP on jenny

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

--- src/shuriken/jenny.clj
+++ src/shuriken/jenny.clj
@@ -0,0 +1,89 @@
+(ns shuriken.jenny
+  "Jenny said
+   When she was just about five years old
+   You know why parents gonna be the death of us all
+   Two TV sets and two Cadillac cars
+   Well you know, it ain't gonna help me at all, not just a tiny bit
+   Then one fine mornin' she turns on a New York station
+   She doesn't believe what she hears at all
+   Ooh, she started dancin' to that fine fine music
+   You know her life is saved by rock 'n' roll, yeah rock 'n' roll
+
+   Despite all the computations
+   You could just dance
+   To that rock 'n' roll station
+   And baby it was alright (it was alright)
+   Hey it was alright (it was alright)
+   Hey here she comes now!
+   Jump! jump!
+
+  The Velvet Underground - Rock & Roll"
+  (:use shuriken.debug
+        clojure.pprint)
+  (:require [dance.core :refer [dance path-dance]]
+            [shuriken.context :refer [lexical-context]]
+            [shuriken.exception :refer [silence]]
+            [shuriken.sequential :refet [get-nth-in assoc-nth-in]]))
+
+(defmulti transform
+  (fn [form _ctx]
+    (if (list? form)
+      (let [m (-> form first resolve meta)]
+          (symbol (-> m :ns .getName name)
+                  (-> m :name name)))
+      (class form))))
+
+(def stock-sym (gensym "stock-"))
+
+(defmethod transform :default [form {:keys [path]}]
+  `(let [ret# ~form]
+     (assoc! ~stock-sym ~path {:form '~form
+                               :result ret#
+                               ; :context (lexical-context)
+                               })
+     ret#))
+
+(defn transform-bindings [bindings ctx]
+  (mapv (fn [[k v]]
+          [k (transform v)])
+        (partition 2 bindings)))
+
+(defmethod transform 'clojure.core/let [[f bindings & body] ctx]
+  (println "----------------------------------")
+  (pprint `(~f ~(transform-bindings bindings)
+               ~@(map transform body)))
+  (println "----------------------------------")
+  `(~f ~bindings
+       ~@body))
+
+(defn passover [& code]
+  (let [new-code (dance code path-dance
+                        ; :debug true
+                        ; :debug-context true
+                        :post (fn [form ctx]
+                                (let [new-form (if (list? form)
+                                                 (transform form ctx)
+                                                 form)]
+                                  [new-form ctx])))]
+    `(let [~stock-sym (transient {})]
+       ~@new-code
+       (pprint (persistent! ~stock-sym)))))
+
+(defn inject-in-code [k code stock]
+  (->> stock
+       (sort-by #(-> % first count -))
+       (reduce (fn [new-code [path data]]
+                 (assoc-nth-in path (get data k)))
+               code)))
+
+(def inject-results (partial inject-in-code :result))
+(def inject-results (partial inject-in-code :form))
+
+(def code
+  '(let [a 1
+         b 0]
+    (println (+ a b))
+    (println (/ a b))
+    (println (- a b))))
+
+(pprint (-> code passover eval))


Refactor: rename 'column' component for...

... consistency.

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


kata5: introduce multimethods for internal size/get/set operations

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


Added permutation-context.clj as example

Computes the context K as mentioned in GW97, 1.4, example 12, whose
concept lattice is isomorphic to the lattice of all permutations on a
finite set.

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

error: pathspec 'doc/examples/permutation-context.clj' did not match any file(s) known to git

--- doc/examples/permutation-context.clj
+++ doc/examples/permutation-context.clj
@@ -0,0 +1,51 @@
+;; Copyright: Daniel Borchmann, 2010
+;; This file is in the public domain.
+
+;; Permutations can be ordered such that they form a complete
+;; lattice. This program computes a formal context for a lattice
+;; isomorphic to the lattice of all permutations on a set {1,...,n}.
+;; For this see Ganter-Wille, 1.4, Example 12.
+
+(in-ns 'user)
+(use 'conexp.main)
+
+;;;
+
+(defn context-crossover
+  "For four given context ctx-{1,2,3,4} computes
+
+     ctx-1 | ctx-2
+    -------+-------
+     ctx-3 | ctx-4
+  "
+  [ctx-1 ctx-2 ctx-3 ctx-4]
+  (context-subposition
+   (context-apposition ctx-1 ctx-2)
+   (context-apposition ctx-3 ctx-4)))
+
+(defn L
+  "Computes the context IL as in example 12."
+  [n]
+  (if (<= n 0)
+    (one-context #{1})
+    (let [L_n-1 (L (- n 1))]
+      (context-crossover (make-context (objects L_n-1) (attributes L_n-1) #{})
+                         L_n-1 L_n-1 L_n-1))))
+
+(defn K
+  "Computes the context IK as in examples 12. Its concept lattice is
+  isomorphic to the lattice of all permutation on the set #{1,...,n}."
+  [n]
+  (if (<= n 0)
+    (one-context #{1})
+    (let [K_n-1 (K (- n 1))]
+      (context-crossover K_n-1 K_n-1 K_n-1 (L (- n 1))))))
+
+;; Try it out!
+
+(count (concepts (K 1))) ;-> 1
+(count (concepts (K 5))) ;-> 120
+
+;;;
+
+nil


fix errant `form-item` component

fix errant `form-item` component


fix generic sql metadata count for H2

fix generic sql metadata count for H2

--- src/metabase/driver/generic_sql/metadata.clj
+++ src/metabase/driver/generic_sql/metadata.clj
@@ -5,7 +5,7 @@
 (defn field-count
   [{:keys [db table name] :as field}]
   (-> ((:native-query @db)
-       (format "SELECT COUNT(\"%s\".\"%s\") FROM \"%s\""
+       (format "SELECT COUNT(\"%s\".\"%s\") AS count FROM \"%s\""
                (:name (table))
                name
                (:name (table))))
@@ -15,7 +15,7 @@
 (defn field-distinct-count
   [{:keys [db table name] :as field}]
   (-> ((:native-query @db)
-       (format "SELECT COUNT(DISTINCT \"%s\".\"%s\") FROM \"%s\""
+       (format "SELECT COUNT(DISTINCT \"%s\".\"%s\") AS count FROM \"%s\""
                (:name (table))
                name
                (:name (table))))


Eliminate unnecessary function.

Eliminate unnecessary 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/mtravers/incidents.git/'


add specs

add specs

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

--- src/id3/spec.clj
+++ src/id3/spec.clj
@@ -0,0 +1,145 @@
+(ns id3.spec
+	(:require
+		[id3.v3]
+		[id3.v4]
+		[id3.common]
+		[clojure.set :as set]
+		[clojure.spec.alpha :as s]))
+
+(s/def :id3.frame/id (set/union id3.v3/frame-ids id3.v4/frame-ids))
+(s/def :id3.frame/size (s/int-in 1 (Math/pow 2 28))) ; 32-bit synchsafe ints hold 28 bits
+(s/def :id3.frame/flags (s/coll-of #{:id3.frame.flag/data-length :id3.frame.flag/unsynchronized :id3.frame.flag/encrypted :id3.frame.flag/compressed :id3.frame.flag/grouped :id3.frame.flag/read-only :id3.frame.flag/file-alter-preserve :id3.frame.flag/tag-alter-preserve}
+	:kind set?
+	:gen-max 0))
+(s/def :id3.frame/encoding #{"UTF-8" "ISO-8859-1" "UTF-16" "UTF-16BE"})
+(s/def :id3.frame/picture-type (s/int-in 0 20))
+(s/def :id3.frame/mime-type string?)
+(s/def :id3.frame/description string?)
+(s/def :id3.frame/bytes bytes?)
+(s/def :id3.frame/url string?)
+(s/def :id3.frame/content (s/coll-of string? :min-count 1 :gen-max 3))
+
+(defmulti frame-simple-v3 #(some-> % first id3.v3/frame-name->id id3.common/frame-type))
+(defmulti frame-simple-v4 #(some-> % first id3.v4/frame-name->id id3.common/frame-type))
+(defmulti frame-normal-v3 #(some-> % first id3.v3/frame-ids id3.common/frame-type))
+(defmulti frame-normal-v4 #(some-> % first id3.v4/frame-ids id3.common/frame-type))
+
+(s/def :id3.frame.format/simple-v3 (s/multi-spec frame-simple-v3 (fn [v _] v)))
+(s/def :id3.frame.format/simple-v4 (s/multi-spec frame-simple-v4 (fn [v _] v)))
+(s/def :id3.frame.format/normal-v3 (s/multi-spec frame-normal-v3 (fn [v _] v)))
+(s/def :id3.frame.format/normal-v4 (s/multi-spec frame-normal-v4 (fn [v _] v)))
+
+(defn frame-type-names [version frame-type]
+	(map first
+		(filter (fn [[name id]] (= frame-type (id3.common/frame-type id)))
+			(id3.common/frame-names-for-version version))))
+
+(defn frame-type-ids [version frame-type]
+	(filter (fn [id] (= frame-type (id3.common/frame-type id)))
+		(id3.common/frame-ids-for-version version)))
+
+(doseq [
+		[multimethod frame-type-keyfn] {
+			frame-simple-v3 (partial frame-type-names 3)
+			frame-simple-v4 (partial frame-type-names 4)
+			frame-normal-v3 (partial frame-type-ids 3)
+			frame-normal-v4 (partial frame-type-ids 4)}
+		[frame-type val-spec] #:id3.frame.type{
+			:text (s/coll-of string? :min-count 1 :gen-max 3)
+			:user-text (s/every-kv string? (s/coll-of string? :min-count 1 :gen-max 3) :min-count 1 :gen-max 3)
+			:url string?
+			:user-url (s/every-kv string? string? :min-count 1 :gen-max 3)
+			:picture (s/coll-of (s/keys :req [:id3.frame/picture-type :id3.frame/mime-type :id3.frame/bytes]) :min-count 1 :gen-max 3)
+			:blob bytes?}]
+	(when-let [valid-keys (seq (frame-type-keyfn frame-type))]
+		(defmethod multimethod frame-type [_]
+			(s/tuple (set valid-keys) val-spec))))
+
+(defmulti frame-full-v3 #(some-> % :id3.frame/id id3.v3/frame-ids id3.common/frame-type))
+(defmulti frame-full-v4 #(some-> % :id3.frame/id id3.v4/frame-ids id3.common/frame-type))
+(s/def :id3.frame.format/full-v3 (s/multi-spec frame-full-v3 (fn [v _] v)))
+(s/def :id3.frame.format/full-v4 (s/multi-spec frame-full-v4 (fn [v _] v)))
+
+(doseq [
+		multimethod [frame-full-v3 frame-full-v4]
+		[frame-type additional-keys] #:id3.frame.type{
+			:text [:id3.frame/content :id3.frame/encoding]
+			:user-text [:id3.frame/content :id3.frame/encoding :id3.frame/description]
+			:url [:id3.frame/url]
+			:user-url [:id3.frame/url :id3.frame/encoding :id3.frame/description]
+			:picture [:id3.frame/bytes :id3.frame/picture-type :id3.frame/mime-type :id3.frame/description :id3.frame/encoding]
+			:blob [:id3.frame/bytes]}]
+	(defmethod multimethod frame-type [_]
+		(let [ks (concat additional-keys [:id3.frame/id :id3.frame/size :id3.frame/flags])]
+			; s/keys is a macro and expects a literal list of keys :(
+			(eval `(s/keys :req ~ks)))))
+
+(s/def :id3/magic-number #{"ID3"})
+(s/def :id3/size (s/int-in 1 (Math/pow 2 28)))
+(s/def :id3/flags (s/coll-of #{:id3.flag/footer :id3.flag/experimental :id3.flag/extended-header :id3.flag/unsynchronized}
+	:kind set?))
+(s/def :id3/version #{3 4})
+(s/def :id3/revision (s/int-in 0 256))
+(s/def :id3/encoding :id3.frame/encoding)
+(s/def :id3/padding :id3.frame/size)
+(s/def :id3/format #{:simple :normal :full})
+(s/def :id3/frames (s/or
+	:v4 (s/coll-of :id3.frame.format/full-v4)
+	:v3 (s/coll-of :id3.frame.format/full-v3)))
+
+(defmulti tag-format id3/tag-format)
+(s/def :id3/tag (s/multi-spec tag-format (fn [v _] v)))
+
+(let [mm tag-format]
+	(defmethod mm :simple [_]
+		(s/or
+			:v4 (s/coll-of :id3.frame.format/simple-v4 :kind map? :min-count 1)
+			:v3 (s/coll-of :id3.frame.format/simple-v3 :kind map? :min-count 1)))
+	(defmethod mm :normal [_]
+		(s/or
+			:v4 (s/coll-of :id3.frame.format/normal-v4 :kind map? :min-count 1)
+			:v3 (s/coll-of :id3.frame.format/normal-v3 :kind map? :min-count 1)))
+	(defmethod mm :full [_]
+		(s/keys :req [:id3/magic-number :id3/size :id3/flags :id3/version :id3/revision :id3/frames])))
+
+(s/def :id3/istream (partial instance? java.io.InputStream))
+(s/def :id3/ostream (partial instance? java.io.OutputStream))
+
+(s/def :id3/data :id3/istream)
+(s/def :id3/mp3 (s/keys :req [:id3/tag :id3/data]))
+
+(s/def :id3/read-opts (s/keys* :opt-un [:id3/format]))
+(s/def :id3/write-opts (s/keys* :opt-un [:id3/version :id3/encoding :id3/padding]))
+
+(s/fdef id3/read-tag
+	:args (s/cat
+		:istream :id3/istream
+		:opts :id3/read-opts)
+	:ret :id3/tag)
+
+(s/fdef id3/read-mp3
+	:args (s/cat
+		:src any?
+		:opts :id3/read-opts)
+	:ret :id3/mp3)
+
+(s/fdef id3/write-tag
+	:args (s/cat
+		:ostream :id3/ostream
+		:tag :id3/tag
+		:opts :id3/write-opts)
+	:ret nil?)
+
+(s/fdef id3/write-mp3
+	:args (s/cat
+		:dest any?
+		:mp3 :id3/mp3
+		:opts :id3/write-opts)
+	:ret nil?)
+
+(s/fdef id3/overwrite-tag
+	:args (s/cat
+		:path string?
+		:tag :id3/tag
+		:opts :id3/write-opts)
+	:ret nil?)


major cleanup; new qx sanity checks

major cleanup; new qx sanity checks

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

--- src/hello_mobile/random_toys.cljs
+++ src/hello_mobile/random_toys.cljs
@@ -0,0 +1,94 @@
+(ns hello-mobile.random-toys
+  (:require
+   [clojure.string :refer [capitalize]]
+   [tiltontec.util.core :refer [pln]]
+   [tiltontec.cell.base
+    :refer [ia-type unbound cells-reset]
+    :as cty]
+   [tiltontec.cell.observer
+    :refer-macros [fn-obs]
+    :refer [observe]]
+   [tiltontec.cell.integrity :refer-macros [with-integrity]]
+   [tiltontec.cell.core
+    :refer-macros [c? c?+ c-reset-next! c?once c?n]
+    :refer [c-in c-reset! make-cell]]
+   [tiltontec.model.core
+    :refer-macros [the-kids c?kids mdv!]
+    :refer [md-get md-reset! fm! fget qx-par] :as md]
+   [tiltontec.qxia.types :as qxty]
+   [tiltontec.qxia.base :refer [qxme qx-data-array]]
+   [tiltontec.qxia.core
+    :refer [label image button routing-get
+            text-field number-field qx-make] :as qx]
+   [tiltontec.qxia.macros
+    :refer-macros [hbox vbox navigation-page form carousel
+                    drawer collapsible group]]))
+
+(defn make-random-toys []
+  (navigation-page ["Random Toys" "/randomtoys"]
+    [:showBackButton true
+     :backButtonText "Back"]
+    (form [][]
+      (qx-make ::qxty/m.RadioGroupStub
+        :name :fav-css
+        :header "How's the weather?"
+        :allowEmptySelection true
+        :selection (c-in :mild)
+        :kids (c? (let [mrb (fn [model & [label]]
+                              (println :here-come-rb model label)
+                              (qx-make ::qxty/m.RadioButton
+                                :model model
+                                :name model
+                                :qx-new-args [model]
+                                :label (or label
+                                         (capitalize (name model)))))]
+                    (the-kids
+                      (mrb :cool "Kinda Kool")
+                      (mrb :mild)
+                      (mrb :hot))))))
+
+    (qx-make ::qxty/m.Row
+      :name :row-me
+      :label "Voila"
+      :css-class (c? (let [rg (fget :fav-css me)]
+                       (when-let [css (md-get rg :selection)]
+                         [(name css)])))
+      :kids (c?kids
+              (label "Like this?" :name :row-me-label)))
+
+    #_(make-picker-test)))
+
+
+(defn make-picker-test []
+  (vbox [:name :picker-vbox]
+     (label (c? (let [myp (fget :my-pick me)]
+                 (str "Latest pick " (md-get myp :value)))))
+    (qx-make ::qxty/m.Picker
+      :name :my-pick
+      :height 100
+      :width 200
+      :visibleItems 3
+      :value (c-in "booya")
+      :listeners {"changeSelection"
+                  (fn [evt me]
+                    (let [data (.getData evt)
+                          jd (js->clj data)]
+                      (md-reset! me :value
+                        (get (get jd "item") "title"))))}
+
+      :slot-data (list
+                   [{:title "Windows Phone"
+                     :subtitle "R.I.P."
+                     :image "identica/mmedia/games.png"}
+                    {:title "iOS" :subtitle "Version 7.1"}
+                    {:title "Android"}]
+                   [{:title "Tablet"}
+                    {:title "Smartphone"}
+                    {:title "Phablet"}]))
+    #_(label (c? (let [myp (fget :my-pick me  {:me? false
+                          , :inside? false
+                          , :up? true
+                          , :wocd? true ;; without-c-dependency
+                          })]
+                 "xxx" #_
+                 (str (md-get myp :value)))))))


Let's not overspcecifiy jvm args

Let's not overspcecifiy jvm args

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


Updated deps

Updated deps


Update to kehaar 0.11.0

Update to kehaar 0.11.0

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


Releasing 0.8.2

Releasing 0.8.2


project.clj cleanup

project.clj cleanup

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


Version 81

Version 81

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


Bump to 0.3.6-SNAPSHOT

Bump to 0.3.6-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clj-http "0.3.5"
+(defproject clj-http "0.3.6-SNAPSHOT"
   :description "A Clojure HTTP library wrapping the Apache HttpComponents client."
   :url "https://github.com/dakrone/clj-http/"
   :repositories {"sona" "http://oss.sonatype.org/content/repositories/snapshots"}


Version 1.6.2

Version 1.6.2

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


bump version to 2.8.16

bump version to 2.8.16

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


it seems travis needs a top-level project.clj

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

--- project.clj
+++ project.clj
@@ -0,0 +1,3 @@
+(defproject semtag-web "0.1.0-SNAPSHOT"
+  :description "cljs app that communicates via clojure data using CORS requests"
+  :url "http://github.com/cldwalker/semtag-web")


Add missing project.clj

Add missing project.clj

--- project.clj
+++ project.clj
@@ -0,0 +1,18 @@
+(defproject funcool/beicon "0.1.0-SNAPSHOT"
+  :description "A rxjs idiomatic wrapper for ClojureScript"
+  :url "https://github.com/funcool/beicon"
+  :license {:name "BSD (2 Clause)"
+            :url "http://opensource.org/licenses/BSD-2-Clause"}
+  :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
+                 [org.clojure/clojurescript "1.7.48" :scope "provided"]
+                 [funcool/cats "1.0.0"]]
+  :deploy-repositories {"releases" :clojars
+                        "snapshots" :clojars}
+  :source-paths ["src" "assets"]
+  :test-paths ["test"]
+  :jar-exclusions [#"\.swp|\.swo|user.clj"]
+  :codeina {:sources ["src"]
+            :reader :clojurescript
+            :target "doc/dist/latest/api"}
+  :plugins [[funcool/codeina "0.3.0"]
+            [lein-externs "0.1.3"]])


Bumping clojure version

Bumping clojure 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/xcthulhu/clj-bitauth.git/'


marginalia should be a plugin

marginalia should be a plugin


Fixing broke project file

Fixing broke project file

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/micbie/evemm.git/'


bump CLJS version

bump CLJS version

--- project.clj
+++ project.clj
@@ -9,21 +9,21 @@

   :dependencies [
     [org.clojure/clojure "1.6.0"]
-    [org.clojure/clojurescript "0.0-2740"]
+    [org.clojure/clojurescript "0.0-3126"]
     [com.cognitect/transit-cljs "0.8.194"]
     [hiccups "0.3.0"]]

-  :plugins [[lein-cljsbuild "1.0.4"]]
+  :plugins [[lein-cljsbuild "1.0.5"]]

   :source-paths ["src"]

   :clean-targets [
+    "app.js"
     "out"
     "public/js/cheatsheet.js"
     "public/js/cheatsheet.min.js"
     "public/js/client.js"
-    "public/js/client.min.js"
-    "app.js"]
+    "public/js/client.min.js"]

   :cljsbuild {
     :builds {


add project.clj

add project.clj

--- project.clj
+++ project.clj
@@ -0,0 +1,12 @@
+(defproject core.matrix.complex "0.0.1-SNAPSHOT"
+  :description "Complex numerical arrays in Clojure, as an extension to core.matrix"
+  :url "https://github.com/mikera/core.matrix.complex"
+  :dependencies [[org.clojure/clojure "1.7.0-RC1"]
+                 [net.mikera/core.matrix "0.34.0"]
+                 [complex "0.1.2"]
+                 [net.mikera/core.matrix.stats "0.5.0"]]
+
+  :profiles {:dev {:dependencies [[net.mikera/vectorz-clj "0.29.0"]]}}
+
+  :source-paths ["src/main/clj"]
+  :test-paths ["src/test/clj"])


Update deps

Update deps

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


Version 100

Version 100


lein-release plugin: bumped version from 0.2.3 to 0.2.4-SNAPSHOT for next development cycle

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


Version 117-SNAPSHOT

Version 117-SNAPSHOT


Version 0.4.1

Version 0.4.1

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/tobiasbayer/lambdacd.git/'


do not need reload middleware

do not need reload middleware

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


a small example adapted from music as data

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

--- test/examples/mad.clj
+++ test/examples/mad.clj
@@ -0,0 +1,64 @@
+(ns examples.mad
+  (:use overtone.live
+        overtone.inst.synth))
+
+; Adapted from the music as data project, cool stuff!
+
+(definst tone [note 60 amp 0.3 dur 0.4]
+  (let [snd (sin-osc (midicps note))
+        env (env-gen (perc 0.01 dur) :action :free)]
+    (* env snd amp)))
+
+(defrecord note
+  [synth vol pitch dur data])
+
+(defn p
+  ([elements]
+   (p elements (now)))
+  ([[{:keys [synth vol pitch dur data]} & elements] t]
+   (let [next-t (+ t (int (* 1000 dur)))]
+     (at t
+         (synth pitch vol dur))
+     (when elements
+       (apply-at next-t #'p elements [next-t])))))
+
+(declare calc-duration)
+
+(defn pattern
+  ([m-element] (pattern m-element 1))
+  ([m-element duration]
+   (if (= (type []) (type m-element))
+     (flatten
+       (calc-duration m-element duration (count m-element)))
+     (assoc m-element :dur (float duration)))))
+
+(defn calc-duration
+  [elements duration count]
+  (map #(pattern % (/ duration count))
+       elements))
+
+(defn def-notes
+  "Define vars for all notes."
+  []
+  (doseq [octave (range 8)]
+    (doseq [n (range 7)]
+      (let [n-char (char (+ 65 n))
+            n-sym (symbol (str n-char octave))
+            note (octave-note octave (get NOTE (keyword (str n-char))))]
+      (intern *ns* n-sym
+              {:synth tone
+               :vol 0.2
+               :pitch note
+               :dur 0.1
+               :data []})))))
+
+(def-notes)
+
+; run this to play the pattern
+;(p (pattern [[E4 G4 E4] [E5 B4 G4 D4 A4 E4 G4 A4]] 2))
+
+; or this to play it forever
+;(p (cycle (pattern [[E4 G4 E4] [E5 B4 G4 D4 A4 E4 G4 A4]], 2)))
+
+; call stop to kill the loop
+;(stop)


always forget

always forget

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

--- src/cljs/moon/components.cljs
+++ src/cljs/moon/components.cljs
@@ -0,0 +1,86 @@
+(ns cljs.moon.components
+    (:require [clojure.string :as string]
+              [goog.string :as gstring]
+              [goog.string.format]
+              [om.core :as om]
+              [om-tools.core :refer-macros [defcomponent]]
+              [om-tools.dom :as dom :include-macros true]))
+
+(defn ->minutes [seconds]
+  (gstring/format "%02d:%02d" (int (/ seconds 60))  (rem seconds 60)))
+
+(defcomponent om-show-moon-board [data owner]
+  (render [_]
+          (dom/div {:class "row"}
+                   (dom/div {:class "col-sm-12"}
+                            (dom/img {:class "img-rounded"
+                                      :src "FingerboardNumbered1.jpg"})))))
+
+(defcomponent om-show-workout-detail [{:keys [id title holds duration rest repeat]} owner]
+  (render [_]
+          (dom/tr {:id (str "workout-" id)}
+                  (dom/td title)
+                  (dom/td {:style {:text-align "right"}} (string/join "/" holds))
+                  (dom/td {:style {:text-align "right"}} (->minutes duration))
+                  (dom/td {:style {:text-align "right"}} (->minutes rest))
+                  (dom/td {:style {:text-align "right"}} repeat))))
+
+(defcomponent om-show-exercise-detail [{:keys [id count title holds duration rest repeat]} owner]
+  (render [_]
+          (dom/table {:class "table table-striped"}
+                     (dom/tbody
+                      (dom/tr
+                       (dom/th "Holds")
+                       (dom/th "Duration")
+                       (dom/th "Rest")
+                       (dom/th "Sets"))
+                      (dom/tr {:id (str "workout-" id)}
+                              (dom/td (string/join "/" holds))
+                              (dom/td (->minutes duration))
+                              (dom/td (->minutes rest))
+                              (dom/td (str count "/" repeat)))))))
+
+(defcomponent om-show-current-exercise [{:keys [id title holds duration rest repeat remaining activity] :as data} owner]
+  (render [_]
+          (dom/div
+           (dom/div {:class "row heading"}
+                    (dom/div {:class "col-sm-12"}
+                             (dom/h1 "Excercise")
+                             (dom/p {:class "lead"} title)))
+           (dom/div {:class "row"}
+                    (dom/div {:class "col-sm-12"}
+                             (dom/div {:class "block btn-block primary"}
+                                      (dom/h3 (str (string/capitalize (name activity))
+                                                   " " (->minutes remaining))))))
+           (dom/div {:class "row"}
+                    (dom/div {:class "col-sm-12"}
+                             (->om-show-exercise-detail data))))))
+
+(defcomponent om-show-total-workout [data owner]
+  (render [_]
+          (dom/table {:class "table table-striped"}
+                     (dom/tbody
+                      (dom/tr
+                       (dom/th "Description")
+                       (dom/th {:style {:text-align "right"}} "Holds")
+                       (dom/th {:style {:text-align "right"}} "Duration")
+                       (dom/th {:style {:text-align "right"}} "Rest")
+                       (dom/th {:style {:text-align "right"}} "Sets"))
+                     (map ->om-show-workout-detail data)))))
+
+(defcomponent om-show-workout [data owner]
+  (render [_]
+          (let [running (:running-workout data)]
+            (dom/div (->om-show-moon-board {})
+                     (when running
+                       (->om-show-current-exercise (:current-exercise data)))
+                     (dom/div {:class "row heading"}
+                              (dom/div {:class "col-sm-12"}
+                                       (dom/h1 "Total workout")))
+                     (when-not running
+              (dom/div {:class "row"}
+                       (dom/div {:class "col-sm-12"}
+                                (dom/button {:class "btn block btn-block primary btn-primary"
+                                             :id "ok"} "Go!"))))
+                     (->om-show-total-workout (:workout data))))))
+