Freshen.

Freshen.

--- project.clj
+++ project.clj
@@ -13,7 +13,7 @@
                              :sign-releases false}}
   :dependencies [[org.clojure/clojure "1.7.0"]
                  ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
-                 [org.onyxplatform/onyx "0.8.0-SNAPSHOT"]]
+                 [org.onyxplatform/onyx "0.8.0-20151104_181323-ga2b00f2"]]
   :profiles {:dev {:dependencies [[midje "1.7.0"]
                                   [com.datomic/datomic-free "0.9.5153"]]
                    :plugins [[lein-midje "3.1.3"]


Target Java API for Java 1.6 for issue #146

--- project.clj
+++ project.clj
@@ -20,6 +20,7 @@
   :source-paths ["src/main/clojure"]
   :test-paths ["src/test/clojure" "src/test/common"]
   :java-source-paths ["src/main/java"]
+  :javac-options ["-target" "1.6" "-source" "1.6"]
   :hooks [leiningen.cljsbuild]
   :cljsbuild {:builds [;; Simple mode compilation for tests.
                        {:source-paths ["src/test/clojurescript" "src/test/common"]


bumped up project version

bumped up project version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject reagent/lein-template "0.3.3"
+(defproject reagent/lein-template "0.3.4"
   :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"


fixed versions of deps

fixed versions of deps

--- project.clj
+++ project.clj
@@ -18,8 +18,8 @@

   :resource-paths ["src" "resources"] ; maven deploy to internal artifactory needs src here

-  :plugins [[lein-cljsbuild "1.1.3"]
-            [lein-doo "0.1.6"]]
+  :plugins [[lein-cljsbuild "1.1.4"]
+            [lein-doo "0.1.7"]]

   ;:hooks [leiningen.cljsbuild]


0.8.7-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject expound "0.8.6"
+(defproject expound "0.8.7-SNAPSHOT"
   :description "Human-optimized error messages for clojure.spec"
   :url "https://github.com/bhb/expound"
   :license {:name "Eclipse Public License"


(maint) Merge branch '5.3.x' into 'master'

--- project.clj
+++ project.clj
@@ -211,7 +211,7 @@
                                                [puppetlabs/puppetserver ~ps-version :exclusions [puppetlabs/jruby-deps]]
                                                [puppetlabs/trapperkeeper-webserver-jetty9 nil]
                                                [org.clojure/tools.nrepl nil]]
-                      :plugins [[puppetlabs/lein-ezbake "1.1.13"]]
+                      :plugins [[puppetlabs/lein-ezbake "1.8.1"]]
                       :name "puppetserver"}
              :uberjar {:aot [puppetlabs.trapperkeeper.main]
                        :dependencies [[puppetlabs/trapperkeeper-webserver-jetty9 nil]]}


Set development version to 0.1.5-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject io.aviso/rook "0.1.4"
+(defproject io.aviso/rook "0.1.5-SNAPSHOT"
   :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
   :url "https://github.com/AvisoNovate/rook"
   :license {:name "Apache Sofware Licencse 2.0"


Prepare for next development iteration (0.1.3-SNAPSHOT)

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject cljam "0.1.2"
+(defproject cljam "0.1.3-SNAPSHOT"
   :description "A DNA Sequence Alignment/Map (SAM) library for Clojure"
   :url "https://chrovis.github.io/cljam"
   :license {:name "Apache License, Version 2.0"


cljs sourcepaths into cljsbuild config

cljs sourcepaths into cljsbuild config

--- project.clj
+++ project.clj
@@ -19,14 +19,16 @@
   :plugins [[lein-cljsbuild "1.0.4"]]
   :hooks [leiningen.cljsbuild]
   :main clojurelive-web.web
-  :source-paths ["src/clj" "src/cljs"]
+  :source-paths ["src/clj"]
   :uberjar-name "clojurelive-web-standalone.jar"
   :profiles {:uberjar {:aot :all}}
   :clean-targets ^{:protect false} [:target-path :compile-path "resources/public/js"]
-  :cljsbuild {:builds {:dev {:compiler {:output-to     "resources/public/js/main.js"
+  :cljsbuild {:builds {:dev {:source-paths ["src/cljs"]
+                             :compiler {:output-to "resources/public/js/main.js"
                                         ;; :output-dir "resources/public/js/build-output-dev"
                                         ;; :source-map "resources/public/js/main.js.map"
                                         :optimizations :whitespace}}
-                       :minify {:compiler {:output-to "resources/public/js/main.js"
+                       :minify {:source-paths ["src/cljs"]
+                                :compiler {:output-to "resources/public/js/main.js"
                                            :optimizations :advanced}
                                 :jar true}}})


Add release tasks

Add release tasks

--- project.clj
+++ project.clj
@@ -28,6 +28,15 @@
   :deploy-repositories [["releases" :clojars {:sign-releases false}]
                         ["snapshots" :clojars {:sign-releases false}]]

+  :release-tasks [["vcs" "assert-committed"]
+                  ["change" "version" "leiningen.release/bump-version" "release"]
+                  ["vcs" "commit"]
+                  ["vcs" "tag" "v" "--no-sign"]
+                  ["deploy"]
+                  ["change" "version" "leiningen.release/bump-version"]
+                  ["vcs" "commit"]
+                  ["vcs" "push"]]
+
   :npm {:dependencies [[karma                 "1.0.0"]
                        [karma-cljs-test       "0.1.0"]
                        [karma-chrome-launcher "0.2.0"]


Bump version again

Bump version again

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject puppetlabs/http-client "0.1.1-SNAPSHOT"
+(defproject puppetlabs/http-client "0.1.2-SNAPSHOT"
   :description "HTTP client wrapper"
   :license {:name "Apache License, Version 2.0"
             :url "http://www.apache.org/licenses/LICENSE-2.0.html"}


bump dep

bump dep

--- project.clj
+++ project.clj
@@ -4,7 +4,7 @@

   :dependencies [[org.clojure/clojure "1.6.0"]
                  [org.clojure/clojurescript "0.0-2268"]
-                 [com.cognitect/transit-js "0.8.566"]]
+                 [com.cognitect/transit-js "0.8.567"]]

   :plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]
             [codox "0.8.9"]]


bumped to snapshot

bumped to snapshot

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject etaoin "0.1.6"
+(defproject etaoin "0.1.6-SNAPSHOT"
   :description "Pure Clojure Webdriver protocol implementation."
   :url "https://github.com/igrishaev/etaoin"
   :license {:name "Eclipse Public License"


Add midje for testing

Add midje for testing

--- project.clj
+++ project.clj
@@ -3,4 +3,6 @@
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[org.clojure/clojure "1.6.0"]])
+  :dependencies [[org.clojure/clojure "1.6.0"]]
+  :profiles {:dev {:dependencies [[midje "1.6.3"]]
+                   :plugins [[lein-midje "3.1.3"]]}})


Release 0.2.1

Release 0.2.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject com.vitalreactor/derive "0.2.1-SNAPSHOT"
+(defproject com.vitalreactor/derive "0.2.1"
   :description "Clojurescript library to support efficient computation of up to date values derived from a mutable data source.  Designed to integrate with functional UI frameworks like Om and with data stores like Datascript and NativeStore"
   :url "http://github.com/vitalreactor/derive"
   :license {:name "MIT License"


Bump version

Bump version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clj-similar "0.1.1"
+(defproject clj-similar "0.1.2"
   :description "Fast similar set lookup using MinHash and K-d trees"
   :url "https://github.com/vortext/clj-similar"
   :license {:name "Eclipse Public License"


lein-release plugin: bumped version from 0.7.3 to 0.7.4-SNAPSHOT for next development cycle

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

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


Version bump in develop

Version bump in develop

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject haunting-refrain "0.1.0"
+(defproject haunting-refrain "0.2.0-SNAPSHOT"
   :pedantic? :warn
   :dependencies [[org.clojure/clojure "1.9.0-alpha14"]
                  [org.clojure/clojurescript "1.9.293"]


Removing urly dependency from neocons, updating urly

The official urly release does not have an updated Guava, and the
official neocons depends on it, so I've pushed a personal build of the
latest neocons repository and I'm temporarily referencing a public
push of urly that has an updated guava reference.

--- project.clj
+++ project.clj
@@ -20,8 +20,8 @@
                            [bouncer "0.3.2"]
                            [prone "0.8.1"]
                            [enlive "1.1.5"]
-                           [clojurewerkz/neocons "3.1.0-beta2"]
-                           [clojurewerkz/urly "2.0.0-alpha5"]
+                           [org.clojars.ricardojmendez/neocons "3.1.0-beta3-SNAPSHOT"]
+                           [com.curiosity/urly "2.0.0-alpha6"]
                            [clojure.joda-time "0.4.0"]
                            [http-kit "2.1.19"]
                            [reagent-forms "0.4.6"]


Version 127-SNAPSHOT

Version 127-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "126"
+(defproject clojars-web "127-SNAPSHOT"
   :min-lein-version "2.0.0"
   :dependencies [[org.clojure/clojure "1.10.1"]
                  [org.clojure/core.memoize "0.8.2"]


adding the environ dependency

adding the environ dependency

--- project.clj
+++ project.clj
@@ -3,4 +3,6 @@
   :url "https://bitfondue.com"
   :license {:name "MIT License"
             :url "http://opensource.org/licenses/MIT"}
-  :dependencies [[org.clojure/clojure "1.6.0"]])
+  :dependencies [[org.clojure/clojure "1.6.0"]
+                 [environ "1.0.0"]]
+  :plugins [[lein-environ "1.0.0"]])


version 0.4.3

version 0.4.3

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojure-protobuf "0.4.2"
+(defproject clojure-protobuf "0.4.3"
   :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers."
   :dependencies [[clojure "1.2.0"]
                  [ordered-set "0.2.2"]]


bump dep

bump dep

--- project.clj
+++ project.clj
@@ -4,7 +4,7 @@

   :dependencies [[org.clojure/clojure "1.6.0"]
                  [org.clojure/clojurescript "0.0-2268"]
-                 [com.cognitect/transit-js "0.8.554"]]
+                 [com.cognitect/transit-js "0.8.560"]]

   :plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]
             [codox "0.8.9"]]


Update project version -> 0.1.1

Update project version -> 0.1.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clj-ravendb "0.1.0"
+(defproject clj-ravendb "0.1.1"
   :description "A clojure library for consuming a RavenDB rest api."
   :url "https://bitbucket.org/markwoodhall/clj-ravendb"
   :license {:name "Eclipse Public License"


remove swank in favor of Clojure jack-in

--- project.clj
+++ project.clj
@@ -19,7 +19,6 @@
                  [commons-lang "2.6"]
                  [org.apache.commons/commons-email "1.2"]]
   :dev-dependencies [[lein-ring "0.4.5"]
-                     [swank-clojure "1.3.3"]
                      [midje "1.1.1"]]
   :main foreclojure.core
   :ring {:handler foreclojure.core/app


Release version 0.12.0.0-rc1.

Release version 0.12.0.0-rc1.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject onyx-app/lein-template "0.12.0.0-SNAPSHOT"
+(defproject onyx-app/lein-template "0.12.0.0-rc1"
   :description "Onyx Leiningen application template"
   :url "https://github.com/onyx-platform/onyx-template"
   :license {:name "MIT License"


point native jars to org.clojars.processing-core clojars

--- project.clj
+++ project.clj
@@ -2,6 +2,6 @@
   :description "A wrapper for Processing in Clojure."
   :dependencies [[org.clojure/clojure "1.3.0"]
                  [org.clojars.processing-core/org.processing.core "1.5.1"]
-                 [processing-jogl "1.5.1"]
-                 [processing-opengl "1.5.1"]
-                 [processing-gluegen-rt "1.5.1"]])
+                 [org.clojars.processing-core/org.processing.gluegen-rt "1.5.1"]
+                 [org.clojars.processing-core/org.processing.jogl "1.5.1"]
+                 [org.clojars.processing-core/org.processing.opengl "1.5.1"]])


Update to 2.1.8

Update to 2.1.8

--- project.clj
+++ project.clj
@@ -4,7 +4,7 @@
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [org.immutant/immutant "2.1.7"]
+                 [org.immutant/immutant "2.1.8"]
                  [compojure "1.4.0"]
                  [ring/ring-devel "1.3.1"]
                  [org.clojure/core.memoize "0.5.6"]


(maint) Update clj-parent to 4.2.6

(maint) Update clj-parent to 4.2.6

This update includes changes to Jetty cipher suites, an update of
jackson-xml to fix some CVEs, and an update for tk-filesystem-watcher to
improve error handling.

This commit also adds tk-filesystem-watcher as an explicit dependency,
rather than relying on its coming in transitively through tk-jetty9.

--- project.clj
+++ project.clj
@@ -27,7 +27,7 @@

   :min-lein-version "2.9.1"

-  :parent-project {:coords [puppetlabs/clj-parent "4.2.4"]
+  :parent-project {:coords [puppetlabs/clj-parent "4.2.6"]
                    :inherit [:managed-dependencies]}

   :dependencies [[org.clojure/clojure]
@@ -60,6 +60,7 @@
                  [puppetlabs/trapperkeeper-metrics]
                  [puppetlabs/trapperkeeper-scheduler]
                  [puppetlabs/trapperkeeper-status]
+                 [puppetlabs/trapperkeeper-filesystem-watcher]
                  [puppetlabs/kitchensink]
                  [puppetlabs/ssl-utils]
                  [puppetlabs/ring-middleware]


Update clj-parent to 1.2.1

Update clj-parent to 1.2.1

Also remove our forward-pinning of tk-jetty, as clj-parent now comes with
version 2.0.1.

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
 (def pdb-version "5.0.0-SNAPSHOT")
 (def puppetserver-version "5.0.0-master-SNAPSHOT")
-(def clj-parent-version "0.8.0")
+(def clj-parent-version "1.2.1")

 (defn deploy-info
   "Generate deployment information from the URL supplied and the username and
@@ -54,7 +54,7 @@
                  [puppetlabs/stockpile "0.0.4"]
                  [puppetlabs/tools.namespace "0.2.4.1"]
                  [puppetlabs/trapperkeeper]
-                 [puppetlabs/trapperkeeper-webserver-jetty9 "2.0.0"]
+                 [puppetlabs/trapperkeeper-webserver-jetty9]
                  [puppetlabs/trapperkeeper-metrics :exclusions [ring/ring-defaults org.slf4j/slf4j-api]]
                  [puppetlabs/trapperkeeper-status]

@@ -138,7 +138,7 @@
                    :dependencies [[ring-mock]
                                   [puppetlabs/trapperkeeper :classifier "test"]
                                   [puppetlabs/kitchensink :classifier "test"]
-                                  [puppetlabs/trapperkeeper-webserver-jetty9 "2.0.0" :classifier "test"]
+                                  [puppetlabs/trapperkeeper-webserver-jetty9 :classifier "test"]
                                   [puppetlabs/puppetserver ~puppetserver-version]
                                   [puppetlabs/puppetserver ~puppetserver-version :classifier "test"]
                                   [org.flatland/ordered "1.5.3"]
@@ -172,7 +172,6 @@
                                                ;; ezbake (EZ-35); without it, bootstrap.cfg will not be included
                                                ;; in the final package.
                                                [puppetlabs/puppetdb ~pdb-version]
-                                               [puppetlabs/trapperkeeper-webserver-jetty9 "2.0.0"]
                                                [org.clojure/tools.nrepl nil]]
                       :name "puppetdb"
                       :plugins [[puppetlabs/lein-ezbake "1.4.0"]]}


release v0.0.3

release v0.0.3

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject com.billpiel/sayid "0.0.3-dev"
+(defproject com.billpiel/sayid "0.0.3"
   :description "Sayid is a library for debugging and profiling clojure code."
   :url "http://bpiel.github.io/sayid/"
   :license {:name "Apache License, Version 2.0"


Bump lib.

Bump lib.

--- project.clj
+++ project.clj
@@ -32,7 +32,7 @@
     ;; ***************** (JWT schema changes, more info here: *****************
     ;; ******* https://github.com/open-company/open-company-lib/pull/82) ******
     ;; ************************************************************************
-    [open-company/lib "0.17.34-alpha9" :exclusions [org.clojure/tools.logging]]
+    [open-company/lib "0.17.35-alpha" :exclusions [org.clojure/tools.logging]]
     ;; ************************************************************************
     ;; In addition to common functions, brings in the following common dependencies used by this project:
     ;; Component - Component Lifecycle https://github.com/stuartsierra/component


Added eval-in-leiningen to project.clj

Added eval-in-leiningen to project.clj

--- project.clj
+++ project.clj
@@ -3,4 +3,5 @@
   :url "https://github.com/weavejester/lein-ring"
   :dependencies [[org.clojure/clojure "1.2.1"]
                  [ring/ring-jetty-adapter "1.0.0"]
-                 [ring/ring-devel "1.0.0"]])
+                 [ring/ring-devel "1.0.0"]]
+  :eval-in-leiningen true)


(SERVER-518) Changed "puppet-server" to "puppetserver" in ezbake profile

This commit changes the "puppet-server" reference to "puppetserver", for
consistency with the change to the same reference in the project.clj in
a prior commit.

--- project.clj
+++ project.clj
@@ -83,7 +83,7 @@
                    ; SERVER-332, enable SSLv3 for unit tests that exercise SSLv3
                    :jvm-opts      ["-Djava.security.properties=./dev-resources/java.security"]}

-             :ezbake {:dependencies ^:replace [[puppetlabs/puppet-server ~ps-version]
+             :ezbake {:dependencies ^:replace [[puppetlabs/puppetserver ~ps-version]
                                                [puppetlabs/trapperkeeper-webserver-jetty9 ~tk-jetty-version]
                                                [org.clojure/tools.nrepl "0.2.3"]]
                       :plugins [[puppetlabs/lein-ezbake "0.2.6"]]


Release version 0.10.0.0-beta4.

Release version 0.10.0.0-beta4.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject onyx-cheat-sheet "0.10.0.0-beta3"
+(defproject onyx-cheat-sheet "0.10.0.0-beta4"
   :description "Cheat sheet for Onyx"
   :url "https://github.com/onyx-platform/onyx-cheat-sheet"
   :license {:name "Eclipse Public License"
@@ -16,7 +16,7 @@
                  [compojure "1.5.2"]
                  [enlive "1.1.6"]
                  ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
-                 [org.onyxplatform/onyx "0.10.0-beta3"]
+                 [org.onyxplatform/onyx "0.10.0-beta4"]
                  [prismatic/om-tools "0.4.0"]
                  [markdown-clj "0.9.94"]
                  [org.omcljs/om "0.9.0"]


v22.03.16

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject tupelo "22.03.09"
+(defproject tupelo "22.03.16"
   :description "Tupelo:  Clojure With A Spoonful of Honey"
   :url "https://github.com/cloojure/tupelo"
   :scm "https://github.com/cloojure/tupelo"


Update to Clojure 1.7.0

Update to Clojure 1.7.0

--- project.clj
+++ project.clj
@@ -6,7 +6,7 @@
   :min-lein-version "2.0.0"
   :source-paths ["src/clj" "target/generated/clj"]
   :test-paths ["test/clj"]
-  :dependencies [[org.clojure/clojure "1.7.0-RC1"]
+  :dependencies [[org.clojure/clojure "1.7.0"]
                  [ring "1.2.1"]
                  [compojure "1.1.6"]
                  [aleph "0.3.0-rc2"]


Next dev cycle.

Next dev cycle.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject de.active-group/active-clojure "0.35.0"
+(defproject de.active-group/active-clojure "0.36.0-SNAPSHOT"
   :description "Active Clojure: Various Clojure utilities in use at Active Group"
   :url "http://github.com/active-group/active-clojure"
   :license {:name "Eclipse Public License"


changed versions of lazytest

changed versions of lazytest

--- project.clj
+++ project.clj
@@ -11,7 +11,7 @@
                  [colorize "0.1.1"]]
   :dev-dependencies [[swank-clojure "1.2.1"]
                      [slamhound "1.1.1"]
-                     [org.clojars.ninjudd/lazytest "1.1.3-SNAPSHOT"]]
+                     [com.intelie/lazytest "1.0.0-SNAPSHOT"]]
   ;; automatically detects when your :dependencies key changes and runs
   ;; lein deps behind the scenes when necessary.
   :checksum-deps true)


specifying source map

specifying source map

--- project.clj
+++ project.clj
@@ -19,5 +19,7 @@

   :cljsbuild {:builds [{:id "om-test"
                         :source-paths ["src-cljs"]
-                        :compiler {:output-to "resources/public/om-test.js"
-                                   :optimizations :whitespace}}]})
+                        :compiler {:output-to "resources/public/js/om-test.js"
+                                   :output-dir "resources/public/js/"
+                                   :optimizations :whitespace
+                                   :source-map "resources/public/js/om-test.js.map"}}]})


release 1.8.5

release 1.8.5

--- project.clj
+++ project.clj
@@ -6,7 +6,7 @@
 ;; babel.http: workbook, compojure http routes, querying from GETs, updating from POSTs, PUTs and PATCHes. all the ring/* and servlet-api :dependencies go here.
 ;; babel.<2 letter language code> babel.es, babel.en, etc.
 ;;
-(defproject babel "1.8.5-SNAPSHOT"
+(defproject babel "1.8.5"
   :description "A library for generation and parsing of expressions from grammars and lexicons."
   :url "http://github.com/ekoontz/babel"
   :license {:name "Proprietary: all rights reserved. No distribution allowed without consent of owners."}


move deps to provided

move deps to provided

--- project.clj
+++ project.clj
@@ -6,8 +6,6 @@
             :distribution :repo}

   :dependencies [[org.clojure/clojure "1.5.1"]
-                 [org.clojure/clojurescript "0.0-2202"]
-                 [com.keminglabs/cljx "0.3.1"]
                  [om "0.6.4"]
                  [prismatic/plumbing "0.3.2"]
                  [prismatic/schema "0.2.4"]]
@@ -15,8 +13,10 @@
   :plugins [[com.keminglabs/cljx "0.3.1"]
             [lein-cljsbuild "1.0.3"]
             [com.cemerick/clojurescript.test "0.3.0"]]
-
-  :profiles {:dev {:dependencies [[prismatic/dommy "0.1.2"]]
+  :profiles {:provided
+             {:dependencies [[org.clojure/clojurescript "0.0-2202"]
+                             [com.keminglabs/cljx "0.3.1"]]}
+             :dev {:dependencies [[prismatic/dommy "0.1.2"]]
                    :cljsbuild
                    {:builds
                     [{:id "example/sliders"


release 0.9.18

release 0.9.18

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sync "0.9.18-SNAPSHOT"
+(defproject sync "0.9.18"
   :description "sync is a Leiningen plugin to sync same code base between different clojure projects"
   :url "https://github.com/otto-de/leinsync"
   :license {:name "Eclipse Public License"


Version 0.2.0

Version 0.2.0

--- project.clj
+++ project.clj
@@ -8,6 +8,10 @@
                 [com.palletops/pallet "0.8.0-RC.11" :classifier "tests"]
                 [com.palletops/stevedore "0.8.0-beta.7"]
                 [org.domaindrivenarchitecture.org/dda-config-crate "0.2.0"]]
+ :repositories [["snapshots" :clojars]
+                ["releases" :clojars]]
+ :deploy-repositories [["snapshots" :clojars]
+                       ["releases" :clojars]]
  :profiles {:dev
             {:dependencies
              [[com.palletops/pallet "0.8.0-RC.11" :classifier "tests"]


클로저스크립트 의존성 추가

클로저스크립트 의존성 추가

--- project.clj
+++ project.clj
@@ -4,5 +4,7 @@
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [instaparse "1.4.1"]]
+                 [instaparse "1.4.1"]
+                 [org.clojure/clojurescript "1.8.40"]
+                 [com.lucasbradstreet/instaparse-cljs "1.4.1.1"]]
   :test-paths ["test" "src"])


lein-release plugin: preparing 0.6 release

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


I guess we'll punt on Maven Central.

I guess we'll punt on Maven Central.

--- project.clj
+++ project.clj
@@ -9,12 +9,7 @@
                  [org.clojure/data.json "0.2.6"]]
   :main frmr.dstt
   :aot [frmr.dstt]
-  :deploy-repositories [["releases" {:url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
-                                     :creds :gpg}
-                         "snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots/"
-                                      :creds :gpg}]]

-  ; Required by Maven Central for publishing.
   :scm {:url "git@github.com:farmdawgnation/dstt.git"}
   :pom-addition [:developers [:developer
                               [:name "Matt Farmer"]


bumped version number

bumped version number

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject navis/untangled-client "0.8.1"
+(defproject navis/untangled-client "0.8.2-SNAPSHOT"
   :description "Client-side code for Untangled Webapps"
   :url ""
   :license {:name "MIT"


RS+CM #61 - Remove guidance-buttons 'hide' from draft guidance box

--- src/objective8/templates/draft.clj
+++ src/objective8/templates/draft.clj
@@ -131,6 +131,7 @@
                       [:.clj-masthead-signed-out] (html/substitute (f/masthead context))
                       [:.clj-status-bar] (html/substitute (f/status-flash-bar context))

+                      [:.clj-guidance-buttons] nil
                       [:.clj-guidance-heading] (html/content (translations :draft-guidance/heading))
                       [:.clj-guidance-text-line-1] (html/content (translations :draft-guidance/text-line-1))
                       [:.clj-guidance-text-line-2] (html/content (translations :draft-guidance/text-line-2))


Cleaning up.

Cleaning up.

* fixed partial line from unfinished idea
* changed demo step-player to use the step-pad

--- examples/gui.clj
+++ examples/gui.clj
@@ -80,7 +80,6 @@
         env   (env-gen (perc attack release) :action FREE)
         f-env (+ freq (* 3 freq (env-gen (perc 0.012 (- release 0.1)))))
         bfreq (/ freq 2)
-        mod-seq (demand (
         sig   (apply +
                      (concat (* 0.7 (sin-osc [bfreq (* 0.99 bfreq)]))
                              (lpf (saw [freq (* freq 1.01)]) f-env)))
@@ -92,13 +91,13 @@
   (let [note (duty (dseq [0.2 0.1] INF)
                    0
                    (dseq (map #(+ 60 %) (:steps @(:state pstep)))))
-        src (saw (midicps note))]
+        src (sin-osc (midicps note))]
     (* [0.2 0.2] src)))

 ; or access the sequence steps in a player function
 (defn step-player [b]
   (at (m b)
-      (bar (+ 60 (nth (:steps @(:state pstep)) (mod b 16)))))
+      (step-pad (+ 60 (nth (:steps @(:state pstep)) (mod b 16)))))
   (apply-at (m (inc b)) #'step-player [(inc b)]))

 (step-player (m))


New faster fetcher 2

New faster fetcher 2

--- src/org/spootnik/cyanite/store.clj
+++ src/org/spootnik/cyanite/store.clj
@@ -108,9 +108,21 @@
       (throw (ex-info "Too long!" {})))
     result))

+(defn do-series
+  [points path data]
+  (if data
+    (let [time-map (reduce (fn [acc el]
+                             (let [time (:time el)
+                                   metric (:metric el)]
+                               (assoc acc time metric)))
+                           {} data)
+          time-series (map #(get time-map % nil) points)]
+      time-series)
+    {}))
+
 (defn par-fetch
   "Fetch data in parallel fashion."
-  [session fetch! paths tenant rollup period from to]
+  [session fetch! paths tenant rollup period from to points]
   (let [futures
         (doall (map #(future
                        (debug "fetching path from store: " % tenant
@@ -122,24 +134,10 @@
                                                   from to]
                                          :fetch-size Integer/MAX_VALUE})
                                        (map (partial detect-aggregate %))
-                                       (seq))]
-                         {:path % :data data}))
+                                       (do-series points %))]
+                         {% data}))
                     paths))]
     (map deref-limiter futures)))
-
-(defn do-series
-  [points path-data]
-  (let [path (:path path-data)
-        data (:data path-data)]
-    (if data
-      (let [time-map (reduce (fn [acc el]
-                               (let [time (:time el)
-                                     metric (:metric el)]
-                                 (assoc acc time metric)))
-                             {} data)
-            time-series (map #(get time-map % nil) points)]
-        {path time-series})
-      {})))

 (defn cassandra-metric-store
   "Connect to cassandra and start a path fetching thread.
@@ -190,19 +188,18 @@
          {:values [ttl data tenant rollup period path time]}))
       (fetch [this agg paths tenant rollup period from to]
         (debug "fetching paths from store: " paths tenant rollup period from to)
-        (if-let [data (and (seq paths)
-                           (par-fetch session fetch! paths tenant rollup
-                                      period from to))]
-          (let [min-point  (align-time from rollup)
-                max-point  (align-time (apply min [to (now)]) rollup)
-                points (range min-point (inc max-point) rollup)
-                paths-series (pmap (partial do-series points) data)
-                series (reduce merge paths-series)]
-            {:from min-point
-             :to   max-point
+        (let [min-point  (align-time from rollup)
+              max-point  (align-time (apply min [to (now)]) rollup)
+              points (range min-point (inc max-point) rollup)]
+          (if-let [data (and (seq paths)
+                             (par-fetch session fetch! paths tenant rollup
+                                        period from to points))]
+            (let [series (reduce merge data)]
+              {:from min-point
+               :to   max-point
+               :step rollup
+               :series series})
+            {:from from
+             :to to
              :step rollup
-             :series series})
-          {:from from
-           :to to
-           :step rollup
-           :series {}})))))
+             :series {}}))))))


Refacto - hide the spinner function.

Refacto - hide the spinner function.

--- src/app/cljs/one/sample/view.cljs
+++ src/app/cljs/one/sample/view.cljs
@@ -147,6 +147,11 @@
    (:spinner snippets)
    (:prev snippets)))

+(defn- hide-spinner "Hide the spinner block"
+  []
+  ;; hide the spinner
+  (set-styles! (by-id "spinner") {:display "none"}))
+
 (defmethod render-fnx :ns-navigating [{:keys [all-ns ns-nav]}]
   (let [lns-fns (ls-curr-ns all-ns ns-nav)
         lns (first lns-fns)
@@ -155,8 +160,7 @@
         fnd (by-id "fn-display")
         prev (by-id "prev")]

-    ;; hide the spinner
-    (set-styles! (by-id "spinner") {:display "none"})
+    (hide-spinner)

     ;; Deal with ..
     (if ns-nav


Update docstring

Update docstring

--- src/irobot/parse.clj
+++ src/irobot/parse.clj
@@ -72,7 +72,7 @@

 (defn find-sitemaps-in-tree
-  "Find the disallow-rules in a robots.txt record"
+  "Find the sitemap rules in a robots.txt record"
   [t]
   (find-nodes-in-tree t :sitemap))


simplify

simplify


Minor fix on cljs impl.

Minor fix on cljs impl.

--- src/lentes/core.cljc
+++ src/lentes/core.cljc
@@ -294,7 +294,7 @@
            (add-watch src id main-watcher))
          self))

-     (-remove-watch [_ key]
+     (-remove-watch [self key]
        (set! (.-watchers self) (dissoc watchers key))
        (when (empty? watchers)
          (remove-watch src id)))))


Problem 0098.

Problem 0098.


Light edits on the inline Interceptor docs

--- src/re_frame/std_interceptors.cljc
+++ src/re_frame/std_interceptors.cljc
@@ -21,8 +21,17 @@

   Warning:  calling clojure.data/diff on large, complex data structures
   can be slow. So, you won't want this interceptor present in production
-  code. See the todomvc example to see how to exclude interceptors from
-  production code."
+  code. So condition it out like this:
+
+    (re-frame.core/reg-event
+       :evt-id
+       [(when ^boolean goog.DEBUG re-frame.core/debug)]  ;; <-- conditional
+       (fn [db v]
+         ...))
+
+  You'll also have to set goog.DEBUG to false in your production builds - look
+  in project.clj of the todomvc example in /examples.
+  "
   (->interceptor
     :id     :debug
     :before (fn debug-before
@@ -72,7 +81,7 @@

 ;; -- Interceptor Factories - PART 1 ---------------------------------------------------------------
 ;;
-;; These 3 factories wrap the 3 kinds of handlers.
+;; These 3 factories wrap the 3 kinds of event handlers.
 ;;

 (defn db-handler->interceptor
@@ -137,7 +146,7 @@

 (defn path
   "An interceptor factory which supplies a sub-path of `:db` to the handler.
-  It's action is somewhat analogous to `update-in`. It grafts the return
+  It's action is somewhat analogous to clojure's `update-in`. It grafts the return
   value from the handler back into db.

   Usage:
@@ -147,9 +156,8 @@
     (path [:some :path] [:to] :here)

   Notes:
-    1. cater for `path` appearing more than once in an interceptor chain.
-    2. `:effects` may not contain `:db` effect. Which means no change to
-       `:db` should be made.
+    1. `path` may appear more than once in an interceptor chain
+    2. if `:effects` contains no `:db` effect, can't graft a value back in.
   "
   [& args]
   (let [path (flatten args)
@@ -184,7 +192,7 @@
   position.  `f` is called with two arguments: `db` and `v`, and is expected to
   return a modified `db`.

-  Unlike the `after` inteceptor which is only about side effects, `enrich`
+  Unlike the `after` interceptor which is only about side effects, `enrich`
   expects `f` to process and alter the given `db` coeffect in some useful way,
   contributing to the derived data, flowing vibe.

@@ -192,11 +200,11 @@
   ------------

   Imagine that todomvc needed to do duplicate detection - if any two todos had
-  the same text, then highlight their background, and report them in a warning
-  down the bottom of the panel.
+  the same text, then highlight their background, and report them via a warning
+  at the bottom of the panel.

   Almost any user action (edit text, add new todo, remove a todo) requires a
-  complete reassesment of duplication errors and warnings. Eg: that edit
+  complete reassessment of duplication errors and warnings. Eg: that edit
   just made might have introduced a new duplicate, or removed one. Same with
   any todo removal. So we need to re-calculate warnings after any CRUD events
   associated with the todos list.
@@ -204,23 +212,25 @@
   Unless we are careful, we might end up coding subtly different checks
   for each kind of CRUD operation.  The duplicates check made after
   'delete todo' event might be subtly different to that done after an
-  eddting operation. Nice and efficient, but fiddly. A bug generator
+  editing operation. Nice and efficient, but fiddly. A bug generator
   approach.

-  So, instead, we create an `f` which recalculates warnings from scratch
+  So, instead, we create an `f` which recalculates ALL warnings from scratch
   every time there is ANY change. It will inspect all the todos, and
   reset ALL FLAGS every time (overwriting what was there previously)
   and fully recalculate the list of duplicates (displayed at the bottom?).

+  https://twitter.com/nathanmarz/status/879722740776939520
+
   By applying `f` in an `:enrich` interceptor, after every CRUD event,
   we keep the handlers simple and yet we ensure this important step
   (of getting warnings right) is not missed on any change.

-  We can test `f` easily - it is a pure fucntions - independently of
+  We can test `f` easily - it is a pure function - independently of
   any CRUD operation.

   This brings huge simplicity at the expense of some re-computation
-  each time. This may be a very satisfactory tradeoff in many cases."
+  each time. This may be a very satisfactory trade-off in many cases."
   [f]
   (->interceptor
     :id    :enrich
@@ -243,8 +253,8 @@
   (or the `coeffect` value of db if no db effect is returned) and the event.
    Its return value is ignored so `f` can only side-effect.

-  Example use:
-     - `f` runs schema validation (reporting any errors found)
+  Examples use can be seen in the /examples/todomvc:
+     - `f` runs schema validation (reporting any errors found).
      - `f` writes some aspect of db to localstorage."
   [f]
   (->interceptor
@@ -260,10 +270,11 @@

 (defn  on-changes
-  "Interceptor factory which acts a bit like `reaction`  (but it flows into `db`, rather than out)
-  It observes N paths in `db` and if any of them test not indentical? to their previous value
-  (as a result of a handler being run) then it runs `f` to compute a new value, which is
-  then assoced into the given `out-path` within `db`.
+  "Interceptor factory which acts a bit like `reaction`  (but it flows into
+  `db`, rather than out). It observes N paths within `db` and if any of them
+  test not identical? to their previous value  (as a result of a event handler
+  being run) then it runs `f` to compute a new value, which is then assoc-ed
+  into the given `out-path` within `db`.

   Usage:


Show latest news on the admin dashboard

Show latest news on the admin dashboard

--- src/servisne_info/routes/admin.clj
+++ src/servisne_info/routes/admin.clj
@@ -13,7 +13,7 @@
   (layout/render
     "dashboard.html"
     {:users (repo/find-all-users)
-     :news (repo/find-all-news)}))
+     :news (repo/find-latest-news)}))

 (defroutes admin-routes
   (GET "/admin" [] (restricted (dashboard))))


Change grammar fix back, monster names are now plural

--- src/demogorgon/nh.clj
+++ src/demogorgon/nh.clj
@@ -307,7 +307,7 @@
     :genocided_monster (format "%s genocided %s%s"
                                (:player data)
                                (if (= (:dungeon_wide data) "yes")
-                                 "every "
+                                 "all "
                                  "")
                                (:genocided_monster data))


Add some missing type predicates

Add some missing type predicates

--- src/detritus/pred.clj
+++ src/detritus/pred.clj
@@ -38,3 +38,18 @@
   ([pred error v]
      (if (pred v) v
          (assert false error))))
+;; Missing type predicates
+;;--------------------------------------------------------------------
+
+(defn seqable? [x]
+  (or (instance? clojure.lang.ISeq x)
+     (instance? clojure.lang.Seqable x)
+     (instance? Iterable x)
+     (instance? CharSequence x)
+     (instance? java.util.Map x)
+     (nil? x)
+     (.. x getClass isArray)))
+
+
+(defn atom? [x]
+  (instance? clojure.lang.Atom x))


Implement issue-specific search :monkey:

--- src/discuss/find.cljs
+++ src/discuss/find.cljs
@@ -25,18 +25,17 @@

 (defn find-statement
   "Find related statements to given keywords."
-  [keywords]
+  [keywords issue-id]
   (when-not (= keywords "")
-    (let [issue 1
-          mode 3
-          request (clojure.string/join "/" ["api/get/statements" issue mode keywords])]
+    (let [mode 3
+          request (clojure.string/join "/" ["api/get/statements" issue-id mode keywords])]
       (com/ajax-get request {} statement-handler))))

 (defn update-state-find-statement
   "Saves current state into object and sends search request to discussion system."
-  [key val owner]
+  [key val issue-id owner]
   (vlib/commit-component-state key val owner)
-  (find-statement (.. val -target -value)))
+  (find-statement (.. val -target -value) issue-id))

 (defn store-selected-issue
   "Store issue id from current selection into local state of the component. Preparation to find statements
@@ -69,12 +68,10 @@
     om/IInitState
     (init-state [_]
       {:search-value ""
-       :issue-id     -1})
+       :issue-id     1})
     om/IRenderState
     (render-state [_ {:keys [search-value issue-id]}]
       (dom/div nil
-               "Selected: "
-               issue-id
                (dom/div #js {:className "form-group"}
                         (dom/label nil "Select Issue")
                         (dom/select #js {:className "form-control"
@@ -83,17 +80,19 @@

                (dom/div #js {:className "input-group"}
                         (dom/input #js {:className   "form-control"
-                                        :onChange    #(update-state-find-statement :search-value % owner)
+                                        :onChange    #(update-state-find-statement :search-value % issue-id owner)
                                         :value       search-value
                                         :placeholder "Find Statement"})
                         (dom/span #js {:className "input-group-btn"}
                                   (dom/button #js {:className "btn btn-primary"
                                                    :type      "button"}
-                                              (vlib/fa-icon "fa-search fa-fw" #(find-statement search-value)))))))))
+                                              (vlib/fa-icon "fa-search fa-fw" #(find-statement search-value issue-id)))))))))

 (defn results-view []
   (reify om/IRender
     (render [_]
-      (dom/div nil
-               (apply dom/div nil
-                      (om/build-all item-view (get-search-results)))))))+      (let [results (get-search-results)]
+        (dom/div nil
+                 (dom/h6 nil (str "Received " (count results) " entries."))
+                 (apply dom/div nil
+                        (om/build-all item-view results)))))))


Submit answers, get num correct

Submit answers, get num correct

--- src/clj/quiz_site/routes/quiz.clj
+++ src/clj/quiz_site/routes/quiz.clj
@@ -55,22 +55,29 @@
 (defn create-quiz
   [& {:keys[params headers] :as args}]
   (log/debug "create-quiz")
-  (log/debug "params " params)
   (push-quiz params (:host headers))
   )

 (defn submit-answers
-  [& {:keys[quiz-id] :as args}]
+  [& {:keys[params] :as args}]
   (log/debug "submit-answers")
   (log/debug "args:   " args)
-  {:error "Implementation for this method not found."})
-
+  (let [quiz (do-get-quiz* (:quiz-id params))
+        qs   (:questions quiz)
+        qkeys (keys qs)
+        results (keywordize-keys params)
+        answers (:answers results)
+        cmpfn (fn [x] (if (= (:c (x qs)) (x answers)) true false))
+        ncorrect (count (filter cmpfn qkeys))
+        ]
+    {:correct ncorrect
+     :outof (:nQuestions quiz)}))
 (def quiz-routes
   (defroutes document-routes
     (context "/quiz" []
              (POST "/" {:keys [headers params] :as request} (wrap-status (mapply create-quiz request)))
              (context "/:quiz-id" [quiz-id]
                       (GET  "/" {params :params} (wrap-status (mapply get-quiz       params)))
-                      (POST "/" {params :params} (wrap-status (mapply submit-answers params)))))
+                      (POST "/" {:keys [headers params] :as request} (wrap-status (mapply submit-answers request)))))
     (context "/results/:results-id" [results-id]
              (GET "/" {params :params} (wrap-status (mapply get-quiz-results params))))))


correct bad invokation in accounts/create

--- src/clj_money/models/accounts.clj
+++ src/clj_money/models/accounts.clj
@@ -33,18 +33,25 @@
    (s/optional-key :parent-id) s/Int})

 (declare find-by-id)
-(defn- before-update-validation
+(defn- before-validation
   "Adjust account data for validation"
   [storage account]
   (cond-> account
+
+    ; If no entity is specified, try to look it up
     (nil? (:entity-id account))
-    (assoc :entity-id (:entity-id (find-by-id storage (Integer. (:id account)))))))
+    (assoc :entity-id (:entity-id (find-by-id storage
+                                              (Integer. (:id account)))))

-(defn- prepare-for-save
+    ; make sure type is a keyword
+    (string? (:type account))
+    (update-in [:type] keyword)))
+
+(defn- before-save
   "Adjusts account data for saving in the database"
   [storage account]
-  ; convert account type from keyword to string
-  (cond-> account ; TODO should coercion handle this?
+  (cond-> account
+    ; convert account type from keyword to string
     (:type account) (update-in [:type] name)))

 (defn- prepare-for-return
@@ -110,7 +117,7 @@
     (if (validation/has-error? validated)
       validated
       (->> validated
-           (partial prepare-for-save storage)
+           (before-save storage)
            (create-account storage)
            prepare-for-return))))

@@ -143,13 +150,18 @@
   [storage-spec account]
   (let [st (storage storage-spec)
         validated (->> account
-                       (before-update-validation st)
+                       (before-validation st)
                        (validate-account st))]
     (if (validation/has-error? validated)
       validated
       (do
-        (update-account st (prepare-for-save validated))
-        (prepare-for-return (find-by-id st (:id validated)))))))
+        (->> validated
+             (before-save st)
+             (update-account st))
+        (->> validated
+             :id
+             (find-by-id st)
+             prepare-for-return)))))

 (defn delete
   "Removes the account from the system"


fixed pop-up width

fixed pop-up width

--- src/cljs/cljs_repl_web/views.cljs
+++ src/cljs/cljs_repl_web/views.cljs
@@ -109,7 +109,7 @@
       :popover [popover-content-wrapper
                 :showing? (step-keyword tour)
                 :position position
-                :width    "250px"
+                :width    "200px"
                 :title    [:strong (get-in tour-steps [step-keyword :title])]
                 :body     [:div (get-in tour-steps [step-keyword :body])
                            [tour-buttons tour another-step close-fn]]


Fixed Alt+g Alt+s after loading

Fixed Alt+g Alt+s after loading

--- src/cljs/gorilla_repl/events.cljs
+++ src/cljs/gorilla_repl/events.cljs
@@ -227,13 +227,16 @@
                         (into {}))
           segment-order (->> segs
                              (map #(:id %))
-                             (into []))]
+                             (into []))
+          save (assoc (:save db) :filename filename)]
       (assoc db :worksheet
                 {:segments             segments
                  :segment-order        segment-order
                  :url                  filename
                  :queued-code-segments #{}
-                 :active-segment       nil}))))
+                 :active-segment       nil}
+                :save
+                save))))

 (reg-event-db


Feedback while waiting for opponent's mulligan choice

--- src/cljs/netrunner/gameboard.cljs
+++ src/cljs/netrunner/gameboard.cljs
@@ -218,11 +218,13 @@

              [:div.centralpane
               [:div.button-pane.panel.blue-shade
-               (when-not (:keep me)
+               (if-not (:keep me)
                  [:div
                   [:h4 "Keep hand?"]
                   [:button {:on-click #(send-command "keep")} "Keep hand"]
-                  [:button {:on-click #(send-command "mulligan")} "Mulligan"]])
+                  [:button {:on-click #(send-command "mulligan")} "Mulligan"]]
+                 (when-not (:keep opponent)
+                   [:h4 "Waiting for opponent's mulligan choice."]))

                (when (and (:keep me) (:keep opponent))
                  [:div


Fix clear method.

Fix clear method.

--- src/cljs/nonojure/puzzleview.cljs
+++ src/cljs/nonojure/puzzleview.cljs
@@ -219,7 +219,9 @@
   (doseq [class ["num-clicked" "filled" "crossed"]
           el (sel (str "." class))]
     (dommy/remove-class! el class))
-  (dommy/remove! (sel1 [:#puzzle :#solved])))
+  (when-let [solved-div (sel1 [:#puzzle :#solved])]
+   (dommy/remove! solved-div))
+  (dommy/remove-class! (sel1 :#puzzle-table) "solved"))

 (defn change-cell-style! [cell style]
   (case style


crash correction

crash correction

--- src/cljs/triboard/view/board.cljs
+++ src/cljs/triboard/view/board.cljs
@@ -42,6 +42,8 @@
     (for [[position cell] (model/to-iterable board)]
       ^{:key position}
       (if (= :empty cell)
-        [empty-cell position cb (if (suggestions position) :help :empty)]
+        [empty-cell position cb
+         (if (and suggestions (suggestions position))       ;; Avoids crash !
+           :help :empty)]
         [rect-cell position cell])
       )))


fix before value

fix before value

--- src/cljs/tumblrsearch/search.cljs
+++ src/cljs/tumblrsearch/search.cljs
@@ -42,7 +42,7 @@
               :before 0
               :current-search query
               :current-items []))
-    (search ajax-chan query before))
+    (search ajax-chan query 0))

 ;; Response Handler
 ;; -----------------------------------------------------------------------------


Fix trace resolve

Fix trace resolve

--- src/com/wsscode/pathom/trace.cljc
+++ src/com/wsscode/pathom/trace.cljc
@@ -215,4 +215,4 @@
    :com.wsscode.pathom.connect/register
    [{:com.wsscode.pathom.connect/sym     `trace
      :com.wsscode.pathom.connect/output  [:com.wsscode.pathom/trace]
-     :com.wsscode.pathom.connect/resolve (fn [env _] :com.wsscode.pathom.core/not-found)}]})
+     :com.wsscode.pathom.connect/resolve (fn [env _] {:com.wsscode.pathom/trace nil})}]})


make server app dynamic

make server app dynamic

--- src/meta/server.cljs
+++ src/meta/server.cljs
@@ -4,11 +4,11 @@

 (enable-console-print!)

-(def app (feathers/feathers))
+(def ^:dynamic *app* (feathers/feathers))

 (def public (str js/__dirname "/../../")) ;; could possibly be ./

-(-> app
+(-> *app*
     (feathers/configuration public)
     feathers/compress
     feathers/cors
@@ -22,11 +22,11 @@
     services/users)

 (defn api
-  ([path store hooks] (api app path store hooks))
-  ([app path store hooks] (feathers/api app path (store) hooks)))
+  ([path svc hooks] (api *app* path svc hooks))
+  ([app path svc hooks] (feathers/api app path (svc) hooks)))

 (defn listen
-  ([port] (feathers/listen app port))
+  ([port] (feathers/listen *app* port))
   ([app port] (listen app port)))

 (defn init! [fname]


Remove stray debugging statement

Remove stray debugging statement

--- src/time_tracker/invoices/core.clj
+++ src/time_tracker/invoices/core.clj
@@ -102,7 +102,6 @@
         to-date         (-> (util/epoch->clj-time end utc-offset)
                             (time/minus (time/days 1))
                             (util/to-epoch-seconds))]
-    (def *gt-output amount-due)
     (merge (select-keys invoice [:client :address :currency :utc-offset :notes])
            {:items items
             :subtotal subtotal-amount


snapshot

snapshot

--- src/naojure/core.clj
+++ src/naojure/core.clj
@@ -88,10 +88,10 @@
   (let [p (proxy robot)]
     (if (nil? p) (make-proxy robot proxy) p)))

-(defn make-variant
-  "Make instance of Aldebaran ALValue (Variant in java)"
-  [val]
-  (new com.aldebaran.proxy.Variant val))
+;; (defn make-variant
+;;   "Make instance of Aldebaran ALValue (Variant in java)"
+;;   [val]
+;;   (new com.aldebaran.proxy.Variant val))

 ; behaviour management
 (defn get-installed-behaviours
@@ -148,16 +148,16 @@
 ;; TODO need a way to unpack the Variant
 ;; currently get the following error when trying to extract values from the result
 ;; ClassNotFoundException com.aldebaran.proxy.Variant$typeV  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
-(defn get-memory-value
-  "Get named value from memory"
-  [robot key]
-  (.getData (get-proxy robot :memory) key))
-
-(defn get-memory-values
-  "Get values for list of named keys"
-  [robot keys]
-  (.getData (get-proxy robot :memory)
-            (make-variant (to-array keys))))
+;; (defn get-memory-value
+;;   "Get named value from memory"
+;;   [robot key]
+;;   (.getData (get-proxy robot :memory) key))
+
+;; (defn get-memory-values
+;;   "Get values for list of named keys"
+;;   [robot keys]
+;;   (.getData (get-proxy robot :memory)
+;;             (make-variant (to-array keys))))

 ; posture
 (defn go-to-posture


[CS] Don't try to insert nothing

[CS] Don't try to insert nothing

--- src/vip/data_processor/db/util.clj
+++ src/vip/data_processor/db/util.clj
@@ -98,7 +98,8 @@
                                             (or (existing-ids id)
                                                 (local-dupe-ids id)))
                                           chunk-values)]
-       (korma/insert sql-table (korma/values chunk-without-dupe-ids))
+       (when (seq chunk-without-dupe-ids)
+         (korma/insert sql-table (korma/values chunk-without-dupe-ids)))
        (reduce (fn [ctx dupe-id]
                  (assoc-in ctx [:fatal table dupe-id :duplicate-ids]
                            ["Duplicate id"]))


monsterids are back

monsterids are back

--- src/ontrail/user.clj
+++ src/ontrail/user.clj
@@ -12,7 +12,7 @@
         email (.toLowerCase (get user :email))
         gravatar-md5-hash (md5 email)]
     (if gravatar?
-      (str "http://www.gravatar.com/avatar/" gravatar-md5-hash "?d=identicon&r=x")
+      (str "http://www.gravatar.com/avatar/" gravatar-md5-hash "?d=monsterid&r=x")
       "/img/default-avatar.png")))

 (defn as-user [user]


Adding helpers to tree traverser

Adding helpers to tree traverser

--- src/dev/core.clj
+++ src/dev/core.clj
@@ -4,7 +4,7 @@
             [pacl.protocols :as p]
             [clojure.walk :as walk] :reload-all))

-(declare walk-tree)
+(declare walk-tree replace-last)

 (defmulti processtreepart
   (fn [el]
@@ -12,28 +12,40 @@
       (first el))))

-(defn tree-assembler [current-tree element]
-  (let [processed (processtreepart element)
-        tree (if (nil? processed) current-tree (conj current-tree processed))]
-    (fn [] (walk-tree element tree tree-assembler))
-    ))
+(defn tree-assembler
+  ([form]
+   (tree-assembler [] form))
+  ([tree form]
+   (let [processed (processtreepart form)
+         children (if (coll? form)
+                    (map (fn [el] (walk-tree el tree-assembler)) form)
+                    nil)]
+     (if (nil? processed)
+       (if (empty? children)
+         tree
+         (conj tree children))
+       (if (empty? children)
+         (conj tree processed)
+         (replace-last (conj tree processed) children))))))

-(defn walk-tree
-  ([top processor-fn]
-   (walk-tree top [] processor-fn))
-  ([top tree processor-fn]
-   (let [ only-colls (filter coll? top)  ]
-     (if (empty? only-colls)
-       tree
-       (map (fn [element]
-              (trampoline (fn [el] (processor-fn tree el)) element))
-            only-colls)))))
+(defn walk-tree [top processor-fn]
+  (let [children (map (fn [element]
+                        (let [res (processor-fn element)]
+                          res))
+                      top)
+        non-empty-ch (filter (complement nil?)  children)]

-(defmethod processtreepart :class_declaration_statement [el]  (nth el 2))
+    non-empty-ch))
+
+(defn replace-last [coll item]
+  (let [coll-last (last coll)]
+    (conj (pop coll) [coll-last [item]])))
+
+(defmethod processtreepart :class_declaration_statement [el] :class_declaration_statement)
 (defmethod processtreepart :class_statement [el]  :statement)
 (defmethod processtreepart :method_modifiers [el]  :method_modifiers)
 (defmethod processtreepart :property_list [el]  :property_list)
 (defmethod processtreepart :variable_modifiers [el]  :variable_modifiers)
 (defmethod processtreepart :property [el]  :property)
-(defmethod processtreepart :default [el])
+(defmethod processtreepart :default [el] nil)


fixes issue #114 - Paredit deleted some lines when tab is pressed

--- src/paredit/core.clj
+++ src/paredit/core.clj
@@ -525,7 +525,8 @@
                  ;;;   "\n      |(display (+ n 1)"
                  ;;;   "\n        port))\n        bar"
                  ;;   )
-                }]
+                ")|s" ")|s"
+                ")\n|s" ")\n|s"}]
       ["C-j"     :paredit-newline
                 {"(ab|cd)" "(ab\n  |cd)"
                  "(ab|     cd)" "(ab\n  |cd)"
@@ -1125,32 +1126,34 @@
 (defmethod paredit
   :paredit-indent-line
   [cmd {:keys [#^String text offset length] :as t}]
-  (if-let [rloc (-?> (parse text (.length text)) (parsed-root-loc true))]
-    (let [line-start (line-start text offset)
-          line-stop (line-stop text offset)
-          loc (-> rloc (loc-for-offset line-start))]
-      (if (and (= (str \") (loc-tag loc)) (< (:offset (zip/node loc)) line-start))
-        t
-        (let [indent (indent-column rloc line-start)
-              cur-indent-col (or (some (fn [l]
-                                         (when (not= (str \space) (loc-tag l))
-                                           (- (start-offset l) line-start)))
-                                   (filter (fn [l] (<= line-start (start-offset l) line-stop))
-                                     (next-leaves loc)))
-                               (- line-stop line-start))
-              to-add (- indent cur-indent-col)]
-          (cond
-            (zero? to-add) t
-            :else (let [t (update-in t [:modifs] conj {:text (str2/repeat " " indent) :offset line-start :length cur-indent-col})
-                        t (update-in t [:text] str-replace line-start cur-indent-col (str2/repeat " " indent))]
-                    (cond
-                      (>= offset (+ line-start cur-indent-col))
-                        (update-in t [:offset] + to-add)
-                      (<= offset (+ line-start indent))
-                        t
-                      :else
-                        (update-in t [:offset] + (max to-add (- line-start offset)))))))))
-    t))
+  (let [parsed (parse text (.length text))
+        rloc (-?> parsed (parsed-root-loc true))]
+    (if (and rloc (not= :ko (:parser-state parsed)))
+      (let [line-start (line-start text offset)
+            line-stop (line-stop text offset)
+            loc (-> rloc (loc-for-offset line-start))]
+        (if (and (= (str \") (loc-tag loc)) (< (:offset (zip/node loc)) line-start))
+          t
+          (let [indent (indent-column rloc line-start)
+                cur-indent-col (or (some (fn [l]
+                                           (when (not= (str \space) (loc-tag l))
+                                             (- (start-offset l) line-start)))
+                                     (filter (fn [l] (<= line-start (start-offset l) line-stop))
+                                       (next-leaves loc)))
+                                 (- line-stop line-start))
+                to-add (- indent cur-indent-col)]
+            (cond
+              (zero? to-add) t
+              :else (let [t (update-in t [:modifs] conj {:text (str2/repeat " " indent) :offset line-start :length cur-indent-col})
+                          t (update-in t [:text] str-replace line-start cur-indent-col (str2/repeat " " indent))]
+                      (cond
+                        (>= offset (+ line-start cur-indent-col))
+                          (update-in t [:offset] + to-add)
+                        (<= offset (+ line-start indent))
+                          t
+                        :else
+                          (update-in t [:offset] + (max to-add (- line-start offset)))))))))
+      t)))

 (defn test-command [title-prefix command]


Fix moving walls around

Fix moving walls around

--- src/player/core.cljs
+++ src/player/core.cljs
@@ -19,6 +19,10 @@

 (defonce has-run nil)
 (declare rererender)
+
+(defn spy [& v]
+  (apply println v)
+  (last v))

 (defn main []
   (enable-console-print!)
@@ -69,11 +73,11 @@
                         :state :right
                         :x     96 :y 32
                         :w     16 :h 16}
-                   :m {:type  :mario
-                       :state :jumping-left
-                       :x     200 :y 16
-                       :v/y   100
-                       :w     16 :h 16}
+                   :m  {:type  :mario
+                        :state :jumping-left
+                        :x     200 :y 16
+                        :v/y   100
+                        :w     16 :h 16}
                    }})

 (set! heval/frame-length (/ 1 30))
@@ -673,13 +677,11 @@
                                      :w nw :h nh)
               :move-mode :resizing)))

-(def resize-threshold 4)
-
-(defn wall-centerish-point? [wld wx wy]
-  (some (fn [{x :x y :y w :w h :h}]
-          (and (<= (+ x resize-threshold) wx (- (+ x w) resize-threshold))
-               (<= (+ y resize-threshold) wy (- (+ y h) resize-threshold))))
-        (:walls (:desc wld))))
+(def resize-threshold 2)
+
+(defn wall-centerish-point? [{x :x y :y w :w h :h} wx wy]
+  (and (<= (+ x resize-threshold) wx (- (+ x w) resize-threshold))
+       (<= (+ y resize-threshold) wy (- (+ y h) resize-threshold))))

 (defn ha->desc [{v0 :v0 state :state ha-type :ha-type}]
   (assoc v0 :state state :type ha-type))


Pass entire meta

Pass entire meta

--- src/pot/core/bl.cljs
+++ src/pot/core/bl.cljs
@@ -59,7 +59,7 @@
   (let [compressed-row (compress-row row)]
     (with-meta
       (vec (concat compressed-row (repeat (- (count row) (count compressed-row)) nil)))
-      {:score (-> compressed-row meta :score)})))
+      (meta compressed-row))))

 (defn process-board
   [board]
@@ -72,13 +72,13 @@
   [board]
   (with-meta
     (mapv (comp vec reverse) board)
-    {:score (-> board meta :score)}))
+    (meta board)))

 (defn transpose-board
   [board]
   (with-meta
     (apply mapv vector board)
-    {:score (-> board meta :score)}))
+    (meta board)))

 (def move-left process-board)
 (def move-right (comp mirrorv-board process-board mirrorv-board))


Eliminate commented code

Eliminate commented code

--- Clojure/src/ambly/repl/jsc.clj
+++ Clojure/src/ambly/repl/jsc.clj
@@ -138,9 +138,7 @@
     (let [core-js (closure/compile core
                     (assoc opts
                       :output-file
-                      (closure/src-file->target-file core)
-                      ;:static-fns true
-                      ))
+                      (closure/src-file->target-file core)))
           deps (closure/add-dependencies opts core-js)]
       ;; output unoptimized code and the deps file
       ;; for all compiled namespaces


Removed experimental code from row-button & ...  - Added "Components" heading in Alerts and Basics

--- src/re_com/core.cljs
+++ src/re_com/core.cljs
@@ -260,8 +260,8 @@
                     style)
         :title    tooltip
         :on-click #(when-not disabled? (on-click))
-        :on-mouse-over #(when-not disabled? (on-click))
-        :on-mouse-out  #(when-not disabled? (on-click))
+        ;:on-mouse-over #(when-not disabled? (on-click))
+        ;:on-mouse-out  #(when-not disabled? (on-click))
        }
        attr)
      [:i {:class md-icon-name}]]))


Use Java package naming conventions in Main-Class value of JAR manifest.

--- src/leiningen/jar.clj
+++ src/leiningen/jar.clj
@@ -20,7 +20,7 @@
                       (str "Built-By: " (System/getProperty "user.name"))
                       (str "Build-Jdk: " (System/getProperty "java.version"))
                       (when-let [main (:main project)]
-                        (str "Main-Class: " main))])
+                        (str "Main-Class: " (re-sub #"-" "_" (str main))))])
            "\n")))))

 (defn unix-path [path]


gui: menu mnemonics added according to mpa

--- src/gui/main.clj
+++ src/gui/main.clj
@@ -1,8 +1,7 @@
 (ns gui.main
   (require [seesaw.core :refer :all]
            [seesaw.rsyntax :as syntax]
-           [seesaw.dev :refer (show-options)]
-           [seesaw.util :refer (to-mnemonic-keycode)])
+           [seesaw.dev :refer (show-options)])
   (import [java.io File]))

 ; general stuff
@@ -49,6 +48,7 @@
 ; menus
 (def project-menu (menu
                     :text "Project"
+                    :mnemonic "P"
                     :items [(action :name "New Project")
                             (action :name "Open Project")
                             (separator)
@@ -61,13 +61,13 @@
                             (action
                               :name "Save"
                               :key "ctrl S"
-                              :mnemonic "s"
+                              :mnemonic "S"
                               :icon (icon-path "save.gif")
                               :handler (fn [_] (println "Saving")))
                             (action
                               :name "Save All"
                               :key "ctrl shift S"
-                              :mnemonic "a"
+                              :mnemonic "A"
                               :icon (icon-path "saveall.gif")
                               :handler (fn [_] (println "Saving All"))
                               )
@@ -78,6 +78,7 @@

 (def tasks-menu (menu
                   :text "Tasks"
+                  :mnemonic "T"
                   :items [(action :name "Check SAT")
                           (action :name "Truth Table")
                           (action :name "Transform to CNF")
@@ -88,13 +89,18 @@

 (def options-menu (menu
                     :text "Options"
+                    :mnemonic "O"
                     :items [(action :name "Select Font")
                             (action :name "Settings")
                             (action :name "Include Path")]))

 (def help-menu (menu
                  :text "Help"
-                 :items [(action :name "Help Contents")
+                 :mnemonic "H"
+                 :items [(action
+                           :name "Help Contents"
+                           :mnemonic "H"
+                           :key "F1")
                          (separator)
                          (action :name "About")]))


Add a repl for Isla code.

Add a repl for Isla code.

--- src/isla/cli.clj
+++ src/isla/cli.clj
@@ -2,9 +2,12 @@
   (:use [isla.parser])
   (:use [isla.interpreter])
   (:require [isla.utils :as utils])
+  (:require [isla.library :as library])
   (:use [clojure.pprint])
   (:import java.io.File)
   (:require [clojure.string :as str]))
+
+(declare repl)

 (def story-dir "stories/")

@@ -33,11 +36,32 @@
   Which story would you like?\n")))

-(defn -main [& args]
-  (introduction)
+(defn start-repl []
+  (def repl-context (ref (library/get-initial-context)))

-  (run-story (utils/take-input))
-  ;; (def first-story (first (str/split (.getName (first (get-stories))) #"\.")))
-  ;; (run-story first-story)
+  (println)
+  (utils/output "-------------------------------------------------------\n")
+  (utils/output "Hello. My name is Isla. It's terribly nice to meet you.\n")
+
+  (repl)

   (flush)) ;; empty return to stop last thing executed from being printed to console
+
+
+
+(defn run [code]
+  (dosync (ref-set repl-context (interpret (parse code) (deref repl-context)))))
+
+(defn repl []
+  (run (utils/take-input))
+  (repl))
+
+;; (defn -main [& args]
+;;   (introduction)
+
+;;   (run-story (utils/take-input))
+;;   ;; (def first-story (first (str/split (.getName (first (get-stories))) #"\.")))
+;;   ;; (run-story first-story)
+
+;;   (flush)) ;; empty return to stop last thing executed from being printed to console
+


First test for new nesting approach works.

--- src/dsbdp/data_processing_dsl.clj
+++ src/dsbdp/data_processing_dsl.clj
@@ -91,32 +91,24 @@
                                                     body-creation-fn
                                                     output
                                                     (inc nesting-level))))
-          (cond-rule-expr? rule-expression) (do
-                                              (println "FOOOOOOOOOOOOOOOO")
-                                              (pprint rule-expression)
-                                              (println "")
-                                              (let [cond-expr (reduce
-                                                                (fn [vect v]
-                                                                  (cond
-                                                                    (or (list? v)
-                                                                        (keyword? v)) (conj vect v)
-                                                                    (vector? v) (conj vect
-                                                                                (create-let-expression
-                                                                                input
-                                                                                v
-                                                                                body-creation-fn
-                                                                                output
-                                                                                (inc nesting-level)))
-                                                                    :default (do
-                                                                               (println "Unknown rule expression part:" v)
-                                                                               vect)))
-                                                                ['clojure.core/cond]
-                                                                rule-expression)]
-                                                (println "BAAAAARRRRRRRRRRRR")
-                                                (pprint cond-expr)
-                                                (println "BLAH")
-                                                (pprint (into '() (reverse cond-expr)))
-                                                (conj v (prefix-rule-name rule-name nesting-level) (into '() (reverse cond-expr)))))
+          (cond-rule-expr? rule-expression) (let [cond-expr (reduce
+                                                              (fn [vect v]
+                                                                (cond
+                                                                  (or (list? v)
+                                                                      (keyword? v)) (conj vect v)
+                                                                  (vector? v) (conj vect
+                                                                                (create-let-expression
+                                                                                input
+                                                                                v
+                                                                                body-creation-fn
+                                                                                output
+                                                                                (inc nesting-level)))
+                                                                  :default (do
+                                                                             (println "Unknown rule expression part:" v)
+                                                                             vect)))
+                                                              ['clojure.core/cond]
+                                                              rule-expression)]
+                                              (conj v (prefix-rule-name rule-name nesting-level) (into '() (reverse cond-expr))))
           :default (println "Binding: unknown element for rule:" (str rule)))))
     []
     rules))
@@ -160,9 +152,7 @@
         (list? (second rule)) (conj v
                                     `(assoc
                                       ~(name (first rule))
-                                      ~(if (> 1 nesting-level)
-                                         (first rule)
-                                         (symbol (str "__" nesting-level "_" (first rule))))))
+                                      ~(prefix-rule-name (first rule) nesting-level)))
         (and
           (vector? (second rule))
           (every? vector? (second rule))) (do
@@ -171,7 +161,9 @@
                                                   `(assoc
                                                      ~(name (first rule))
                                                      ~(reverse (into '() (create-let-body-vec-clj-map-out (second rule) nil (inc nesting-level)))))))
-;        (cond-rule-expr? (second rule))
+        (cond-rule-expr? (second rule)) (conj v
+                                              `(assoc ~(name (first rule))
+                                                      ~(prefix-rule-name (first rule) nesting-level)))
         :default (do (println "Clj Map Body: unknown element for rule:" (str rule))
                      ;(throw (RuntimeException. "Clj Map Body: unknown element for rule"))
                      )))
@@ -241,8 +233,8 @@
 ;        _ (println "Created data processing function vector from DSL:" fn-body-vec)
         fn-body (create-let-expression input-sym rules let-body-creation-fn output-sym 0)
 ;        _ (println "Created data processing function body:" fn-body)
-        _ (pprint fn-body)
-        _ (println "")
+;        _ (pprint fn-body)
+;        _ (println "")
         data-processing-fn (if (not (nil? output-sym))
                              (eval `(fn [~input-sym ~output-sym] ~fn-body))
                              (eval `(fn [~input-sym] ~fn-body)))]


fix empty string issue

fix empty string issue

--- src/gibberish_detector/detect.clj
+++ src/gibberish_detector/detect.clj
@@ -41,7 +41,9 @@
                              count)]
     ;; (println (mapv #(get @trie %) input))
     ;; returns true if 50% or more words are gibberish
-    (>= 0.50 (/ num-true-values (count input)))))
+    (if (string/blank? input)
+      false
+      (>= 0.50 (/ num-true-values (count input))))))

 (defn is-gibberish?
   "Determine if the given input is gibberish. Returns true if it is gibberish, false otherwise"


Indents generated code

Indents generated code

--- src/hundred_pushups/ios/core.cljs
+++ src/hundred_pushups/ios/core.cljs
@@ -7,7 +7,7 @@
 (def ReactNative (js/require "react-native"))

 (defn create-element [rn-comp opts & children]
-      (apply js/React.createElement rn-comp (clj->js opts) children))
+  (apply js/React.createElement rn-comp (clj->js opts) children))

 (def app-registry (.-AppRegistry ReactNative))
 (def view (partial create-element (.-View ReactNative)))
@@ -18,23 +18,23 @@
 (def logo-img (js/require "./images/cljs.png"))

 (defn alert [title]
-      (.alert (.-Alert ReactNative) title))
+  (.alert (.-Alert ReactNative) title))

 (defonce app-state (atom {:greeting "Hello Clojure in iOS and Android!"}))

 (defc AppRoot < rum/cursored-watch [state]
-          (view {:style {:flexDirection "column" :margin 40 :alignItems "center"}}
-                (text {:style {:fontSize 30 :fontWeight "100" :marginBottom 20 :textAlign "center"}} (:greeting @state))
-                (image {:source logo-img
-                        :style  {:width 80 :height 80 :marginBottom 30}})
-                (touchable-highlight {:style   {:backgroundColor "#999" :padding 10 :borderRadius 5}
-                                      :onPress #(alert "HELLO!")}
-                                     (text {:style {:color "white" :textAlign "center" :fontWeight "bold"}} "press me"))))
+  (view {:style {:flexDirection "column" :margin 40 :alignItems "center"}}
+        (text {:style {:fontSize 30 :fontWeight "100" :marginBottom 20 :textAlign "center"}} (:greeting @state))
+        (image {:source logo-img
+                :style  {:width 80 :height 80 :marginBottom 30}})
+        (touchable-highlight {:style   {:backgroundColor "#999" :padding 10 :borderRadius 5}
+                              :onPress #(alert "HELLO!")}
+                             (text {:style {:color "white" :textAlign "center" :fontWeight "bold"}} "press me"))))

 (defonce root-component-factory (support/make-root-component-factory))

 (defn mount-app [] (support/mount (AppRoot app-state)))

 (defn init []
-      (mount-app)
-      (.registerComponent app-registry "HundredPushups" (fn [] root-component-factory)))
+  (mount-app)
+  (.registerComponent app-registry "HundredPushups" (fn [] root-component-factory)))


Fix "checkout-dir handles spaces" test by checking what is being tested better.

--- test/circle/backend/test_build.clj
+++ test/circle/backend/test_build.clj
@@ -4,8 +4,8 @@
   (:use circle.model.build))

 (fact "checkout-dir handles spaces"
-  (let [b (minimal-build :build_num 42)]
-    (checkout-dir b) => "Dummy-Project-42"))
+  (let [b (minimal-build)]
+    (checkout-dir b) => #"Dummy-Project-\d+"))

 (fact "ensure-project-id works"
   (let [b (minimal-build)]


partially functional hall of fame entry for chinup challenger

--- src/ontrail/group.clj
+++ src/ontrail/group.clj
@@ -98,7 +98,8 @@
     (map (fn [rank elem]
       (assoc elem :rank rank))
         ranks
-        (sort-by (juxt :resultCount :count) (fn [a b] (compare b a)) (november-race-stats-with-day day-now users)))))
+        (sort-by (juxt :resultCount :count)
+                 (fn [a b] (compare b a)) (november-race-stats-with-day day-now users)))))

 ;; Leuanvetohaaste 2014
 (def start-date-time (time/date-time 2014 1 1 0 0))
@@ -106,24 +107,25 @@
 (defn chinup-stats-query [users days]
   {:sport "Leuanveto" "$or" (mapv (partial assoc {} :user) users)
    "$and" [{:creationDate {"$gte" (time/date-time 2014 1 1 0 0)}}
-           {:creationDate {"$lte" (time/plus (time/date-time 2013 11 1 0 0) (time/days days))}}]
+           {:creationDate {"$lte" (time/plus (time/date-time 2014 1 1 0 0) (time/days days))}}]
    })

 (defn year-day-number [date-time]
   (inc (time/in-days (time/interval start-date-time date-time))))

-(defn chinups-per-day-map [chinup-exs]
+(defn accumulate-repeats-map [exs-list]
   (loop [accumulator {}
          i 1
-         exs chinup-exs]
-    (if (empty? exs)
+         exs exs-list]
+    (if (or (empty? exs) (> i 365))
       accumulator
-      (let [current (first exs)
-            current-day (year-day-number (:creationDate current))]
-        (if (> current-day i) ;; check if more results for today, if not accumulate next day
+      (let [current-ex (first exs)
+            current-day-idx (year-day-number (:creationDate current-ex))]
+        (if (> current-day-idx i) ;; check if more results for today, if not accumulate next day
           (recur accumulator (inc i) exs)
-          (let [current-value (if (contains? accumulator i) (get accumulator i) 0)
-                new-value (assoc accumulator i (+ current-value (if-let [value (:detailRepeats current)] value 0)))]
+          (let [new-value (merge-with +
+                                      accumulator
+                                      {i (if-let [value (:detailRepeats current-ex)] value 0)})]
             (recur new-value i (rest exs))))))))

 (defn all-chinups [users day-number]
@@ -133,9 +135,19 @@
        (mq/fields [:creationDate :detailRepeats :user])
        (mq/sort {:creationDate 1}))))

-(defn analyze-chinups [results day-number user])
-
-(defn chinup-race-stats [users] {})
+(defn analyze-chinups [user]
+  (let [now (time/date-time 2014 1 4 10 0)
+        day-number (year-day-number now)
+        all-results (all-chinups ["Jörö"] day-number)
+        results (filter #(= user (:user %)) all-results)
+        reps-map (accumulate-repeats-map results)
+        day-range (vec (range 1 (inc day-number)))
+        total (reduce + (vals reps-map))
+        ok? (every? identity (mapv (fn [day] (>= (if-let [reps (reps-map day)] reps 0) day)) day-range))]
+    {:user user :ok ok? :total total :ttotal (if ok? total 0)}))
+
+(defn chinup-race-stats [users]
+  {})

 (defn fetch-group-stats [group-map]


only auto-boot within live namespace if server is disconnected. This allows the use of namespaces that :use overtone.live in the context of an external server connection.

--- src/overtone/live.clj
+++ src/overtone/live.clj
@@ -3,4 +3,6 @@

 (overtone.api/immigrate-overtone-api)

-(defonce __AUTO-BOOT__ (boot-server-and-mixer))
+(defonce __AUTO-BOOT__
+  (when (overtone.sc.server/server-disconnected?)
+    (overtone.studio.mixer/boot-server-and-mixer)))


Better organization of source code

Better organization of source code

--- src/parbench/core.clj
+++ src/parbench/core.clj
@@ -43,6 +43,19 @@
       (.get (future (.invokeAll pool tasks)))
       (.shutdown pool)))

+(defn req-map-counts []
+  "Returns a mapping of req-map states to counts"
+  (reduce (fn [stats point]
+            (let [[x y state] (deref point)]
+               (assoc stats
+                 :progress (inc (stats :progress 0))
+                 state     (inc (stats state     0)))))
+          {}
+          (deref req-map) ))
+
+
+
+
 (defn on-draw
   "Draws the canvas based on the data in req-map"
   [dst]
@@ -67,22 +80,6 @@
        (binding [*applet* this]
        (on-draw this)))))

-(defn req-map-counts []
-  "Returns a mapping of req-map states to counts"
-  (reduce (fn [stats point]
-            (let [[x y state] (deref point)]
-               (assoc stats
-                 :progress (inc (stats :progress 0))
-                 state     (inc (stats state     0)))))
-          {}
-          (deref req-map) ))
-
-(defn initialize-console []
-  "Sets up display loop for console output"
-  (let [task (proxy [TimerTask] []
-               (run [] (println (req-map-counts))))]
-    (. (new Timer) (scheduleAtFixedRate task (long 0) (long 1000)))))
-
 (defn initialize-graphics [width height]
   "Sets up GUI output via Processing"
   (let [pb-applet   (create-pb-applet width height)
@@ -95,6 +92,12 @@
         (.pack)
         (.show))))

+(defn initialize-console []
+  "Sets up display loop for console output"
+  (let [task (proxy [TimerTask] []
+               (run [] (println (req-map-counts))))]
+    (. (new Timer) (scheduleAtFixedRate task (long 0) (long 1000)))))
+
 (defn -main [concurrencyArg reqsArg url]
   (let [requests    (Integer. reqsArg)
         concurrency (Integer. concurrencyArg)


Added guitar chord stuff w/ example in comment

--- src/leap_step/example/popular.clj
+++ src/leap_step/example/popular.clj
@@ -1,6 +1,5 @@
 (ns leap-step.example.popular
   (:use [overtone.core]))
-

 (defsynth dubstep [rootNote 34 bpm 120 wobble 8 note 34 snare-vol 1 kick-vol 1 hihat-vol 1 v 1 chord-vol 0 wob-vol 0 wob4-vol 0 out-bus 0]

@@ -141,4 +140,12 @@
                        (poly/toggle-led m x y))))
 )

+(defn loop-seq [metro action things]
+  (let [beat (metro)]
+    (at (metro beat) (#(action (first things))))
+    (apply-at (metro (inc beat)) loop-seq metro action (rest things) [])))
+;(def metro (metronome 120))
+;(def g (guitar))
+;(loop-seq metro #(guitar-strum g %) (cycle [:C :G :Am :F]))
+
 ;;(stop)


加入一个说明

加入一个说明

--- src/learnclojure/chapt3/core6.clj
+++ src/learnclojure/chapt3/core6.clj
@@ -68,7 +68,7 @@

 ;;remove作用和filter相反，它把符合谓词的元素从集合中去除掉，返回所有不符合谓词要求的元素。相当于(filter (complement f) collection)

-;;收set来测试结合中是否包含某个元素非常方便，但不要忘记，如果检查的元素是nil或false，那么结果可能就和我们预期的不一样了。
+;;收set来测试结合中是否包含某个元素非常方便(因为set的key是其本身)，但不要忘记，如果检查的元素是nil或false，那么结果可能就和我们预期的不一样了。
 ;;因为这两个值在逻辑上就是false
 (remove #{5 7} (cons false (range 10)))
 ;=(false 0 1 2 3 4 6 8 9)


fixed passing event data to channel

fixed passing event data to channel

--- src/main/clojure/naojure/core.clj
+++ src/main/clojure/naojure/core.clj
@@ -114,8 +114,9 @@
   "Calls callback functions and sends data on channel. Expects atom containign map of channel to use and possibly empty sequence of functions"
   [event value event-state]
   (do
+;;    (println "event-dispatcher" event)
     (doseq [cb (:callbacks @event-state)] (cb event value))
-    (go (doseq [ch (:channels @event-state)] (>! ch event value)))))
+    (go (doseq [ch (:channels @event-state)] (>! ch [ event value])))))

 (defn- make-event-wrapper
   "Creates a wrapper than QiMessaging can use as a callback and returns a robot with an atom holding the state in its events map"


use condp instead of cond

use condp instead of cond

--- src/passport/core.clj
+++ src/passport/core.clj
@@ -20,14 +20,14 @@

 (defn- handle-response [resp]
   (let [status (:status resp)]
-    (cond
-      (= status 200) (json/parse-string (:body resp) true)
-      (= status 400) {:error error-text-400 :status status}
-      (= status 401) {:error error-text-401 :status status}
-      (= status 402) {:error error-text-402 :status status}
-      (= status 403) {:error error-text-403 :status status}
-      (= status 404) {:error error-text-404 :status status}
-      :else          {:error error-text-generic :status status})))
+    (condp = status
+      200 (json/parse-string (:body resp) true)
+      400 {:error error-text-400 :status status}
+      401 {:error error-text-401 :status status}
+      402 {:error error-text-402 :status status}
+      403 {:error error-text-403 :status status}
+      404 {:error error-text-404 :status status}
+          {:error error-text-generic :status status})))

 (defn- passport-get [url username token]
   (-> url
@@ -37,7 +37,7 @@
 (defn caller-id
   "Takes the phone number to query and
    an optional sid and token. The sid and token are
-   for use of the OpenCNAM Professional Tier. Alternatively, the sid and
+   for use of the OpenCNAM Professional Tier. Alternatively, the sid and
    token can be specified in the OPEN_CNAM_SID
    and OPEN_CNAM_TOKEN env variables rather than passing
    them into this function. If sid and token are not passed in


fix broadcasting transactions

fix broadcasting transactions

--- src/pc/http/sente.clj
+++ src/pc/http/sente.clj
@@ -59,12 +59,13 @@
 (defonce client-stats (atom {}))

 (defn notify-transaction [data]
-  (doseq [[uid _] (dissoc (get @document-subs (:transaction/document data)) (str (:session/uuid data)))]
-    (log/infof "notifying %s about new transactions for %s" uid (:transaction/document data))
-    ((:send-fn @sente-state) uid [:datomic/transaction data]))
-  (when-let [server-timestamps (seq (filter #(= :server/timestamp (:a %)) (:tx-data data)))]
-    (log/infof "notifying %s about new server timestamp for %s" (:session/uuid data) (:transaction/document data))
-    ((:send-fn @sente-state) (str (:session/uuid data)) [:datomic/transaction (assoc data :tx-data server-timestamps)])))
+  (let [doc-id (:db/id (:transaction/document data))]
+    (doseq [[uid _] (dissoc (get @document-subs doc-id) (str (:session/uuid data)))]
+      (log/infof "notifying %s about new transactions for %s" uid doc-id)
+      ((:send-fn @sente-state) uid [:datomic/transaction data]))
+    (when-let [server-timestamps (seq (filter #(= :server/timestamp (:a %)) (:tx-data data)))]
+      (log/infof "notifying %s about new server timestamp for %s" (:session/uuid data) doc-id)
+      ((:send-fn @sente-state) (str (:session/uuid data)) [:datomic/transaction (assoc data :tx-data server-timestamps)]))))

 (defn ws-handler-dispatch-fn [req]
   (-> req :event first))


Refactor game mode tests to be more descriptive

--- test/obb_rules/game_mode_test.cljc
+++ test/obb_rules/game_mode_test.cljc
@@ -13,38 +13,32 @@
 (def p1-element (element/create-element "p1" rain 20 :south))
 (def p2-element (element/create-element "p2" rain 20 :south))
 (def running-game (-> (game/random)
-                  (assoc :state "p1")
-                  (board/place-element [1 1] p1-element)
-                  (board/place-element [1 2] p2-element)
-                  (game-mode/process)))
+                      (assoc :state "p1")
+                      (board/place-element [1 1] p1-element)
+                      (board/place-element [1 2] p2-element)
+                      (game-mode/process)))

-(deftest toogle-state-player-str
-  (let [game (-> running-game
-                 (assoc :state "p1")
-                 (game-mode/process))]
-    (is (= :p2 (get game :state)))))
+(deftest game-processing
+  (testing "switch current player using a string"
+    (let [game (-> running-game
+                   (assoc :state "p1")
+                   (game-mode/process))]
+      (is (= :p2 (get game :state)))))

-(deftest toogle-state-player-keyword
-  (let [game (-> running-game
-                 (assoc :state :p1)
-                 (game-mode/process))]
-    (is (= :p2 (get game :state)))))
+  (testing "switch current player using a keyword"
+    (let [game (-> running-game
+                   (assoc :state :p1)
+                   (game-mode/process))]
+      (is (= :p2 (get game :state)))))

-(deftest toogle-state-player-keyword-inverted
-  (let [game (-> running-game
-                 (assoc :state :p2)
-                 (game-mode/process))]
-    (is (= :p1 (get game :state)))))
+  (testing "game is not finished while in deploy state"
+    (let [game-on-deploy (game/random)
+          final-game (game-mode/process game-on-deploy)]
+      (is (not (game-mode/final? game-on-deploy)))
+      (is (= :deploy (game/state final-game)))))

-(deftest dont-finalize-on-deploy
-  (let [game-on-deploy (game/random)
-        final-game (game-mode/process game-on-deploy)]
-    (is (not (game-mode/final? game-on-deploy)))
-    (is (= :deploy (game/state final-game)))))
-
-(deftest dont-finalize-on-deploy-str
-  (let [game-on-deploy (-> (game/random) (assoc :state "deploy"))
-        final-game (game-mode/process game-on-deploy)]
-    (is (not (game-mode/final? game-on-deploy)))
-    (is (= "deploy" (game/state final-game)))))
-
+  (testing "game is not finished even if it is in deploy state as a string"
+    (let [game-on-deploy (-> (game/random) (assoc :state "deploy"))
+          final-game (game-mode/process game-on-deploy)]
+      (is (not (game-mode/final? game-on-deploy)))
+      (is (= "deploy" (game/state final-game))))))


Simplify extraction of note freqs

Simplify extraction of note freqs

--- src/playmary/one.cljs
+++ src/playmary/one.cljs
@@ -173,7 +173,7 @@
   (let [new-notes (touches->notes instrument (filter-type "touchstart" touches))]
     (reduce play-piano-key
             (assoc instrument :notes (concat new-notes notes))
-            (map (fn [n] (n :freq)) new-notes))))
+            (map :freq new-notes))))

 (defn end-notes
   [touches {notes :notes playhead :playhead :as instrument}]


Update intro.cljs

Update intro.cljs

--- src/prais2/intro.cljs
+++ src/prais2/intro.cljs
@@ -100,6 +100,7 @@
    [:ul
     [:li "If one hospital has a higher survival rate than another hospital it does not mean that it is better than the other"]
     [:li "The predicted range is calculated by a formula and depends " [:b "only"] " on the children treated at that hospital. A " [:b "lower"] " predicted range means a hospital treated children with " [:b "more complex"] " medical problems." ]
+    [:li "A hospital's survival rate should only be compared to its predicted range. It is not valid to compare survival rates between hospitals."]
     [:li "The survival rate for all UK hospitals is very high."]]])


finished reading ch 14

finished reading ch 14

--- src/joy/ch14.clj
+++ src/joy/ch14.clj
@@ -175,11 +175,109 @@
 (def agent-for-player
   (memoize (fn [player-name]
              (-> (agent [])
-                 (set-error-handler! #(println "ERROR:   " %1 %2))
+                 (set-error-handler! #(println "ERROR: " %1 %2))
                  (set-error-mode! :fail)))))
+
 (defn feed [db event]
   (let [a (agent-for-player (:player event))]
     (send a
           (fn [state]
             (commit-event db event
                           (conj state event))))))
+
+(defn feed-all [db events]
+  (doseq [event events]
+    (feed db event)) db)
+
+#_(let [db (ref PLAYERS)]
+  (feed-all db
+            (rand-events 100
+                         {:player "Nick" :ability 32/100}))
+  db)
+
+#_(count @(agent-for-player "Nick"))
+
+(defn simulate [total players]
+  (let [events
+        (apply interleave
+               (for [player players]
+                 (rand-events total player)))
+        results
+        (feed-all (ref players) events)]
+    (apply await
+           (map #(agent-for-player
+                  (:player %)) players))
+    @results))
+
+;; 14.4 Code as Data as Code
+
+(defn meters->feet [m] (* m 3.28084))
+(defn meters->miles [m] (* m 0.000621))
+
+(meters->feet 1609.344)
+(meters->miles 1609.344)
+
+(comment
+  (our base unit of distance is the :meter
+       [There are 1000 :meters in a :kilometer]
+       [There are 100 :centemeters in a :meter]
+       ...))
+
+(comment
+  (define unit of distance
+    {:m 1
+     :km 1000
+     :cm 1/10
+     :mm [1/10 of a :cm]
+     :ft 0.3048
+     :mile [is 5280 :ft]}))
+
+(defn relative-units [context unit]
+  (if-let [spec (get context unit)]
+    (if (vector? spec)
+      (convert context spec)
+      spec)
+    (throw
+     (RuntimeException. (str "undefined nit " unit)))))
+
+(relative-units {:m 1 :cm 100 :mm [10 :cm]} :m)
+
+(relative-units {:m 1 :cm 1/100 :mm [1/10 :cm]} :mm)
+
+(relative-units {:m 1 :cm 100 :mm [10 :cm]} :what)
+
+(defmacro defunits-of [name base-unit & conversions]
+  (let [magnitude (gensym)
+        unit (gensym)
+        units-map (into `{~base-unit 1}
+                        (map vec (partition 2 conversions)))]
+    `(defmacro ~(symbol (str "unit-of-" name))
+       [~magnitude ~unit]
+       `(* ~~magnitude
+           ~(case ~unit
+              ~@(mapcat
+                 (fn [[u# & r#]]
+                   `[~u# ~(relative-units
+                           units-map
+                           u#)])
+                 units-map))))))
+
+(defunits-of distance :m
+  :km 1000
+  :cm 1/100
+  :mm [1/10 :cm]
+  :ft 0.3048
+  :mile [5280 :ft])
+
+(unit-of-distance 1 :m)
+(unit-of-distance 1 :mm)
+(unit-of-distance 441 :ft)
+
+(macroexpand-1 '(defunits-of distance :m
+  :km 1000
+  :cm 1/100
+  :mm [1/10 :cm]
+  :ft 0.3048
+  :mile [5280 :ft]))
+
+(macroexpand-1 '(unit-of-distance 1 :cm))


Fix partial applications

Fix partial applications


index: fix a bug in expiry which broke events without ttls.

--- src/riemann/index.clj
+++ src/riemann/index.clj
@@ -54,7 +54,7 @@

       (expire [this]
               (filter
-                (fn [{:keys [ttl time] :or {:ttl default-ttl} :as state}]
+                (fn [{:keys [ttl time] :or {ttl default-ttl} :as state}]
                   (let [age (- (unix-time) time)]
                     (when (> age ttl)
                       (delete this state)


src/riemann/xymon.clj: xymon: using previously defined formatter instead of maybe-nil :formatter

--- src/riemann/xymon.clj
+++ src/riemann/xymon.clj
@@ -109,8 +109,7 @@
 (defn xymon
   "
   Returns a function which accepts an event and sends it to Xymon.
-  Silently drops events when xymon is down. Attempts to reconnect
-  automatically every five seconds. Use:
+  Drops events when Xymon is down. Use:

   (xymon {:host \"127.0.0.1\" :port 1984
           :timeout 5 :formatter event->status})
@@ -119,5 +118,5 @@
   (let [formatter (or (:formatter opts) event->status)]
     (fn [{:keys [state service] :as event}]
       (when (and state service)
-        (let [statusmessage ((:formatter opts) event)]
+        (let [statusmessage (formatter event)]
           (send-line opts statusmessage))))))


Convert the run-rule to call an iterate rule function that will
draw a row and then set a js timeout to call self again.
This way we can see the rows being drawn line by line.

Should try using core.async with a timeout channel to compare how the
code looks and how easy it is.

--- src/rule110/core.cljs
+++ src/rule110/core.cljs
@@ -63,6 +63,26 @@
   [rule-num grid ]
   (str rule-num "-g" (.toString (js/parseInt (apply str grid) 2) 16)))

+(defn- end-rule
+  []
+   (canvas/reset))
+
+(defn- iterate-rule
+  "Run the rule then call self again in a timeout to allow the drawing
+   to show row by row."
+  [step-fn grid step-acc]
+
+  (if (< step-acc const/max-steps)
+    (let [ngrid (reduce (fn [s v] (-> s
+                                     (step step-fn)
+                                     canvas/draw-frame
+                                     #_midi/play-grid))
+                        grid [1])]
+      (js/setTimeout #(iterate-rule step-fn
+                                    ngrid
+                                    (inc step-acc))
+                     100))
+    (end-rule)))

 (defn run-rule
   "Runs a celular automata based on the passed step-fn passed
@@ -75,14 +95,17 @@
   ([rule-num step-fn grid]
      (reset! canvas/rule-name (rule-and-grid-name rule-num grid))
      (canvas/draw-board)
-     (reduce (fn [s v] (-> s
-                          (step step-fn)
-                          canvas/draw-frame
-                          #_midi/play-grid))
-             grid
-             (range const/max-steps))
-     #_(Thread/sleep 300) ;; need to make rule or core async it
-     (canvas/reset)))
+     (comment ;; This is the direct iteration that draws the whole image on call.
+       (reduce (fn [s v] (-> s
+                                   (step step-fn)
+                                   canvas/draw-frame
+                                   #_midi/play-grid))
+                      grid
+                      (range const/max-steps))
+              #_(Thread/sleep 300) ;; need to make rule or core async it
+              (canvas/reset))
+     (iterate-rule step-fn grid 0)
+     ))

 (defn init


added functions to set users as muted/unmuted

--- src/server/rooms.cljs
+++ src/server/rooms.cljs
@@ -482,3 +482,13 @@
         (do
           (println "File hash found!")
           (callback true))))))
+
+(defn mute-user [socket-id callback]
+  (.set redis-client (str "users:" socket-id ":muted?") "true"
+    (fn []
+      (callback))))
+
+(defn unmute-user [socket-id callback]
+  (.set redis-client (str "users:" socket-id ":muted?") "false"
+    (fn []
+      (callback))))