bumped up version

bumped up version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject reagent/lein-template "0.7.7"
+(defproject reagent/lein-template "0.7.8"
   :description "A Leiningen template for a ClojureScript setup with Figwheel, Austin, and Reagent."
   :url "https://github.com/reagent-project/reagent-template"
   :license {:name "MIT License"


Upgrading libraries.

Upgrading libraries.

--- project.clj
+++ project.clj
@@ -2,12 +2,12 @@
   :description "Provides library functions for tracing requests throughout the CMR system. Built on
                Twitter Zipkin and clj-zipkin."
   :url "***REMOVED***projects/CMR/repos/cmr-system-trace-lib/browse"
-  :dependencies [[org.clojure/clojure "1.5.1"]
+  :dependencies [[org.clojure/clojure "1.6.0"]
                  [nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"]

                 ;; clj-zipkin macros don't work very well. It's included mostly for some utility
                 ;; functions, and the thrift handling.
-                [clj-zipkin "0.1.1" :exclusions [ch.qos.logback/logback-classic
+                [clj-zipkin "0.1.3" :exclusions [ch.qos.logback/logback-classic
                                                  log4j
                                                  org.slf4j/slf4j-log4j12]]
                 ;; Turn off the logging noise


lein-release plugin: bumped version from 0.155 to 0.156-SNAPSHOT for next development cycle

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject maestro "0.155"
+(defproject maestro "0.156-SNAPSHOT"
   :description "Maestro service"
   :license  "https://github.com/mixradio/mr-maestro/blob/master/LICENSE"


Version 0.4.13

Version 0.4.13

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
 (def ks-version "1.0.0")

-(defproject puppetlabs/jdbc-util "0.4.13-SNAPSHOT"
+(defproject puppetlabs/jdbc-util "0.4.13"
   :description "Common JDBC helpers for use in Puppet Labs projects"
   :url "https://github.com/puppetlabs/jdbc-util"


Update dependencies.

Update dependencies.

--- project.clj
+++ project.clj
@@ -73,7 +73,7 @@
   }

   :plugins [
-    [lein-ring "0.9.4"] ; Common ring tasks https://github.com/weavejester/lein-ring
+    [lein-ring "0.9.6"] ; Common ring tasks https://github.com/weavejester/lein-ring
     [lein-environ "1.0.0"] ; Get environment settings from different sources https://github.com/weavejester/environ
   ]


Update dependencies

Update dependencies

--- project.clj
+++ project.clj
@@ -7,10 +7,10 @@
   :dependencies [[org.clojure/clojure "1.9.0"]
                  [org.clojure/clojurescript "1.10.339"]
                  [org.clojure/data.generators "0.1.2"]
-                 [org.clojure/core.async "0.3.465"]
+                 [org.clojure/core.async "0.4.474"]
                  [com.stuartsierra/component "0.3.2"]
-                 [aleph "0.4.4"]
-                 [ring "1.6.3"]
+                 [aleph "0.4.6"]
+                 [ring "1.7.0"]
                  [ragtime "0.7.2"]
                  [ring/ring-defaults "0.3.2"]
                  [bk/ring-gzip "0.3.0"]
@@ -19,18 +19,18 @@
                  [compojure "1.6.1"]
                  [metosin/compojure-api "1.1.12"]
                  [prismatic/schema "1.1.9"]
-                 [org.clojure/java.jdbc "0.7.7"]
+                 [org.clojure/java.jdbc "0.7.8"]
                  [hikari-cp "2.6.0"]
-                 [org.postgresql/postgresql "42.2.4"]
+                 [org.postgresql/postgresql "42.2.5"]
                  [environ "1.1.0"]
                  [hiccup "1.0.5"]
                  [cheshire "5.8.0"]
                  [funcool/cats "2.2.0"]
                  [ns-tracker "0.3.1"]
-                 [bidi "2.1.3"]
-                 [garden "1.3.5"]
+                 [bidi "2.1.4"]
+                 [garden "1.3.6"]
                  [reagent "0.8.1"]
-                 [re-frame "0.10.5"]
+                 [re-frame "0.10.6"]
                  [kibu/pushy "0.3.8"]
                  [cljs-http "0.1.45"]
                  [binaryage/devtools "0.9.10"]]


Set repl timeout to 120 seconds due to many consecutive repl startup failures

--- project.clj
+++ project.clj
@@ -58,7 +58,8 @@

   :plugins [[lein-shell "0.4.0"]]
-  :repl-options {:init-ns user}
+  :repl-options {:init-ns user
+                 :timeout 120000}

   :jvm-opts ["-XX:PermSize=256m" "-XX:MaxPermSize=256m" "-XX:-OmitStackTraceInFastThrow"]


Bumped version towards 0.8.1-SNAPSHOT

Bumped version towards 0.8.1-SNAPSHOT

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


Some tweaks to make deploy work with cljx.

--- project.clj
+++ project.clj
@@ -16,6 +16,9 @@
             :source-paths ["target/generated/src/clj"]
             :resource-paths ["target/generated/src/cljs"]
             :test-paths ["target/generated/test/clj"]
+
+            :prep-tasks ["cljx" "javac" "compile"]
+
             :cljx {:builds [{:source-paths ["src/cljx"]
                              :output-path  "target/generated/src/clj"
                              :rules        :clj}


undo setting the optimizations to none since node can't load code compiled that way

Signed-off-by: Chris Granger <5654cde260ae99bc4d30054171b8bcd902efd19a@gmail.com>

--- project.clj
+++ project.clj
@@ -10,7 +10,7 @@
                  ]
   :jvm-opts ["-Xmx4g" "-XX:+UseConcMarkSweepGC"] ; cljsbuild eats memory
   :cljsbuild {:builds [{:source-paths ["src"]
-                        :compiler {:optimizations :none
+                        :compiler {:optimizations :simple
                                    :externs ["externs/jquery.js" "externs/throttle.js" "externs/codemirror.js"]
                                    :source-map "deploy/core/node_modules/lighttable/bootstrap.js.map"
                                    :output-to "deploy/core/node_modules/lighttable/bootstrap.js"


Don't depend on dependencies to depend on your dependencies for you.

--- project.clj
+++ project.clj
@@ -9,7 +9,8 @@
                  [org.clojars.christophermaier/congomongo "0.1.4-SNAPSHOT"]
 		 [org.jasypt/jasypt "1.7"]
                  [amalloy/utils "[0.3.7,)"]
-                 [clj-github "1.0.0-SNAPSHOT"]]
+                 [clj-github "1.0.0-SNAPSHOT"]
+                 [ring "0.3.7"]]
   :dev-dependencies [[lein-ring "0.4.0"]
                      [swank-clojure "1.2.1"]]
   :main foreclojure.core


update to cljs-react-material-ui "0.2.42" & cljsjs/material-ui-chip-input "0.13.5-0"

--- project.clj
+++ project.clj
@@ -19,8 +19,8 @@
                  [juxt.modular/wire-up "0.5.0"]
                  [juxt.modular/aleph "0.1.4"]
                  [com.andrewmcveigh/cljs-time "0.4.0"]
-                 [cljs-react-material-ui "0.2.41"]
-                 [cljsjs/material-ui-chip-input "0.13.0-0"]
+                 [cljs-react-material-ui "0.2.42"]
+                 [cljsjs/material-ui-chip-input "0.13.5-0"]
                  [prismatic/schema "1.1.1"]
                  [print-foo-cljs "2.0.0"]]


Version 0.0.12-SNAPSHOT

Version 0.0.12-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject pe-jdbc-utils "0.0.11"
+(defproject pe-jdbc-utils "0.0.12-SNAPSHOT"
   :description "A Clojure library of helper functions when working with JDBC."
   :url "https://github.com/evanspa/pe-jdbc-utils"
   :license {:name "MIT"


Add advanced profile for cljs.

Add advanced profile for cljs.

--- project.clj
+++ project.clj
@@ -22,6 +22,25 @@

   :plugins [[lein-cljsbuild "1.0.3"]]

+  :profiles {:dev
+             {:cljsbuild
+              {:builds
+               [{:source-paths ["src/cljs"]
+                 :compiler
+                 {:output-to "public/js/main.js"
+                  :optimizations :simple
+                  :preamble ["processing.min.js"]}}]}}
+             :prod
+             {:cljsbuild
+              {:builds
+               [{:source-paths ["src/cljs"]
+                 :compiler
+                 {:output-to "public/js/main.js"
+                  :optimizations :advanced
+                  :pretty-print false
+                  :preamble ["processing.min.js"]
+                  :externs ["externs/processing.js"]}}]}}}
+
   :cljsbuild {
     :builds [
       {:source-paths ["src/cljs-preload"]
@@ -29,10 +48,4 @@
          {:output-to "public/js/preload.js"
           :optimizations :simple
           :pretty-print false
-          :preamble ["processing.min.js"]}}
-      {:source-paths ["src/cljs"]
-       :compiler
-         {:output-to "public/js/main.js"
-          :optimizations :simple
-          :preamble ["processing.min.js"]
-          :externs ["externs/processing.js"]}}]})
+          :preamble ["processing.min.js"]}}]})


Bump version to 0.3.10 and update dependencies

--- project.clj
+++ project.clj
@@ -1,12 +1,12 @@
-(defproject uruk "0.3.9"
+(defproject uruk "0.3.10"
   :description "Clojure wrapper of MarkLogic XML Content Connector For Java (XCC/J)"
   :url "https://github.com/daveliepmann/uruk"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[org.clojure/clojure "1.8.0"]
-                 [com.marklogic/marklogic-xcc "9.0.1"]
+  :dependencies [[org.clojure/clojure "1.9.0"]
+                 [com.marklogic/marklogic-xcc "9.0.3"]
                  ;; required but not included by MarkLogic (e.g. for ContentFactory):
-                 [com.fasterxml.jackson.core/jackson-databind "2.6.3"]
+                 [com.fasterxml.jackson.core/jackson-databind "2.9.3"]
                  [org.clojure/data.json "0.2.6"]
                  [org.clojure/data.xml "0.1.0-beta2"]
                  [slingshot "0.12.2"]]


update component

update component

--- project.clj
+++ project.clj
@@ -24,7 +24,7 @@
                  [clj-http "1.0.0"]
                  [ring-server "0.3.1"]
                  [ring/ring-defaults "0.1.1"]
-                 [com.stuartsierra/component "0.2.1"]
+                 [com.stuartsierra/component "0.2.2"]
                  [log4j "1.2.15" :exclusions [javax.mail/mail
                                               javax.jms/jms
                                               com.sun.jdmk/jmxtools
@@ -50,7 +50,7 @@
                     :dependencies [[javax.servlet/servlet-api "2.5"]
                                    [ring-mock "0.1.5"]
                                    [clj-http-fake "0.7.8"]
-                                   [org.clojure/tools.namespace "0.2.5"]
+                                   [org.clojure/tools.namespace "0.2.7"]
                                    [pjstadig/humane-test-output "0.6.0"]]

                     :source-paths ["dev"]}


Bump version to 0.3.0

Bump version to 0.3.0

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
 (defproject
   multiplex
-  "0.2.9"
+  "0.3.0"
   :dependencies
   [[org.clojure/clojure "1.5.1"]
    [lib-noir "0.4.9"]


lein-release plugin: bumped version from 2.0.1 to 2.0.2-SNAPSHOT for next development cycle

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject dda/dda-managed-ide "2.0.1"
+(defproject dda/dda-managed-ide "2.0.2-SNAPSHOT"
   :description "module to install and configure ide based on ubuntu vm."
   :url "https://www.domaindrivenarchitecture.org"
   :license {:name "Apache License, Version 2.0"


Update jooq version to 3.5.1

Update jooq version to 3.5.1

--- project.clj
+++ project.clj
@@ -12,7 +12,7 @@
                    }}
   :java-source-paths ["src/java"]
   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [org.jooq/jooq "3.5.0"]
+                 [org.jooq/jooq "3.5.1"]
                  [clojure.jdbc "0.3.2"]
                  [cats "0.2.0" :exclusions [org.clojure/clojure]]
                  [org.clojure/core.async "0.1.346.0-17112a-alpha"]])


upgrade clojure & figwheel dependencies

upgrade clojure & figwheel dependencies

--- project.clj
+++ project.clj
@@ -6,13 +6,13 @@

   :min-lein-version "2.7.1"

-  :dependencies [[org.clojure/clojure "1.10.0-RC2"]
-                 [org.clojure/clojurescript "1.10.439"]
+  :dependencies [[org.clojure/clojure "1.10.0"]
+                 [org.clojure/clojurescript "1.10.520"]
                  [org.clojure/core.async "0.4.490"
                   :exclusions [org.clojure/tools.reader]]
                  [reagent "0.8.1"]]

-  :plugins [[lein-figwheel "0.5.17"]
+  :plugins [[lein-figwheel "0.5.18"]
             [lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]]

   :source-paths ["src"]
@@ -94,7 +94,7 @@

   :profiles {:dev {:dependencies [[binaryage/devtools "0.9.10"]
-                                  [figwheel-sidecar "0.5.17"]
+                                  [figwheel-sidecar "0.5.18"]
                                   [com.cemerick/piggieback "0.2.2"]]
                    ;; need to add dev source path here to get user.clj loaded
                    :source-paths ["src" "dev"]


bumping version to 1.4.0

bumping version to 1.4.0

--- project.clj
+++ project.clj
@@ -1,7 +1,7 @@
 ;   Copyright (c) 2014 Kevin Bell. All rights reserved.
 ;   See the file license.txt for copying permission.

-(defproject dacom "0.1.3-SNAPSHOT"
+(defproject dacom "0.1.4"
   :description "A skeleton app built with datomic, compojure, and om"
   :url "https://github.com/bellkev/dacom"
   :dependencies [[org.clojure/clojure "1.6.0"]


latest self-build

latest self-build

--- project.clj
+++ project.clj
@@ -5,6 +5,6 @@

   :dependencies [[org.clojure/clojure "1.6.0"]]

-  :plugins  [[self-build "0.0.9"]]
+  :plugins  [[self-build "0.1.0"]]

 )


Update to 1.9.0-alpha13

Update to 1.9.0-alpha13

alpha13 has minor perf improvement in spec's nilable

--- project.clj
+++ project.clj
@@ -12,7 +12,7 @@
                  [incanter/incanter-core "1.5.6"]
                  [incanter/incanter-charts "1.5.6"]
                  [io.aviso/pretty "0.1.26"]
-                 [org.clojure/clojure "1.9.0-alpha12"]
+                 [org.clojure/clojure "1.9.0-alpha13"]
                  [org.clojure/tools.cli "0.3.5"]
                  [prismatic/schema "1.1.3"]]
   :plugins [[io.aviso/pretty "0.1.26"]]


Increment version number

Increment version number

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject play-clj "0.1.1-SNAPSHOT"
+(defproject play-clj "0.1.1"
   :description "A LibGDX wrapper for easy cross-platform game development"
   :url "https://github.com/oakes/play-clj"
   :license {:name "Public Domain"


Release version 0.8.0

Release version 0.8.0

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clj-gatling "0.8-beta1"
+(defproject clj-gatling "0.8.0"
   :description "Clojure library for load testing"
   :url "http://github.com/mhjort/clj-gatling"
   :license {:name "Eclipse Public License"


Try new jvm options

Try new jvm options

--- project.clj
+++ project.clj
@@ -16,7 +16,7 @@
                   "run/compiled/demo"]

   :resource-paths ["run/resources"]
-
+  :jvm-opts         ["-Xmx1g" "-XX:+UseConcMarkSweepGC"] ;;
   :source-paths ["src"]
   :test-paths   ["test"]


go back to clj-time 0.11.0

go back to clj-time 0.11.0

--- project.clj
+++ project.clj
@@ -30,7 +30,7 @@
                   :exclusions [commons-codec
                                commons-io
                                slingshot]]
-                 [clj-time "0.12.0"]                                  ; library for dealing with date/time
+                 [clj-time "0.11.0"]                                  ; library for dealing with date/time
                  [clojurewerkz/quartzite "2.0.0"]                     ; scheduling library
                  [colorize "0.1.1" :exclusions [org.clojure/clojure]] ; string output with ANSI color codes (for logging)
                  [com.cemerick/friend "0.2.1"                         ; auth library


Fix running JAR on Java 7 [ci skip]

Fix running JAR on Java 7 [ci skip]

--- project.clj
+++ project.clj
@@ -27,7 +27,7 @@
                  [amalloy/ring-gzip-middleware "0.1.3"]               ; Ring middleware to GZIP responses if client can handle it
                  [aleph "0.4.1"]                                      ; Async HTTP library; WebSockets
                  [buddy/buddy-core "1.2.0"]                           ; various cryptograhpic functions
-                 [buddy/buddy-sign "1.1.0"]                           ; JSON Web Tokens; High-Level message signing library
+                 [buddy/buddy-sign "1.5.0"]                           ; JSON Web Tokens; High-Level message signing library
                  [cheshire "5.7.0"]                                   ; fast JSON encoding (used by Ring JSON middleware)
                  [clj-http "3.4.1"                                    ; HTTP client
                   :exclusions [commons-codec


Rewrite profiles properly

Rewrite profiles properly

Build ids and profiles aren't related in any way

--- project.clj
+++ project.clj
@@ -13,35 +13,25 @@

   :source-paths ["src"]

-  :cljsbuild {:builds [{:id "live"
-                        :source-paths ["src" "src-live"]
-                        :figwheel true
-                        :compiler {:main tabswitcher.live
-                                   :asset-path "js/compiled/out"
-                                   :output-to "resources/public/js/compiled/tabswitcher.js"
-                                   :output-dir "resources/public/js/compiled/out"
-                                   :source-map-timestamp true}}
+  :profiles {:live  {:plugins [[lein-figwheel "0.3.5"]
+                               [lein-cljsbuild "1.0.5"]]
+                     :cljsbuild {:builds [{:source-paths ["src" "src-live"]
+                                           :figwheel true
+                                           :compiler {:main tabswitcher.live
+                                                      :asset-path "js/compiled/out"
+                                                      :output-to "resources/public/js/compiled/tabswitcher.js"
+                                                      :output-dir "resources/public/js/compiled/out"
+                                                      :source-map-timestamp true}}]}}

-                       {:id "dev"
-                        :source-paths ["src"]
-                        :compiler {:output-to "target/unpacked/tabswitcher.js"
-                                   :output-dir "target/js"
-                                   :optimizations :whitespace
-                                   :pretty-print true}}
-
-                       ;{:id "min"
-                       ; :source-paths ["src"]
-                       ; :compiler {:output-to "target/unpacked/tabswitcher.js"
-                       ;            :output-dir "target/js"
-                       ;            :optimizations :advanced
-                       ;            :pretty-print false}}
-                       ]}
-
-
-  :profiles {:live  {:plugins [[lein-figwheel "0.3.5"]]}
              :dev   {:plugins [[com.cemerick/austin "0.1.3"]
                                [lein-cljsbuild "1.0.5"]
                                [lein-chromebuild "0.2.1"]]
+                     :cljsbuild {:builds [{:id "dev"
+                                           :source-paths ["src"]
+                                           :compiler {:output-to "target/unpacked/tabswitcher.js"
+                                                      :output-dir "target/js"
+                                                      :optimizations :whitespace
+                                                      :pretty-print true}}]}

                      :chromebuild {:resource-paths ["resources/js" "resources/html" "resources/images" "resources/css"]
                                    :target-path "target-unpacked"}}


Update cheshire dependency to 5.8.0

Update cheshire dependency to 5.8.0

--- project.clj
+++ project.clj
@@ -7,7 +7,7 @@
                  [com.taoensso/nippy "2.13.0" :scope "provided"]
                  [org.clojure/test.check "0.9.0" :scope "test"]
                  [buddy/buddy-core "1.3.0"]
-                 [cheshire "5.7.1"]]
+                 [cheshire "5.8.0"]]
   :source-paths ["src"]
   :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
   :test-paths ["test"])


:bug: Fix faraday dependencies

:bug: Fix faraday dependencies

--- project.clj
+++ project.clj
@@ -17,7 +17,11 @@
                  [cheshire "5.7.1"]
                  [tentacles "0.5.1"]
                  [com.stuartsierra/component "0.3.2"]
-                 [com.taoensso/faraday "1.9.0"]
+                 [com.taoensso/faraday "1.9.0"
+                  :exclusions [com.amazonaws/aws-java-sdk-dynamodb]]
+                 [joda-time "2.9.6"]
+                 [com.amazonaws/aws-java-sdk-dynamodb "1.11.95"
+                  :exclusions [joda-time]]
                  [com.google.cloud/google-cloud-pubsub "0.17.2-alpha"]
                  [clj-http "3.8.0"]
                  [jarohen/chime "0.2.2"]]


Update snapshot to version 0.4.3

Update snapshot to version 0.4.3

--- project.clj
+++ project.clj
@@ -3,7 +3,7 @@
   [path]
   (str "resources/public/js/lib/" path))

-(defproject onaio/hatti "0.4.2-SNAPSHOT"
+(defproject onaio/hatti "0.4.3-SNAPSHOT"
   :description "A cljs dataview from your friends at Ona.io"
   :license "Apache 2, see LICENSE"
   :url "https://github.com/onaio/hatti"


Fix :clean-targets folder

Fix :clean-targets folder

--- project.clj
+++ project.clj
@@ -13,7 +13,7 @@
                                     [lein-figwheel "0.3.8"]]}}

   :clean-targets [:target-path
-                  "run/compiled/demo"]
+                  "run/compiled"]

   :resource-paths ["run/resources"]
   :jvm-opts       ["-Xmx1g" "-XX:+UseConcMarkSweepGC"]


working on 2.9.2

working on 2.9.2

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


Version 6.7.2-SNAPSHOT

Version 6.7.2-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def ps-version "6.7.1")
+(def ps-version "6.7.2-SNAPSHOT")

 (defn deploy-info
   [url]


Upgrading some library versions.

Upgrading some library versions.

--- project.clj
+++ project.clj
@@ -5,8 +5,8 @@
   :dependencies [[org.clojure/clojure "1.6.0"]
                  [nasa-cmr/cmr-oracle-lib "0.1.0-SNAPSHOT"]
                  [nasa-cmr/cmr-system-trace-lib "0.1.0-SNAPSHOT"]
-                 [compojure "1.1.6"]
-                 [ring/ring-core "1.2.2" :exclusions [clj-time]]
+                 [compojure "1.1.9"]
+                 [ring/ring-core "1.3.1" :exclusions [clj-time]]
                  [ring/ring-json "0.3.1"]
                  [org.clojure/tools.reader "0.8.4"]
                  [org.clojure/tools.cli "0.3.1"]
@@ -23,7 +23,7 @@
   :repl-options {:init-ns user}

   :profiles
-  {:dev {:dependencies [[org.clojure/tools.namespace "0.2.4"]
+  {:dev {:dependencies [[org.clojure/tools.namespace "0.2.5"]
                         [org.clojars.gjahad/debug-repl "0.3.3"]
                         [cheshire "5.3.1"]
                         [clj-http "0.9.1"]]


Version 1.7.0-SNAPSHOT

Version 1.7.0-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject puppetlabs/lein-ezbake "1.6.4"
+(defproject puppetlabs/lein-ezbake "1.7.0-SNAPSHOT"
   :description "A system for building packages for trapperkeeper-based applications"
   :url "https://github.com/puppetlabs/ezbake"
   :license {:name "Apache License 2.0"


Update to latest ring-swagger-ui

Update to latest ring-swagger-ui

--- project.clj
+++ project.clj
@@ -27,7 +27,7 @@
                          [metosin/reitit-frontend "0.3.10"]
                          [metosin/reitit-sieppari "0.3.10"]
                          [metosin/reitit-pedestal "0.3.10"]
-                         [metosin/ring-swagger-ui "2.2.10"]
+                         [metosin/ring-swagger-ui "3.24.3"]
                          [metosin/spec-tools "0.10.0"]
                          [metosin/schema-tools "0.12.1"]
                          [metosin/muuntaja "0.6.6"]


Version 0.1.12-SNAPSHOT

Version 0.1.12-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject ci-test "0.1.11"
+(defproject ci-test "0.1.12-SNAPSHOT"
   :description "FIXME: write description"
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"


release 2.6.0

release 2.6.0

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


cut 0.2.1

cut 0.2.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject tenzing/lein-template "0.2.0"
+(defproject tenzing/lein-template "0.2.1"
   :description "Clojurescript application template built on Boot"
   :url "http://github.com/martinklepsch/tenzing"
   :license {:name "Eclipse Public License"


fix tfidf example namespace

fix tfidf example namespace

--- project.clj
+++ project.clj
@@ -24,7 +24,7 @@
                         [codox "0.8.9"]]
               ;; so gen-class stuff works in the repl
               :aot [flambo.function
-                    flambo.tfidf]}
+                    flambo.example.tfidf]}
              :provided
              {:dependencies
               [[org.apache.spark/spark-core_2.10 "1.0.0"]


Version 3.24.1 [ci skip]

Version 3.24.1 [ci skip]

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


Try fix travis tests

Try fix travis tests

--- project.clj
+++ project.clj
@@ -86,17 +86,34 @@
                                             "phantomjs" :runner
                                             "target/unit-test.js"]}}
   :profiles {
-    :dev {
-          :main robinson.core
-          :dependencies
+    :dev {:dependencies
             [[org.clojure/core.typed "0.3.9"]
              #_[org.clojure/clojurescript "0.0-3030"]]

           :plugins
             [[com.cemerick/piggieback "0.1.5-SNAPSHOT"]
-             [lein-cljsbuild "1.0.6"]]}
+             [lein-cljsbuild "1.0.6"]]
+           :jvm-opts [
+             ;"-agentpath:/home/santos/bin/yjp-2014-build-14096/bin/linux-x86-64/libyjpagent.so"
+             "-Xdebug"
+             ;"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
+             ;"-XX:+UnlockCommercialFeatures"
+             ;"-XX:+FlightRecorder"
+             "-XX:-OmitStackTraceInFastThrow"
+             "-XX:+UseParNewGC"
+             "-XX:+UseConcMarkSweepGC"
+             "-XX:+CMSConcurrentMTEnabled"
+             "-XX:MaxGCPauseMillis=20"
+             "-Dhttps.protocols=TLSv1"
+             "-XstartOnFirstThread"]}
     :test {
-           :main robinson.core}
+           :jvm-opts [
+             "-XX:-OmitStackTraceInFastThrow"
+             "-XX:+UseParNewGC"
+             "-XX:+UseConcMarkSweepGC"
+             "-XX:+CMSConcurrentMTEnabled"
+             "-XX:MaxGCPauseMillis=20"
+             "-Dhttps.protocols=TLSv1"]}
     :demos {:dependencies
               [[quil "2.2.6"]]}
     :uberjar {:aot [robinson.update
@@ -116,21 +133,4 @@
                        robinson.combat robinson.core robinson.describe robinson.endgame robinson.lineofsight robinson.main robinson.monstergen
                        robinson.player robinson.render robinson.swingterminal robinson.viewport robinson.worldgen]}
   :repl-options {:timeout 920000}
-  :jvm-opts [
-             ;"-agentpath:/home/santos/bin/yjp-2014-build-14096/bin/linux-x86-64/libyjpagent.so"
-             "-Xdebug"
-             ;"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
-             ;"-XX:+UnlockCommercialFeatures"
-             ;"-XX:+FlightRecorder"
-             "-XX:-OmitStackTraceInFastThrow"
-             "-XX:+UseParNewGC"
-             "-XX:+UseConcMarkSweepGC"
-             "-XX:+CMSConcurrentMTEnabled"
-             "-XX:MaxGCPauseMillis=20"
-             "-Dhttps.protocols=TLSv1"
-             ~(if (-> (System/getProperty "os.name")
-                    (.toLowerCase)
-                    (.contains "mac"))
-               "-XstartOnFirstThread"
-               "")]
 )


Version 27

Version 27

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


Loading code from cljs source

Loading code from cljs source

--- src-cljs/qcon/main.cljs
+++ src-cljs/qcon/main.cljs
@@ -12,6 +12,7 @@
    [sablono.core :as html :refer-macros [html]]
    [ankha.core :as ankha]
    [cljs.core.async :refer [<! >! timeout buffer chan put! sliding-buffer close! pipe map< filter<]]
+   [clojure.string :as string]
    [ajax.core :refer (GET POST)]))

 (enable-console-print!)
@@ -311,7 +312,8 @@
              :opts {:font-size "72pt"}}

             {:subtitle "buffers (TODO)"
-             :code "(<! (chan))"}
+             :code {:source "cljs/core/async.cljs"
+                    :range [10 20]}}

             {:subtitle "alts!"
              :custom alts-slide
@@ -324,7 +326,7 @@
                     :radius 60 :font-size "40pt"}
              }

-            {:subtitle "catch game"
+            #_{:subtitle "catch game"
              :custom catch-game-slide
              :opts {:width 600 :height 600
                     :circles 13
@@ -365,7 +367,39 @@
             {:title "Thank you"
              :text "Please evaluate my talk via the mobile app!"}]))}))

-(defn source-snippet [data owner fname]
+(defn source-snippet [data owner {}]
+  (reify
+    om/IWillMount
+    (will-mount [_]
+      (GET (str "/js/" (get-in data [:code :source]))
+          (-> {:handler (fn [e]
+                          (om/set-state! owner
+                                         :text (if-let [[from to] (get-in @data [:code :range])]
+                                                 (->>
+                                                  (string/split-lines e)
+                                                  (drop (dec from))
+                                                  (take (- to from))
+                                                  (interpose "\n")
+                                                  (apply str))
+                                                 e)))
+               :headers {"Accept" "text/plain"}
+               :response-format :raw})))
+    om/IRender
+    (render [_]
+      (html
+       [:div]))
+    om/IDidUpdate
+    (did-update [this prev-props prev-state]
+      (when (om/get-state owner :text)
+        (let [n (om/get-node owner)]
+          (while (.hasChildNodes n)
+            (.removeChild n (.-lastChild n))))
+        (let [pre (.createElement js/document "pre")]
+          (set! (.-innerHTML pre) (.-value (hljs.highlightAuto (om/get-state owner :text))))
+          (.appendChild (om/get-node owner) pre)
+          )))))
+
+(defn clj-source-snippet [data owner fname]
   (reify
     om/IWillMount
     (will-mount [_]
@@ -453,7 +487,7 @@
              )

            (when-let [code (:code data)]
-             (om/build source-snippet data {:opts "filter"})
+             (om/build source-snippet data {:opts code})
              )
            ]
           ])))))


Fix format-commands #5

Fix format-commands #5

--- build.boot
+++ build.boot
@@ -53,7 +53,7 @@
   [& commands]
   (util/info (str "Input commands:\n" (str (vec commands)) "\n\n"))
   (util/info (str "Running command: \n"
-                  (apply str (apply format-commands commands))
+                  (str (vec (apply format-commands commands)))
                   "\n\n"))
   (->> commands
        (apply format-commands)


make test independent of key order; preparation for update to clojure 1.7.0

--- ssclj/jar/src/test/clojure/com/sixsq/slipstream/ssclj/usage/summary_test.clj
+++ ssclj/jar/src/test/clojure/com/sixsq/slipstream/ssclj/usage/summary_test.clj
@@ -4,6 +4,7 @@
     [com.sixsq.slipstream.ssclj.usage.summary       :refer :all]
     [com.sixsq.slipstream.ssclj.usage.record-keeper :as rc]
     [com.sixsq.slipstream.ssclj.usage.utils         :as u]
+    [clojure.data.json                              :as json]
     [clojure.test                                   :refer :all]
     [clojure.tools.logging                          :as log]
     [korma.core                                     :refer :all]
@@ -203,12 +204,17 @@
     (summarize start-day end-day)))
   )

-(deftest test-summarize-and-store
+(deftest test-summarize-and-store
   (insert-record)
   (summarize-and-store start-day end-day)
-  (let [summaries-from-db (select usage_summaries)]
+  (let [summaries-from-db (select usage_summaries)
+        result "{\"disk-GB\":{\"unit_minutes\":33868.5},
+                 \"RAM-GB\":{\"unit_minutes\":2696.0},
+                 \"nb-cpu\":{\"unit_minutes\":1348.0}}"]
+
     (is (= 1 (count summaries-from-db)))
-    (is (= "{\"disk-GB\":{\"unit_minutes\":33868.5},\n \"RAM-GB\":{\"unit_minutes\":2696.0},\n \"nb-cpu\":{\"unit_minutes\":1348.0}}\n"
-       (:usage (first summaries-from-db))))))
-
-
+    (is (= (json/read-str result)
+           (-> summaries-from-db
+               (first)
+               (:usage)
+               (json/read-str))))))


Ensure that scrolling the data drill ui scrolls all the way down

--- src/datadrill/core.cljs
+++ src/datadrill/core.cljs
@@ -113,14 +113,14 @@

 (defn DataDrillShellVisibleButton [visible? toggle-visible-fn]
   (if visible?
-    [:div {:style {:overflow "hidden"}}
-     [:div {:onClick toggle-visible-fn
-            :style {:backgroundColor "#4EE24E"
-                    :padding "12px"
-                    :float "right"
-                    :width "80px"
-                    :text-align "center"}}
-      "Hide"]]
+    [:div {:onClick toggle-visible-fn
+           :style {:backgroundColor "#4EE24E"
+                   :padding "12px"
+                   :position "fixed"
+                   :right 0
+                   :width "80px"
+                   :text-align "center"}}
+     "Hide"]
     [:div {:onClick toggle-visible-fn
            :style {:backgroundColor "#4EE24E"
                    :padding "12px"
@@ -146,6 +146,7 @@
      [DataDrillShellVisibleButton visible? (fn [_] (swap! data-atom assoc-in [:data-drill :visible?] (not visible?)))]
      [:div {:style {:padding "10px"
                     :height "100%"
+                    :box-sizing "border-box"
                     :overflow-y "scroll"}}
       [Root data-atom]]]))


Clean up initialization code

Clean up initialization code

--- src/demogorgon/core.clj
+++ src/demogorgon/core.clj
@@ -11,9 +11,6 @@
   (:gen-class))

 (def logger (Logger/getLogger "demogorgon.core"))
-(def *connection* (irc/create (:irc config)))
-(def *nh* (nh-init *connection*))
-(def *web* (ref nil))

 (defn get-memory-info []
   (let [runtime (Runtime/getRuntime)
@@ -24,8 +21,6 @@
     (str "used " used " free " free " total " total " max " max)))

 (defn print-debug []
-  (let [thread (:thread @*nh*)]
-    (.debug logger (str (.getName thread) ": " (.getState thread))))
   (.debug logger (str "before " (get-memory-info)))
   (.gc (Runtime/getRuntime))
   (.debug logger (str "after  " (get-memory-info))))
@@ -37,25 +32,34 @@
         word (aget words idx)]
     word))

+(defn create []
+  (let [irc (irc/create (:irc config))]
+    {:connection irc
+    :nh (nh-init irc)
+    :web (ref nil)}))
+
+(defn start [bot]
+  (let [logger (Logger/getLogger "main")]
+    (nh-start (:nh bot))
+
+    (irc-hooks/add-message-hook (:connection bot) #"^\.rng (.+)" #'rand-hook)
+    (irc-hooks/add-message-hook (:connection bot) #"^\.rnd (.+)" #'rand-hook)
+    (irc-hooks/add-message-hook (:connection bot) #"^\.random (.+)" #'rand-hook)
+    (irc-hooks/add-message-hook (:connection bot) ".debug" (fn [& rest] (get-memory-info)))
+    (irc-hooks/add-message-hook (:connection bot) ".gc" (fn [& rest] (.gc (Runtime/getRuntime))))
+    (irc-hooks/add-message-hook (:connection bot) #"^\.u ?(.*)?" #'unicode-hook)
+    (irc-hooks/add-message-hook (:connection bot) ".cur" #'online-players-hook)
+    (irc-hooks/add-message-hook (:connection bot) ".online" #'online-players-hook)
+    (irc-hooks/add-message-hook (:connection bot) #"^\.last ?(.*)?" #'last-dump-hook)
+    (irc-hooks/add-message-hook (:connection bot) #"^\.lastdump ?(.*)?" #'last-dump-hook)
+    (irc-hooks/add-message-hook (:connection bot) #"^\.lasturl ?(.*)?" #'last-dump-hook)
+    (irc-hooks/add-message-hook (:connection bot) #"^\.whereis ?(.*)?" #'whereis-hook)
+    (irc/connect (:connection bot))
+    (dosync
+     (ref-set (:web bot) (start-web)))))
+
 (defn -main[& args]
-  (try
-   (let [logger (Logger/getLogger "main")]
-     (nh-start *nh*)
-
-     (irc-hooks/add-message-hook *connection* #"^\.rng (.+)" #'rand-hook)
-     (irc-hooks/add-message-hook *connection* #"^\.rnd (.+)" #'rand-hook)
-     (irc-hooks/add-message-hook *connection* #"^\.random (.+)" #'rand-hook)
-     (irc-hooks/add-message-hook *connection* ".debug" (fn [& rest] (get-memory-info)))
-     (irc-hooks/add-message-hook *connection* ".gc" (fn [& rest] (.gc (Runtime/getRuntime))))
-     (irc-hooks/add-message-hook *connection* #"^\.u ?(.*)?" #'unicode-hook)
-     (irc-hooks/add-message-hook *connection* ".cur" #'online-players-hook)
-     (irc-hooks/add-message-hook *connection* ".online" #'online-players-hook)
-     (irc-hooks/add-message-hook *connection* #"^\.last ?(.*)?" #'last-dump-hook)
-     (irc-hooks/add-message-hook *connection* #"^\.lastdump ?(.*)?" #'last-dump-hook)
-     (irc-hooks/add-message-hook *connection* #"^\.lasturl ?(.*)?" #'last-dump-hook)
-     (irc-hooks/add-message-hook *connection* #"^\.whereis ?(.*)?" #'whereis-hook)
-     (irc/connect *connection*)
-     (dosync
-      (ref-set *web* (start-web))))
-   (catch Exception e
-     (pst e))))
+  (try
+    (start (create))
+    (catch Exception e
+      (pst e))))


Refactor commutative featurec

Refactor commutative featurec

--- src/desdemona/query.clj
+++ src/desdemona/query.clj
@@ -67,13 +67,13 @@
   expressions."
   [dsl-query]
   (m/match [dsl-query]
-    [((= ((attr lvar) :seq) value) :seq)]
-    (let [lvar (free-sym lvar)]
-      `(l/featurec ~lvar {~attr ~value}))
-
-    [((= value ((attr lvar) :seq)) :seq)]
-    (let [lvar (free-sym lvar)]
-      `(l/featurec ~lvar {~attr ~value}))
+    [(('= & terms) :seq)]
+    (let [{literals true attr-terms false} (group-by dsl-literal? terms)]
+      (m/match [(count literals) (count attr-terms)]
+        [1 1] (let [[value] literals
+                    [[attr lvar]] attr-terms
+                    lvar (free-sym lvar)]
+                `(l/featurec ~lvar {~attr ~value}))))

     [(('and & terms) :seq)]
     (let [logic-terms (map dsl->logic terms)]


Docstrings, indicies-of, prefixes-by-including

--- src/detritus/string.clj
+++ src/detritus/string.clj
@@ -1,13 +1,17 @@
 (ns detritus.string)

-(defn remove-from-end [s end]
+(defn remove-from-end
+  "Removes a strictly trailing substring."
+  [s end]
   (when s
     (if (.endsWith s end)
       (.substring s 0 (- (count s)
                          (count end)))
       s)))

-(defn re-find-last [re s]
+(defn re-find-last
+  "Returns the last match of `re` in `s` if any."
+  [re s]
   (let [m (re-matcher re s)]
     (loop [p nil]
       (if-let [x (re-find m)]
@@ -27,3 +31,19 @@
              (if (first groups)
                groups
                nil))))))
+
+(defn indicies-of [^String text ^String s]
+  (loop [acc  []
+         last (.indexOf text s)]
+    (if-not (= -1 last)
+      (recur (conj acc last) (.indexOf text s (inc last)))
+      acc)))
+
+(defn prefixes-by-including
+  "Returns all prefixes of the `text` which are delimited by an
+  occurrence of the provided string `s`.
+
+  Includes the delimiter in all prefixes."
+  [^String text ^String s]
+  (for [idx (reverse (indicies-of text s))]
+    (.substring text 0 (+ idx (count s)))))


refactored distillery.data namespace, added comments, added more load-* functions

--- src/distillery/data.clj
+++ src/distillery/data.clj
@@ -1,38 +1,103 @@
 (ns distillery.data
   (:require [clojure.java.io :refer (reader)])
   (:require [clojure.string :as string])
-  (:require [clojure.edn :as edn]))
+  (:require [clojure.edn :as edn])
+  (:require [net.cgrand.enlive-html :as eh]))
+
+;; ## Data Input
+;; Functions to read data from URLs or files.
+
+;; ### Private Functions
+
+(defn- build-reader
+  "Creates an java.io.Reader from an URL or file path.
+  The sequence opts can be [:encoding \"<encoding>\"].
+  The default encoding is UTF-8"
+  [x opts]
+  (apply reader (cons x opts)))
+
+(defn- read-text
+  "Reads all text from the given URL or file path.
+  For opts see build-reader."
+  [x opts]
+  (apply slurp (cons x opts)))
+
+(defn- words-from-text
+  "Creates a sequence of words from a text."
+  [text]
+  (->> (string/split text #"\b")
+       (filter #(not (string/blank? %)))
+       (map string/trim)))
+
+;; ### Public Functions
+
+;; All `load-*` functions do have the same interface.
+;; The first argument is the URL or file path to the resource.
+;; The later arguments can be flags to control the way
+;; the resource is read.
+;; For now, only the `:encoding` flag is supported.
+;;
+;; To read all text from a resource use
+;; `(load-text "myfile.txt" :encoding "ISO-LATIN-1")`.
+
+(defn load-data
+  "Loads the content of an URL or file as EDN formatted data structure."
+  [x & opts]
+  (with-open
+    [r (java.io.PushbackReader. (build-reader x opts))]
+    (edn/read r)))
+
+(defn load-text
+  "Loads the content from an URL or file as plain text."
+  [x & opts]
+  (read-text x opts))
+
+(defn load-list
+  "Loads the content of an URL or file as word list.
+  Whitespace and commas are word separators."
+  [x & opts]
+  (let [text (read-text x opts)]
+    (string/split text #"[\s,]+")))
+
+(defn load-words
+  "Loads the content of an URL or file as a sequence of words."
+  [x & opts]
+  (words-from-text (read-text x opts)))
+
+(defn load-text-from-html
+  "Loads the textual content from an HTML page."
+  [x & opts]
+  (let [nodes (-> (build-reader x opts)
+                  (eh/html-resource)
+                  (eh/select #{[:head :title] [:body]})
+                  (eh/transform [:script] nil)
+                  (eh/select [eh/text-node]))]
+    (->> nodes
+         (map eh/text)
+         (map string/trim)
+         (string/join " "))))
+
+(defn load-words-from-html
+  "Loads the content of an HTML page as a sequence of words."
+  [x & opts]
+  (words-from-text (apply load-text-from-html (cons x opts))))
+
+;; ## Collection Processing
+;; Basic helper functions to process maps and collections.
+
+;; ### General

 (defmacro key-comp
   "Creates a comparator, defined by a function which takes an element and returns the key."
   [f-key]
   `(fn [a# b#] (compare (~f-key a#) (~f-key b#))))

-(defn load-data
-  "Loads the content of a file as EDN formatted data structure."
-  [path & opts]
-  (with-open
-    [r (java.io.PushbackReader. (apply reader (cons path opts)))]
-    (edn/read r)))
-
-(defn load-list
-  "Loads the content of a file as word list. Whitespace and commas are word separators."
-  [path & opts]
-  (let [text (apply slurp (cons path opts))]
-    (string/split text #"[\s,]+")))
-
-(defn map-group-items
-  "Applies a function to the items of the group collection."
-  [f [k xs]] [k (map f xs)])
-
-(defn map-pair-value
-  "Applies a function to the value of a key-value-pair."
-  [f [k v]] [k (f v)])
-
-(defn map-values
-  "Applies a function to the values of a map and returns a map with associating the original keys with the transformed values."
-  [f m]
-  (apply (if (sorted? m) sorted-map hash-map) (apply concat (map #(map-pair-value f %) m))))
+(defn multi-filter
+  "Applies a number of predicates to a value and returns true if all predicates are true."
+  [predicates x]
+  (if (empty? predicates)
+    true
+    (every? true? ((apply juxt predicates) x))))

 (defn reduce-by
   "Groups a collection by a key, computed by key-fn, and reduces the values of each group with f."
@@ -51,12 +116,23 @@
               (assoc summaries k (f (summaries k init) x))))
           (sorted-map) coll))

-(defn multi-filter
-  "Applies a number of predicates to a value and returns true if all predicates are true."
-  [predicates x]
-  (if (empty? predicates)
-    true
-    (every? true? ((apply juxt predicates) x))))
+;; ### Maps
+
+(defn map-group-items
+  "Applies a function to the items of a group collection."
+  [f [k xs]] [k (map f xs)])
+
+(defn map-pair-value
+  "Applies a function to the value of a key-value-pair."
+  [f [k v]] [k (f v)])
+
+(defn map-values
+  "Applies a function to the values of a map and returns a map with associating the original keys with the transformed values."
+  [f m]
+  (apply (if (sorted? m) sorted-map hash-map) (apply concat (map #(map-pair-value f %) m))))
+
+;; ## Collection Math
+;; A few helper functions to simplify some mathematical tasks on collections.

 (defn sum
   "Computes the sum of a numeric sequence."
@@ -71,3 +147,5 @@
 (defn squared-sum
   "Computes the sum of the squared items of a sequence."
   [xs] (apply + (map #(* % %) xs)))
+
+


use cheshire when serializing our json for query results.

--- src/metabase/driver.clj
+++ src/metabase/driver.clj
@@ -1,6 +1,6 @@
 (ns metabase.driver
-  (:require [clojure.data.json :as json]
-            [clojure.tools.logging :as log]
+  (:require [clojure.tools.logging :as log]
+            [cheshire.core :as cheshire]
             [medley.core :refer :all]
             [metabase.db :refer [exists? ins sel upd]]
             (metabase.driver [result :as result])
@@ -163,7 +163,7 @@
                    :running_time (- (System/currentTimeMillis) (:start_time_millis <>))
                    :result_rows (get query-result :row_count 0)
                    :result_data (if cache-result
-                                  (json/write-str (:data query-result))
+                                  (cheshire/generate-string (:data query-result))
                                   "{}"))
       (dissoc :start_time_millis)
       (save-query-execution)


Test safeguards against spurious abort/accept/notify/prepares

--- test/onyx/log/generative_peer_join.clj
+++ test/onyx/log/generative_peer_join.clj
@@ -539,6 +539,8 @@
                                       :args {:id :p1}}]}))
           :log []
           :peer-choices []}))]
+    (is (empty? (:accepted replica)))
+    (is (empty? (:prepared replica)))
     (standard-invariants replica)
     (is (= 3 (count (:peer-state replica))))
     (is (= 3 (count (:peers replica))))))
@@ -560,15 +562,16 @@
           :log []
           :peer-choices []}))]
     (standard-invariants replica)
+    (is (empty? (:accepted replica)))
+    (is (empty? (:prepared replica)))
     (is (or (= 2 (count (:peer-state replica)))
             (= 3 (count (:peer-state replica)))))
     (is (or (= 2 (count (:peers replica)))
             (= 3 (count (:peers replica)))))))

-
-(deftest peer-leave-still-running
-  (checking
-    "Checking peer leave is correctly performed"
+(deftest peer-spurious-notify
+  (checking
+    "Checking a spurious notify is handled correctly"
     (times 50)
     [{:keys [replica log peer-choices]}
      (log-gen/apply-entries-gen
@@ -583,20 +586,58 @@
                                        peer-config
                                        job-1
                                        (planning/discover-tasks (:catalog job-1) (:workflow job-1)))]})
-              (assoc :spurious-notify {;:predicate (fn [replica entry]
-                                       ;               (some #{:p5} (:peers replica)))
-                                       :queue [{:fn :notify-join-cluster
+              ;; TODO, generate spurious entries
+              (assoc :spurious-prepare {:queue [{:fn :prepare-join-cluster
+                                                 :args {:joiner :p6}}]})
+              (assoc :spurious-notify {:queue [{:fn :notify-join-cluster
                                                 :args {:observer :p5}}]})
+              (assoc :spurious-abort {:queue [{:fn :abort-join-cluster
+                                               :args {:observer :p1}}]})
+              (assoc :spurious-accept {:queue [{:fn :accept-join-cluster
+                                                :args {:observer :p2
+                                                       :subject :p8
+                                                       :accepted-observer :p6
+                                                       :accepted-joiner :p2}}]})
               (assoc :leave-1 {:queue [{:fn :leave-cluster :args {:id :p1}}]})
               (assoc :leave-2 {:queue [{:fn :leave-cluster :args {:id :p2}}]}))
           :log []
           :peer-choices []}))]
     (standard-invariants replica)
+    (is (empty? (:accepted replica)))
+    (is (empty? (:prepared replica)))
     ;; peers may have left before they joined, so there should be at LEAST 7 peers allocated
     ;; since there are enough peers to handle 2 peers leaving without a task being deallocated the
     ;; job must be able to go on
     (is (>= (apply + (map count (vals (get (:allocations replica) job-1-id)))) 7))))

+(deftest peer-leave-still-running
+  (checking
+    "Checking peer leave is correctly performed"
+    (times 50)
+    [{:keys [replica log peer-choices]}
+     (log-gen/apply-entries-gen
+       (gen/return
+         {:replica {:job-scheduler :onyx.job-scheduler/balanced
+                    :messaging {:onyx.messaging/impl :dummy-messenger}}
+          :message-id 0
+          :entries
+          (-> (log-gen/generate-join-queues (log-gen/generate-peer-ids 9))
+              (assoc :job-1 {:queue [(api/create-submit-job-entry
+                                       job-1-id
+                                       peer-config
+                                       job-1
+                                       (planning/discover-tasks (:catalog job-1) (:workflow job-1)))]})
+              (assoc :leave-1 {:queue [{:fn :leave-cluster :args {:id :p1}}]})
+              (assoc :leave-2 {:queue [{:fn :leave-cluster :args {:id :p2}}]}))
+          :log []
+          :peer-choices []}))]
+    (standard-invariants replica)
+    (is (empty? (:accepted replica)))
+    (is (empty? (:prepared replica)))
+    ;; peers may have left before they joined, so there should be at LEAST 7 peers allocated
+    ;; since there are enough peers to handle 2 peers leaving without a task being deallocated the
+    ;; job must be able to go on
+    (is (>= (apply + (map count (vals (get (:allocations replica) job-1-id)))) 7))))

 ;; Reproduce onyx-test scheduler issue
 (def inner-job-id #uuid "f55c14f0-a847-42eb-81bb-0c0390a88608")


Remove spurious params

Remove spurious params

--- src/om_chat/components/message_section.cljs
+++ src/om_chat/components/message_section.cljs
@@ -7,9 +7,7 @@
             ))

 (defui MessageSection
-  static om/IQueryParams
-  (params [this]
-          {:id 0})
+
   static om/IQuery
   (query [this]
          {:thread/messages (om/get-query msg/MessageItem)})


Move console into it's own component

Move console into it's own component

--- src/multi_repl/core.clj
+++ src/multi_repl/core.clj
@@ -37,6 +37,7 @@
 (defn new-repl [command]
   (map->Repl {:command command}))

+
 (defn format-response [response]
   (clojure.set/rename-keys response {"result" :result
                                      "error" :error}))
@@ -48,33 +49,70 @@
     (.flush sink)
     (format-response (msgpack/unpack-stream source))))

+
+(defrecord Console [prompt reader out]
+  component/Lifecycle
+
+  (start [this]
+    (if reader
+      this
+      (let [reader (ConsoleReader.)
+            out (PrintWriter. (.getOutput reader))]
+        (.setPrompt reader "> ")
+        (print-err ";; Starting console")
+        (assoc this
+               :reader reader
+               :out out))))
+
+  (stop [this]
+    (if (not reader)
+      this
+      (do (print-err ";; Stopping console")
+          (.close out)
+          (dissoc this :reader :out)))))
+
+(defn new-console [prompt]
+  (map->Console {:prompt prompt}))
+
+(defn read-console-line [console]
+  (.flush (:out console))
+  (some-> (:reader console)
+          .readLine
+          clojure.string/trim))
+
+(defn println-console [console & args]
+  (binding [*out* (:out console)]
+    (apply println args)))
+
+(defmulti run-line (fn [system line] line))
+
+(defmethod run-line "exit" [system _]
+  (component/stop system)
+  (System/exit 0))
+
+(defmethod run-line :default [system line]
+  (let [{:keys [repl console]} system
+        {:keys [error result]} (eval-in-repl repl line)]
+    (if error
+      (println-console console "ERROR:" error)
+      (println-console console result))))
+
 (defn start-python-repl []
   (-> (new-repl ["python" "-u" "python-repl.py"])
       (component/start)))

-(defn read-line [reader]
-  (-> (.readLine reader)
-      clojure.string/trim))
+(def commands
+  {:python ["python" "-u" "python-repl.py"]})

-(defmulti run-line (fn [repl line] line))
-
-(defmethod run-line "exit" [repl _]
-  (component/stop repl)
-  (System/exit 0))
-
-(defmethod run-line :default [repl line]
-  (let [{:keys [error result]} (eval-in-repl repl line)]
-    (if error
-      (println "ERROR:" error)
-      (println result))))
+(defn new-system [prompt type]
+  (component/system-map :repl (new-repl (get commands type))
+                        :console (new-console "> ")))

 (defn -main [& args]
-  (let [repl (start-python-repl)
-        reader (ConsoleReader.)
-        out (PrintWriter. (.getOutput reader))]
-    (.setPrompt reader "> ")
-    (loop [line (read-line reader)]
+  (let [system (-> (new-system "> " :python)
+                   component/start)
+        console (:console system)]
+    (loop [line (read-console-line console)]
       (print-err "line" line)
-      (run-line repl line)
-      (.flush out)
-      (recur (read-line reader)))))
+      (run-line system line)
+      (recur (read-console-line console)))))


Fix for format test.

Fix for format test.

--- test/yetibot/core/test/util/format.clj
+++ test/yetibot/core/test/util/format.clj
@@ -33,7 +33,8 @@
            "all --> foo bar baz <-- there"))
     (is (= (pseudo-format-n "just the second --> %2 <--" args)
            "just the second --> bar <--"))
-    (is (= (pseudo-format-n "append to end -->" args))))
+    (is (= (pseudo-format-n "append to end -->" args)
+           "append to end --> foo bar baz")))
   (is (= (pseudo-format-n "echo hi | echo bar" [])
          "echo hi | echo bar")
       "It shouldn't have a space at the end when args is empty"))


`slam.hound.search`: avoid a compile-time computation

`(get-available-classes)` was invoked at compile-time.

That was plausibly problematic.

--- src/refactor_nrepl/ns/slam/hound/search.clj
+++ src/refactor_nrepl/ns/slam/hound/search.clj
@@ -121,18 +121,18 @@
         (all-classpath-entries)))

 (def available-classes
-  (get-available-classes))
+  (delay (get-available-classes)))

 (defn- get-available-classes-by-last-segment
   []
   (delay
-   (group-by #(symbol (peek (string/split (str %) #"\."))) available-classes)))
+   (group-by #(symbol (peek (string/split (str %) #"\."))) @available-classes)))

 (def available-classes-by-last-segment
-  (get-available-classes-by-last-segment))
+  (delay (get-available-classes-by-last-segment)))

 (defn reset
   "Reset the cache of classes"
   []
-  (alter-var-root #'available-classes (constantly (get-available-classes)))
-  (alter-var-root #'available-classes-by-last-segment (constantly (get-available-classes-by-last-segment))))
+  (alter-var-root #'available-classes (constantly (delay (get-available-classes))))
+  (alter-var-root #'available-classes-by-last-segment (constantly (delay (get-available-classes-by-last-segment)))))


Use provided cljs random uuid.

Use provided cljs random uuid.

--- src/hasch/platform.cljs
+++ src/hasch/platform.cljs
@@ -12,26 +12,7 @@
                          (cemerick.austin/repl-env)))
     (cemerick.austin.repls/cljs-repl repl-env))

-;; taken from https://github.com/whodidthis/cljs-uuid-utils/blob/master/src/cljs_uuid_utils.cljs
-;; Copyright (C) 2012 Frank Siebenlist
-;; Distributed under the Eclipse Public License, the same as Clojure.
-(defn uuid4
-  "(uuid4) => new-uuid
-   Arguments and Values:
-   new-uuid --- new type 4 (pseudo randomly generated) cljs.core/UUID instance.
-   Description:
-   Returns pseudo randomly generated UUID,
-   like: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx as per http://www.ietf.org/rfc/rfc4122.txt.
-   Examples:
-   (uuid4) => #uuid \"305e764d-b451-47ae-a90d-5db782ac1f2e\"
-   (type (uuid4)) => cljs.core/UUID"
-  []
-  (letfn [(f [] (.toString (rand-int 16) 16))
-          (g [] (.toString (bit-or 0x8 (bit-and 0x3 (rand-int 15))) 16))]
-    (UUID. (.toString (.append (goog.string.StringBuffer.)
-       (f) (f) (f) (f) (f) (f) (f) (f) "-" (f) (f) (f) (f)
-       "-4" (f) (f) (f) "-" (g) (f) (f) (f) "-"
-       (f) (f) (f) (f) (f) (f) (f) (f) (f) (f) (f) (f))))))
+(def uuid4 random-uuid)

 (defn byte->hex [b]
   (-> b


adding access-control-allow-origin headers to allow ajax calls from voltron42.gitub.io

--- src/scullery_plateau/routings.clj
+++ src/scullery_plateau/routings.clj
@@ -24,12 +24,14 @@
     (r/context "/api"
                (r/POST "/svg"
                        {"content-type" "application/edn"}
-                       {"content-type" "application/xml"}
+                       {"content-type" "application/xml"
+                        "access-control-allow-origin" "https://voltron42.github.io"}
                        {:body [s/Any identity]}
                        identity)
                (r/POST "/svg/png"
                        {"content-type" "application/edn"}
-                       {"content-type" "image/png"}
+                       {"content-type" "image/png"
+                        "access-control-allow-origin" "https://voltron42.github.io"}
                        {:body [s/Any identity]}
                        (fn [{:keys [body]}]
                          (println body)
@@ -38,7 +40,8 @@
                              (img/rasterize :png {} body out)))))
                (r/POST "/svg/jpeg"
                        {"content-type" "application/edn"}
-                       {"content-type" "image/jpeg"}
+                       {"content-type" "image/jpeg"
+                        "access-control-allow-origin" "https://voltron42.github.io"}
                        {:body [s/Any identity]}
                        (fn [{:keys [body]}]
                          (io/piped-input-stream
@@ -46,7 +49,8 @@
                              (img/rasterize :jpeg {} body out)))))
                (r/POST "/pdf"
                        {"content-type" "application/edn"}
-                       {"content-type" "application/pdf"}
+                       {"content-type" "application/pdf"
+                        "access-control-allow-origin" "https://voltron42.github.io"}
                        {:body [s/Any identity]}
                        (fn [{:keys [body]}]
                          (io/piped-input-stream


Issue 18: Support truthy return from Function-type Request Specification (#19)

--- src/stub_http/internal/server.clj
+++ src/stub_http/internal/server.clj
@@ -18,7 +18,7 @@
          o)))

 (defn- indices-of-routes-matching-request [stub-http-request routes]
-  (keep-indexed #(if (true? ((:request-spec-fn %2) stub-http-request)) %1 nil) routes))
+  (keep-indexed #(if ((:request-spec-fn %2) stub-http-request) %1) routes))

 (defn- create-response [{:keys [status headers body content-type delay counter]}]
   "Create a nano-httpd Response from the given map.


refactoring parallel stress-test code

refactoring parallel stress-test code

--- test/acceptance/new_stress_tests.clj
+++ test/acceptance/new_stress_tests.clj
@@ -1,6 +1,7 @@
 (ns acceptance.new-stress-tests
   (:require [push.core :as push]
             [com.climate.claypoole :as cp]
+            [com.climate.claypoole.lazy :as lazy]
             [acceptance.util :as util]
             [push.util.code-wrangling :as fix]
             )
@@ -11,7 +12,7 @@
 ;;;; setup

 (def my-interpreter (push/interpreter))
-(def cohort-size 1000)
+(def cohort-size 100)
 (def program-size 1000)
 (def erc-scale 10)
 (def erc-prob 3/5)
@@ -31,7 +32,11 @@

 (defn interpreter-details
   [i]
-  { :steps (:counter i)
+  { :program-size
+      (str
+        (count (:program i))
+        " (" (fix/count-collection-points (:program i)) ")")
+    :steps (:counter i)
     :errors (count (push/get-stack i :error))
     :argument-errors
       (count
@@ -41,18 +46,19 @@
                       (push/get-stack i :error)))
     :stack-points
       (reduce-kv
-        (fn [counts stackname stack]
-          (assoc counts stackname
-            (str (count stack) "(" (fix/count-collection-points stack) " pts)")))
+        (fn [counts key value]
+          (assoc counts key
+            (str (count value) " (" (fix/count-collection-points value) ")")))
         {}
         (:stacks i))
     :binding-points
       (reduce-kv
-        (fn [counts bindingname b]
-          (assoc counts bindingname
-            (str (count bindingname) " (" (fix/count-collection-points b) " pts)")))
+        (fn [counts key value]
+          (assoc counts key
+            (str (count value) " (" (fix/count-collection-points value) ")")))
         {}
         (:bindings i))
+
   })

@@ -96,22 +102,22 @@
 (defn launch-some-workers
   [interpreter bindings numbered-programs]
   (doall
-    (cp/upmap 8
-      #(try
-        (println
+    (lazy/upmap 32
+      #(do
+        (.write *out*
           (str "\n\n"
             (first %) ": "
-            (interpreter-details
-              (run-program interpreter (second %) bindings))))
-      (catch Exception e
-        (do
-          (println (str "failure at " (first %)))
-          (spit-prisoner-file "foo" (second %) bindings (.getMessage e))
-          ; (throw (Exception. (.getMessage e)))
-          )))
-  numbered-programs))
-  (println :done)
-  )
+              (try
+                (interpreter-details
+                  (run-program interpreter (second %) bindings))
+              (catch Exception e
+                (do
+                  (.write *out* (str "failure at " (first %)))
+                  (spit-prisoner-file (second %) bindings (.getMessage e))
+                  (throw (Exception. (.getMessage e)))
+                  ))))))
+      numbered-programs)
+      ))

 (fact "run some workers in parallel"


modified new stress test somewhat

modified new stress test somewhat

--- test/acceptance/new_stress_tests.clj
+++ test/acceptance/new_stress_tests.clj
@@ -1,6 +1,7 @@
 (ns acceptance.new-stress-tests
   (:require [push.core :as push]
             [push.type.definitions.quoted :as qc]
+            [push.type.definitions.interval :as iv]
             [com.climate.claypoole :as cp]
             )
   (:use midje.sweet))
@@ -61,6 +62,12 @@
 (declare some-codeblock)

+(defn some-interval
+  [i]
+  (iv/make-interval (some-long 100) (some-double 100)))
+
+
+
 (def all-the-letters (map keyword (map str (map char (range 97 123)))))

@@ -79,6 +86,7 @@
       (some-bigdec 10000000)
       (some-ascii 1)
       (some-string 10)
+      (some-interval 100)
       (vector-of-stuff some-long 100 i)
       (vector-of-stuff some-double 100 i)
       (rand-nth all-the-letters)
@@ -118,11 +126,12 @@
    :errors (count (push/get-stack i :error))
    :items (frequencies (map :item (push/get-stack i :error)))
    :scalar (push/get-stack i :scalar)
+   :bindings (:bindings i)
   })

 (def many-programs
-  (take 100 (repeatedly #(some-program 100 10))))
+  (take 10 (repeatedly #(some-program 1000 10))))

 (def sample-bindings


Artificially introducing a bug.

Artificially introducing a bug.

--- src/helloworld/core.clj
+++ src/helloworld/core.clj
@@ -3,7 +3,7 @@
 (defn my-add
   "Demo function to add two numbers."
   [a b]
-  (+ a b))
+  (* a b))

 (defn foo
   "I don't do a whole lot."


Try new Version of flatten-ast

Try new Version of flatten-ast

--- src/logic/transform.clj
+++ src/logic/transform.clj
@@ -43,6 +43,42 @@
   [ast]
   (postwalk flatten-subast ast))

+;(defn flatten-ast
+;  "Flats the transformed ast.
+;   Nested binary functions will be transformed to one n-ary function when it is possible.
+;   (and (and a b) c) => (and a b c)"
+;  [ast]
+;  (if (seq? ast)
+;    (case (count ast)
+;      1 (flatten-ast (first ast))
+;      2 (let [op (first ast)
+;              fst (flatten-ast (second ast))
+;              new-fst (if (and
+;                            (seq? fst)
+;                            (n-ary? op)
+;                            (= op (first fst)))
+;                        (rest fst)
+;                        (list fst))]
+;          `(~op ~@new-fst))
+;      3 (let [op (first ast)
+;              fst (flatten-ast (second ast))
+;              new-fst (if (and
+;                            (seq? fst)
+;                            (n-ary? op)
+;                            (= op (first fst)))
+;                        (rest fst)
+;                        (list fst))
+;              snd (flatten-ast (nth ast 2))
+;              new-snd  (if (and
+;                            (seq? snd)
+;                            (n-ary? op)
+;                            (= op (first snd)))
+;                        (rest snd)
+;                        (list snd))]
+;          `(~op ~@new-fst ~@new-snd))
+;      (println (count ast)))
+;    ast))
+
 (defn clojure-formula
   "Parses a formula and transforms it to an ast."
   [formula]


Include hyphen in suffix

Include hyphen in suffix

--- planck-cljs/src/planck/core.cljs
+++ planck-cljs/src/planck/core.cljs
@@ -91,7 +91,7 @@
                                     (completion-candidates-for-ns 'cljs.core false)
                                     (completion-candidates-for-ns @current-ns true)
                                     (when top-form? (map str repl-specials))))]
-    (let [buffer-match-suffix (re-find #"[a-zA-Z]*$" buffer)
+    (let [buffer-match-suffix (re-find #"[a-zA-Z-]*$" buffer)
           buffer-prefix (subs buffer 0 (- (count buffer) (count buffer-match-suffix)))]
       (clj->js (if (= "" buffer-match-suffix)
                  []


Bind vars needed by reader

Bind vars needed by reader

Partial preparation for #190

--- planck-cljs/src/planck/repl.cljs
+++ planck-cljs/src/planck/repl.cljs
@@ -7,6 +7,7 @@
             [cljs.tools.reader.reader-types :as rt]
             [cljs.tagged-literals :as tags]
             [cljs.source-map :as sm]
+            [cljs.env :as env]
             [cljs.js :as cljs]
             [cljs.repl :as repl]
             [cljs.stacktrace :as st]
@@ -93,7 +94,11 @@

 (defn repl-read-string
   [line]
-  (r/read-string {:read-cond :allow :features #{:cljs}} line))
+  (binding [ana/*cljs-ns* @current-ns
+            env/*compiler* st
+            r/*data-readers* tags/*cljs-data-readers*
+            r/resolve-symbol ana/resolve-symbol]
+    (r/read-string {:read-cond :allow :features #{:cljs}} line)))

 (defn- eof-while-reading?
   [message]
@@ -103,19 +108,18 @@

 (defn ^:export is-readable?
   [line]
-  (binding [r/*data-readers* tags/*cljs-data-readers*]
-    (try
-      (repl-read-string line)
-      true
-      (catch :default e
-        (let [message (.-message e)]
-          (cond
-            (eof-while-reading? message) false
-            (= "EOF" message) true
-            :else (do
-                    (print-error e false)
-                    (println)
-                    true)))))))
+  (try
+    (repl-read-string line)
+    true
+    (catch :default e
+      (let [message (.-message e)]
+        (cond
+          (eof-while-reading? message) false
+          (= "EOF" message) true
+          :else (do
+                  (print-error e false)
+                  (println)
+                  true))))))

 (defn ns-form?
   [form]
@@ -325,7 +329,10 @@
 (defn- is-completely-readable?
   [source]
   (let [rdr (rt/indexing-push-back-reader source 1 "noname")]
-    (binding [r/*data-readers* tags/*cljs-data-readers*]
+    (binding [ana/*cljs-ns* @current-ns
+              env/*compiler* st
+              r/*data-readers* tags/*cljs-data-readers*
+              r/resolve-symbol ana/resolve-symbol]
       (try
         (r/read {:eof (js-obj) :read-cond :allow :features #{:cljs}} rdr)
         (nil? (rt/peek-char rdr))


Ablity to cache for top-level script file

Former-commit-id: fd9b4349f618228303d10f40191a818eba4c887d

--- planck-cljs/src/planck/repl.cljs
+++ planck-cljs/src/planck/repl.cljs
@@ -70,6 +70,12 @@

 (defn ns-form? [form]
   (and (seq? form) (= 'ns (first form))))
+
+(defn extract-namespace
+  [source]
+  (let [first-form (repl-read-string source)]
+    (when (ns-form? first-form)
+      (second first-form))))

 (def special-doc-map
   '{.     {:forms [(.instanceMethod instance args*)
@@ -436,6 +442,15 @@
 (defn- cache-prefix-for-path [path]
   (str (:cache-path @app-env) "/" (munge path)))

+(defn- extract-cache-metadata [source]
+  (let [file-namespace (extract-namespace source)
+        relpath (if file-namespace
+                  (cljs/ns->relpath file-namespace)
+                  "cljs/user")]
+    [file-namespace relpath]))
+
+(def extract-cache-metadata-mem (memoize extract-cache-metadata))
+
 (defn caching-js-eval
   [{:keys [path name source cache]}]
   (when (and path source cache (:cache-path @app-env))
@@ -463,16 +478,20 @@
             {:lang   lang
              :source source}
             (when-not (= :js lang)
-              (let [precompiled-js (or (raw-load (add-suffix path ".js"))
+              (let [cache-prefix (if (= :calculate-cache-prefix cache-prefix)
+                                   (cache-prefix-for-path (second (extract-cache-metadata-mem source)))
+                                   cache-prefix)
+                    precompiled-js (or (raw-load (add-suffix path ".js"))
                                      (js/PLANCK_READ_FILE (str cache-prefix ".js")))
                     cache-json (or (raw-load (str path ".cache.json"))
                                  (js/PLANCK_READ_FILE (str cache-prefix ".cache.json")))]
-                (when (and precompiled-js cache-json)
+                (when precompiled-js
                   (when (:verbose @app-env)
-                    (println-verbose "Loading precompiled JS and analysis cache for" path))
-                  {:lang   :js
-                   :source precompiled-js
-                   :cache  (transit-json->cljs cache-json)})))))
+                    (println-verbose "Loading precompiled JS" (if cache-json "and analysis cache" "") "for" path))
+                  (merge {:lang   :js
+                          :source precompiled-js}
+                    (when cache-json
+                      {:cache (transit-json->cljs cache-json)})))))))
       :loaded)))

 (defn closure-index []
@@ -492,7 +511,7 @@
 ; file here is an alternate parameter denoting a filesystem path
 (defn load [{:keys [name macros path file] :as full} cb]
   (if file
-    (when-not (load-and-callback! file :clj nil cb)
+    (when-not (load-and-callback! file :clj :calculate-cache-prefix cb)
       (cb nil))
     (if (re-matches #"^goog/.*" path)
       (if-let [goog-path (get (closure-index-mem) name)]
@@ -603,6 +622,41 @@
         (-> (r/read {:read-cond :allow :features #{:cljs}} rdr)
           meta :source)))))

+(defn- run-async!
+  "Like cljs.core/run!, but for an async procedure, and with the
+  ability to break prior to processing the entire collection.
+
+  Chains successive calls to the supplied procedure for items in
+  the collection. The procedure should accept an item from the
+  collection and a callback of one argument. If the break? predicate,
+  when applied to the procedure callback value, yields a truthy
+  result, terminates early calling the supplied cb with the callback
+  value. Otherwise, when complete, calls cb with nil."
+  [proc coll break? cb]
+  (if (seq coll)
+    (proc (first coll)
+      (fn [res]
+        (if (break? res)
+          (cb res)
+          (run-async! proc (rest coll) break? cb))))
+    (cb nil)))
+
+(defn- process-deps
+  [names opts cb]
+  (run-async! (fn [name cb]
+                (cljs/require name opts cb))
+    names
+    :error
+    cb))
+
+(defn- process-macros-deps
+  [cache cb]
+  (process-deps (distinct (vals (:require-macros cache))) {:macros-ns true} cb))
+
+(defn- process-libs-deps
+  [cache cb]
+  (process-deps (distinct (concat (vals (:requires cache)) (vals (:imports cache)))) {} cb))
+
 (defn execute-source
   [[source-type source-value] {:keys [expression? print-nil-expression? in-exit-context? include-stacktrace?] :as opts}]
   (binding [ana/*cljs-ns* @current-ns
@@ -615,7 +669,15 @@
           (if source
             (case lang
               :clj (execute-source ["text" source] opts)
-              :js (js/eval source))
+              :js (process-macros-deps cache
+                    (fn [res]
+                      (if-let [error (:error res)]
+                        (handle-error (js/Error. error) false in-exit-context?)
+                        (process-libs-deps cache
+                          (fn [res]
+                            (if-let [error (:error res)]
+                              (handle-error (js/Error. error) false in-exit-context?)
+                              (js/eval source))))))))
             (handle-error (js/Error. (str "Could not load file " source-value)) false in-exit-context?))))
       (let [source-text source-value
             expression-form (and expression? (repl-read-string source-text))]
@@ -653,16 +715,21 @@
               source-text
               (if expression? "Expression" "File")
               (merge
-                {:ns           @current-ns
-                 :source-map   false
-                 :verbose      (:verbose @app-env)
-                 :cache-source (fn [x cb]
-                                 #_(when (and path (:source x))
-                                     (js/PLANCK_CACHE path (:source x) nil))
-                                 (cb {:value nil}))}
-                (when expression?
+                {:ns         @current-ns
+                 :source-map false
+                 :verbose    (:verbose @app-env)}
+                (if expression?
                   {:context       :expr
-                   :def-emits-var true}))
+                   :def-emits-var true}
+                  (when (:cache-path @app-env)
+                    {:cache-source (fn [x cb]
+                                     (when (and (= "File" (:name x)) (:source x))
+                                       (let [source (:source x)
+                                             [file-namespace relpath] (extract-cache-metadata-mem source-text)]
+                                         (js/PLANCK_CACHE (cache-prefix-for-path relpath) source
+                                           (when file-namespace
+                                             (cljs->transit-json (get-in @st [:cljs.analyzer/namespaces file-namespace]))))))
+                                     (cb {:value nil}))})))
               (fn [{:keys [ns value error] :as ret}]
                 (if expression?
                   (when-not error


CMR-4478 - Added test for same native id with different providers.

--- system-int-test/test/cmr/system_int_test/ingest/service_ingest_test.clj
+++ system-int-test/test/cmr/system_int_test/ingest/service_ingest_test.clj
@@ -119,15 +119,24 @@
 ;; Service with concept-id ingest and update scenarios.
 (deftest service-w-concept-id-ingest-test
   (let [supplied-concept-id "S1000-PROV1"
-        concept (service-util/make-service-concept
-                 {:concept-id supplied-concept-id
-                  :native-id "Atlantic-1"})]
+        metadata {:concept-id supplied-concept-id
+                  :native-id "Atlantic-1"}
+        concept (service-util/make-service-concept metadata)]
     (testing "ingest of a new service concept with concept-id present"
       (let [{:keys [concept-id revision-id]} (ingest/ingest-concept concept)]
         (is (mdb/concept-exists-in-mdb? concept-id revision-id))
         (is (= [supplied-concept-id 1] [concept-id revision-id]))))
-
-    (testing "Update the concept with the concept-id"
+    (testing "ingest of same native id and different providers is allowed"
+      (let [concept2 (service-util/make-service-concept
+                      (assoc metadata :provider-id "PROV2"))
+            {:keys [concept1-id revision1-id]} (ingest/ingest-concept concept)
+            {:keys [concept2-id revision2-id]} (ingest/ingest-concept concept2)]
+        (is (mdb/concept-exists-in-mdb? concept1-id revision1-id))
+        (is (= [supplied-concept-id 1] [concept1-id revision1-id]))
+        (is (mdb/concept-exists-in-mdb? concept2-id revision2-id))
+        (is (= [supplied-concept-id 1] [concept2-id revision2-id]))))
+
+    (testing "update the concept with the concept-id"
       (let [{:keys [concept-id revision-id]} (ingest/ingest-concept concept)]
         (is (= [supplied-concept-id 2] [concept-id revision-id]))))


🏗 Sort event keys in dev mode

🏗 Sort event keys in dev mode

--- src/territory_bro/event_store.clj
+++ src/territory_bro/event_store.clj
@@ -3,7 +3,8 @@
 ;; The license text is at http://www.apache.org/licenses/LICENSE-2.0

 (ns territory-bro.event-store
-  (:require [territory-bro.db :as db]
+  (:require [territory-bro.config :as config]
+            [territory-bro.db :as db]
             [territory-bro.events :as events])
   (:import (java.util UUID)))

@@ -17,13 +18,21 @@
     (keyword s)
     s))

+(defn- sorted-keys [event]
+  ;; sorted maps are slower to access than hash maps,
+  ;; so we use them in only dev mode for readability
+  (if (:dev config/env)
+    (events/sorted-keys event)
+    event))
+
 (defn- parse-db-row [row]
   (-> (:data row)
       *json->event*
       (assoc :event/stream-id (:stream_id row)
              :event/stream-revision (:stream_revision row)
              :event/global-revision (:global_revision row))
-      (update :event/type coerce-keyword)))
+      (update :event/type coerce-keyword)
+      (sorted-keys)))

 (defn read-stream
   ([conn stream-id]
@@ -55,5 +64,4 @@

 (comment
   (db/with-db [conn {}]
-    (->> (read-stream conn (UUID/fromString "61e51981-bbd3-4298-a7a6-46109e39dd52"))
-         (map events/sorted-keys))))
+    (read-stream conn (UUID/fromString "61e51981-bbd3-4298-a7a6-46109e39dd52"))))


a simple uuid generator added as the default value of uid

--- src/clj/hellhound/http/websocket.clj
+++ src/clj/hellhound/http/websocket.clj
@@ -155,8 +155,9 @@

 (defn get-or-create-user-id
   [context]
-  ;; A dummy uid generator
-  "somestting")
+  ;; TODO: check the cookies for the presence of uid
+  ;; otherwise create a new one.
+  (str (java.util.UUID/randomUUID)))

 (defn interceptor-factory
   []


remove obsolete import in views ns

remove obsolete import in views ns

--- src/cljs/ws_ldn_2/day1/ui/state.cljs
+++ src/cljs/ws_ldn_2/day1/ui/state.cljs
@@ -4,8 +4,7 @@
    [cljs-log.core :refer [debug info warn]])
   (:require
    [reagent.core :as r]
-   [thi.ng.domus.io :as io]
-   [goog.Uri.QueryData :as qd]))
+   [thi.ng.domus.io :as io]))

 (defonce app-state (r/atom {}))


fix bug -- deref ws atom before trace

fix bug -- deref ws atom before trace

--- src/com/billpiel/sayid/workspace.clj
+++ src/com/billpiel/sayid/workspace.clj
@@ -96,11 +96,12 @@

 (defn enable-trace-fn!
   [ws fn-sym]
-  (when-let [traces (->> fn-sym
-                         (lookup-traces-by-fn @ws)
-                         (replace {:ns :fn}))]
-    (doseq [t traces]
-      (trace/trace* t fn-sym ws)))
+  (let [w @ws]
+    (when-let [traces (->> fn-sym
+                           (lookup-traces-by-fn w)
+                           (replace {:ns :fn}))]
+      (doseq [t traces]
+        (trace/trace* t fn-sym w))))
   true)

 (defn disable-all-traces!


s/debug/trace/

s/debug/trace/

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -74,7 +74,7 @@
                     & {:keys [max-total-depth truncate-children]
                        :or {max-total-depth max-total-depth
                             truncate-children true}}]
-  (log/debug (str "generate-all: spec:" (strip-refs spec)))
+  (log/trace (str "generate-all: spec:" (strip-refs spec)))

   (let [language-model (if (future? language-model) @language-model language-model)
         total-depth (if total-depth total-depth 0)]
@@ -91,14 +91,14 @@
                                 truncate-children max-total-depth]
   (mapfn
    (fn [bolt]
-     (log/debug (str "add-all-comps: adding comps to bolt: " (show-bolt bolt language-model)))
+     (log/trace (str "add-all-comps: adding comps to bolt: " (show-bolt bolt language-model)))
      (add-all-comps-with-paths [bolt] language-model total-depth
                                (find-comp-paths-in (bolt-depth bolt))
                                truncate-children max-total-depth))
    bolt-group))

 (defn log-bolt-groups [bolt-groups language-model]
-  (log/debug
+  (log/trace
    (str "bolt-groups:\n"
         (string/join "\n"
                      (map (fn [bolt-group]
@@ -116,9 +116,9 @@
                 bolt-groups)
         bolts (reduce concat bolt-groups)]
     (when (not (empty? bolt-groups))
-      (log/debug (str "bolt group count: " (count bolt-groups)))
-      (log/debug (str "total bolt count: " (count bolts)))
-      (log/debug (str "counts by group: [ "
+      (log/trace (str "bolt group count: " (count bolt-groups)))
+      (log/trace (str "total bolt count: " (count bolts)))
+      (log/trace (str "counts by group: [ "
                       (string/join ","
                                    (map (fn [group]
                                           (count group))
@@ -126,7 +126,7 @@
                       " ]"))
       (lazy-mapcat
        (fn [bolt]
-         (log/debug (str "add-all-comps: adding comps to bolt: " (show-bolt bolt language-model)))
+         (log/trace (str "add-all-comps: adding comps to bolt: " (show-bolt bolt language-model)))
          (add-all-comps-with-paths [bolt] language-model total-depth
                                    (find-comp-paths-in (bolt-depth bolt))
                                    truncate-children max-total-depth))
@@ -179,7 +179,7 @@
                               & {:keys [max-total-depth truncate-children]
                                  :or {max-total-depth max-total-depth
                                       truncate-children true}}]
-  (log/debug (str "add-complement-to-bolt: " (show-bolt bolt language-model)
+  (log/trace (str "add-complement-to-bolt: " (show-bolt bolt language-model)
                   "@[" (string/join " " path) "]" "^" total-depth))
   (let [index (:index language-model)
         lexicon (if (-> :generate :lexicon language-model)
@@ -257,7 +257,7 @@
                                 (lazy-cat filtered-lexical-complements phrasal-complements))
                           true
                           (do
-                            (log/debug (str "successfully generated some complements for bolt:"
+                            (log/trace (str "successfully generated some complements for bolt:"
                                             (show-bolt bolt language-model)
                                             " matching spec:"
                                             (spec-info spec)))
@@ -298,7 +298,7 @@
 there is only one child for each parent, and that single child is the
 head of its parent. generate (above) 'decorates' each returned lightning bolt
 of this function with complements."
-  (log/debug (str "lightning-bolts(depth=" depth
+  (log/trace (str "lightning-bolts(depth=" depth
                  "; total-depth=" total-depth
                  "; max-total-depth=" max-total-depth
                  "; spec info:" (spec-info spec) ")"))
@@ -311,11 +311,10 @@
         ;; total-depth, on the other hand, is the depth all the way to the top of the entire
         ;; expression, which might involve several parent lightning bolts.
         parents (shuffle (candidate-parents grammar spec))]
-    (log/debug (str "lightning-bolt: candidate-parents:" (string/join "," (map :rule parents))))
-    (log/debug (str "lightning-bolt:  for spec: " (strip-refs spec)))
+    (log/debug (str "lightning-bolt: candidate-parents:" (count parents) " for spec:" (strip-refs spec)))
     (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
           (mapfn (fn [parent]
-                   (log/debug (str "looking for lexical heads of parent: " (:rule parent)))
+                   (log/trace (str "looking for lexical heads of parent: " (:rule parent)))
                    (if (= false (get-in parent [:head :phrasal] false))
                      (let [candidate-lexemes (get-lex parent :head index)
                            filter-on-spec {:synsem {:cat (get-in parent [:head :cat] :top)
@@ -329,9 +328,9 @@
                                           candidate-lexemes)]
                        (filter #(not (nil? %))
                                (do (when (not (empty? subset))
-                                     (log/trace (str "adding lexical heads to parent:" (:rule parent)))
+                                     (log/debug (str "adding lexical heads to parent:" (:rule parent)))

-                                     (log/trace (str " with lexemes:" (string/join ";" (sort (map morph subset)))))
+                                     (log/debug (str " with lexemes:" (string/join ";" (sort (map morph subset)))))
                                      (log/trace (str " with spec:" (spec-info spec))))
                                    (if (not (empty? subset))
                                      (over/overh parent (shuffle subset))
@@ -341,13 +340,14 @@
           (if (and (< total-depth max-total-depth)
                    (= true (get-in spec [:head :phrasal] true)))
             (mapfn (fn [parent]
+                     (log/debug (str "looking for phrasal heads of parent: " (:rule parent)))
                      (over/overh parent
                                  (lightning-bolts language-model (get-in parent [:head])
                                                   (+ 1 depth) (+ 1 total-depth)
                                                   :max-total-depth max-total-depth)))
                    parents)
             (do
-              (log/debug (str "hit max-total-depth: " max-total-depth ": will not generate phrasal head children."))
+              (log/trace (str "hit max-total-depth: " max-total-depth ": will not generate phrasal head children."))
               nil))]
       (if (lexemes-before-phrases total-depth max-total-depth)
         (lazy-cat lexical phrasal)
@@ -358,7 +358,7 @@
   (log/trace (str "candidate-parents: spec: " (strip-refs spec)))
   (filter #(not (fail? %))
           (mapfn (fn [rule]
-                   (log/debug (str "candidate-parents: rule: " (:rule rule)))
+                   (log/trace (str "candidate-parents: rule: " (:rule rule)))
                    (if (and (not (fail? (unifyc (get-in rule [:synsem :cat] :top)
                                                 (get-in spec [:synsem :cat] :top))))
                             (not (fail? (unifyc (get-in rule [:synsem :infl] :top)
@@ -371,13 +371,14 @@
                            (unifyc spec rule)]
                        (if (fail? result)
                          (do
-                           (log/debug (str " rule: " (:rule rule) " failed (2)"))
+                           (log/trace (str " rule: " (:rule rule) " failed (2)"))
                            :fail)
                          (do
-                           (log/debug (str " rule: " (:rule rule) " did not fail."))
+                           (log/trace (str " rule: " (:rule rule) " did not fail."))
+                           (log/info (str "returning parent with synsem: " (strip-refs (get-in result [:synsem]))))
                            result)))
                      (do
-                       (log/debug (str " rule: " (:rule rule) " failed (1)"))
+                       (log/trace (str " rule: " (:rule rule) " failed (1)"))
                        :fail)))
                  rules)))


Fix external reader/writer brokenness

Fix external reader/writer brokenness

from previous checkin

Actually, looking at the actual diff, I don't think the previous version
was that much worse than what I had before. The trouble is that what I
had before was pretty broken in the same way.

--- src/com/frereth/common/async_zmq.clj
+++ src/com/frereth/common/async_zmq.clj
@@ -20,9 +20,11 @@
 ;;; Schema

 (s/defrecord EventPairInterface
-    [;; send messages to this to get them to 0mq. Supplied by caller
+    [;; send messages to this to get them to 0mq.
+     ;; Should be supplied by caller
      ;; (that's where the messages come from, so that's what's responsible
      ;; for opening/closing)
+     ;; But we'll override to create it if the caller doesn't provide
      in-chan  :- fr-sch/async-channel
      ;; faces outside world.
      ;; Caller provides, because binding/connecting is really not in scope here
@@ -56,30 +58,30 @@
       ;; I wasn't paying enough attention when
       ;; I started refacting.
       ;; This version is broken
-      external-reader (assoc
-                       :external-reader
-                       (fn [sock]
-                         ;; It's tempting to default
-                         ;; to :dont-wait
-                         ;; But we shouldn't ever
-                         ;; try reading this unless
-                         ;; a Poller just verified
-                         ;; that messages are waiting.
-                         ;; Note that we probably never want this
-                         ;; default behavior.
-                         ;; This really needs to demarshall
-                         ;; the message and analyze it before
-                         ;; tagging it with whatever info
-                         ;; really needs to be done.
-                         ;; Still, there might be some
-                         ;; apps where this is enough.
-                         (mq/raw-recv! sock :wait)))
-      external-writer (assoc
-                       :external-writer
-                       (fn [sock array-of-bytes]
-                         ;; Same comments re: over-simplicity
-                         ;; in the default reader apply here
-                         (mq/send! sock array-of-bytes)))))
+      (not external-reader) (assoc
+                             :external-reader
+                             (fn [sock]
+                               ;; It's tempting to default
+                               ;; to :dont-wait
+                               ;; But we shouldn't ever
+                               ;; try reading this unless
+                               ;; a Poller just verified
+                               ;; that messages are waiting.
+                               ;; Note that we probably never want this
+                               ;; default behavior.
+                               ;; This really needs to demarshall
+                               ;; the message and analyze it before
+                               ;; tagging it with whatever info
+                               ;; really needs to be done.
+                               ;; Still, there might be some
+                               ;; apps where this is enough.
+                               (mq/raw-recv! sock :wait)))
+      (not external-writer) (assoc
+                             :external-writer
+                             (fn [sock array-of-bytes]
+                               ;; Same comments re: over-simplicity
+                               ;; in the default reader apply here
+                               (mq/send! sock array-of-bytes)))))
   (stop
    [this]
     (when in-chan


whitespace

whitespace

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -212,8 +212,9 @@
               phrasal ;; 2. generate list of all phrases where the head child of each parent is itself a phrase.
               (if (< depth max-total-depth)
                 (mapcat (fn [parent]
-                          (over/overh parent (lightning-bolt grammar lexicon (get-in parent [:head])
-                                                             (+ 1 depth) index morph (+ 1 total-depth))))
+                          (over/overh parent
+                                      (lightning-bolt grammar lexicon (get-in parent [:head])
+                                                      (+ 1 depth) index morph (+ 1 total-depth))))
                         parents))]
           (if (lexemes-before-phrases total-depth)
             (concat lexical phrasal)


cleanup

cleanup

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -31,7 +31,6 @@
 (declare lazy-shuffle)
 (declare lexemes-before-phrases)
 (declare lightning-bolts)
-(declare log-bolt-groups)
 (declare generate-all)
 (declare path-to-map)
 (declare spec-info)
@@ -180,8 +179,7 @@
          (add-all-comps-with-paths [bolt] language-model total-depth
                                    (find-comp-paths-in (bolt-depth bolt))
                                    truncate-children max-total-depth))
-       (do (log-bolt-groups bolt-groups language-model)
-           (reduce concat bolt-groups))))))
+       bolts))))

 ;; TODO: make this non-recursive by using mapcat.
 (defn add-all-comps-with-paths [bolts language-model total-depth comp-paths truncate-children max-total-depth]
@@ -415,14 +413,3 @@
       {:subcat/:1/:cat subcat1
        :subcat/:1/:agr (get-in spec [:synsem :subcat :1 :agr])}))))

-(defn log-bolt-groups [bolt-groups language-model]
-  (log/trace
-   (str "bolt-groups:\n"
-        (string/join "\n"
-                     (map (fn [bolt-group]
-                            (str "bolt-group:\n"
-                                 (string/join "\n"
-                                              (map (fn [bolt]
-                                                     (str " " (show-bolt bolt language-model)))
-                                                   bolt-group))))
-                          bolt-groups)))))


more simplification

more simplification

--- src/babel/generate.cljc
+++ src/babel/generate.cljc
@@ -1,7 +1,7 @@
 (ns babel.generate
   (:refer-clojure :exclude [get-in deref resolve find parents])
   (:require
-   [babel.cache :refer [check-index get-head-phrases-of get-lex]]
+   [babel.cache :refer [get-lex]]
    [babel.over :as over]
    [babel.stringutils :refer [show-as-tree]]
    #?(:clj [clojure.tools.logging :as log])
@@ -16,7 +16,7 @@
                                         )]))

 ;; during generation, will not decend deeper than this when creating a tree:
-(def ^:const max-total-depth 2)
+(def ^:const max-total-depth 3)

 ;; use map or pmap.
 (def ^:const mapfn map)
@@ -187,7 +187,7 @@
         (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
               (mapcat (fn [parent]
                         (if (= false (get-in parent [:head :phrasal] false))
-                          (let [candidate-lexemes (filter #(not (nil? %)) (get-lex parent :head index spec))]
+                          (let [candidate-lexemes (filter #(not (nil? %)) (lazy-seq (get-lex parent :head index spec)))]
                             (filter #(not (nil? %))
                                     (over/overh parent (mapfn copy candidate-lexemes))))))
                       parents)
@@ -236,15 +236,15 @@
                     (get-in bolt (concat path [:phrasal]))))
           (let [cached (if cache
                          (get-lex immediate-parent :comp cache spec))]
-            (if cached cached (lazy-seq (flatten (vals lexicon))))))
+            (if cached cached
+                (flatten (vals lexicon)))))

         complement-pre-check (fn [child parent path-to-child]
-                               (let [child-in-bolt (get-in bolt path-to-child)
-                                     result (not (fail?
-                                                  (unifyc (get-in child [:synsem] :top)
-                                                          (get-in child-in-bolt [:synsem] :top))))]
-                                 (log/trace (str "add-complement: checking child: " (morph child) "success?:" result))
-                                 result))
+                               (let [child-in-bolt (get-in bolt path-to-child)]
+                                 (not (fail?
+                                       (unifyc (get-in child [:synsem] :top)
+                                               (get-in child-in-bolt [:synsem] :top))))))
+
         filtered-lexical-complements (filter (fn [lexeme]
                                                (complement-pre-check lexeme bolt path))
                                              complement-candidate-lexemes)]


fix typo

fix typo

--- src/babel/italiano.cljc
+++ src/babel/italiano.cljc
@@ -57,8 +57,8 @@
              result)))))

 (defn an-example []
-  (let [med (babel.italiano.grammar/medium)
-        med-reload (babel.italiano.grammar/medium-reloaded)]
+  (let [med (babel.italiano.grammar/model)
+        med-reload (babel.italiano.grammar/model-reloaded)]
     (do
       (take 5
             (repeatedly