bumps the version number

bumps the version number

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject ring-curl "0.1.1"
+(defproject ring-curl "0.1.2"
             :description "Converts ring requests to cURL commands"
             :url "https://github.com/GentlemanHal/ring-curl"
             :license {:name "Eclipse Public License"


bump serializable-fn

bump serializable-fn

--- project.clj
+++ project.clj
@@ -9,7 +9,7 @@
                               :username :env :passphrase :env}}
   :dependencies [[org.clojure/clojure "1.5.1"]
                  [org.clojure/tools.logging "0.2.6"]
-                 [yieldbot/serializable-fn "0.0.3"]
+                 [yieldbot/serializable-fn "0.0.4"]
                  [com.twitter/carbonite "1.3.3"]
                  [com.twitter/chill_2.9.3 "0.3.5"]]
   :plugins [[s3-wagon-private "1.1.2"]]


org.clojure/test.check 0.8.0-alpha2 released

--- project.clj
+++ project.clj
@@ -43,7 +43,7 @@
   :main ^:skip-aot icecap.core
   :target-path "target/%s"
   :profiles {:uberjar {:aot :all}
-             :dev {:dependencies [[org.clojure/test.check "0.7.0"]]
+             :dev {:dependencies [[org.clojure/test.check "0.8.0-alpha2"]]
                    :aliases ^:replace {"lint"
                                        ["do"
                                         ["clean"]


Add eastwood to repl dependencies.

Add eastwood to repl dependencies.

--- project.clj
+++ project.clj
@@ -10,4 +10,5 @@
   :global-vars {*warn-on-reflection* true}
   :java-source-paths ["src-java"]
   :javac-options     ["-target" "1.6" "-source" "1.6"]
+  :profiles  {:repl  {:dependencies  [[jonase/eastwood "0.2.2" :exclusions  [org.clojure/clojure]]]}}
   :main dsbdp.main)


Update to clj-http-client 0.2.7 to fix encoding bug

--- project.clj
+++ project.clj
@@ -16,7 +16,7 @@
                  [puppetlabs/trapperkeeper ~tk-version]
                  [puppetlabs/kitchensink ~ks-version]
                  [puppetlabs/certificate-authority "0.6.0"]
-                 [puppetlabs/http-client "0.2.5"]
+                 [puppetlabs/http-client "0.2.7"]
                  [org.jruby/jruby-core "1.7.15" :exclusions [com.github.jnr/jffi com.github.jnr/jnr-x86asm]]
                  [org.jruby/jruby-stdlib "1.7.15"]
                  [com.github.jnr/jffi "1.2.7"]


Bump lein-unison to next version.

Bump lein-unison to next version.

--- project.clj
+++ project.clj
@@ -43,7 +43,7 @@
                                   [joda-time/joda-time "2.8.2"]]
                    :plugins [[lein-jammin "0.1.1"]
                              [lein-set-version "0.4.1"]
-                             [mdrogalis/lein-unison "0.1.14"]
+                             [mdrogalis/lein-unison "0.1.15"]
                              [codox "0.8.8"]]}
              :reflection-check {:global-vars {*warn-on-reflection* true
                                               *assert* false


upgrade cider-nrepl to trunk

upgrade cider-nrepl to trunk

--- project.clj
+++ project.clj
@@ -26,6 +26,7 @@
   :plugins [[lein-environ "1.0.0"]
             [lein-localrepo "0.4.0"]
             [lein-pprint "1.1.1"]
+            [cider/cider-nrepl "0.10.0-SNAPSHOT"]
             [lein-ring "0.9.3"]]

   :ring {:handler babel.core/app})


lein-release plugin: preparing 0.9 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject tyranitar "0.9-SNAPSHOT"
+(defproject tyranitar "0.9"
   :description "Tyranitar service"
   :url "http://wikis.in.nokia.com/NokiaMusicArchitecture/Tyranitar"


Prepare for next release cycle.

Prepare for next release cycle.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject org.onyxplatform/onyx-sql "0.12.0.0-beta1"
+(defproject org.onyxplatform/onyx-sql "0.12.0.0-SNAPSHOT"
   :description "Onyx plugin for JDBC-backed SQL databases"
   :url "https://github.com/onyx-platform/onyx-sql"
   :license {:name "Eclipse Public License"


Version 5.3.13

Version 5.3.13

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def ps-version "5.3.13-SNAPSHOT")
+(def ps-version "5.3.13")
 (def jruby-1_7-version "1.7.27-1")
 (def jruby-9k-version "9.1.16.0-1")


lein-release plugin: bumped version from 0.6.0 to 0.6.1-SNAPSHOT for next development cycle

--- project.clj
+++ project.clj
@@ -1,7 +1,7 @@
 (def tk-version "0.4.3")
 (def ks-version "0.7.2")

-(defproject puppetlabs/trapperkeeper-webserver-jetty9 "0.6.0"
+(defproject puppetlabs/trapperkeeper-webserver-jetty9 "0.6.1-SNAPSHOT"
   :description "We are trapperkeeper.  We are one."
   ;; Abort when version ranges or version conflicts are detected in
   ;; dependencies. Also supports :warn to simply emit warnings.


Release 0.14.0.

Release 0.14.0.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "0.13.8"
+(defproject clojars-web "0.14.0"
   :dependencies [[org.clojure/clojure "1.4.0"]
                  [org.clojure/tools.cli "0.2.1"]
                  [org.apache.maven/maven-model "3.0.4"


add prep alias task to quickly prep a file

--- project.clj
+++ project.clj
@@ -18,6 +18,8 @@
   :source-paths ["src"]

   :clean-targets ^{:protect false} ["resources/public/js/compiled" "target"]
+
+  :aliases {"prep" ["run" "-m" "parinfer.format.prep-file"]}

   :cljsbuild {
     :test-commands {"test" ["node" "resources/public/js/compiled/parinfer-test.js"]}


(SERVER-1494) move remaining (PL) versions to parent

--- project.clj
+++ project.clj
@@ -1,4 +1,3 @@
-(def tk-version "1.5.1-SNAPSHOT")
 (def jetty-version "9.2.10.v20150310")

 (defproject puppetlabs/trapperkeeper-webserver-jetty9 "1.5.11-SNAPSHOT"
@@ -34,13 +33,12 @@
                  [org.eclipse.jetty.websocket/websocket-server ~jetty-version]

                  [prismatic/schema]
-                 [ring/ring-servlet "1.4.0"]
-                 [ring/ring-codec "1.0.0"]
+                 [ring/ring-servlet]
+                 [ring/ring-codec]

-                 [puppetlabs/ssl-utils "0.8.1"]
+                 [puppetlabs/ssl-utils]
                  [puppetlabs/kitchensink]
-                 [puppetlabs/trapperkeeper ~tk-version]
-
+                 [puppetlabs/trapperkeeper]
                  ]

   :source-paths  ["src"]
@@ -68,17 +66,15 @@
                                   "examples/webrouting_app/src"]
                    :java-source-paths ["examples/servlet_app/src/java"
                                        "test/java"]
-                   :dependencies [[puppetlabs/http-client "0.5.0"]
+                   :dependencies [[puppetlabs/http-client]
                                   [puppetlabs/kitchensink nil :classifier "test"]
-                                  [puppetlabs/trapperkeeper ~tk-version :classifier "test"]
-                                  [org.clojure/tools.namespace "0.2.10"]
-                                  [compojure "1.1.8" :exclusions [ring/ring-core
-                                                                  commons-io
-                                                                  org.clojure/tools.macro]]
+                                  [puppetlabs/trapperkeeper nil :classifier "test"]
+                                  [org.clojure/tools.namespace]
+                                  [compojure]
                                   [stylefruits/gniazdo "0.4.0" :exclusions [org.eclipse.jetty.websocket/websocket-api
                                                                             org.eclipse.jetty.websocket/websocket-client
                                                                             org.eclipse.jetty/jetty-util]]
-                                  [ring/ring-core "1.4.0"]]
+                                  [ring/ring-core]]
                     ;; Enable SSLv3 for unit tests that exercise SSLv3
                     :jvm-opts ["-Djava.security.properties=./dev-resources/java.security"]}

@@ -86,7 +82,7 @@
                          :java-source-paths ^:replace ["test/java"]}
              :uberjar {:aot [puppetlabs.trapperkeeper.main]
                        :classifiers ^:replace []
-                       :dependencies [[org.clojure/tools.nrepl "0.2.6" :scope "test" :exclusions [[org.clojure/clojure]]]]}}
+                       :dependencies [[org.clojure/tools.nrepl nil :scope "test" :exclusions [[org.clojure/clojure]]]]}}

   :main puppetlabs.trapperkeeper.main
   )


bump dependency version

bump dependency version

--- project.clj
+++ project.clj
@@ -9,6 +9,6 @@
 [org.apache.mesos/mesos "0.9.0-120"] ;; TODO: needs to be made public
 ]
   :dev-dependencies [
-[storm "0.8.2-wip13"]
+[storm "0.8.2-wip14"]
 [org.clojure/clojure "1.4.0"]
 ])


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -24,12 +24,12 @@
     [http-kit "2.2.0-alpha1"] ; Web server http://http-kit.org/
     [compojure "1.5.0"] ; Web routing https://github.com/weavejester/compojure
     [liberator "0.14.1"] ; WebMachine (REST API server) port to Clojure https://github.com/clojure-liberator/liberator
-    [com.apa512/rethinkdb "0.15.19"] ; RethinkDB client for Clojure https://github.com/apa512/clj-rethinkdb
+    [com.apa512/rethinkdb "0.15.20"] ; RethinkDB client for Clojure https://github.com/apa512/clj-rethinkdb
     [prismatic/schema "1.1.1"] ; Data validation https://github.com/Prismatic/schema
     [environ "1.0.3"] ; Environment settings from different sources https://github.com/weavejester/environ
     [com.taoensso/timbre "4.4.0-alpha1"] ; Logging https://github.com/ptaoussanis/timbre
-    [raven-clj "1.3.1"] ; Interface to Sentry error reporting https://github.com/sethtrain/raven-clj
-    [clj-http "3.0.1"] ; HTTP client https://github.com/dakrone/clj-http
+    [raven-clj "1.3.2"] ; Interface to Sentry error reporting https://github.com/sethtrain/raven-clj
+    [clj-http "3.1.0"] ; HTTP client https://github.com/dakrone/clj-http
     [org.clojure/tools.cli "0.3.5"] ; Command-line parsing https://github.com/clojure/tools.cli
     [clj-jwt "0.1.1"] ; Library for JSON Web Token (JWT) https://github.com/liquidz/clj-jwt
     [medley "0.8.1"] ; Utility functions https://github.com/weavejester/medley


Set version to 1.1.1

Set version to 1.1.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject funcool/catacumba "1.1.0"
+(defproject funcool/catacumba "1.1.1"
   :description "Asynchronous Web Toolkit for Clojure."
   :url "http://github.com/funcool/catacumba"
   :license {:name "BSD (2-Clause)"


cleaned lib project a bit

cleaned lib project a bit

--- project.clj
+++ project.clj
@@ -3,75 +3,35 @@
                  [org.clojure/clojurescript "1.7.170"]

                  [reagent "0.5.1" :exclusions [cljsjs/react]]
-                 [cljsjs/react-with-addons "0.13.3-0"]
-                 [org.clojure/core.match "0.3.0-alpha4"]
-                 [com.rpl/specter "0.8.0"]
-                 [funcool/hodgepodge "0.1.4"]
-
-                 ; for tests:
-                 #_[org.clojure/test.check "0.9.0"]
-                 #_[com.gfredericks/test.chuck "0.2.5"]]
+                 [cljsjs/react-with-addons "0.13.3-0"]]

   :plugins [[lein-cljsbuild "1.1.1"]
-            [lein-figwheel "0.5.0"]
             [lein-doo "0.1.6"]]

   :clean-targets ^{:protect false} ["resources/public/js/compiled" "resources/private" "target"]

   :cljsbuild {
               :builds [#_{:id           "dev"
-                        :source-paths ["src"]
-                        :compiler     {:main                 core
-                                       :asset-path           "js/compiled/out"
-                                       :output-to            "resources/public/js/compiled/frontend.js"
-                                       :output-dir           "resources/public/js/compiled/out"
-                                       :source-map-timestamp true}
-                        :figwheel     {:on-jsload     "core/on-jsload"
-                                       :before-jsload "core/before-jsload"}}
+                          :source-paths ["src"]
+                          :compiler     {:main                 core
+                                         :asset-path           "js/compiled/out"
+                                         :output-to            "resources/public/js/compiled/frontend.js"
+                                         :output-dir           "resources/public/js/compiled/out"
+                                         :source-map-timestamp true}
+                          :figwheel     {:on-jsload     "core/on-jsload"
+                                         :before-jsload "core/before-jsload"}}

                        #_{:id           "min"
-                        :source-paths ["src"]
-                        :compiler     {:main          core
-                                       :output-to     "resources/public/js/compiled/frontend.js"
-                                       :optimizations :advanced
-                                       :pretty-print  false}}
+                          :source-paths ["src"]
+                          :compiler     {:main          core
+                                         :output-to     "resources/public/js/compiled/frontend.js"
+                                         :optimizations :advanced
+                                         :pretty-print  false}}

                        #_{:id           "test"
-                        :source-paths ["src/frontend" "test"]
-                        :compiler     {:main          'unit.runner
-                                       :output-to     "resources/private/js/compiled/testable.js"
-                                       :output-dir    "resources/private/js/compiled/out"
-                                       :optimizations :none
-                                       }}]}
-
-  :figwheel {
-             ;; :http-server-root "public" ;; default and assumes "resources"
-             ;; :server-port 3449 ;; default
-             ;; :server-ip "127.0.0.1"
-
-             :css-dirs ["resources/public/css"]             ;; watch and update CSS
-
-             ;; Start an nREPL server into the running figwheel process
-             ;; :nrepl-port 7888
-
-             ;; Server Ring Handler (optional)
-             ;; if you want to embed a ring handler into the figwheel http-kit
-             ;; server, this is for simple ring servers, if this
-             ;; doesn't work for you just run your own server :)
-             ;; :ring-handler hello_world.server/handler
-
-             ;; To be able to open files in your editor from the heads up display
-             ;; you will need to put a script on your path.
-             ;; that script will have to take a file path and a line number
-             ;; ie. in  ~/bin/myfile-opener
-             ;; #! /bin/sh
-             ;; emacsclient -n +$2 $1
-             ;;
-             ;; :open-file-command "myfile-opener"
-
-             ;; if you want to disable the REPL
-             ;; :repl false
-
-             ;; to configure a different figwheel logfile path
-             ;; :server-logfile "tmp/logs/figwheel-logfile.log"
-             })
+                          :source-paths ["src/frontend" "test"]
+                          :compiler     {:main          'unit.runner
+                                         :output-to     "resources/private/js/compiled/testable.js"
+                                         :output-dir    "resources/private/js/compiled/out"
+                                         :optimizations :none
+                                         }}]})


Version 0.4.26

Version 0.4.26

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject kixi/terraboot "0.4.26-SNAPSHOT"
+(defproject kixi/terraboot "0.4.26"
   :description "Terraform modules for kixi framework"
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"


Prepare 3.0.0-preview3 release

Prepare 3.0.0-preview3 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject neko "3.0.0-preview2"
+(defproject neko "3.0.0-preview3"
   :description "Neko is a toolkit designed to make Android development using Clojure easier and more fun."
   :url "https://github.com/alexander-yakushev/neko"
   :license {:name "Eclipse Public License"


Version 2.27.1-1-SNAPSHOT [ci skip]

Version 2.27.1-1-SNAPSHOT [ci skip]

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojush "2.27.1"
+(defproject clojush "2.27.1-1-SNAPSHOT"
   :description "The Push programming language and the PushGP genetic programming
                 system implemented in Clojure. See http://pushlanguage.com"
   :license {:name "Eclipse Public License"


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -22,7 +22,7 @@
     [ring/ring-core "1.6.0-beta6"] ; Web application library https://github.com/ring-clojure/ring
     [jumblerg/ring.middleware.cors "1.0.1"] ; CORS library https://github.com/jumblerg/ring.middleware.cors
     [http-kit "2.3.0-alpha1"] ; Web server http://http-kit.org/
-    [compojure "1.6.0-beta1"] ; Web routing https://github.com/weavejester/compojure
+    [compojure "1.6.0-beta2"] ; Web routing https://github.com/weavejester/compojure
     [liberator "0.14.1"] ; WebMachine (REST API server) port to Clojure https://github.com/clojure-liberator/liberator
     [com.apa512/rethinkdb "0.15.26"] ; RethinkDB client for Clojure https://github.com/apa512/clj-rethinkdb
     [prismatic/schema "1.1.3"] ; Data validation https://github.com/Prismatic/schema
@@ -36,7 +36,7 @@
     [clj-jwt "0.1.1"] ; Library for JSON Web Token (JWT) https://github.com/liquidz/clj-jwt
     [medley "0.8.4"] ; Utility functions https://github.com/weavejester/medley
     [com.stuartsierra/component "0.3.1"] ; Component Lifecycle
-    [amazonica "0.3.77"] ; A comprehensive Clojure client for the entire Amazon AWS api https://github.com/mcohen01/amazonica
+    [amazonica "0.3.78"] ; A comprehensive Clojure client for the entire Amazon AWS api https://github.com/mcohen01/amazonica
     [open-company/lib "0.0.6-04c024d"] ; Library for OC projects https://github.com/open-company/open-company-lib
   ]


Bump project to beta1

Bump project to beta1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject com.wsscode/pathom "2.2.0"
+(defproject com.wsscode/pathom "2.2.0-beta1"
   :description "A Clojure library designed to provide a collection of helper functions to support Clojure(script) graph parsers using\nom.next graph syntax."
   :url "https://github.com/wilkerlucio/pathom"
   :license {:name "Eclipse Public License"


Fixed dep conflict for schema

Fixed dep conflict for schema

Conflict in schema version for nomad was causing an error when running
phantomjs for cljs tests.

--- project.clj
+++ project.clj
@@ -16,7 +16,7 @@
                  [org.clojure/core.async "0.2.374"]
                  [petrol "0.1.2"]
                  [hiccup "1.0.5"]
-                 [jarohen/nomad "0.8.0-beta3"]
+                 [jarohen/nomad "0.8.0-beta3" :exclusions [org.clojure/clojure prismatic/schema]]
                  [com.taoensso/timbre "4.2.0"]
                  [org.clojure/core.match "0.3.0-alpha4"]
                  [clj-jwt "0.1.1"]]


Improve error message when passing invalid defscreen args

--- src/play_clj/core.clj
+++ src/play_clj/core.clj
@@ -465,8 +465,15 @@
         (println (:initial-distance screen)) ; the start distance between fingers
         (println (:distance screen)) ; the end distance between fingers
         entities))"
-  [n & {:keys [] :as options}]
-  `(let [fn-syms# (->> (for [[k# v#] ~options]
+  [n & options]
+  ; make sure the options are valid
+  (let [s (format "Unexpected value in (defscreen %s). Make sure you give it
+keywords and functions in pairs."
+                  (str n))]
+    (assert (even? (count options)) s)
+    (assert (= 0 (count (remove keyword? (keys (apply hash-map options))))) s))
+  ; return form calling defscreen*
+  `(let [fn-syms# (->> (for [[k# v#] ~(apply hash-map options)]
                          [k# (intern *ns* (symbol (str '~n "-" (name k#))) v#)])
                        flatten
                        (apply hash-map))


Bumped version number to 0.1.1-SNAPSHOT.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject assert-json "0.1.0"
+(defproject assert-json "0.1.1-SNAPSHOT"
   :description "Small library to test JSON objects"
   :url "https://github.com/manuelp/assert-json"
   :license {:name "Eclipse Public License"


Version 0.0.8

Version 0.0.8

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject pe-core-utils "0.0.8-SNAPSHOT"
+(defproject pe-core-utils "0.0.8"
   :description "A Clojure library providing a set of helper functions."
   :url "https://github.com/evanspa/pe-core-utils"
   :license {:name "MIT"


release 0.2.4

release 0.2.4

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject minhtuannguyen/remote-test-refresh "0.2.4-SNAPSHOT"
+(defproject minhtuannguyen/remote-test-refresh "0.2.4"
   :description "Automatically synchronize with remote project over ssh  when files change"
   :url "https://github.com/minhtuannguyen/remote-test-refresh"
   :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"}


Set version to 1.0.4

Set version to 1.0.4

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject funcool/bide "1.0.3"
+(defproject funcool/bide "1.0.4"
   :description "Simple routing for ClojureScript"
   :url "https://github.com/funcool/bide"
   :license {:name "BSD (2-Clause)"


Add s3-wagon, repositories, bump version (#1)

--- project.clj
+++ project.clj
@@ -1,8 +1,11 @@
-(defproject funcool/cats "2.1.0"
+(defproject funcool/cats "2.2.0"
   :description "Category Theory abstractions for Clojure"
   :url         "https://github.com/funcool/cats"
   :license {:name "BSD (2 Clause)"
             :url  "http://opensource.org/licenses/BSD-2-Clause"}
+
+  :plugins [[s3-wagon-private "1.3.0"]]
+
   :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
                  [org.clojure/clojurescript "1.9.89" :scope "provided"]
                  [org.clojure/core.async "0.3.442" :scope "provided"]
@@ -10,8 +13,9 @@
                  [org.clojure/core.match "0.3.0-alpha4" :scope "provided"]
                  [manifold "0.1.5" :scope "provided"]
                  [funcool/promesa "1.8.1" :scope "provided"]]
-  :deploy-repositories {"releases"  :clojars
-                        "snapshots" :clojars}
+  :repositories  [["central"  {:url "http://repo1.maven.org/maven2/" :snapshots false}]
+                  ["clojars"  {:url "https://clojars.org/repo/"}]
+                  ["nu-maven" {:url "s3p://nu-maven/releases/"}]]
   :source-paths   ["src"]
   :test-paths     ["test"]
   :jar-exclusions [#"\.swp|\.swo|user\.clj"])


using ec2 fork

using ec2 fork

--- project.clj
+++ project.clj
@@ -22,7 +22,7 @@
                  [com.narkisr/carmine "1.6.0"]
                  [org.clojure/core.memoize "0.5.2" :exclusions [org.clojure/core.cache]]
                  [metrics-clojure "0.9.2"]
-                 [clj-aws-ec2 "0.2.1" :exclusions  [org.codehaus.jackson/jackson-core-asl]]
+                 [narkisr/clj-aws-ec2 "0.2.0" :exclusions  [org.codehaus.jackson/jackson-core-asl]]
                  [narkisr/trammel "0.8.0-freez"]
                  [mississippi "1.0.1"]
                  [org.flatland/useful "0.9.5"]


upgrade dag_unify

upgrade dag_unify

--- project.clj
+++ project.clj
@@ -6,7 +6,7 @@
   :dependencies [[clj-time "0.7.0"]
                  [clojail "1.0.6"]
                  [compojure "1.1.6"]
-                 [dag_unify "1.4.1-SNAPSHOT"]
+                 [dag_unify "1.4.1"]
                  [environ "1.0.0"]
                  [hiccup "1.0.5"]
                  [javax.servlet/servlet-api "2.5"]


upgrade

upgrade

--- project.clj
+++ project.clj
@@ -10,10 +10,10 @@
   :test-paths ["spec/clj"]

   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [org.clojure/clojurescript "0.0-2511" :scope "provided"]
+                 [org.clojure/clojurescript "0.0-3153" :scope "provided"]
                  [ring "1.3.2"]
-                 [ring/ring-defaults "0.1.3"]
-                 [compojure "1.3.1"]
+                 [ring/ring-defaults "0.1.4"]
+                 [compojure "1.3.2"]
                  [enlive "1.1.5"]
                  [om "0.8.0-rc1"]
                  [environ "1.0.0"]]
@@ -36,10 +36,10 @@
   :profiles {:dev {:source-paths ["env/dev/clj"]
                    :test-paths ["test/clj"]

-                   :dependencies [[figwheel "0.2.1-SNAPSHOT"]
-                                  [figwheel-sidecar "0.2.1-SNAPSHOT"]
-                                  [com.cemerick/piggieback "0.1.3"]
-                                  [weasel "0.4.2"]]
+                   :dependencies [[figwheel "0.2.5"]
+                                  [figwheel-sidecar "0.2.5"]
+                                  [com.cemerick/piggieback "0.1.5"]
+                                  [weasel "0.6.0"]]

                    :repl-options {:init-ns ladder.server
                                   :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}


start working on on 2.5.2

start working on on 2.5.2

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject babel "2.5.1"
+(defproject babel "2.5.2-SNAPSHOT"
   :description "A library for natural language generation and parsing"
   :url "http://github.com/ekoontz/babel"
   :license {:name "Eclipse Public License"


Upgrade Clojure to 1.10.1

Upgrade Clojure to 1.10.1

--- project.clj
+++ project.clj
@@ -9,7 +9,7 @@
   :url              "https://github.com/Day8/re-com.git"
   :license          {:name "MIT"}

-  :dependencies     [[org.clojure/clojure         "1.10.0"]
+  :dependencies     [[org.clojure/clojure         "1.10.1"]
                      [org.clojure/clojurescript   "1.10.439"]
                      [reagent                     "0.8.1"]
                      [org.clojure/core.async      "0.4.474"]


Version 0.4.0-alpha16

Version 0.4.0-alpha16

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject yetibot.core "0.4.0-alpha16-SNAPSHOT"
+(defproject yetibot.core "0.4.0-alpha16"
   :description "Core yetibot utilities, extracted for shared use among yetibot
                 and its various plugins"
   :url "https://github.com/devth/yetibot.core"


Bump clojurescript dependency to 3030

Bump clojurescript dependency to 3030

--- project.clj
+++ project.clj
@@ -3,7 +3,7 @@
   :url "http://example.com/FIXME"

   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [org.clojure/clojurescript "0.0-2913"]
+                 [org.clojure/clojurescript "0.0-3030"]
                  [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                  [org.omcljs/om "0.8.8"]
                  [prismatic/om-tools "0.3.10"]


Resolve dependency conflict.

Resolve dependency conflict.

--- project.clj
+++ project.clj
@@ -29,7 +29,10 @@
     ;; Ring logging https://github.com/nberger/ring-logger-timbre
     ;; NB: com.taoensso/encore pulled in by oc.lib
     ;; NB: com.taoensso/timbre pulled in by oc.lib
-    [ring-logger-timbre "0.7.6" :exclusions [com.taoensso/encore com.taoensso/timbre]]
+    ;; NB: org.clojure/tools.logging pulled in by oc.lib
+    [ring-logger-timbre "0.7.6" :exclusions [com.taoensso/encore
+                                             com.taoensso/timbre
+                                             org.clojure/tools.logging]]
     ;; Web routing https://github.com/weavejester/compojure
     [compojure "1.6.1"]
     ;; Utility functions https://github.com/weavejester/medley


mark om dep as provided

mark om dep as provided

--- project.clj
+++ project.clj
@@ -6,7 +6,7 @@
   :repositories [["clojars" {:sign-releases false}]]
   :dependencies [[org.clojure/clojure "1.9.0-alpha7" :scope "provided"]

-                 [org.omcljs/om "1.0.0-alpha36"]]
+                 [org.omcljs/om "1.0.0-alpha36" :scope "provided"]]

   :jvm-opts ^:replace ["-Xmx1g" "-server"]
   :source-paths ["src" "test"]


update the comment at the bottom of the page


Changed variable name which was creating confusion about data-point

--- src/riemann/stackdriver.clj
+++ src/riemann/stackdriver.clj
@@ -36,9 +36,9 @@
                       :name :service } opts)]
     (fn [event]
       (when (:metric event))
-      (let [data-point {:timestamp (-> (System/currentTimeMillis) (quot 1000))
+      (let [post-data { :timestamp (-> (System/currentTimeMillis) (quot 1000))
                         :proto_version 1
-                        :data (generate-datapoint opts event)}
-            json-data (generate-string data-point)]
+                        :data (generate-datapoint opts event) }
+            json-data (generate-string post-data)]
         (when (:metric event)
           (post-datapoint (:api-key opts) gateway-url json-data))))))


Factor out compiling of individual file from site-map generation.

--- src/pubhouse/core.clj
+++ src/pubhouse/core.clj
@@ -66,23 +66,11 @@
   (merge page-info
          {:url (strip-extension (:path file-info))}))

-(defmulti render-file (fn [ext _ _] ext))
-
-(defmethod render-file ".md"
-  [_ page-record content-lines]
-  (hiccup/html
-   [:html
-    [:head [:title (:title page-record)]]
-    [:body
-     (md-to-html-string (join "\n" content-lines))
-     [:div (:url page-record)]
-     [:div (get-in site [:current-page :url])]]]))
-
 (defn pages->site
   [pages]
   (reduce #(assoc-in %1 (fs/split (:url %2)) %2) {} pages))

-(defn with-file-ends
+(defn with-io
   "Creates a reader and writer using the input and output files, and invokes the
   f with the arguments (reader writer). Ensures that the parent directory of the output
   file exists."
@@ -106,23 +94,46 @@
   [build-path url]
   (fs/with-cwd build-path (fs/file (str url ".html"))))

+(defmulti render-file (fn [ext _ _] ext))
+
+(defmethod render-file ".md"
+  [_ page-record content-lines]
+  (hiccup/html
+   [:html
+    [:head [:title (:title page-record)]]
+    [:body
+     (md-to-html-string (join "\n" content-lines))
+     [:pre (with-out-str (clojure.pprint/pprint site))]
+     [:div (:url page-record)]
+     [:div (get-in site [:current-page :url])]]]))
+
+(defn compile-file!
+  [comp-state [file-info page-info]]
+  (let [{:keys [site-path build-path]} comp-state
+        page (make-page file-info page-info)
+        input (input-file site-path (:path file-info))
+        output (output-file build-path (:url page))]
+    (with-io input output
+      (fn [reader writer]
+        (binding [site (assoc site :current-page page)]
+          (.write writer (render-file (fs/extension (:path file-info))
+                                      page
+                                      (content-section (line-seq reader)))))))))
+
+(defn fresh-comp-state
+  [site-path build-path]
+  {:site-path site-path :build-path build-path})
+
 (defn compile-content!
-  [site-path site-map build-path]
+  [comp-state site-map]
   (let [site (pages->site (map (partial apply make-page) site-map))]
-    (doseq [[file-info page-info] site-map]
-      (let [page (make-page file-info page-info)
-            input (input-file site-path (:path file-info))
-            output (output-file build-path (:url page))]
-        (with-file-ends input output
-          (fn [reader writer]
-            (binding [site (assoc site :current-page page)]
-              (.write writer
-                      (render-file (fs/extension (:path file-info))
-                                   page
-                                   (content-section (line-seq reader)))))))))))
+    (doseq [content-map site-map]
+      (binding [site site]
+        (compile-file! comp-state content-map)))))

 (defn compile-site!
   [site-path build-root]
   (binding [*site-map* (atom {})]
     (fs/with-cwd site-path (build-site-map!))
-    (compile-content! site-path @*site-map* build-root)))
+    (compile-content! (fresh-comp-state site-path build-root)
+                      @*site-map*)))


Modify test task to take advantage of fixed clojure bug #193.

--- src/leiningen/test.clj
+++ src/leiningen/test.clj
@@ -9,31 +9,6 @@
         [clojure.contrib.find-namespaces :only [find-namespaces-in-dir]]
         [leiningen.compile :only [eval-in-project]]))

-(def report-fns
-     '(let [aggregates (ref [])]
-
-        (defmethod report :summary [m]
-          (with-test-out
-            (println "\nRan" (:test m) "tests containing"
-                     (+ (:pass m) (:fail m) (:error m)) "assertions.")
-            (println (:fail m) "failures," (:error m) "errors."))
-          (dosync (commute aggregates conj m))
-          (= 0 (:fail m) (:error m)))
-
-        (defn test-namespace [all-passed? n]
-          (require n)
-          (let [this-passed? (run-tests n)]
-            (and all-passed? this-passed?)))
-
-        (defn super-summary []
-          (with-test-out
-            (println "\n\n--------------------\nTotal:"))
-          (report (apply merge-with (fn [a b]
-                                      (if (number? a)
-                                        (+ a b)
-                                        a))
-                         @aggregates)))))
-
 (defn test
   "Run the project's tests. Accept a list of namespaces for which to run all
 tests for. If none are given, runs them all."
@@ -41,11 +16,18 @@
   (let [namespaces (if (empty? namespaces)
                      (find-namespaces-in-dir (file (:root project) "test"))
                      (map symbol namespaces))]
+    ;; It's long and a bit hairy because it has to be self-contained.
     (eval-in-project
      project
-     `(do
-        (use ~''clojure.test)
-        ~report-fns
-        (let [passed?# (reduce ~'test-namespace true '~namespaces)]
-          (~'super-summary)
-          (System/exit (if passed?# 0 1)))))))
+     `(do (use ~''clojure.test)
+          (let [add-numbers# (fn [a# b#] (if (number? a#)
+                                           (+ a# b#) a#))
+                summary# (reduce (fn [summary# n#]
+                                   (require n#)
+                                   (merge-with add-numbers#
+                                               summary# (run-tests n#)))
+                                 {} '~namespaces)]
+            (with-test-out
+              (println "\n\n--------------------\nTotal:")
+              (report summary#))
+            (System/exit (if (successful? summary#) 0 1)))))))


Added implict group-id to plugin section of zinc-profile.

--- src/leiningen/zinc.clj
+++ src/leiningen/zinc.clj
@@ -166,7 +166,7 @@
               fork-java? false
               }} project
         lein-zinc-version (lein/dependency-version
-                            (lein/plugin project 'lein-zinc))]
+                            (lein/plugin project 'lein-zinc/lein-zinc))]
   (main/info "scala version: " scala-version)
   (main/info "sbt   version: " sbt-version)
   (main/info "fork java?     " fork-java?)


src/riemann/xymon.clj: fixed: one message was dropped after combo was getting too big

--- src/riemann/xymon.clj
+++ src/riemann/xymon.clj
@@ -127,29 +127,37 @@
 (def ^:private combo-header "combo\n")
 (def ^:private combo-header-len (count combo-header))

+(defn- make-combo [messages]
+  (if (= (count messages) 1)            ; messages must not be empty
+    (first messages)
+    (str combo-header (clojure.string/join "\n\n" messages) "\n\n")))
+
 (defn events->combo
   "Returns a lazy sequence of combo messages. Each message is at most
   message-max-length long.
   "
-  ([formatter events]
-   (if (seq events)
-     (events->combo formatter events combo-header combo-header-len)))
-  ([formatter events message len]
-   (if (empty? events)
-     (list message)
+  ([formatter events] (events->combo formatter events [] combo-header-len))
+  ([formatter events messages len]
+   (cond
+     (seq events)
+     ;; We have more events, consume next one.
      (let [next-message (formatter (first events))
            next-length (count next-message)
            length (+ len next-length 2)
            events (rest events)]
-       (cond
-         ;; single message case // drop the combo
-         (and (= len combo-header-len) (empty? events))
-         (list next-message)
+       (if (< length message-max-length)
          ;; keep appending to message
-         (< length message-max-length)
-         (recur formatter events (str message next-message "\n\n") length)
-         ;; create list of messages
-         :else (cons message (lazy-seq (events->combo formatter events))))))))
+         (recur formatter events (conj messages next-message) length)
+         ;; message is getting too big, so we create a combo and
+         ;; iterate over the rest of the sequence.
+         (cons (make-combo messages)
+               (lazy-seq (events->combo
+                          formatter events [next-message]
+                          (+ next-length combo-header-len 2))))))
+     ;; Stop case, no message found // drop combo
+     (empty? messages) messages
+     ;; Stop case, multiple messages joined as a combo
+     :else (list (make-combo messages)))))

 (defn xymon
   "Returns a function which accepts an event or a vector of events and


Now creates media entities in URLS

Now creates media entities in URLS

--- src/stream_crawler/impl.clj
+++ src/stream_crawler/impl.clj
@@ -147,10 +147,17 @@
       hashtags )))

 (defn build-urls [tw-tweet]
-  "Build map[s] of url[s] in tweet. Returns an empty array if none are found."
+  "Build map[s] of url[s] in tweet. Returns an empty sequence if none are found."
   (let [urls (:urls (:entities tw-tweet))]
     (for [tw-url urls]
       {:extended_url (:expanded_url tw-url)})))
+
+(defn build-media [tw-tweet]
+  "Build map[s] of media entity[s] in tweet. Returns an empty sequence if none
+   are found."
+  (let [medias (:media (:entities tw-tweet))]
+    (for [media medias]
+      {:extended_url (:expanded_url media)})))

 (defn create-hashtags-from-tweet [twitter-tweet]
   (let [hts-attrs (build-hashtags twitter-tweet)]
@@ -169,7 +176,7 @@
       (naan/create urls url))))

 (defn create-urls-from-tweet [twitter-tweet]
-  (doseq [url (build-urls twitter-tweet)]
+  (doseq [url (concat (build-urls twitter-tweet) (build-media twitter-tweet))]
     (let [url-id (:id (find-or-create-url url))
           tweet-id (:id twitter-tweet)]
       (naan/create url-in-tweets {:tweet_id tweet-id :url_id url-id}))))


MIDI mapping to change speed of oscillators

--- src/lights/my_show.clj
+++ src/lights/my_show.clj
@@ -215,6 +215,7 @@
         "Automap MIDI" 10 22 :sparkle-fade :min 1 :max 2000)
       (show/add-midi-control-to-cue-mapping "Automap MIDI" 10 :control 51 0 7)
       (show/add-midi-control-to-cue-mapping "Automap MIDI" 10 :control 52 1 7)
+      (show/add-midi-control-to-var-mapping "Automap MIDI" 10 66 :osc-beat-ratio :max 3 :transform-fn (fn [v] (Math/pow 2 (Math/round v))))
     )
   )

@@ -222,6 +223,10 @@
     (show/sync-to-external-clock
       (afterglow.midi/sync-to-midi-clock "USB Uno MIDI Interface"))
     )
+
+  (if (= interface "identify")
+    (afterglow.midi/identify-mapping))
+
 )

 (bind-midi "automap")
@@ -236,9 +241,6 @@

 ; Max lightness in the show
 (afterglow.show/set-variable! :max-lightness 50)
-
-; Osc beat ratio, isn't working yet with oscillators, but hope isn't lost
-(afterglow.show/set-variable! :osc-beat-ratio 4)

 (defn light-sawtooth
   "Change light according to sawtooth osc"


Make the workspace message not visible (temporary).

--- src/uxbox/ui/workspace.cljs
+++ src/uxbox/ui/workspace.cljs
@@ -122,13 +122,13 @@
          :on-scroll on-scroll
          :on-wheel (partial on-wheel own)}

-         ;; WIP message version
-         [:div.message-version
-          [:span "Continue working with version 22?"]
-          [:div.message-action
-           [:a.btn-transparent "Accept"]
-           [:a.btn-transparent "Cancel"]
-         ]]
+        ;; WIP message version
+        #_[:div.message-version
+         [:span "Continue working with version 22?"]
+         [:div.message-action
+          [:a.btn-transparent "Accept"]
+          [:a.btn-transparent "Cancel"]
+          ]]

         ;; Rules
         (horizontal-rule zoom)


update search by title on-click event to on-change event

--- src_cljs/rrms/corecljs.cljs
+++ src_cljs/rrms/corecljs.cljs
@@ -134,9 +134,9 @@
      [:div {:class "col-xs-12"}
       [:div.form-group
        [:div.col-sm-2 [:input.form-control {:id "sText" :type "text"
-                                            :placeholder "search by title"}]]
-       [:input {:type "button" :value "Search"
-                :class "btn btn-primary" :on-click search}]
+                                            :placeholder "Search By Title" :on-change search}]]
+       ;; [:input {:type "button" :value "Search"
+       ;;          :class "btn btn-primary" :on-click search}]
        (url-format "#/documents/add" "Document")]
       [:div {:class "box-body"}


fix add to +

fix add to +

--- src/neuseg/prepare.clj
+++ src/neuseg/prepare.clj
@@ -43,7 +43,7 @@
     (with-open [wrtr (writer baos :encoding "utf-8")]
       (with-open [rdr (reader file-corpus :encoding "utf-8")]
         (doseq [line (line-seq rdr)]
-          (swap! counter add (count line))
+          (swap! counter + (count line))
           (.write wrtr (gen-cases text)))))
     (with-open [wrtr (writer file-output  :encoding "utf-8")]
         (.write wrtr (str @counter " 32 2\n"))


More form validation

More form validation

--- client/src/cljs/receipts_client/views.cljs
+++ client/src/cljs/receipts_client/views.cljs
@@ -166,6 +166,7 @@
 (def complete-receipt
   {:purchase/paymentMethod [[struct/required :message "'Paid by' missing"] struct/string]
    :purchase/date [[struct/required :message "Please specify date"] struct/positive]
+   :purchase/price [[struct/required :message "Please specify amount"] struct/positive]
    :purchase/category [[struct/required :message  "Category missing"] struct/string]
    :purchase/vendor [[struct/required :message  "Choose vendor in category"] struct/string]
    :purchase/forWhom [[struct/required :message  "Specify user(s) of this purchase"] struct/set]})
@@ -188,7 +189,8 @@
            [dropdown :multiple? false
             :field-key :purchase/paymentMethod
             :subs-key :payment-methods
-            :schema-key :paymentMethod/abbrev]]
+            :schema-id-key :paymentMethod/abbrev
+            :schema-label-key :paymentMethod/name]]
           [labelled "Date"
            (:purchase/date validation-errors)
            [date-time-picker
@@ -200,6 +202,7 @@
             :width field-width
             :model (or (:purchase/price @current-receipt) "0.00")
             :on-change #(re-frame/dispatch [:edit-current-receipt :purchase/price %])
+            :change-on-blur? false
             :attr {:type "number"
                    :step "0.01"}]]
           [labelled "Category"


- Remove potential reflection when using Symbol instances for condition :type rather than Class instances

--- src/main/clojure/clara/rules/compiler.clj
+++ src/main/clojure/clara/rules/compiler.clj
@@ -262,9 +262,19 @@
 (defn- add-meta
   "Helper function to add metadata."
   [fact-symbol fact-type]
-  (if (class? fact-type)
-    (vary-meta fact-symbol assoc :tag (symbol (.getName ^Class fact-type)))
-    fact-symbol))
+  (let [fact-type (if (symbol? fact-type)
+                    (try
+                      (resolve fact-type)
+                      (catch Exception e
+                        ;; We shouldn't have to worry about exceptions being thrown here according
+                        ;; to `resolve`s docs.
+                        ;; However, due to http://dev.clojure.org/jira/browse/CLJ-1403 being open
+                        ;; still, it is safer to catch any exceptions thrown.
+                        fact-type))
+                    fact-type)]
+    (if (class? fact-type)
+      (vary-meta fact-symbol assoc :tag (symbol (.getName ^Class fact-type)))
+      fact-symbol)))

 (defn compile-condition
   "Returns a function definition that can be used in alpha nodes to test the condition."


misc edits

misc edits

--- src/main/clojure/mikera/spectral/core.clj
+++ src/main/clojure/mikera/spectral/core.clj
@@ -1,20 +1,27 @@
 (ns mikera.spectral.core
   (:use [overtone core]))

- (definst foo [] (saw 220))
+(defonce boot (boot-external-server))
+
+(defonce buf (buffer 44100)) ;; create a buffer to store the audio
+
+;; ==================================================
+;; some instruments
+
+(definst foo [] (saw 220))

- (definst trem [freq 440 depth 10 rate 6 length 3]
+(definst trem [freq 440 depth 10 rate 6 length 3]
     (* 0.3
        (line:kr 0 1 length FREE)
        (saw (+ freq (* depth (sin-osc:kr rate))))))

-  (definst bar [freq 440 depth 10 rate 6 length 10]
+(definst bar [freq 440 depth 10 rate 6 length 10]
     (* 2.0
        (sin-osc:kr rate)
-       (line:kr 1 1 length FREE)
+     (line:kr 1 1 length FREE)
        (sound-in)))

-  (definst oksaw [note 60 velocity 100 gate 1 bass-presence 0]
+(definst oksaw [note 60 velocity 100 gate 1 bass-presence 0]
   (let [freq (midicps note)
         amp 0.33
         snd (sin-osc freq)
@@ -33,4 +40,12 @@
         snd (b-low-shelf snd 80 1 10)
         snd (b-peak-eq snd 800 1 0)
         snd (b-hi-shelf snd 2000 1 5)]
-      (* env snd)))+      (* env snd)))
+
+  ;; ============================================
+  ;; buffer fun
+
+(defsynth my-saw []
+  (record-buf (saw 220) buf :action :free, :loop 0))
+
+


comment raises

comment raises

--- src/ontrail/mutate.clj
+++ src/ontrail/mutate.clj
@@ -118,6 +118,7 @@
   (.debug logger (str user " creating comment " params))
   (mc/update-by-id EXERCISE
                    (ObjectId. (:id params))
+                   {:lastModifiedDate (time/now)}
                    {"$push" {:comments {:avatar (get-avatar-url user)
                                         :title (:title params)
                                         :date (to-human-date (time/now))


rename clear-handlers to match osc-clj

rename clear-handlers to match osc-clj

--- src/overtone/event.clj
+++ src/overtone/event.clj
@@ -84,7 +84,7 @@
       (let [handlers (get @handler-ref* event-type {})]
         (alter handler-ref* assoc event-type (dissoc handlers key))))))

-(defn clear-handlers
+(defn remove-all-handlers
   "Remove all handlers (both sync and async) for events of type event-type."
   [event-type]
   (dosync


Don't add hyphens to upper-case strings

Don't add hyphens to upper-case strings

--- doclet/src/clojure/play_clj_doclet/core.clj
+++ doclet/src/clojure/play_clj_doclet/core.clj
@@ -13,9 +13,16 @@

 (def classes (-> "classes.edn" io/resource slurp edn/read-string))

+(defn split-string
+  [s]
+  (if (= s (string/upper-case s))
+    [s]
+    (string/split s #"(?=[A-Z])")))
+
 (defn camel->keyword
   [s]
-  (->> (string/split (string/replace s "_" "-") #"(?=[A-Z])")
+  (->> (string/replace s "_" "-")
+       split-string
        (map string/lower-case)
        (string/join "-")
        keyword))


Remove extra whitespace :shower:

Remove extra whitespace :shower:


use https for jquery CDN link

use https for jquery CDN link

--- src/norman_sicily_static/web.clj
+++ src/norman_sicily_static/web.clj
@@ -36,7 +36,7 @@
       page]
       util/footer
      [:script
-      {:src "http://code.jquery.com/jquery-3.2.1.slim.min.js"
+      {:src "https://code.jquery.com/jquery-3.2.1.slim.min.js"
        :integrity "sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
        :crossorigin "anonymous"}]
      (include-js (link/file-path request "/scripts/bootstrap.min.js"))


Makes a stream observer thread that will do general book keeping.

[ci skip]

--- src/onyx/peer/task_lifecycle.clj
+++ src/onyx/peer/task_lifecycle.clj
@@ -65,8 +65,40 @@
     nil
     (let [channel (aeron-channel bind-addr port)
           subscription (.addSubscription conn channel stream-id)]
-      {:conn conn
-       :subscription subscription})))
+      {:subscription subscription})))
+
+(defn stream-observer-handler [event this-task-id buffer offset length header]
+  (let [ba (byte-array length)
+        _ (.getBytes buffer offset ba)
+        res (messaging-decompress ba)]
+    (when (and (map? res)
+               (= (:type res) :job-completed)
+               (= this-task-id (:task-id res)))
+      (prn "Completed!"))))
+
+(defn fragment-data-handler [f]
+  (FragmentAssembler.
+   (reify FragmentHandler
+     (onFragment [this buffer offset length header]
+       (f buffer offset length header)))))
+
+(defn consumer [handler ^IdleStrategy idle-strategy limit]
+  (reify Consumer
+    (accept [this subscription]
+      (while (not (Thread/interrupted))
+        (let [fragments-read (.poll ^Subscription subscription ^FragmentHandler handler ^int limit)]
+          (.idle idle-strategy fragments-read))))))
+
+(defn start-stream-observer! [conn bind-addr port stream-id idle-strategy event task-id]
+  (let [channel (aeron-channel bind-addr port)
+        subscription (.addSubscription conn channel stream-id)
+        handler (fragment-data-handler
+                 (fn [buffer offset length header]
+                   (stream-observer-handler event task-id buffer offset length header)))
+        subscription-fut (future (try (.accept ^Consumer (consumer handler idle-strategy 10) subscription)
+                                    (catch Throwable e (fatal e))))]
+    {:subscription subscription
+     :subscription-fut subscription-fut}))

 ;;;;

@@ -533,6 +565,14 @@
                  :task-kill-ch task-kill-ch
                  :task-lifecycle-ch task-lifecycle-ch
                  :input-retry-segments-ch input-retry-segments-ch
+                 :stream-observer (start-stream-observer! aeron-conn
+                                                          (mc/bind-addr opts)
+                                                          (:onyx.messaging/peer-port opts)
+                                                          1
+                                                          (backoff-strategy (arg-or-default :onyx.messaging.aeron/poll-idle-strategy opts))
+                                                          pipeline-data
+                                                          task-id)
+
                  :aux-ch aux-ch)))
       (catch Throwable e
         (handle-exception task-information log e restart-ch outbox-ch job-id)
@@ -565,8 +605,10 @@
           (state-extensions/close-filter @filter-state event)))

       (doseq [subscriber (:onyx.core/subscribers event)]
-        (future-cancel (:subscriber-fut subscriber))
         (.close ^Subscription (:subscription subscriber)))
+
+      (future-cancel (:subscription-fut (:stream-observer component)))
+      (.close ^Subscription (:subscription (:stream-observer component)))
       (.close ^Aeron (:onyx.core/aeron-conn event))

       ((:compiled-after-task-fn (:onyx.core/compiled event)) event))


Fixes #374.

Fixes #374.

--- src/onyx/peer/task_lifecycle.clj
+++ src/onyx/peer/task_lifecycle.clj
@@ -737,7 +737,9 @@
         component)))

   (stop [component]
-    (taoensso.timbre/info (format "[%s] Stopping Task LifeCycle for %s" id (:onyx.core/task (:pipeline-data component))))
+    (if-let [task-name (:onyx.core/task (:pipeline-data component))]
+      (taoensso.timbre/info (format "[%s] Stopping Task LifeCycle for %s" id task-name))
+      (taoensso.timbre/info (format "[%s] Stopping Task LifeCycle, failed to initialize task set up." id)))
     (when-let [event (:pipeline-data component)]

       ;; Fire all triggers on task completion.


indentation

indentation

--- src/open_company/lib/slugify.clj
+++ src/open_company/lib/slugify.clj
@@ -55,8 +55,8 @@
       false))) ; must not have been a string

 (defn ^:private positive-numbers
-	([] (positive-numbers 1))
-	([n] (lazy-seq (cons n (positive-numbers (inc n))))))
+  ([] (positive-numbers 1))
+  ([n] (lazy-seq (cons n (positive-numbers (inc n))))))

 (defn find-available-slug
   "Create a slug from `name` but find alternatives
@@ -68,4 +68,4 @@
       (->> (map #(str base-slug "-" %) (positive-numbers))
            (filter (fn [candidate] (not (contains? taken candidate))))
            first)
-      base-slug)))+      base-slug)))


Added Partition backlog stats. Hmmm..doesn't feel right...will need to review

--- qanal/src/qanal/core.clj
+++ qanal/src/qanal/core.clj
@@ -8,6 +8,8 @@
   (:gen-class)
   (:import (kafka.common OffsetOutOfRangeException InvalidMessageSizeException)))

+(log/set-config! [:appenders :spit :enabled?] true)
+(log/set-config! [:shared-appender-config :spit-filename] "Qanal.log")

 (def ^:private config-validator
   (compose-sets
@@ -52,6 +54,16 @@
     (Thread/sleep millis)
     (catch InterruptedException ie
       (log/warn "Sleeping Thread was interrupted : " ie))))
+
+(defn- execute-if-elapsed [{:keys [last-time-executed] :as m} window f & args]
+  (let [last-time (or last-time-executed 0)
+        elapsed (- (System/currentTimeMillis) last-time)]
+    #_(log/debug "last-time->" last-time " elapsed->" elapsed)
+    (if (> elapsed window)
+      (do
+        (apply f args)
+        (assoc m :last-time-executed (System/currentTimeMillis)))
+      m)))

 ;; TODO yuck! need to come up with a better name
 (defn- result-or-exception [f & args]
@@ -154,30 +166,34 @@
                 (log/warn "An unexpected Exception was encountered whilst getting kafka messages. Reconnecting Kafka and trying again")
                 (recur (connect-to-kafka m) m)))))))

+
+(defn- print-stats [c {:keys [topic partition-id offset received-msgs bulked-docs bulked-time]}]
+  (let [kafka-args {:topic topic :partition-id partition-id :auto-offset-reset :latest}
+        current-offset (result-or-exception kafka/get-topic-offset c kafka-args)
+        backlog (if (instance? Exception current-offset) "EXCEPTION" (- current-offset offset))]
+
+    (log/info "Topic->" topic " Partition-id->" partition-id " Received Msgs->" received-msgs
+              " Bulked Docs->" bulked-docs " Bulked-time->" bulked-time "ms"
+              " Backlog->" backlog)))
+
 (defn siphon [{:keys [kafka-source elasticsearch-target]}]
   (loop [c (connect-to-kafka kafka-source)
          source-with-offset (apply-initial-offset c kafka-source)]
-    (let [msgs-seq (get-kafka-messages c source-with-offset)
-          topic (:topic source-with-offset)
-          partition-id (:partition-id source-with-offset)]
+    (let [msgs-seq (get-kafka-messages c source-with-offset)]
       (if (empty? msgs-seq)
-        (do
-          (log/info "Topic->" topic " Partition-id->" partition-id " Received Msgs-> 0"
-                    " Bulked Docs->0 Bulked-time->0")
+        (let [print-stats-sensibly (partial execute-if-elapsed source-with-offset 1000 print-stats c)
+              source-with-offset (print-stats-sensibly (assoc source-with-offset :received-msgs 0 :bulked-docs 0 :bulked-time 0))]
           (sleep 1000)
           (recur c source-with-offset))
         (let [bulk-stats (els/bulk-index msgs-seq elasticsearch-target)
-              {:keys [last-offset received-msgs bulked-docs bulked-time]} bulk-stats
+              last-offset (:last-offset bulk-stats)
               m-with-offset (assoc source-with-offset :offset (inc last-offset))]
-          (log/info "Topic->" topic " Partition-id->" partition-id " Received Msgs->" received-msgs
-                    " Bulked Docs->" bulked-docs " Bulked-time->" (str bulked-time " millis"))
           (set-consumer-offset m-with-offset)
-          (recur c m-with-offset))))))
+          (let [print-stats-sensibly (partial execute-if-elapsed m-with-offset 1000 print-stats c)
+                m-with-offset (print-stats-sensibly (merge m-with-offset bulk-stats))]
+            (recur c m-with-offset)))))))

 (defn -main [& args]
-  (log/set-config! [:appenders :spit :enabled?] true)
-  (log/set-config! [:appenders :spit :rate-limit] [1 1000]) ;log maximum once a second
-  (log/set-config! [:shared-appender-config :spit-filename] "Qanal.log")
   (let [{:keys [options errors ]} (parse-opts args known-options)
         config-file (:config options)]
     (when errors


Reformat day8.re-frame-10x.view.app-db ns

--- src/day8/re_frame_10x/view/app_db.cljs
+++ src/day8/re_frame_10x/view/app_db.cljs
@@ -33,20 +33,20 @@
 (def app-db-styles
   [:#--re-frame-10x--
    #_[:.app-db-path
-    {:background-color           common/white-background-color
-     :border-bottom-left-radius  border-radius
-     :border-bottom-right-radius border-radius}]
+      {:background-color           common/white-background-color
+       :border-bottom-left-radius  border-radius
+       :border-bottom-right-radius border-radius}]

    [:.app-db-path--pod-border
-    {:border-left                pod-border-edge
-     :border-right               pod-border-edge
-     :border-bottom              pod-border-edge}]
+    {:border-left   pod-border-edge
+     :border-right  pod-border-edge
+     :border-bottom pod-border-edge}]

    [:.app-db-path--header
-    {:background-color        "#fafbfc"
-     :color                   "#b0b2b4"
-     :border                  pod-border-edge
-     :height                  common/gs-31}
+    {:background-color "#fafbfc"
+     :color            "#b0b2b4"
+     :border           pod-border-edge
+     :height           common/gs-31}
     ["&.subscription-pinned"
      {:background-color common/lighter-blue}]]

@@ -70,10 +70,10 @@
      :min-width "100px"
      :height    common/gs-19s}]
    #_[:.app-db-path--label
-    {:color           "#2D9CDB"
-     :text-decoration "underline"
-     :font-size       "11px"
-     :margin-bottom   "2px"}]
+      {:color           "#2D9CDB"
+       :text-decoration "underline"
+       :font-size       "11px"
+       :margin-bottom   "2px"}]

    [:.app-db-panel (common/panel-style border-radius)]

@@ -86,63 +86,63 @@
      :margin           (css-join "0px" pod-padding)
      :min-width        "100px"}]
    [:.data-viewer--top-rule
-    {#_#_:border-top  pod-border-edge}]])
+    {#_#_:border-top pod-border-edge}]])

 (defn panel-header []
   [rc/h-box
-   :align      :center
-   :style      {:margin-top common/gs-19s}
-   :children   [[rc/button
-                 :class "bm-muted-button app-db-panel-button"
-                 :label [rc/v-box
-                         :align :center
-                         :children ["+ path inspector"]]
-                 :on-click #(rf/dispatch [:app-db/create-path])]]])
+   :align :center
+   :style {:margin-top common/gs-19s}
+   :children [[rc/button
+               :class "bm-muted-button app-db-panel-button"
+               :label [rc/v-box
+                       :align :center
+                       :children ["+ path inspector"]]
+               :on-click #(rf/dispatch [:app-db/create-path])]]])

 (defn pod-header-section
   [& {:keys [size justify align gap width min-width background-color children style attr last?]
       :or   {size "none" justify :start align :center}}]
   [rc/h-box
-   :size      size
-   :justify   justify
-   :align     align
-   :gap       gap
-   :width     width
+   :size size
+   :justify justify
+   :align align
+   :gap gap
+   :width width
    :min-width min-width
-   :height    common/gs-31s
-   :style     (merge {:border-right     (when-not last? pod-border-edge)
-                      :background-color background-color}
-                     style)
-   :attr      attr
-   :children  children])
+   :height common/gs-31s
+   :style (merge {:border-right     (when-not last? pod-border-edge)
+                  :background-color background-color}
+                 style)
+   :attr attr
+   :children children])

 (defn pod-header [{:keys [id path path-str open? diff?]}]
   [rc/h-box
-   :class    "app-db-path--header"
-   :align    :center
-   :height   common/gs-31s
+   :class "app-db-path--header"
+   :align :center
+   :height common/gs-31s
    :children [[pod-header-section
-   :children [[rc/box
-                           :width  common/gs-31s
-               :height common/gs-31s
-               :class  "noselect"
-               :style  {:cursor "pointer"}
-               :attr   {:title    (str (if open? "Close" "Open") " the pod bay doors, HAL")
-                                    :on-click (handler-fn (rf/dispatch [:app-db/set-path-visibility id (not open?)]))}
-               :child  [rc/box
-                        :margin "auto"
-                                    :child [:span.arrow (if open? "▼" "▶")]]]]]
+               :children [[rc/box
+                           :width common/gs-31s
+                           :height common/gs-31s
+                           :class "noselect"
+                           :style {:cursor "pointer"}
+                           :attr {:title    (str (if open? "Close" "Open") " the pod bay doors, HAL")
+                                  :on-click (handler-fn (rf/dispatch [:app-db/set-path-visibility id (not open?)]))}
+                           :child [rc/box
+                                   :margin "auto"
+                                   :child [:span.arrow (if open? "▼" "▶")]]]]]

               [rc/h-box
                :background-color "white"
-               :class    "app-db-path--path-header"
-               :size     "auto"
-               :style    {:height       common/gs-31s
-                          :border-right pod-border-edge}
-               :align    :center
+               :class "app-db-path--path-header"
+               :size "auto"
+               :style {:height       common/gs-31s
+                       :border-right pod-border-edge}
+               :align :center
                :children [[rc/input-text
                            :class (when (empty? path-str) "app-db-path--path-text__empty")
                            :style {:height  "25px"
@@ -158,43 +158,43 @@
                            :placeholder "Showing all of app-db. Try entering a path like [:todos 1]"]]]
               [pod-header-section
                :width "50px"
-               :attr     {:on-click (handler-fn (rf/dispatch [:app-db/set-diff-visibility id (not diff?)]))}
+               :attr {:on-click (handler-fn (rf/dispatch [:app-db/set-diff-visibility id (not diff?)]))}
                :children [[rc/box
                            :style {:margin "auto"}
                            :child [rc/checkbox
-                                   :model     diff?
-                                   :label     ""
-                                   :style     {:margin-left "6px"
-                                               :margin-top  "1px"}
+                                   :model diff?
+                                   :label ""
+                                   :style {:margin-left "6px"
+                                           :margin-top  "1px"}
                                    :on-change #(rf/dispatch [:app-db/set-diff-visibility id (not diff?)])]]]]
               [pod-header-section
-               :width    "50px"
-               :justify  :center
-               :last?    true
+               :width "50px"
+               :justify :center
+               :last? true
                :children [[close-button
-                           :div-size    31
-                           :font-size   31
+                           :div-size 31
+                           :font-size 31
                            :left-offset 3
-                           :top-offset  -4
-                           :tooltip     "Remove this inspector"
-                           :on-click    #(do (reset! *finished-animation? false)
-                                             (rf/dispatch [:app-db/remove-path id]))]]]]])
+                           :top-offset -4
+                           :tooltip "Remove this inspector"
+                           :on-click #(do (reset! *finished-animation? false)
+                                          (rf/dispatch [:app-db/remove-path id]))]]]]])

 (defn pod [{:keys [id path open? diff?] :as pod-info}]
-  (let [render-diff?  (and open? diff?)
-        app-db-after  (rf/subscribe [:app-db/current-epoch-app-db-after])]
+  (let [render-diff? (and open? diff?)
+        app-db-after (rf/subscribe [:app-db/current-epoch-app-db-after])]
     [rc/v-box
-     :style    {:margin-bottom pod-gap
-                :margin-right  "1px"}
+     :style {:margin-bottom pod-gap
+             :margin-right  "1px"}
      :children [[pod-header pod-info]
                 [rc/v-box
-                 :class    (when open? "app-db-path--pod-border")
+                 :class (when open? "app-db-path--pod-border")
                  :children [[animated/component
                              (animated/v-box-options
                                {:enter-animation "accordionVertical"
-                                                      :leave-animation "accordionVertical"
-                                                      :duration        animation-duration})
+                                :leave-animation "accordionVertical"
+                                :duration        animation-duration})
                              (when open?
                                [rc/v-box
                                 :class "data-viewer"
@@ -223,8 +223,8 @@
                             [animated/component
                              (animated/v-box-options
                                {:enter-animation "accordionVertical"
-                                                      :leave-animation "accordionVertical"
-                                                      :duration        animation-duration})
+                                :leave-animation "accordionVertical"
+                                :duration        animation-duration})
                              (when render-diff?
                                (let [app-db-before (rf/subscribe [:app-db/current-epoch-app-db-before])
                                      [diff-before diff-after _] (when render-diff?
@@ -232,9 +232,9 @@
                                                                                (get-in @app-db-after path)))]
                                  [rc/v-box
                                   :children [[rc/v-box
-                                              :class    "app-db-path--link"
-                                              :style    {:background-color cljs-dev-tools-background}
-                                              :justify  :end
+                                              :class "app-db-path--link"
+                                              :style {:background-color cljs-dev-tools-background}
+                                              :justify :end
                                               :children [[rc/hyperlink-href
                                                           ;:class  "app-db-path--label"
                                                           :label "ONLY BEFORE"
@@ -250,9 +250,9 @@
                                                           diff-before
                                                           ["app-db-diff" path]]]]
                                              [rc/v-box
-                                              :class    "app-db-path--link"
-                                              :style    {:background-color cljs-dev-tools-background}
-                                              :justify  :end
+                                              :class "app-db-path--link"
+                                              :style {:background-color cljs-dev-tools-background}
+                                              :justify :end
                                               :children [[rc/hyperlink-href
                                                           ;:class  "app-db-path--label"
                                                           :label "ONLY AFTER"
@@ -261,8 +261,8 @@
                                                           :target "_blank"
                                                           :href utils/diff-link]]]
                                              [rc/v-box
-                                              :class    "data-viewer data-viewer--top-rule"
-                                              :style    {:overflow-x "auto"
+                                              :class "data-viewer data-viewer--top-rule"
+                                              :style {:overflow-x "auto"
                                                       :overflow-y "hidden"}
                                               :children [[components/simple-render
                                                           diff-after
@@ -294,30 +294,30 @@
                :size "1"
                :child ""]
               [rc/box
-               :width "51px" ;;  50px + 1 border
+               :width "51px"                                ;;  50px + 1 border
                :justify :center
                :child [rc/label :style {:font-size "9px"} :label "DIFFS"]]
               [rc/box
-               :width "51px" ;;  50px + 1 border
+               :width "51px"                                ;;  50px + 1 border
                :justify :center
                :child [rc/label :style {:font-size "9px"} :label "DELETE"]]
-              [rc/gap-f :size "6px"]]]) ;; Add extra space to look better when there is/aren't scrollbars
+              [rc/gap-f :size "6px"]]])                     ;; Add extra space to look better when there is/aren't scrollbars

 (defn pod-section []
   (let [pods @(rf/subscribe [:app-db/paths])]
     [rc/v-box
-     :size     "1"
+     :size "1"
      :children [(if (and (empty? pods) @*finished-animation?)
                   [no-pods]
                   [pod-header-column-titles])
                 [animated/component
                  (animated/v-box-options
                    {:on-finish #(reset! *finished-animation? true)
-                                          :duration  animation-duration
+                    :duration  animation-duration
                     :style     {:flex       "1 1 0px"
-                                                      :overflow-x "hidden"
-                                                      :overflow-y "auto"}})
+                                :overflow-x "hidden"
+                                :overflow-y "auto"}})
                  (for [p pods]
                    ^{:key (:id p)}
                    [pod p])]]]))
@@ -325,7 +325,7 @@

 (defn render [app-db]
   [rc/v-box
-   :size  "1"
+   :size "1"
    :style {:margin-right common/gs-19s
            ;:overflow     "hidden"
            }


Convert assert-message into a macro to get proper line numbers on failure

--- core/src/test/clojure/vdx_test/handlers.clj
+++ core/src/test/clojure/vdx_test/handlers.clj
@@ -43,9 +43,10 @@
     (instance? List v) (map coerce-value v)
     :default v))

-(defn assert-message [msg template & values]
-  (is (= template (.template msg)))
-  (is (= (or values []) (map coerce-value (.rawValues msg)))))
+(defmacro assert-message [msg template & values]
+  `(do
+     (is (= ~template (.template ~msg)))
+     (is (= (or [~@values] []) (map coerce-value (.rawValues ~msg))))))

 (deftest test-DuplicateElementHandler
   (let [ctx (ValidationContext. (io/resource "handler-test.xml")


adding license

adding license

--- src/docker/client.clj
+++ src/docker/client.clj
@@ -1,3 +1,14 @@
+(comment
+   Celestial, Copyright 2012 Ronen Narkis, narkisr.com
+   Licensed under the Apache License,
+   Version 2.0  (the "License") you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.)
+
 (ns docker.client
   "Docker client"
   (:require


Cloverage fixed

Cloverage fixed

--- src/priceous/provider_helper.clj
+++ src/priceous/provider_helper.clj
@@ -1,98 +0,0 @@
-(ns priceous.provider-helper
-  (:require [priceous.selector-utils :as su]
-            [priceous.utils :as u]
-            [priceous.provider :as p]
-            [taoensso.timbre :as log]
-            [net.cgrand.enlive-html :as html]
-            )
-  (:import [java.util.concurrent ExecutorService Executors Callable]))
-
-
-
-
-(defn create-page->docs-fn
-  "Accept configuration and returns function which
-  can return all documents for the given provider
-  Note: this function should return map with a new state of
-  provider and retrieved docs   {:provider provider :docs []}
-  "
-  [conf]
-  (let [known-strategies   #{:heavy :light :api}
-        parallel-count     (get-in conf [:parallel-count] 1)
-        strategy           (get-in conf [:strategy])
-        url-selector       (get-in conf [:url-selector])
-        node-selector      (get-in conf [:node-selector])
-        node->document     (get-in conf [:node->document])
-        last-page-selector (get-in conf [:last-page-selector])]
-
-    ;; CONFIG VALIDATION
-
-    (assert (known-strategies strategy)
-              (str "Strategy must be one of " known-strategies))
-    (assert node->document "node->document must be provided")
-
-    ;; validate heavy
-    (when (= strategy :heavy)
-      (log/debug "> Heavy strategy")
-      (assert url-selector "URL Selector must be provided")
-      )
-
-    ;; validate light
-    (when (= strategy :light)
-      (log/debug "> Light strategy")
-      (assert node-selector "Node selector must be provided")
-      )
-
-    ;; RETURN FUNCTION
-
-    (fn [provider]
-      ;; fetch the page
-      (let [page (u/fetch (p/current-page provider))]
-        (->>
-         page
-
-         ;; get all urls/nodes for current page
-         (fn [page]
-           (condp = strategy
-             :heavy ((su/generic-page-urls url-selector) provider page)
-             :light (u/die "Not implemented")
-             :api (u/die "Not implemented")
-             (u/die "Invalid strategy")
-             ))
-
-         ;; fetch all pages by url OR do nothing
-         (fn [urls-or-nodes]
-           (condp = strategy
-             :heavy (-> urls-or-nodes
-                        ;; fetch all urls in parallel
-                        (map #(future-in-the-pool pool (cast Callable (fn [] (u/fetch %)))))
-                        (map #(.get %)))
-             urls-or-nodes))
-
-         ;; Here is the thing:
-         ;; at this point we have either list of nodes OR list of pages
-         ;; each of node/page represents one document
-         ;; good thing, we can process node/page with the same api
-         ;; TODO: maybe we need to process documents in parallel as well?
-
-         (map (partial node->document provider))
-
-         ((fn [docs] {:provider provider :docs (into [] docs)}))
-
-         ;; update provider stats
-         (#(update-in % [:provider :state :page-current] inc))
-         (#(update-in % [:provider :state :page-processed] inc))
-
-         ;; if limit reached set done
-         (#(if (>= (get-in % [:provider :state :page-processed])
-                   (get-in % [:provider :state :page-limit]))
-             (assoc-in % [:provider :state :done] true)
-             %))
-
-         ;; if current page > last page
-         (#(if (> (get-in % [:provider :state :page-current])
-                  ((create-last-page-fn last-page-selector) % page))
-             (assoc-in % [:provider :state :done] true)
-             %))
-         )))))
-


Introduce (common/linear-time)

Introduce (common/linear-time)

--- src/riemann/common.clj
+++ src/riemann/common.clj
@@ -40,6 +40,13 @@
   "The current unix epoch time in seconds, taken from System/currentTimeMillis."
   []
   (/ (System/currentTimeMillis) 1000))
+
+(defn linear-time
+  "A current time on a linear scale with no fixed epoch; counts in seconds.
+  Unlike unix-time, which can pause, skip, or flow backwards, advances
+  consistently at (close) to wall clock time."
+  []
+  (/ (System/nanoTime) 1000000000))

 (defn time-at
   "Returns the Date of a unix epoch time."


Mark a context in transaction properly.

Mark a context in transaction properly.

Only usefull for checking if a current context is in one
transaction or not.

--- src/suricatta/core.clj
+++ src/suricatta/core.clj
@@ -86,7 +86,9 @@
   (let [^Configuration conf (.derive (proto/get-configuration ctx))
         ^TransactionContext txctx (transaction-context conf)
         ^TransactionProvider provider (.transactionProvider conf)]
-    (.data conf "suricatta.rollback" false)
+    (doto conf
+      (.data "suricatta.rollback" false)
+      (.data "suricatta.transaction" true))
     (try
       (.begin provider txctx)
       (let [result (func (types/->context conf))


SER-2935 | empty map in log/info because of reasons

--- src/vignette/http/middleware.clj
+++ src/vignette/http/middleware.clj
@@ -45,7 +45,7 @@
 (defn log-path
   [handler]
   (fn [request]
-    (log/info (str "path-requested" (:uri request)))
+    (log/info (str "path-requested" (:uri request)) {})
     (handler request)
   )
 )


Clean up unused code

Clean up unused code

--- src/yetibot/core/util/format.clj
+++ src/yetibot/core/util/format.clj
@@ -46,7 +46,7 @@
 (defn pseudo-format-n
   "Combination of pseudo-format and format-n - it can do both if the string
    contains both %s and %1 substitution placeholders. If neither are found, it
-   appends joined args to end of string. Yes"
+   appends joined args to end of string."
   [s args]
   (if (empty? args)
     (s/replace s (general-subst-pattern) "")
@@ -58,8 +58,6 @@
         gen? (pseudo-format joined)
         num? (format-n args)
         neither? (str " " joined)))))
-
-(s/replace "foo $s hi" #"\$s" "")

 ;; chat formaters


put get-count into a fn

put get-count into a fn

So that we can reuse it for the realtime queries

--- src/webapp/framework/server/systemfns.clj
+++ src/webapp/framework/server/systemfns.clj
@@ -373,15 +373,17 @@

-(defn create-query-key
-[& {:keys [
-         db-table
-         where
-         start
-         end
-         params
-         order
-         ]}]
+
+
+
+(defn create-query-key [& {:keys [
+                                   db-table
+                                   where
+                                   start
+                                   end
+                                   params
+                                   order
+                                   ]}]
          {
           :db-table db-table
           :where where
@@ -389,49 +391,37 @@
           :end end
           :params params
           :order order
-         }
-)
-
-
-
-(defn !get-query-results-v2
-  [{:keys [
-           db-table
-		       where
-           start
-           end
-           params
-           order
-           realtime
-           data-session-id
-		   ]}]
+         })
+
+
+
+
+(defn get-count [db-table  where   params]
+                                               (:cnt (sql-1 (str
+                                                  "select count (id) as CNT from "
+                                                  db-table " "
+                                                  (if (-> where count pos?) (str "where " where " "))
+                                                  )
+                                                 params)))
+
+
+
+
+
+
+(defn !get-query-results-v2 [{:keys [
+                                     db-table
+                          		       where
+                                     start
+                                     end
+                                     params
+                                     order
+                                     realtime
+                                     data-session-id
+                          		   ]}]

   (println "************************************************************************************")
   (println "!get-query-results-v2*   REALTIME = " realtime)
-
-
-(cond
-   realtime
-  (let [
-  query-key   (create-query-key
-                :db-table db-table
-                :where where
-                :start start
-                :end end
-                :params params
-                :order order
-  )
-  ]
-  (if (get @cached-queries  query-key)
-    nil
-    (swap! cached-queries assoc  query-key {})
-  )
-    (println "-------------------------------")
-   (println cached-queries)
-    (println "-------------------------------")
-
-
-
   (println (str "!get-query-results-v2: "
                 db-table
                 where " "
@@ -441,21 +431,39 @@
                 order " "
                 data-session-id " "
                 realtime " "
-                )))
-
-
-
-:else
-(do
-  (let [
-        record-count
-
-        (:cnt (sql-1 (str
-                        "select count (id) as CNT from "
-                        db-table " "
-                        (if (-> where count pos?) (str "where " where " "))
-                        )
-                       params))
+                ))
+  (println "************************************************************************************")
+
+  (cond
+       realtime
+
+       (let [
+             query-key   (create-query-key
+                            :db-table db-table
+                            :where where
+                            :start start
+                            :end end
+                            :params params
+                            :order order)
+             ]
+
+           (if (get @cached-queries  query-key)
+               nil
+              (swap! cached-queries assoc  query-key {})
+           )
+
+          (println "-------------------------------")
+          (println cached-queries)
+          (println "-------------------------------")
+      )
+
+
+
+      :else
+
+      (do
+          (let [
+                 record-count      (get-count   db-table  where   params)


Oracle realtime can insert demo tables now

v0.5 YAY - almost working realtime with oracle now!

--- src/webapp/framework/server/systemfns.clj
+++ src/webapp/framework/server/systemfns.clj
@@ -376,28 +376,57 @@

         coils-trigger-exists   (pos? (count coils-trigger))

-        sql-to-drop-trigger    (str "DROP TRIGGER IF EXISTS trigger_afterinsert ON " table-name ";")
-        sql-to-insert-trigger-row "
-        INSERT INTO coils_triggers
-        (
-        table_name,version
-        ) values (?,?);
-        "
-
-        sql-to-create-insert-trigger (str "CREATE TRIGGER trigger_afterInsert AFTER INSERT ON " table-name " FOR EACH ROW EXECUTE PROCEDURE trigger_function_afterInsert();")
-        sql-to-create-update-trigger (str "CREATE TRIGGER trigger_afterUpdate AFTER UPDATE ON " table-name " FOR EACH ROW EXECUTE PROCEDURE trigger_function_afterUpdate();")
-        sql-to-create-delete-trigger (str "CREATE TRIGGER trigger_afterDelete AFTER DELETE ON " table-name " FOR EACH ROW EXECUTE PROCEDURE trigger_function_afterDelete();")
+        sql-to-insert-trigger-row
+        (cond
+          (= *database-type* "postgres")
+          "INSERT INTO coils_triggers (table_name,version) values (?,?);"
+
+          (= *database-type* "oracle")
+          "INSERT INTO coils_triggers (table_name,version) values (?,?)")
+
+        sql-to-create-insert-trigger
+        (cond
+          (= *database-type* "postgres")
+          (str "CREATE TRIGGER trigger_afterInsert AFTER INSERT ON " table-name " FOR EACH ROW EXECUTE PROCEDURE trigger_function_afterInsert();")
+
+          (= *database-type* "oracle")
+          "create or replace
+              trigger Icoils_todo_items
+                        BEFORE INSERT ON coils_todo_items
+                            FOR EACH ROW
+                        BEGIN
+                            INSERT INTO coils_realtime_log
+                                (record_timestamp, record_table_name,  record_id, record_id_type, record_operation,  record_status)
+                            VALUES
+                                (LOCALTIMESTAMP, 'coils_todo_items', :NEW.id,
+                                (SELECT data_type FROM user_tab_columns WHERE table_name = 'COILS_TODO_ITEMS' AND column_name = 'ID') ,
+                                'INSERT',  'WAITING');
+                        END;")
+        sql-to-create-update-trigger
+        (cond
+          (= *database-type* "postgres")
+          (str "CREATE TRIGGER trigger_afterUpdate AFTER UPDATE ON " table-name " FOR EACH ROW EXECUTE PROCEDURE trigger_function_afterUpdate();")
+
+          (= *database-type* "oracle")
+          "")
+
+        sql-to-create-delete-trigger
+        (cond
+          (= *database-type* "postgres")
+          (str "CREATE TRIGGER trigger_afterDelete AFTER DELETE ON " table-name " FOR EACH ROW EXECUTE PROCEDURE trigger_function_afterDelete();")
+
+          (= *database-type* "oracle")
+          "")
         ]
     ;(println "Coils trigger table exists: " coils-trigger-exists)

-    (if (not coils-trigger-exists )
+    (if (not coils-trigger-exists)
       (do
-        (korma.core/exec-raw   [sql-to-insert-trigger-row [table-name  coils-tables-trigger-version]]   [])
-        (korma.core/exec-raw   [sql-to-drop-trigger []]   [])
-        (korma.core/exec-raw   [sql-to-create-insert-trigger []]   [])
-        (korma.core/exec-raw   [sql-to-create-update-trigger []]   [])
-        (korma.core/exec-raw   [sql-to-create-delete-trigger []]   [])
+        (korma.core/exec-raw   [sql-to-insert-trigger-row [table-name  coils-tables-trigger-version]])
+        (korma.core/exec-raw   [sql-to-create-insert-trigger []])
+        (korma.core/exec-raw   [sql-to-create-update-trigger []])
+        (korma.core/exec-raw   [sql-to-create-delete-trigger []])

         )
       nil)))
@@ -552,7 +581,7 @@
           (
           id                  serial NOT NULL,
           realtime_jvm_id     integer,
-          record_timestamp    timestamp without time zone,
+          record_timestamp    timestamp(3),
           record_table_name   character varying,
           record_id           character varying,
           record_id_type      character varying,
@@ -1138,20 +1167,23 @@

 (defn parse-id [s]
-  (let [find-num (re-find  #"\d+" s )]
-    (if find-num
-      (Integer. find-num)
-      s)))
+  (do
+    (println (str "(defn parse-id [" s "]"))
+    (let [find-num (re-find  #"\d+" s )]
+      (if find-num
+        (Integer. find-num)
+        s))))

 (defn get-id-type [ column-type ]
   (do
     (println (str "*******COLTYPE:" column-type ":"))
     (cond
+    (= column-type "NUMBER")                       "INTEGER"
     (= column-type "integer")                      "INTEGER"
     (= column-type "character")                    "TEXT"
     (= column-type "character varying")            "TEXT"

-    :else                                          "integer"
+    :else                                          "INTEGER"
     )
   ))

@@ -1165,10 +1197,10 @@
 (defn process-log-entry [ realtime-log-entry ]

   (let [
-        id-type          (get-id-type (get realtime-log-entry :record_id_type))
-        id               (cond (= id-type "INTEGER")  (parse-id  (get realtime-log-entry :record_id))
-                               (= id-type "TEXT")     (get realtime-log-entry :record_id))
-        db-table         (get realtime-log-entry :record_table_name)
+        id-type          (get-id-type (get realtime-log-entry (cond (= *database-type* "postgres" ) :record_id_type (= *database-type* "oracle") :RECORD_ID_TYPE) ))
+        id               (cond (= id-type "INTEGER")  (parse-id  (get realtime-log-entry (cond (= *database-type* "postgres" ) :record_id (= *database-type* "oracle") :RECORD_ID)))
+                               (= id-type "TEXT")     (get realtime-log-entry (cond (= *database-type* "postgres" ) :record_id (= *database-type* "oracle") :RECORD_ID)))
+        db-table         (get realtime-log-entry (cond (= *database-type* "postgres" ) :record_table_name (= *database-type* "oracle") :RECORD_TABLE_NAME))
         ]
     ;(println (str "**** Processing realtime record change: "))
     ;(println (str "      "  "realtime-log-entry"))
@@ -1185,7 +1217,7 @@
     ; If this is a record update, so update the internal record
     ; cache
     ; ----------------------------------------------------------------
-    (if (= (get realtime-log-entry :record_operation) "UPDATE")
+    (if (= (get realtime-log-entry (cond (= *database-type* "postgres" ) :record_operation (= *database-type* "oracle") :RECORD_OPERATION)) "UPDATE")
       (do
         (update-record-in-cache  db-table   id)
         (inform-clients-about-record   db-table   id)))


Fix a bug in cycle algorithm, still buggy.

--- src/exp/sahucs_nc.clj
+++ src/exp/sahucs_nc.clj
@@ -173,10 +173,10 @@
 (defn expand-sa-node [node #^HashMap cache next-best state reward-to-state last-cutoff
                       #^IdentityHashMap stack-node-depths depth]
   (assert (not (.containsKey stack-node-depths node)))
-  (println "Entering " (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "at depth" depth ", " (count @(:result-map-atom node)) ", " last-cutoff reward-to-state)
+  ;(println "Entering " (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "at depth" depth ", " (count @(:result-map-atom node)) ", " last-cutoff reward-to-state)
   (.put stack-node-depths node depth)
   (let [good-queue (:queue node)
-        bad-queue  (queues/make-graph-stack-pq)
+        bad-queue  (queues/make-graph-search-pq)
         both-queue (queues/make-union-pq good-queue bad-queue)
         catchup    (if (= last-cutoff (cutoff good-queue)) {}
                      (util/filter-map #(<= (val %) last-cutoff) @(:result-map-atom node)))]
@@ -194,7 +194,7 @@
             (queues/g-pq-replace! good-queue entry
               (or (:cutoff (meta entry)) (- (:reward-to-state entry))))) ;(if-let [n  (:sanode entry)] (cutoff (:queue n)) 0)
           (.remove stack-node-depths node) ;; TODO: catchup!!
-          (println "Returning from" (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "With cutoff" cut (cutoff good-queue) "and cdm" cutoff-depth-map "and states" (count new-results) (count catchup) "-" (count clean) (count dirtied) (count still-dirty) "and good roots" (count good-roots) (map :reward-to-state good-roots))
+         ; (println "Returning from" (env/action-name (:action node)) (map #(env/get-var state %) '[[atx] [aty]]) "With cutoff" cut (cutoff good-queue) "and cdm" cutoff-depth-map "and states" (count new-results) (count catchup) "-" (count clean) (count dirtied) (count still-dirty) "and good roots" (count good-roots) (map :reward-to-state good-roots))
           (PartialResult (stitch-effect-map
                            (into {} (map (fn [[s r]] [(vary-meta s assoc :cycle-depth
                                                         (final-cycle-depth r (or (:cycle-depth (:entry (meta s)))
@@ -208,12 +208,12 @@
               b-ra (:remaining-actions entry), b-sa (:sanode entry), b-cd (:min-cycle-depth entry)
               rec-next-best (- (max next-best (cutoff both-queue)) b-rts)]
           (if (empty? b-ra)
-              (do (println "found state" (map #(env/get-var b-s %) '[[atx] [aty]]) "with reward" b-rts)
+              (do; (println "found state" (map #(env/get-var b-s %) '[[atx] [aty]]) "with reward" b-rts)
                 (recur (assoc-safe new-results >=
                                   (vary-meta (extract-effect b-s (:context node) (:opt (meta b-s))) assoc :entry entry) b-rts)
                       cutoff-depth-map good-roots))
             (let [[rec rcut] (if-let [stack-depth (.get stack-node-depths b-sa)]
-                            (do (println "Stack hit on" (env/action-name (:action b-sa)) (map #(env/get-var b-s %) '[[atx] [aty]]))
+                            (do ;(println "Stack hit on" (env/action-name (:action b-sa)) (map #(env/get-var b-s %) '[[atx] [aty]]))
                                 [(PartialResult {} Double/NEGATIVE_INFINITY stack-depth) (- neg-reward)])
                             [(expand-sa-node b-sa cache rec-next-best b-s b-rts (- 0 neg-reward b-rts)
                                               stack-node-depths (inc depth)) (+ (cutoff (:queue b-sa)) b-rts)])
@@ -275,7 +275,7 @@

 ; (first (filter #(let [h (simple-taxi-hierarchy (make-random-taxi-env 2 3 2 %)) ] (println %) (not (= (prln  (second (sahtn-dijkstra h))) (second (exp.sahucs-nc/sahucs-nc h))))) (map (fn [x y] x) (range 100) (iterate inc 0))))
-; 74 causes infinite loop. ?
+; 54 fails

 ; (first (filter #(let [h (simple-taxi-hierarchy (make-random-taxi-env 3 2 2 %)) ] (println %) (not (= (prln  (second (sahtn-dijkstra h))) (second (exp.sahucs-nc/sahucs-nc h))))) (map (fn [x y] x) (range 100) (iterate inc 0))))
 ; 65 fails


disable test until we re-enable extmap serialization check

--- test/protobuf/core_test.clj
+++ test/protobuf/core_test.clj
@@ -125,8 +125,10 @@
       (let [p (conj p {:stuff 15})]
         (is (= 15 (:stuff p)))))

-    (is (thrown? Exception (protobuf-dump p))
-        "Should refuse to serialize with stuff in extmap")))
+    ;; TODO add test back once we re-enable this check
+    (comment
+      (is (thrown? Exception (protobuf-dump p))
+          "Should refuse to serialize with stuff in extmap"))))

 (deftest test-string-keys
   (let [p (protobuf Foo "id" 5 "label" "rad")]


Generate random fracture information

Generate random fracture information

--- src/test_utils/sandbox.cljs
+++ src/test_utils/sandbox.cljs
@@ -258,3 +258,12 @@
   (let [start-at (rand-stage-time-point-seconds)
         at-times (iterate (fn [t] (+ t 30)) start-at)]
     (map #(rand-delta-p-mon %) at-times)))
+
+(defn rand-fhl []
+  (tuc/draw-normal 773 106))
+
+(defn rand-fracture-height []
+  (tuc/draw-normal 246.8 63.0))
+
+(defn rand-ratio []
+  (tuc/draw-normal 3.09 0.42))


Remove unused local used-names.

Remove unused local used-names.

--- frontend/src/uxbox/main/data/workspace.cljs
+++ frontend/src/uxbox/main/data/workspace.cljs
@@ -155,7 +155,6 @@
   ptk/UpdateEvent
   (update [_ state]
     (let [page (get-in state [:workspace :page])
-          used-names (map #(get-in state [:shapes % :name]) (get-in state [:pages page :shapes]))
           selected (if (nil? id)
                      (first (:clipboard state))
                      (->> (:clipboard state)


necrotic code deleted

necrotic code deleted

--- src/hangman/bitop.clj
+++ src/hangman/bitop.clj
@@ -163,12 +163,6 @@
   (unchecked-long num))

-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; "Byte Vectors" implement a collection of primitive signed and unsigned byte
-;; values cast appropriately from the JVM native (signed) two's complement
-;; representation.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 (defn long-to-octets
   "convert a long into a sequence of minimum PAD-COUNT unsigned values.
   The zeroes are padded to the msb"
@@ -183,7 +177,6 @@
              value-bytes)))))

-
 (defn assemble-bytes [v]
   (reduce (fn
             ([] 0)
@@ -191,72 +184,3 @@
     (util/indexed (reverse v))))

-
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Subject to Rewrite
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(comment
-(defn sbvec [thing]
-  (cond
-   (= (type thing) Long) (into (vector-of :byte)
-                               (map unchecked-byte (long-to-octets thing)))
-   (coll? thing)         (into (vector-of :byte)
-                               (map unchecked-byte thing))))
-
-(defn sbvector [& args]
-  (sbvec args))
-
-(defn make-sbvector [length initial-element]
-  (sbvec (loop [len length v []]
-         (if (<= len 0)
-           v
-           (recur (- len 1) (cons (unchecked-byte initial-element) v))))))
-
-(defn ubvec [thing]
-  (cond
-   (= (type thing) Long) (into (vector-of :short)
-                               (map unchecked-short (long-to-octets thing)))
-   (coll? thing)         (into (vector-of :short)
-                               (map unchecked-short thing))))
-
-(defn ubvector [& args]
-  (ubvec args))
-
-(defn make-ubvector [length initial-element]
-  (ubvec (loop [len length v []]
-           (if (<= len 0)
-             v
-             (recur (- len 1) (cons (short initial-element) v))))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Hexadecimal String Representation
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defn octet-hex [num]
-  (str
-    (+hex-chars+ (bit-shift-right num 4))
-    (+hex-chars+ (bit-and 0x0F num))))
-
-(defn hex [thing]
-  (cond
-    (and (number? thing) (<  thing 0))     (hex (ubvec thing))
-    (and (number? thing) (>=  thing 0 ))  (hex (ubvec thing))
-    (coll? thing)   (apply str (into [] (map octet-hex thing)))))
-
-(defn hex-str [s]
-  (hex (.getBytes s)))
-
-(defn unhex [s]
-  (unchecked-long (read-string (str "0x" s))))
-
-(defn unhex-str [s]
-  (apply str (map char (unhex s))))
-)