temp fix so it runs

temp fix so it runs

--- src/overtone/app/editor.clj
+++ src/overtone/app/editor.clj
@@ -8,7 +8,7 @@
      (com.raelity.jvi.swing DefaultViFactory StatusDisplay TextView)
      (com.sun.scenario.scenegraph JSGPanel SGText SGShape SGGroup
                                   SGAbstractShape$Mode SGComponent SGTransform)
-     (jsyntaxpane DefaultSyntaxKit)
+;     (jsyntaxpane DefaultSyntaxKit)
      ))

 (def DEFAULT-FONT "Sans")
@@ -56,7 +56,7 @@
         fm (.getFontMetrics editor font)
         width (* 81 (.charWidth fm \space))
         height (* 10 (.getHeight fm))]
-    (DefaultSyntaxKit/initKit)
+    ;(DefaultSyntaxKit/initKit)

     (ViManager/activateAppEditor editor nil "Overtone Editor")
     (ViManager/installKeymap editor)


Fix fragment key test case

Fix fragment key test case

--- test/reagenttest/testreagent.cljs
+++ test/reagenttest/testreagent.cljs
@@ -1138,14 +1138,14 @@

 (deftest test-fragments
   (testing "Fragment as array"
-    (let [comp (fn []
+    (let [comp (fn comp1 []
                  #js [(r/as-element [:div "hello"])
                       (r/as-element [:div "world"])])]
       (is (= "
hello

world
"
              (as-string [comp])))))

   (testing "Fragment element, :<>"
-    (let [comp (fn []
+    (let [comp (fn comp2 []
                  [:<>
                   [:div "hello"]
                   [:div "world"]
@@ -1155,7 +1155,11 @@

   (testing "Fragment key"
     ;; This would cause React warning if both fragements didn't have key set
-    (let [comp (fn []
+    ;; But wont fail the test
+    (let [children (fn comp4 []
+                     [:<>
+                      [:div "foo"]])
+          comp (fn comp3 []
                  [:div
                   (list
                     [:<>
@@ -1163,7 +1167,6 @@
                      [:div "hello"]
                      [:div "world"]]
                     ^{:key 2}
-                    [:<>
-                     [:div "foo"]])])]
+                    [children])])]
       (is (= "

hello

world

foo

"
              (as-string [comp]))))))


azulenoids.clj: uses the new method in branchings2d.clj

--- clojure/org/gavrog/clojure/azulenoids.clj
+++ clojure/org/gavrog/clojure/azulenoids.clj
@@ -1,9 +1,11 @@
 (ns org.gavrog.clojure.azulenoids
   (:use (org.gavrog.clojure [util :only [iterate-cycle unique]]
-                            [delaney :only [s v chain-end curvature]]))
+                            [delaney :only [s v chain-end curvature]]
+                            [generators :only [results]]
+                            [branchings2d :only [branchings]]))
   (:import (org.gavrog.jane.numbers Whole)
            (org.gavrog.joss.dsyms.basic DSymbol DynamicDSymbol IndexList)
-           (org.gavrog.joss.dsyms.generators CombineTiles DefineBranching2d))
+           (org.gavrog.joss.dsyms.generators CombineTiles))
   (:gen-class))

 ;; Azulenoid-specific functions
@@ -44,7 +46,11 @@

 (def octa-syms
   (for [dset octa-sets
-        dsym (lazy-seq (DefineBranching2d. dset 3 2 Whole/ZERO))
+        dsym (results (branchings dset
+                                  :face-sizes-at-least 3
+                                  :vertex-degrees-at-least 2
+                                  :curvature-at-least 0
+                                  :try-spins [1 2 3 4 6]))
         :when (-> dsym curvature (= 0))]
     dsym))


fix up views a bit

fix up views a bit


Redirects

Redirects

--- dev/src/yada/dev/examples.clj
+++ dev/src/yada/dev/examples.clj
@@ -2,7 +2,8 @@

 (ns yada.dev.examples
   (:require
-   [bidi.bidi :refer (handler RouteProvider path-for)]
+   [bidi.bidi :refer (handler RouteProvider path-for alts)]
+   [bidi.ring :refer (redirect)]
    [schema.core :as s]
    [clojure.java.io :as io]
    [clojure.string :as string]
@@ -177,6 +178,15 @@
   (path [r] [(basename r) "/" [long :account]])
   (path-args [_] [:account 17382343])
   (request [_] {:method :get})
+  (expected-response [_] {:status 200}))
+
+;; Conditional GETs
+
+(defrecord ConditionalGet []
+  Example
+  (resource-map [_] {:body "Hello World!"})
+  (request [_] {:method :get
+                :headers {"Accept" "text/plain"}})
   (expected-response [_] {:status 200}))

 ;; POSTS
@@ -478,24 +488,27 @@
 (defrecord ExamplesService [router handlers]
   RouteProvider
   (routes [this]
-    ["/examples/"
-     (vec
-      (concat
-       (for [h handlers]
-         [(get-path h) (handler (keyword (basename h))
-                            (make-async-handler (eval (resource-map h))))])
-       [["index.html"
-         (handler
-          ::index
-          (fn [_]
-            (ok
-             (index (:routes @router) handlers))))]
-        ["tests.html"
-         (handler
-          ::tests
-          (fn [_]
-            (ok (tests (:routes @router) handlers))))
-         ]]))]))
+    ["/examples"
+     [["/"
+       (vec
+        (concat
+         (for [h handlers]
+           [(get-path h) (handler (keyword (basename h))
+                                  (make-async-handler (eval (resource-map h))))])
+         [["index.html"
+           (handler
+            ::index
+            (fn [_]
+              (ok
+               (index (:routes @router) handlers))))]
+          ["tests.html"
+           (handler
+            ::tests
+            (fn [_]
+              (ok (tests (:routes @router) handlers))))
+           ]
+          ["" (redirect ::index)]]))]
+      ["" (redirect ::index)]]]))

 (defn new-examples-service [& {:as opts}]
   (-> (->> opts
@@ -515,6 +528,9 @@
                     (->ResourceState)
                     (->ResourceStateWithBody)
                     (->ResourceStateTopLevel)
+
+                    (->ConditionalGet)
+
                     (->PutResourceMatchedEtag)
                     (->PutResourceUnmatchedEtag)
                     (->ServiceUnavailable)


Fix author split (again)

Fix author split (again)

--- src/qcast/infoq/scraper.clj
+++ src/qcast/infoq/scraper.clj
@@ -36,9 +36,8 @@
   (select [:head :title] inner-text dom))

 (defn- authors [dom]
-  (let [splitter #(split % #"[ ,&]")
-        cleaner (some-fn empty? (partial = "and"))
-        transformer #(some->> % inner-text splitter (remove cleaner))]
+  (let [authors-split #(split % #"(\s*,\s*|\s*&\s*|\s+and\s+)")
+        transformer #(some->> % inner-text authors-split (map trim))]
     (select [:.author_general :> :a] transformer dom)))

 (defn- length [dom]


Version 0.6.7-SNAPSHOT

Version 0.6.7-SNAPSHOT

--- metlog-vault/project.clj
+++ metlog-vault/project.clj
@@ -1,4 +1,4 @@
-(defproject metlog-vault "0.6.6"
+(defproject metlog-vault "0.6.7-SNAPSHOT"
   :description "Repository for storing and displaying time series data reported by metlog-agent.."

   :license {:name "Eclipse Public License"


Added new game object type and overloaded existing type generators

--- src/retro_fever/sprite.cljs
+++ src/retro_fever/sprite.cljs
@@ -9,8 +9,8 @@
 (defn ^:export move [{:keys [x y velocity-x velocity-y] :as sprite}]
   "Moves a sprite based on its velocity on the x and y-axis"
   (assoc sprite
-    :x (if velocity-x (+ x velocity-x) x)
-    :y (if velocity-x (+ y velocity-y) y)))
+         :x (+ x velocity-x)
+         :y (+ y velocity-y)))

 (defn- update-sprite
   [& [sprite scene :as args]]
@@ -32,7 +32,21 @@
   (render [this context])
   (update [this] [this scene]))

-(defrecord ImageSprite [image width height x y]
+(defrecord StaticImage [image width height x y]
+  TypeInfo
+  (get-type [this] :static-image)
+  SpriteActions
+  (render [this context] (graphic/render-image context (:image image) x y width height))
+  (update [this] this)
+  (update [this scene] scene))
+
+(defn ^:export static-image
+  ([{:keys [width height] :as image} x y]
+   (static-image image width height x y))
+  ([image width height x y]
+   (StaticImage. image width height x y)))
+
+(defrecord ImageSprite [image width height x y velocity-x velocity-y]
   TypeInfo
   (get-type [this] :image-sprite)
   SpriteActions
@@ -41,7 +55,20 @@
   (update [this] (update-sprite this))
   (update [this scene] (update-sprite this scene)))

-(defrecord SpritesheetSprite [spritesheet width height cell x y]
+(defn image-sprite
+  "Creates a sprite represented by the given image with the specified values"
+  ([{:keys [image] :as data}]
+   (let [{:keys [width height]} image]
+     (merge (ImageSprite. image width height 0 0 0 0)
+            data)))
+  ([{:keys [width height] :as image} x y]
+   (image-sprite image width image x y 0 0))
+  ([image width height x y]
+   (image-sprite image width height x y 0 0))
+  ([image width height x y velocity-x velocity-y]
+   (ImageSprite. image width height x y velocity-x velocity-y)))
+
+(defrecord SpritesheetSprite [spritesheet cell width height x y velocity-x velocity-y]
   TypeInfo
   (get-type [this] :spritesheet-sprite)
   SpriteActions
@@ -49,7 +76,19 @@
   (update [this] (update-sprite this))
   (update [this scene] (update-sprite this scene)))

-(defrecord AnimatedSprite [animation width height x y]
+(defn spritesheet-sprite
+  ([{:keys [spritesheet] :as data}]
+   (let [{:keys [cell-width cell-height]} spritesheet]
+     (merge (SpritesheetSprite. spritesheet 0 cell-width cell-height 0 0 0 0)
+            data)))
+  ([{:keys [cell-width cell-height] :as spritesheet} cell x y]
+   (spritesheet-sprite spritesheet cell cell-width cell-height x y 0 0))
+  ([spritesheet cell width height x y]
+   (spritesheet-sprite spritesheet width height cell x y 0 0))
+  ([spritesheet cell width height x y velocity-x velocity-y]
+   (SpritesheetSprite. spritesheet width height cell x y velocity-x velocity-y)))
+
+(defrecord AnimatedSprite [animation width height x y velocity-x velocity-y]
   TypeInfo
   (get-type [this] :animated-sprite)
   SpriteActions
@@ -58,7 +97,20 @@
   (update [this] (update-animated-sprite this))
   (update [this scene] (update-animated-sprite this scene)))

-(defn ^:export sprite
+(defn animated-sprite
+  ([{:keys [animation] :as data}]
+   (let [{:keys [cell-width cell-height]} (:spritesheet animation)]
+     (merge (AnimatedSprite. animation cell-width cell-height 0 0 0 0)
+            data)))
+  ([{:keys [spritesheet] :as animation} x y]
+   (let [{:keys [cell-width cell-height]} spritesheet]
+     (animated-sprite animation cell-width cell-height x y 0 0)))
+  ([animation width height x y]
+   (animated-sprite animation width height x y 0 0))
+  ([animation width height x y velocity-x velocity-y]
+   (AnimatedSprite. animation width height x y velocity-x velocity-y)))
+
+(defn ^:export new
   "Creates a sprite record based on graphics resource"
   [& args]
   (let [arg-1 (first args)


Enable printing to the console in dev mode for the examples

--- examples/asoiaf/agot/dev.cljs
+++ examples/asoiaf/agot/dev.cljs
@@ -2,4 +2,6 @@
   (:require [asoiaf.agot.core :as agot]
             [figwheel.client :as fw]))

+(enable-console-print!)
+
 (fw/start {:websocket-url "ws://localhost:3449/figwheel-ws"})


RS | Refactoring handler.clj requires

RS | Refactoring handler.clj requires

--- src/stonecutter/handler.clj
+++ src/stonecutter/handler.clj
@@ -1,16 +1,15 @@
 (ns stonecutter.handler
-  (:require [ring.middleware.defaults :refer [wrap-defaults site-defaults api-defaults]]
+  (:require [ring.middleware.defaults :as ring-mw]
             [ring.util.response :as r]
-            [ring.adapter.jetty :refer [run-jetty]]
-            [environ.core :refer [env]]
-            [scenic.routes :refer [scenic-handler]]
+            [ring.adapter.jetty :as ring-jetty]
+            [environ.core :as env]
+            [scenic.routes :as scenic]
             [clojure.tools.logging :as log]
-            [clauth.endpoints :as ep]
             [stonecutter.view.error :as error]
-            [stonecutter.view.view-helpers :refer [enable-template-caching! disable-template-caching!]]
+            [stonecutter.view.view-helpers :as vh]
             [stonecutter.db.storage :as s]
-            [stonecutter.helper :refer :all]
-            [stonecutter.routes :refer [routes path]]
+            [stonecutter.helper :as sh]
+            [stonecutter.routes :as routes]
             [stonecutter.logging :as log-config]
             [stonecutter.client :as client]
             [stonecutter.controller.user :as user]
@@ -23,15 +22,15 @@
 (def default-context {:translator (t/translations-fn t/translation-map)})

 (defn not-found [request]
-  (-> (html-response (error/not-found-error default-context))
+  (-> (sh/html-response (error/not-found-error default-context))
       (r/status 404)))

 (defn err-handler [request]
-  (-> (html-response (error/internal-server-error default-context))
+  (-> (sh/html-response (error/internal-server-error default-context))
       (r/status 500)))

 (defn csrf-err-handler [req]
-  (-> (html-response (error/csrf-error default-context))
+  (-> (sh/html-response (error/csrf-error default-context))
       (r/status 403)))

 (def site-handlers
@@ -72,21 +71,20 @@
   (csrf-err-handler req))

 (def wrap-defaults-config
-  (-> site-defaults
+  (-> ring-mw/site-defaults
       (assoc-in [:session :cookie-attrs :max-age] 3600)
       (assoc-in [:session :cookie-name] "stonecutter-session")
       (assoc-in [:security :anti-forgery] {:error-handler handle-anti-forgery-error})))

 (defn create-site-app [dev-mode?]
-  (-> (scenic-handler routes site-handlers not-found)
-      (wrap-defaults wrap-defaults-config)
+  (-> (scenic/scenic-handler routes/routes site-handlers not-found)
+      (ring-mw/wrap-defaults wrap-defaults-config)
       m/wrap-translator
-      (m/wrap-error-handling err-handler dev-mode?)
-      ))
+      (m/wrap-error-handling err-handler dev-mode?)))

 (defn create-api-app [dev-mode?]
-  (-> (scenic-handler routes api-handlers not-found)
-      (wrap-defaults api-defaults)
+  (-> (scenic/scenic-handler routes/routes api-handlers not-found)
+      (ring-mw/wrap-defaults ring-mw/api-defaults)
       (m/wrap-error-handling err-handler dev-mode?)))                   ;; TODO create json error handler

 (defn create-app [& {dev-mode? :dev-mode?}]
@@ -94,26 +92,26 @@

 (def app (create-app :dev-mode? false))

-(def port (Integer. (get env :port "3000")))
+(def port (Integer. (get env/env :port "3000")))

 (defn -main [& args]
   (log-config/init-logger!)
-  (enable-template-caching!)
-  (let [db (mongo/get-mongo-db (get env :mongo-uri "mongodb://localhost:27017/stonecutter"))]
+  (vh/enable-template-caching!)
+  (let [db (mongo/get-mongo-db (get env/env :mongo-uri "mongodb://localhost:27017/stonecutter"))]
     (s/setup-mongo-stores! db)
     (client/delete-clients!)                                ;; TODO move this into function below
     (migration/run-migrations db))
-  (client/load-client-credentials-and-store-clients (get env :client-credentials-file-path "client-credentials.yml"))
-  (run-jetty app {:port port}))
+  (client/load-client-credentials-and-store-clients (get env/env :client-credentials-file-path "client-credentials.yml"))
+  (ring-jetty/run-jetty app {:port port}))

 (defn lein-ring-init
   "Function called when running app with 'lein ring server'"
   []
   (log-config/init-logger!)
-  (disable-template-caching!)
+  (vh/disable-template-caching!)
   (s/setup-in-memory-stores!)
   (client/delete-clients!)
-  (client/load-client-credentials-and-store-clients (get env :client-credentials-file-path "client-credentials.yml"))
+  (client/load-client-credentials-and-store-clients (get env/env :client-credentials-file-path "client-credentials.yml"))
   (let [user (clauth.user/register-user "user@email.com" "password")
         client-details (clauth.client/register-client "MYAPP" "myapp.com")]
     (log/info (str "TEST USER DETAILS:" user))


Fix the crypto spike

Fix the crypto spike

--- src/icecap/crypto.clj
+++ src/icecap/crypto.clj
@@ -61,15 +61,15 @@
   "A totally bogus KDF that consistently returns all-NUL keys.

   Clearly only suitable for development."
+  []
   (reify KDF
     (derive [_ _ _ _]
       {:index (nul-byte-array index-bytes)
        :cap-key (nul-byte-array cap-key-bytes)})))

-(def ^:private personal
-  "A personalization parameter."
-  (.getBytes "icecap blob storage"))
-
+;; (def ^:private personal
+;;   "A personalization parameter."
+;;   (.getBytes "icecap blob storage"))
 ;; (defn blake2b-kdf
 ;;   "Create a key derivation function based on BLAKE2b."
 ;;   (reify KDF
@@ -90,7 +90,8 @@
   "An encryption scheme that doesn't actually do anything.

   Clearly only suitable for development."
-  (reify KDF
+  []
+  (reify EncryptionScheme
     (encrypt [_ _ plaintext] plaintext)
     (decrypt [_ _ ciphertext] ciphertext)))


Use log-exceptions middleware and wrap-stacktrace-web.

Change order of wrap-stacktrace-web and wrap-log-exceptions.
The whole point of this was to used timbre.

--- src/incise/server.clj
+++ src/incise/server.clj
@@ -5,7 +5,7 @@
             [incise.load :refer [load-all]]
             (ring.middleware [reload :refer [wrap-reload]]
                              [incise :refer [wrap-incise]]
-                             [stacktrace :refer [wrap-stacktrace]])
+                             [stacktrace :refer [wrap-stacktrace-web]])
             [dieter.core :refer [asset-pipeline]]
             [taoensso.timbre :refer [error]]
             [clojure.stacktrace :refer [print-cause-trace]]
@@ -32,7 +32,8 @@
     (try
       (apply func args)
       (catch Exception e
-        (error (with-out-str (print-cause-trace e)))))))
+        (error (with-out-str (print-cause-trace e)))
+        (throw e)))))

 (def app (-> routes
              (wrap-static-index)
@@ -40,8 +41,8 @@
              (wrap-incise :out "resources/public"
                           :in "resources/content")
              (wrap-parsers-reload)
-             (wrap-stacktrace)
              (wrap-log-exceptions)
+             (wrap-stacktrace-web)
              (asset-pipeline {:cache-mode :development
                               :engine :v8
                               :compress false})))


Delete ioframes.clj

Delete ioframes.clj

--- src/iyye/ioframes.clj
+++ src/iyye/ioframes.clj
@@ -1,40 +0,0 @@
-; Iyye - AI agent
-; Copyright (C) 2016-2017  Sasha Yumzya
-
-; This program is free software: you can redistribute it and/or modify
-; it under the terms of the GNU Affero General Public License as
-; published by the Free Software Foundation, either version 3 of the
-; License, or (at your option) any later version.
-
-; This program is distributed in the hope that it will be useful,
-; but WITHOUT ANY WARRANTY; without even the implied warranty of
-; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU Affero General Public License for more details.
-
-; You should have received a copy of the GNU Affero General Public License
-; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-(ns iyye.ioframes
-  (:require
-    [clojure.tools.logging :as log]
-    [iyye.persistence :as persistence]
-    [iyye.resource :as resource]))
-
-(defrecord InputSources [start-function input-listeners-list])
-(defn create-InputSources [start-function input-listeners-list] (InputSources. start-function input-listeners-list))
-(defrecord OutputActuators [start-function outputs-list])
-
-(defrecord IO [name start-function inputs-list outputs-list])
-
-(defn create-IO [name start-fumction inputs-list outputs-list] (IO. name start-fumction inputs-list outputs-list))
-
-(defn process-input [IO input]
-  (log/info (str "in: " (:name IO) input))
-  (for [func (map :input-listeners-list IO)
-        :when func] (func input))
-  (persistence/write-io-to-db @resource/num-days IO :input input))
-
-(defn process-output [IO output]
-  (log/info (str "out:" (:name IO) output))
-  ((first (:outputs-list (:outputs-list IO))) output)
-  (persistence/write-io-to-db @resource/num-days IO :output output))


Add a message in the jar task.

Add a message in the jar task.

--- src/leiningen/jar.clj
+++ src/leiningen/jar.clj
@@ -75,5 +75,6 @@
                       {:type :path :path (str (:root project) "/project.clj")}]]
        ;; TODO: support slim, etc
        (write-jar project jar-file filespecs)
+       (println "Created" jar-file)
        jar-file))
   ([project] (jar project (str (:name project) ".jar"))))


lein-release plugin: bumped version from 0.1.0 to 0.1.1-SNAPSHOT for next development cycle

--- re-frame-simple/project.clj
+++ re-frame-simple/project.clj
@@ -1,4 +1,4 @@
-(defproject re-view/re-frame-simple "0.1.0"
+(defproject re-view/re-frame-simple "0.1.1-SNAPSHOT"

   :description "re-view syntax for re-frame"


Add full metric logs to metrics endpoint (#1622)

* log the first 10 metrics as well

* sort

* preview

--- waiter/src/waiter/metrics_sync.clj
+++ waiter/src/waiter/metrics_sync.clj
@@ -563,8 +563,7 @@
         (throw-error-response-if-invalid-body
           #(nat-int? %) service-metrics [service-id instance-id "metrics" "active-request-count"] "Must be non-negative integer.")))

-    (log/info "received service metrics from external source." {:service-ids-preview (take 10 (keys service-metrics))
-                                                                :service-ids-count (count (keys service-metrics))})
+    (log/info "received service metrics from external source." {:service-metric-pairs-preview (take 10 service-metrics)})
     (let [clean-service-metrics (clean-service-id->instance-id->metric query-state-fn service-metrics)]
       (log/info "removed irrelevant services and instances." {:service-ids-preview (take 10 (keys clean-service-metrics))
                                                               :service-ids-count (count (keys clean-service-metrics))})


Add `treatment-times` iterator

Add `treatment-times` iterator

--- src/test_utils/sandbox.cljs
+++ src/test_utils/sandbox.cljs
@@ -88,9 +88,10 @@
                      (tuc/draw-normal z 4)]))]
     (iterate next-fn [md x y z])))

-(defn typical-treatment-times []
-  (let [[year-0 month-0 day-0 hour-0 minute-0 second-0 :as start] (tuc/rand-timestamp 2016 2026)
-        duration-hours (tuc/draw-normal 2.5 0.25)
+(defn typical-treatment-time-range
+  ([]
+   (let [[year-0 month-0 day-0 hour-0 minute-0 second-0 :as start] (tuc/rand-timestamp 2016 2026)
+        duration-hours (tuc/draw-normal 2.52 0.17)
         duration-hour (int duration-hours)
         duration-minute (int (* 60 (- duration-hours duration-hour)))
         duration-seconds (rand-nth (range 60))]
@@ -99,6 +100,31 @@
       (rem (+ hour-0 duration-hour) 24)
       (rem (+ minute-0 duration-minute) 60)
       duration-seconds]]))
+  ([[start-a start-mo start-d start-h start-min start-s]
+    [stop-a stop-mo stop-d stop-h stop-min stop-s]]
+   (let [start-duration (tuc/draw-normal 5.7 1.37)
+         start-duration-h (int start-duration)
+         start-duration-min (int (* 60 (- start-duration start-duration-h)))
+         start-duration-s (rand-nth (range 60))
+         start [start-a start-mo start-d
+                (+ start-h start-duration-h)
+                (+ start-min start-duration-min)
+                (+ start-s start-duration-s)]
+         stop-duration (tuc/draw-normal 2.52 0.17)
+         stop-duration-h (int stop-duration)
+         stop-duration-min (int (* 60 (- stop-duration stop-duration-h)))
+         stop-duration-s (rand-nth (range 60))
+         stop [start-a start-mo start-d
+               (+ (nth start 3) stop-duration-h)
+               (+ (nth start 4) stop-duration-min)
+               (+ (nth start 5) stop-duration-s)]]
+     [start stop])))
+
+(defn treatment-times []
+  (let [[start-0 stop-0] (typical-treatment-time-range)
+        next-fn (fn [[start-n-1 stop-n-1]]
+                  (typical-treatment-time-range start-n-1 stop-n-1))]
+    (iterate next-fn [start-0 stop-0])))

 (defn typical-stage-separation []
   (tuc/draw-normal 45 3))


Extend Bezier2 and Bezier3 to support IFlip

--- src/thi/ng/geom/bezier.cljc
+++ src/thi/ng/geom/bezier.cljc
@@ -109,6 +109,9 @@
 ;; ** Type implementations

 (extend-type Bezier2
+  g/IFlip
+  (flip [_]
+    (Bezier2. (reverse (get _ :points))))

   g/IVertexAccess
   (vertices
@@ -156,6 +159,9 @@
     (gu/sample-uniform udist include-last? (g/vertices _))))

 (extend-type Bezier3
+  g/IFlip
+  (flip [_]
+    (Bezier3. (reverse (get _ :points))))

   g/IVertexAccess
   (vertices


Remove dependency on trace

Remove dependency on trace

--- src/yada/representation.clj
+++ src/yada/representation.clj
@@ -5,7 +5,6 @@
    [clojure.java.io :as io]
    [clojure.string :as str]
    [clojure.tools.logging :refer :all]
-   [clojure.tools.trace :refer [deftrace]]
    [schema.core :as s]
    [yada.coerce :refer (to-set to-list)]
    [yada.charset :as charset]


Reverting tabs.cljs file back to original repo. I do not want to merge this file with the changes specific to this branch.

--- src/lt/objs/tabs.cljs
+++ src/lt/objs/tabs.cljs
@@ -105,10 +105,6 @@
   (str c (when (:dirty @e)
            " dirty")))

-(defui close-tab [obj] ;; TODO: Create x button - TWM
-  [:button "x"]
-  :click (fn [] (object/raise obj :close)))
-
 (defui item [multi e pos]
   [:li {:class (-> " "
                    (active? e multi)
@@ -117,7 +113,6 @@
         :title (->path e)
         :obj-id (object/->id e)
         :pos pos}
-   (close-tab e)   ;; TODO: Add 'x' button next to file name - TWM
    (->name e)]
   :click (fn []
            (active! e))


Updated snapshot benchmark results.

Updated snapshot benchmark results.

Signed-off-by: Peter Taoussanis <31b59c0e45453c97c3c2f1c22e7d4bf68ab97403@gmail.com>

--- benchmarks/benchmarks.clj
+++ benchmarks/benchmarks.clj
@@ -137,6 +137,7 @@
   (bench-carmine       (opts :requests 10000 :clients 1 :data-size 100))
   ;; {:ping 829.496, :set 933.46,  :get 882.737}
   ;; {:ping 865.845, :set 979.341, :get 986.603} ; With full bin, clj support
+  ;; {:ping 717.882, :set 811.658, :get 860.322} ; 0.8.2 snapshot 2012 Jun 11
   (bench-accession     (opts :requests 10000 :clients 1 :data-size 100))
   ;; {:ping 2418.782, :set "DNF", :get "DNF"}
   (bench-clj-redis     (opts :requests 10000 :clients 1 :data-size 100))


Juoksu pace histograms to the user interface

--- src/ontrail/stats.clj
+++ src/ontrail/stats.clj
@@ -24,9 +24,19 @@
        :distance (to-human-distance (get db-retmap :dist)) :numDistance (if (get db-retmap :dist) (get db-retmap :dist) 0)
        :pace (get-pace {:sport sport :duration true-duration :distance true-distance})
        :avghr (int (+ 0.5 (stats-avghr db-retmap)))
-       :count count}))
+       :count count
+       :paceHist (:paceHist db-retmap)
+       :paceHistBins (:paceHistBins db-retmap)}))

-(defn get-stats-summary [condition]
+(def hist-paces 30)
+(def paces (map #(- 7 (* % 0.15)) (range hist-paces)))
+(def comp-unit-paces (map #(* (/ 60 %) 1000) paces))
+
+(defn cumul [pace-hist]
+  (let [last-elem (last pace-hist)]
+    (map #(/ % last-elem) pace-hist)))
+
+(defn get-stats-summary [condition pace-histogram]
   (let [js-reduce "function(exercise, prev) {
                      if (exercise.distance > 0 && exercise.duration > 0) {
                         prev.tdist += exercise.distance;
@@ -36,6 +46,16 @@
                         prev.tavghr += exercise.avghr;
                         prev.hrcount += 1;
                       }
+                      var i = 0;
+                      if (prev.paceHistBins.length > 0) {
+                          for (i = 0; i < prev.paceHistBins.length; i++) {
+                              if (exercise.pace < prev.paceHistBins[i]) {
+                                  prev.paceHist[i] += exercise.distance;
+                              }
+                          }
+                      }
+                      exercise.paceHist = prev.paceHist
+                      exercise.paceHistBins = prev.paceHistBins
                       prev.dist += exercise.distance;
                       prev.dur += exercise.duration }"]
     (monger.conversion/from-db-object (monger.core/command {:group {:ns EXERCISE
@@ -46,16 +66,19 @@
                                                                               :dist 0
                                                                               :dur 0
                                                                               :tdist 0
-                                                                              :tdur 0}}})
+                                                                              :tdur 0
+                                                                              :paceHistBins pace-histogram
+                                                                              :paceHist (take hist-paces (repeat 0))}}})
       true)))

-(defn get-stats [query sport]
-  (to-stats-summary (get-stats-summary query) sport))
+(defn get-stats [query sport pace-histogram]
+  (to-stats-summary (get-stats-summary query pace-histogram) sport))

 (defn sport-detail [params sport user]
   (if (= "true" (params :stats))
     (let [monger-filter (make-query-from params)
-        stats (get-stats monger-filter sport)]
+          pacehist (if (= sport "Juoksu") comp-unit-paces [])
+          stats (get-stats monger-filter sport pacehist)]
       (.info logger (str monger-filter " " " for sport " sport " for user " user))
-      {:action "other" :target sport :stats stats})
+      {:action "other" :target sport :stats stats })
     {:action "other" :target sport}))


add missing brackets

add missing brackets

--- src/overtone/core.clj
+++ src/overtone/core.clj
@@ -1,5 +1,5 @@
 (ns overtone.core
-  (:use overtone.util ns)
+  (:use [overtone.util ns])
   (:require clojure.stacktrace
             midi overtone.osc byte-spec
             [overtone.algo chance scaling position trig]


Get rid of double paren around channel

Get rid of double paren around channel

--- test/eulalie/test/http.cljc
+++ test/eulalie/test/http.cljc
@@ -17,11 +17,11 @@
     (let [reqs  (async/chan (count resps))
           resps (cond-> resps (coll? resps) async/to-chan)
           {:keys [port stop!]}
-          (<? ((start-local-server!
-                (fn [req]
-                  (go-catching
-                    (>! reqs (walk/keywordize-keys req))
-                    (<? resps))))))]
+          (<? (start-local-server!
+               (fn [req]
+                 (go-catching
+                   (>! reqs (walk/keywordize-keys req))
+                   (<? resps)))))]
       (try
         (let [result (<? (bodyf {:port port
                                  :url  (url (str "http://localhost:" port))


throwing error on deleted instances

throwing error on deleted instances

--- src/aws/provider.clj
+++ src/aws/provider.clj
@@ -42,6 +42,14 @@
 (defmacro ec2 [f & args]
  `(~f (assoc (creds) :endpoint ~'endpoint) ~@args))

+(defn instance-id [uuid]
+   (if-let [id (@ids uuid)]
+     id
+     (throw+
+       {:type ::aws:missing-id :message
+        "Instance id not found, make sure no to address deleted instances" :uuid uuid})
+     ))
+
 (defconstrainedrecord Instance [endpoint conf uuid]
   "An Ec2 instance, uuid used for instance-id tracking"
   [(empty? (:errors (validate conf instance-valid)))
@@ -53,19 +61,19 @@
           this)
   (delete [this]
           (debug "deleting" uuid)
-          (ec2 terminate-instances (@ids uuid))
+          (ec2 terminate-instances (instance-id uuid))
           (wait-for-status this "terminated" {:timeout [5 :minute]})
           (swap! ids dissoc uuid))
   (start [this]
          (debug "starting" uuid)
-         (ec2 start-instances (@ids uuid))
+         (ec2 start-instances (instance-id uuid))
          (wait-for-status this "running" {:timeout [5 :minute]}))
   (stop [this]
         (debug "stopping" uuid )
-        (ec2 stop-instances  (@ids uuid))
+        (ec2 stop-instances  (instance-id uuid))
         (wait-for-status this "stopped" {:timeout [2 :minute]}))
   (status [this]
-          (-> (ec2 describe-instances (instance-id-filter (@ids uuid)))
+          (-> (ec2 describe-instances (instance-id-filter (instance-id uuid)))
               first :instances first :state :name
               )))


index lexemes where path(lexeme) = value, or value = :top, or do not have the path

--- src/babel/index.cljc
+++ src/babel/index.cljc
@@ -162,7 +162,7 @@
     (let [val (first vals-at-path)]
       (merge {val
               (filter (fn [lexeme]
-                        (or (= :top (get-in lexeme path))
+                        (or (= :top (get-in lexeme path :top))
                             (= val
                                (get-in lexeme path))))
                       lexemes)}


whitespace

whitespace

--- src/babel/latin.cljc
+++ src/babel/latin.cljc
@@ -1,13 +1,14 @@
 (ns babel.latin
   (:refer-clojure :exclude [get-in])
-  (:require [babel.latin.morphology :as morph]
-            [babel.lexiconfn :refer [default listify map-function-on-map-vals
-                                     verb-pred-defaults]]
-            [babel.encyclopedia :as encyc]
-            [clojure.java.io :refer [resource]]
-            [clojure.repl :refer [doc]]
-            [clojure.tools.logging :as log]
-            [dag_unify.core :refer [fail? get-in strip-refs unifyc]]))
+  (:require
+   [babel.latin.morphology :as morph]
+   [babel.lexiconfn :refer [default listify map-function-on-map-vals
+                            verb-pred-defaults]]
+   [babel.encyclopedia :as encyc]
+   [clojure.java.io :refer [resource]]
+   [clojure.repl :refer [doc]]
+   [clojure.tools.logging :as log]
+   [dag_unify.core :refer [fail? get-in strip-refs unifyc]]))

 (defn edn2lexicon [resource]
   (-> (read-string (slurp resource)) ;; read .edn file into a Clojure map.
@@ -23,7 +24,6 @@

 (def lexicon
   (-> (edn2lexicon (resource "babel/latin/lexicon.edn"))
-

       (default ;; intransitive verbs' :obj is :unspec.
        {:synsem {:cat :verb


remove old TODO

remove old TODO

--- src/babel/reader.clj
+++ src/babel/reader.clj
@@ -158,7 +158,7 @@
         source-expression
         (source-timing-fn (generate source-spec source-model))]
     (let [pairing
-          {:target ((:morph target-model) target-expression) ;; TODO: hard-wired to Italian.
+          {:target ((:morph target-model) target-expression)
            :pred (unify/strip-refs
                   (unify/get-in target-expression [:synsem :sem :pred]))
            :tense (unify/get-in target-expression [:synsem :sem :tense])


making progress on /reader web service

making progress on /reader web service

--- src/babel/reader.clj
+++ src/babel/reader.clj
@@ -20,6 +20,7 @@
 (declare json-read-str)

 ;; web service that translates babel.reader's API and an HTTP client.
+;; http://localhost:3001/reader?target_spec={%22root%22:{%22italiano%22:{%22italiano%22:%22scrivere%22}}%20%22synsem%22:%20{%22sem%22:%20{%22tense%22:%22past%22,%20%22aspect%22:%22perfect%22}}}
 (def routes
   (compojure/routes
       (GET "/" request
@@ -30,23 +31,20 @@
                   source-locale "US"
                   target "it"
                   target-locale "IT"
-                  target_spec
-                  (json-read-str (if-let [target_spec (get (:query-params request) "target_spec")]
-                              target_spec "{}"))
-                  ]
-              (write-str {:source "some english stuff..."
+                  target_spec (json-read-str
+                               (if-let [target_spec (get (:query-params request) "target_spec")]
+                                 target_spec "{}"))
+                  gcacs (try
+                          (generate-question-and-correct-set
+                           target_spec
+                           source source-locale
+                           target target-locale)
+                          (catch Exception e
+                            {:exception (str e)}))]
+              (write-str {:source (get-in gcacs [:source])
                           :target_spec target_spec
-                          :g-q-a-c-s
-                          (try
-                            (generate-question-and-correct-set
-                             target_spec
-                             source source-locale
-                             target target-locale)
-                            (catch Exception e
-                              {:exception (str e)}))
                           ;; TODO: eventually add :source-v2
-                          :targets ["some italian stuff one",
-                                    "some italian stuff two"]
+                          :targets (get-in gcacs [:targets])
                           :targets-v2 [{:surface "some italian stuff one"
                                         :roots ["italian","stuff"]}]}))})


Clean up the tests

Clean up the tests

--- test/io/aviso/rook_test.clj
+++ test/io/aviso/rook_test.clj
@@ -26,11 +26,16 @@
        ",request=" (count request)
        ",meth=" request-method))

-(defn mkrequest [method path]
-  ((-> identity
-       ring.middleware.keyword-params/wrap-keyword-params
-       ring.middleware.params/wrap-params)
-   (mock/request method path)))
+
+(defn param-handling [handler]
+  (-> handler
+      ring.middleware.keyword-params/wrap-keyword-params
+      ring.middleware.params/wrap-params))
+
+(defn mkrequest [method path namespace]
+  (let [handler (-> (namespace-middleware identity namespace)
+                    param-handling)]
+    (handler (mock/request method path))))

 (defn u-show [id]
   (str "!" id "!"))
@@ -48,55 +53,69 @@
 (in-ns 'io.aviso.rook-test)

 (deftest namespace-middleware-test
-  (let [test-mw (is (namespace-middleware (fn [request] ((:test-fun request) request)) 'io.aviso.rook-test))
-        test-mw2 (is (namespace-middleware (fn [request] ((:test-fun request) request)) 'io.aviso.rook-test2))]
-    (is (= {:arg-resolvers nil :metadata (meta #'io.aviso.rook-test/index) :function #'io.aviso.rook-test/index
-            :namespace     'io.aviso.rook-test}
-           (test-mw (assoc (mkrequest :get "/?limit=100") :test-fun :rook))))
-    (is (= {:arg-resolvers nil :metadata (meta #'io.aviso.rook-test/show) :function #'io.aviso.rook-test/show
-            :namespace     'io.aviso.rook-test}
-           (test-mw (assoc (mkrequest :get "/123") :test-fun :rook))))
-    (is (= {:arg-resolvers nil :metadata (meta #'io.aviso.rook-test/activate) :function #'io.aviso.rook-test/activate
-            :namespace     'io.aviso.rook-test}
-           (test-mw (assoc (mkrequest :post "/123/activate") :test-fun :rook))))
-    (is (nil? (test-mw (assoc (mkrequest :get "/123/activate") :test-fun :rook))))
-    (is (nil? (test-mw (assoc (mkrequest :put "/") :test-fun :rook))))
-    (is (nil? (test-mw (assoc (mkrequest :put "/123") :test-fun :rook))))
-    (is (= {:arg-resolvers nil
-            :metadata      (meta #'io.aviso.rook-test2/index)
-            :function      #'io.aviso.rook-test2/index
-            :namespace     'io.aviso.rook-test2}
-           (test-mw2 (assoc (mkrequest :get "/?offset=100") :test-fun :rook))))))
+
+  (are [method path namespace expected-function]
+    (= expected-function
+       (-> (mkrequest method path namespace)
+           (get-in [:rook :function])))
+
+    :get "/?limit=100" 'io.aviso.rook-test #'index
+
+    :get "/123" 'io.aviso.rook-test #'show
+
+    :post "/123/activate" 'io.aviso.rook-test #'activate
+
+    :get "/123/activate" 'io.aviso.rook-test nil
+
+    :put "/" 'io.aviso.rook-test nil
+
+    :put "/123" 'io.aviso.rook-test nil
+
+    :get "/?offset-100" 'io.aviso.rook-test2 #'io.aviso.rook-test2/index))

 (deftest namespace-handler-test
-  (when-let [test-mw (is (namespace-middleware rook-handler 'io.aviso.rook-test))]
-    (is (= {:status 200 :body "limit=100"}
-           (test-mw (mkrequest :get "/?limit=100"))))
-    (is (= {:status 200 :body "id=123"}
-           (test-mw (mkrequest :get "/123"))))
-    (is (= "test1=1test,id=123,test2=,test3=,test4=,request=13,meth="
-           (test-mw (mkrequest :post "/123/activate?test1=1test"))))
-    (is (nil? (test-mw (assoc (mkrequest :get "/123/activate") :test-fun :rook))))
-    (is (nil? (test-mw (assoc (mkrequest :put "/") :test-fun :rook))))
-    (is (nil? (test-mw (assoc (mkrequest :put "/123") :test-fun :rook))))))
+
+  (let [test-mw (-> (namespace-middleware rook-handler 'io.aviso.rook-test)
+                    param-handling)]
+
+    (are [method path expected-result]
+      (= expected-result
+         (-> (mock/request method path) test-mw))
+
+      :get "/?limit=100" {:status 200 :body "limit=100"}
+
+      :get "/123" {:status 200 :body "id=123"}
+
+      :post "/123/activate?test1=1test" "test1=1test,id=123,test2=,test3=,test4=,request=13,meth="
+
+      :get "/123/activate" nil
+
+      :put "/" nil
+
+      :put "/123" nil)))

 (deftest complete-handler-test
-  (when-let [test-mw (is (namespace-middleware
-                           (arg-resolver-middleware rook-handler
-                                                    (build-map-arg-resolver :test1 "TEST!" :test2 "TEST@" :test3 "TEST#" :request-method :1234)
-                                                    (build-fn-arg-resolver :test4 (fn [request] (str "test$" (:uri request))))
-                                                    #'request-arg-resolver)
-                           'io.aviso.rook-test))]
+  (let [test-mw (-> (namespace-middleware rook-handler 'io.aviso.rook-test)
+                    (arg-resolver-middleware
+                      (build-map-arg-resolver :test1 "TEST!" :test2 "TEST@" :test3 "TEST#" :request-method :1234)
+                      (build-fn-arg-resolver :test4 (fn [request] (str "test$" (:uri request))))
+                      #'request-arg-resolver)
+                    param-handling)]
     (is (= "test1=TEST!,id=123,test2=TEST@,test3=TEST#,test4=test$/123/activate,request=13,meth=:1234"
-           (test-mw (mkrequest :post "/123/activate?test1=1test"))))))
+           (->
+             (mock/request :post "/123/activate?test1=1test")
+             test-mw)))))

 (deftest arg-resolver-test
   (let [map-resolver (build-map-arg-resolver :test1 "TEST!" :test2 "TEST@" :test3 "TEST#" :request-method :1234)
         fn-resolver (build-fn-arg-resolver :test4 (fn [request] (str "test$" (:uri request))))
         arg-resolvers1 [map-resolver fn-resolver #'request-arg-resolver]
         arg-resolvers2 [#'request-arg-resolver map-resolver fn-resolver]
-        test-request (mkrequest :post "/123/activate?test_value=TT!")]
+        handler (-> identity param-handling)
+        test-request (->
+                       (mock/request :post "/123/activate?test_value=TT!")
+                       handler)]
     (is (= "TEST!" (extract-argument-value 'test1 test-request [map-resolver])))
     (is (= "TEST@" (extract-argument-value 'test2 test-request [map-resolver])))
     (is (= "TEST#" (extract-argument-value 'test3 test-request [map-resolver])))
@@ -114,7 +133,7 @@
     (is (= "test$/123/activate" (extract-argument-value 'test4 test-request arg-resolvers2)))))

 (deftest nested-context-test
-  (let [test-mw (is (compojure/context "/merchant" []
+  (let [test-mw (-> (compojure/context "/merchant" []
                                        (namespace-middleware
                                          (compojure/routes
                                            (compojure/context "/:id/activate" []
@@ -126,20 +145,35 @@
                                                                   rook-handler)
                                                                 'io.aviso.rook-test2))
                                            rook-handler)
-                                         'io.aviso.rook-test)))
-        test-mw2 (is (namespace-handler "/merchant" 'io.aviso.rook-test
+                                         'io.aviso.rook-test))
+                    param-handling)
+        test-mw2 (-> (namespace-handler "/merchant" 'io.aviso.rook-test
                                         (compojure/GET "/test" [] {:body "test!"})
                                         (namespace-handler "/:id/activate" 'io.aviso.rook-test2
-                                                           (namespace-handler "/:key" 'io.aviso.rook-test3))))
-        ]
-    (is (nil? (test-mw (mkrequest :post "/456/activate"))))
-    (is (= {:status 200 :body "limit="} (test-mw (mkrequest :get "/merchant/"))))
-    (is (= {:status 200 :body "id=6789"} (test-mw (mkrequest :get "/merchant/6789"))))
-    (is (= {:body "id=4567&offset=1234"} (test-mw (mkrequest :get "/merchant/4567/activate?offset=1234"))))
-    (is (= {:body "test3,id=4567,key=test_key"} (test-mw (mkrequest :get "/merchant/4567/activate/test_key"))))
-    (is (nil? (test-mw2 (mkrequest :post "/456/activate"))))
-    (is (= {:status 200 :body "limit="} (test-mw2 (mkrequest :get "/merchant/"))))
-    (is (= {:status 200 :body "id=6789"} (test-mw2 (mkrequest :get "/merchant/6789"))))
-    (is (= {:body "id=4567&offset=1234"} (test-mw2 (mkrequest :get "/merchant/4567/activate?offset=1234"))))
-    (is (= {:body "test3,id=4567,key=test_key"} (test-mw2 (mkrequest :get "/merchant/4567/activate/test_key"))))
-    (is (= {:status 200 :headers {} :body "test!"} (test-mw2 (mkrequest :get "/merchant/test"))))))+                                                           (namespace-handler "/:key" 'io.aviso.rook-test3)))
+                     param-handling)]
+    (are [handler method path expected-result]
+      (= expected-result
+         (handler (mock/request method path)))
+
+      test-mw :post "/456/activate" nil
+
+      test-mw :get "/merchant/" {:status 200 :body "limit="}
+
+      test-mw :get "/merchant/6789" {:status 200 :body "id=6789"}
+
+      test-mw :get "/merchant/4567/activate?offset=1234" {:body "id=4567&offset=1234"}
+
+      test-mw :get "/merchant/4567/activate/test_key" {:body "test3,id=4567,key=test_key"}
+
+      test-mw2 :post "/456/activate" nil
+
+      test-mw2 :get "/merchant/" {:status 200 :body "limit="}
+
+      test-mw2 :get "/merchant/6789" {:status 200 :body "id=6789"}
+
+      test-mw2 :get "/merchant/4567/activate?offset=1234" {:body "id=4567&offset=1234"}
+
+      test-mw2 :get "/merchant/4567/activate/test_key" {:body "test3,id=4567,key=test_key"}
+
+      test-mw2 :get "/merchant/test" {:status 200 :headers {} :body "test!"})))


Docstring.

Docstring.

--- test/lib_onyx/join_test.clj
+++ test/lib_onyx/join_test.clj
@@ -99,7 +99,8 @@
     :onyx/type :function
     :onyx/consumption :concurrent
     :lib-onyx.join/by :id
-    :onyx/batch-size batch-size}
+    :onyx/batch-size batch-size
+    :onyx/doc "Performs an in-memory streaming join on segments with a common key"}

    {:onyx/name :out
     :onyx/ident :hornetq/write-segments


Use better names for entire catalog function

--- src/catalog/core.clj
+++ src/catalog/core.clj
@@ -45,7 +45,7 @@
    (layout.dtbook/dtbook (slurp editorial) (slurp recommendations))
    (->> (spit (io/file out)))))

-(defn hörfilme [in out]
+(defn hörfilme-all [in out]
   (-> in
    vubis/read-file
    (vubis/order-and-group vubis/get-update-keys-hörfilm)


log if client-state is truly nil.

log if client-state is truly nil.

This is to debug intermittent failures on EAP.

--- web/dev-resources/testing/app.clj
+++ web/dev-resources/testing/app.clj
@@ -97,7 +97,9 @@
   (@client-defined-handler request))

 (defn get-client-state [_]
-  (-> @client-state (maybe-deref 30000 :failure!) pr-str response))
+  (let [state (maybe-deref @client-state 30000 :failure!)]
+    (when (nil? state) (println "CLIENT-STATE IS NIL!"))
+    (-> state pr-str response)))

 (defroutes routes
   (GET "/" [] counter)


Better error message for missing properties file

--- test/pundit/test/helper.clj
+++ test/pundit/test/helper.clj
@@ -7,10 +7,11 @@
 ; Private stuff

 (def ^:private props
-  (into {} (doto (java.util.Properties.)
-             (.load (-> (Thread/currentThread)
-                        .getContextClassLoader
-                        (.getResourceAsStream "test.properties"))))))
+  (if-let [props (-> (Thread/currentThread)
+                   .getContextClassLoader
+                   (.getResourceAsStream "test.properties"))]
+    (into {} (doto (java.util.Properties.) (.load props)))
+    (throw (Exception. "Properties file not found, see README"))))

 (def ^:private auth
   [(props "parse.app") (props "parse.key")])


Tag generated json as a String.

Tag generated json as a String.

--- src/clj/clj_json.clj
+++ src/clj/clj_json.clj
@@ -6,7 +6,9 @@

 (defvar- #^JsonFactory factory (JsonFactory.))

-(defn generate-string [obj]
+(defn generate-string
+  {:tag String}
+  [obj]
   (let [sw        (StringWriter.)
         generator (.createJsonGenerator factory sw)]
     (JsonExt/generate generator obj)


More docs for cursor

More docs for cursor

--- src/reagent/core.cljs
+++ src/reagent/core.cljs
@@ -229,13 +229,17 @@
 The first parameter can also be a function, that should look something
 like this:

-(defn digit-filter
+(defn set-get
   ([k] (get-in @state k))
   ([k v] (swap! state assoc-in k v)))

 The function will be called with one argument – the path passed to
 cursor – when the cursor is deref'ed, and two arguments (path and new
 value) when the cursor is modified.
+
+Given that set-get function, (and that state is a Reagent atom, or
+another cursor) these cursors are equivalent:
+(cursor state [:foo]) and (cursor set-get [:foo]).
 "
   ([src path]
    (ratom/cursor src path)))


Add :superseded-by meta to reagent.core/render

--- src/reagent/core.cljs
+++ src/reagent/core.cljs
@@ -368,6 +368,7 @@
                                 compiler)))

 (defn render
-  {:deprecated "0.10.0"}
+  {:deprecated "0.10.0"
+   :superseded-by "reagent.dom/render"}
   [& _]
   (throw (js/Error. "Reagent.core/render function was moved to reagent.dom namespace in Reagent v1.0.")))


(SERVER-1183) More env-class-info-tag assertion changes

This commit includes a couple more changes to the assertions in the
`environment-class-info-tags` tests:

1) Check for an explicit cache-generation-id value instead of just "not
   nil" in a couple of places.

2) Renamed the production-cache-id-after-first/second-update variables
   to production-cache-id-before/after-marked-expired for clarity.

3) Added an assertion to ensure that cache-generation-id changes from
   before a set tag to after a set tag call and from before mark
   environment expired call to after the mark environment expired call.

--- test/unit/puppetlabs/services/jruby/jruby_puppet_service_test.clj
+++ test/unit/puppetlabs/services/jruby/jruby_puppet_service_test.clj
@@ -305,7 +305,7 @@
          (is (nil? (jruby-protocol/get-environment-class-info-tag
                     service
                     "production")))
-         (is (not (nil? production-cache-id-before-first-update))))
+         (is (= 1 production-cache-id-before-first-update)))
        (testing "when environment info first set to cache"
          (jruby-protocol/set-environment-class-info-tag!
           service
@@ -340,8 +340,8 @@
               service
               "test")]
          (testing "when environment info reset in the cache"
-           (is (not (nil? production-cache-id-after-first-update)))
-           (is (not (nil? test-cache-id-after-first-update)))
+           (is (= 2 production-cache-id-after-first-update))
+           (is (= 2 test-cache-id-after-first-update))
            (jruby-protocol/set-environment-class-info-tag!
             service
             "production"
@@ -358,18 +358,20 @@
                    service
                    "test")))
            (testing "and environment expired between get and corresponding set"
-             (let [production-cache-id-after-second-update
+             (let [production-cache-id-before-marked-expired
                    (jruby-protocol/get-environment-class-info-cache-generation-id!
                     service
                     "production")
                    _ (jruby-protocol/mark-environment-expired! service
                                                                "production")
-                   production-cache-id-after-third-update
+                   production-cache-id-after-marked-expired
                    (jruby-protocol/get-environment-class-info-cache-generation-id!
                     service
                     "production")]
                (is (not= production-cache-id-after-first-update
-                         production-cache-id-after-second-update))
+                         production-cache-id-before-marked-expired))
+               (is (not= production-cache-id-before-marked-expired
+                         production-cache-id-after-marked-expired))
                (is (= nil (jruby-protocol/get-environment-class-info-tag
                            service
                            "production"))
@@ -380,20 +382,22 @@
                 service
                 "production"
                 "89abprod"
-                production-cache-id-after-second-update)
+                production-cache-id-before-marked-expired)
                (is (= nil (jruby-protocol/get-environment-class-info-tag
                            service
                            "production"))
                    (str "Tag should not have been changed by the prior set "
                         "since the environment was marked expired after the "
-                        "cache was read for `production-second-update`"))
-               (is (= production-cache-id-after-third-update
+                        "cache was read for "
+                        "`production-cache-id-before-marked-expired`"))
+               (is (= production-cache-id-after-marked-expired
                       (jruby-protocol/get-environment-class-info-cache-generation-id!
                        service
                        "production"))
                    (str "Cache id should not have been changed by the prior "
                         "set since the environment was marked expired after "
-                        "cache was read for `production-second-update`")))))
+                        "cache was read for "
+                        "`production-cache-id-before-marked-expired`")))))
          (testing "when an individual environment is marked expired"
            (let [production-cache-id-before-marked-expired
                  (jruby-protocol/get-environment-class-info-cache-generation-id!


fix name convention

fix name convention

--- src/rex/dispatch.cljs
+++ src/rex/dispatch.cljs
@@ -6,18 +6,18 @@
                                 get-watchers
                                 action]
   (let [old-store-value (get-store)]
-    (update-store (fn [initial-state]
-                    (reduce (fn [state reducer]
+    (update-store (fn [initial-store]
+                    (reduce (fn [store reducer]
                               (let [{name :name
                                      reduce-fn :fn} reducer]
-                                (reduce-fn state action)))
-                            initial-state
+                                (reduce-fn store action)))
+                            initial-store
                             (get-reducers))))
     (let [new-store-value (get-store)]
-            (doseq [watcher (get-watchers)]
-              (let [{callback :fn} watcher]
-                (callback old-store-value
-                          new-store-value))))
+      (doseq [watcher (get-watchers)]
+        (let [{callback :fn} watcher]
+          (callback old-store-value
+                    new-store-value))))
     (get-store)))

 (defn- dispatch-using-middlewares [get-store


take the first as example

take the first as example

--- ohack/src/ohack/core.clj
+++ ohack/src/ohack/core.clj
@@ -272,21 +272,23 @@
       ]

   ;; map over each 6-line-set...
-  (doseq [play-map (for [line-set sorted-grouped-line-set-list]
-                      ;; map over each line in the line-set, with string index
-                      (apply
-                       merge-with concat
-                       (for [[string-index tab-line] (map-indexed vector line-set)]
-                         ;; now we need to parse the tab-line...
-                         ;; collect each string's results into into {}
-                         (into {}
-                               ;; create index -> []
-                               ;; when no string is played, for rest
-                               (map (fn [[k v]] [k (if v
-                                                    [string-index v]
-                                                    [])])
-                                    (parse-guitar-tab-line tab-line)))
-                         )))]
-    (prn play-map))
+  ;; using the first value as example let's get the playable notes
+  (let [play-map (first (for [line-set sorted-grouped-line-set-list]
+                          ;; map over each line in the line-set, with string index
+                          (apply
+                           merge-with concat
+                           (for [[string-index tab-line] (map-indexed vector line-set)]
+                             ;; now we need to parse the tab-line...
+                             ;; collect each string's results into into {}
+                             (into {}
+                                   ;; create index -> []
+                                   ;; when no string is played, for rest
+                                   (map (fn [[k v]] [k (if v
+                                                        [string-index v]
+                                                        [])])
+                                        (parse-guitar-tab-line tab-line)))
+                             )))
+                        )]
+    play-map)

   )


:bug: Ignore deleted files in dashboard search

--- backend/src/uxbox/services/queries/files.clj
+++ backend/src/uxbox/services/queries/files.clj
@@ -62,6 +62,7 @@
     inner join projects as pr on (file.project_id = pr.id)
      left join page on (file.id = page.file_id)
     where file.name ilike ('%' || ? || '%')
+      and file.deleted_at is null
    window pages_w as (partition by file.id order by page.created_at
                       range between unbounded preceding
                                 and unbounded following)


Fixes metadata dates test to be more readable, using date-time-parser instead

--- umm-spec-lib/test/cmr/umm_spec/test/umm_to_xml_mappings/dif10.clj
+++ umm-spec-lib/test/cmr/umm_spec/test/umm_to_xml_mappings/dif10.clj
@@ -5,7 +5,7 @@
     [cmr.umm-spec.umm-to-xml-mappings.dif10 :as dif10]
     [cmr.common.xml.parse :refer :all]
     [cmr.common.xml.simple-xpath :refer [select]]
-    [cmr.umm-spec.umm-json :as umm-json]))
+    [cmr.common.date-time-parser :as dtp]))

 (deftest dif10-direct-distribution-information-test
   "Testing the dif10 direct distribution information translation from umm-c to dif10."
@@ -31,18 +31,22 @@

 (deftest dif10-metadata-dates-test
   "Testing the dif10 metadata dates translation from umm-c to dif10"
-  (let [json-input1 "{\"MetadataDates\":
-                     [{\"Date\":\"2021-01-01T00:00:00.000Z\",\"Type\":\"CREATE\"},
-                     {\"Date\":\"2021-03-01T00:00:00.000Z\",\"Type\":\"UPDATE\"},
-                     {\"Date\":\"2024-01-01T00:00:00.000Z\",\"Type\":\"DELETE\"},
-                     {\"Date\":\"2022-01-01T00:00:00.000Z\",\"Type\":\"REVIEW\"}]}"
-        result1 (dif10/umm-c-to-dif10-xml (umm-json/json->umm {} :collection json-input1))
+  (let [result1 (dif10/umm-c-to-dif10-xml
+                 {:MetadataDates [{:Date (dtp/parse-datetime "2021-01-01T00:00:00.000Z")
+                                   :Type "CREATE"}
+                                  {:Date (dtp/parse-datetime "2021-03-01T00:00:00.000Z")
+                                   :Type "UPDATE"}
+                                  {:Date (dtp/parse-datetime "2024-01-01T00:00:00.000Z")
+                                   :Type "DELETE"}
+                                  {:Date (dtp/parse-datetime "2022-01-01T00:00:00.000Z")
+                                   :Type "REVIEW"}]})
         result1-dates (first (select result1 "/DIF/Metadata_Dates"))

-        json-input2 "{\"MetadataDates\":
-                     [{\"Date\" : \"1992-01-01T00:00:00.000Z\",\"Type\" : \"CREATE\"},
-                     {\"Date\" : \"2016-08-03T00:00:00.000Z\",\"Type\" : \"UPDATE\"}]}"
-        result2 (dif10/umm-c-to-dif10-xml (umm-json/json->umm {} :collection json-input2))
+        result2 (dif10/umm-c-to-dif10-xml
+                 {:MetadataDates [{:Date (dtp/parse-datetime "1992-01-01T00:00:00.000Z")
+                                   :Type "CREATE"}
+                                  {:Date (dtp/parse-datetime "2016-08-03T00:00:00.000Z")
+                                   :Type "UPDATE"}]})
         result2-dates (first (select result2 "/DIF/Metadata_Dates"))

         result3 (dif10/umm-c-to-dif10-xml nil)


Improved report DB creation.

Improved report DB creation.

Fixed up the skipping logic a bit and keep better track of reasons for
skipping records.

--- src/com/lemondronor/orbital_detector/createdb.clj
+++ src/com/lemondronor/orbital_detector/createdb.clj
@@ -4,6 +4,7 @@
             [clj-time.core :as time]
             [clj-time.format :as timefmt]
             [clojure.java.jdbc :as jdbc]
+            [clojure.pprint :as pprint]
             [com.lemondronor.orbital-detector.planeplotter :as planeplotter]
             [com.lemonodor.gflags :as gflags]))

@@ -42,6 +43,11 @@
    ;;  [:heading :real]))))

+(defn has-position? [r]
+  (not (and (zero? (:lat (:position r)))
+            (zero? (:lon (:position r))))))
+
+
 (defn add-records [db log]
   (jdbc/with-db-transaction [t-con db]
     (let [ping-window (gflags/flags :time-window-secs)
@@ -49,19 +55,38 @@
       (loop [records log
              previous-ping-time {}
              num-inserted 0
-             num-skipped 0]
+             num-skipped {:no-position 0
+                             :non-monotonic-time 0
+                             :rate-too-high 0}]
         (if (seq records)
           (let [r (first records)
                 rstrecords (rest records)
                 icao (:icao r)
                 ping-ts (:timestamp r)
                 previous-ping-ts (previous-ping-time icao)]
-            (if (and (or (not position-only?)
-                         (> (:lat (:position r)) 0.0))
-                     (or (nil? previous-ping-ts)
-                         (>= (time/in-seconds
-                              (time/interval previous-ping-ts ping-ts))
-                             ping-window)))
+            (cond
+              ;; No position, and position is required.
+              (and position-only? (not (has-position? r)))
+              (recur rstrecords
+                     previous-ping-time
+                     num-inserted
+                     (update-in num-skipped [:no-position] inc))
+              ;; Non-monotonic time.
+              (and previous-ping-ts
+                   (time/before? ping-ts previous-ping-ts))
+              (recur rstrecords
+                     previous-ping-time
+                     num-inserted
+                     (update-in num-skipped [:non-monotonic-time] inc))
+              ;; Too soon since last ping.
+              (and previous-ping-ts
+                   (< (time/in-seconds (time/interval previous-ping-ts ping-ts))
+                      ping-window))
+              (recur rstrecords
+                     previous-ping-time
+                     num-inserted
+                     (update-in num-skipped [:rate-too-high] inc))
+              :else
               (do
                 (jdbc/insert!
                  t-con
@@ -80,14 +105,11 @@
                 (recur rstrecords
                        (assoc previous-ping-time icao ping-ts)
                        (inc num-inserted)
-                       num-skipped))
-              (recur rstrecords
-                     previous-ping-time
-                     num-inserted
-                     (inc num-skipped))))
+                       num-skipped))))
           (do
             (println "Inserted" num-inserted "records")
-            (println "Skipped" num-skipped "records")))))))
+            (println "Skipped:" (reduce + (map second num-skipped)) "total")
+            (pprint/print-table [num-skipped])))))))

@@ -95,4 +117,10 @@
   (let [args (gflags/parse-flags (cons nil args))
         db (db-spec (first args))]
     (create-tables db)
-    (add-records db (planeplotter/read-log (second args)))))
+    (add-records
+     db
+     (mapcat
+      (fn [log-path]
+        (println "Reading " log-path)
+        (planeplotter/read-log log-path))
+      (rest args)))))


Moving inputs to components

Moving inputs to components

--- resources/public/js/test/ohds/components.cljs
+++ resources/public/js/test/ohds/components.cljs
@@ -1,4 +1,18 @@
 (ns ohds.components)
+
+(defn atom-input [value id]
+  [:input {:type "text"
+           :value @value
+           :id id
+           :class "form-control"
+           :on-change #(reset! value (-> % .-target .-value))}])
+
+(defn atom-input-password [value id]
+  [:input {:type "password"
+           :value @value
+           :id id
+           :class "form-control"
+           :on-change #(reset! value (-> % .-target .-value))}])

 (defn hamburger []
   [:button {:type "button"


added more tools

added more tools

--- .lein/profiles.clj
+++ .lein/profiles.clj
@@ -24,4 +24,14 @@
    [lein-checkall "0.1.1"]
    #_[samsara/lein-template "0.1.0-SNAPSHOT"]
    ]
+  }
+ :tools2
+ {:plugins
+  [[com.livingsocial/lein-dependency-check "0.2.2"] ;; security scan
+   [lein-instant-cheatsheet "2.2.1"]
+   [org.timmc/nephila "0.3.0"] ;; namespace dep graph
+   ]
   }}
+
+
+;; lein-extend-cp - local lib dir


Add debugger into lein profiles.

Add debugger into lein profiles.

--- .lein/profiles.clj
+++ .lein/profiles.clj
@@ -1,5 +1,6 @@
 {:user {:dependencies [[clj-stacktrace "0.2.8"]
                        [spyscope "0.1.5"]
+                       [debugger "0.1.4"]
                        [com.aphyr/prism "0.1.2"]
                        [slamhound "1.5.5"]]
         :plugins [[lein-difftest "2.0.0"]


GitHub Issue #23 - this and the last commit allow us to use Advanced Compilation mode

--- src-cljs/cljsbuild_ui/exec.cljs
+++ src-cljs/cljsbuild_ui/exec.cljs
@@ -287,6 +287,13 @@

 ;; I fought with this for hours re: trying to kill the process from node.js
 ;; this feels hacky, but it seems to work
+
+
+;; TODO: need a callback here, having a race condition when closing the app
+;; and you have multiple processes going
+;; need a "Shutting down" screen too
+
+
 (defn- kill-auto-on-unix [pid]
   (let [child (js-spawn "ps" (array "-o" "pid,ppid"))]
     (.setEncoding (.-stdout child) "utf8")
@@ -316,7 +323,7 @@
     (.on child "close" #(on-close-child c))

     ;; save the child pid
-    (swap! auto-pids assoc prj-key (.-pid child))
+    (swap! auto-pids assoc prj-key (aget child "pid"))

     ;; return the channel
     c))


add id to route divs

add id to route divs

--- src-cljs/flatride/frontend.cljs
+++ src-cljs/flatride/frontend.cljs
@@ -49,6 +49,7 @@
 (defn display-elevations [{idx :idx
                            longest-slope :longest-slope
                            steepest-slope :steepest-slope}]
+  (dommy/set-attr! (nth (sel :div.route-data) idx) "id" (str "route-" idx))
   (let [ul (nth (sel :ul.route-card) idx)]
     (dommy/append! ul (node [:li "The longest slope is "
                                   (->> longest-slope slope-percent (gstring/format "%.2f%%"))


Refactoring function sigs

Refactoring function sigs

Feels more natural to have the base as the first argument, and better
naming. Removed the awkward `augment-interval` and `derive-interval`
functions.

--- src/tick/interval.clj
+++ src/tick/interval.clj
@@ -285,6 +285,14 @@

 ;; Functions that make use of Allens' Interval Algebra

+(defn- update-interval
+  "Update the interval with the timings of the second interval. The
+  purpose of updating is to preserve any extra data in the interval."
+  ([ival times]
+   (vec (concat (take 2 times) (drop 2 ival))))
+  ([ival x y]
+   (update-interval ival (interval x y))))
+
 (defn concur
   "Return the interval representing the interval, if there is one,
   representing the interval of time the given intervals are
@@ -350,13 +358,6 @@

 ;; TODO: hours-over, minutes-over, seconds-over, millis-over?,

-(defn- augment-interval
-  "Take any additional data in the old interval and apply to the new
-  interval. The purpose of additional data is to support monad-style
-  operations on intervals."
-  [new-ival old-ival]
-  (vec (concat (take 2 new-ival) (drop 2 old-ival))))
-
 (defn segment-by
   "Split the interval in to a lazy sequence of intervals, one for each
   local date."
@@ -364,7 +365,7 @@
   (->> (f ival)
        (map interval)
        (map (partial concur ival))
-       (map #(augment-interval % ival))
+       (map #(update-interval ival %))
        (remove nil?)))

 (defn group-segments-by
@@ -375,7 +376,7 @@
     (->> ivals
          (map interval)
          (map (partial concur ival))
-         (map (fn [k v] (when v [k (list (augment-interval v ival))])) ivals)
+         (map (fn [k v] (when v [k (list (update-interval ival v))])) ivals)
          (remove nil?)
          (into {}))))

@@ -417,9 +418,6 @@

 (defn conj [coll interval]
   (union coll [interval]))
-
-(defn derive-interval [x y from]
-  (augment-interval (interval x y) from))

 (defn intersection
   "Return an interval set that is the intersection of the input
@@ -435,36 +433,36 @@
          (case code
            (\p \m)  (recur (next xs) ys result)
            (\P \M)  (recur xs (next ys) result)
-           \S (recur (cons (derive-interval (second y) (second x) x)
+           \S (recur (cons (update-interval x (second y) (second x))
                            (next xs))
                      (next ys)
-                     (clojure.core/conj result (augment-interval y x)))
+                     (clojure.core/conj result (update-interval x y)))
            \F (recur (next xs) (next ys) (clojure.core/conj result y))
-           \o (recur (cons (derive-interval (first y) (second x) x)
+           \o (recur (cons (update-interval x (first y) (second x))
                            (next xs))
-                     (cons (derive-interval (second x) (second y) x) (next ys))
+                     (cons (update-interval x (second x) (second y)) (next ys))
                      (clojure.core/conj
                       result
-                      (derive-interval (first y) (second x) x)))
+                      (update-interval x (first y) (second x))))
            \O (recur (cons
-                      (derive-interval (second y) (second x) x)
+                      (update-interval x (second y) (second x))
                       (next xs))
                      (next ys)
                      (clojure.core/conj
                       result
-                      (derive-interval (first x) (second y) x)))
+                      (update-interval x (first x) (second y))))
            \D (recur (cons
-                      (derive-interval (second y) (second x) x)
+                      (update-interval x (second y) (second x))
                       (next xs))
                      (next ys)
-                     (clojure.core/conj result (augment-interval y x)))
-           \d (recur (next xs) (cons (derive-interval (second x) (second y) x)
+                     (clojure.core/conj result (update-interval x y)))
+           \d (recur (next xs) (cons (update-interval x (second x) (second y))
                                      (next ys))
                      (clojure.core/conj result x))
            \e (recur (next xs) (next ys) (clojure.core/conj result x))
            \f (recur (next xs) (next ys) (clojure.core/conj result x))
            \s (recur (next xs)
-                     (cons (derive-interval (second x) (second y) x)
+                     (cons (update-interval x (second x) (second y))
                            (next ys))
                      (clojure.core/conj result x))))
        result)))
@@ -489,11 +487,11 @@
              (\f \d \e) (recur (next xs) (next ys) result)
              \s (recur (next xs) ys result)
              (\S \O) (recur (cons (interval (second y) (second x)) (next xs)) (next ys) result)
-             \F (recur (next xs) (next ys) (clojure.core/conj result (derive-interval (first x) (first y) x)))
-             \o (recur (next xs) ys (clojure.core/conj result (derive-interval (first x) (first y) x)))
+             \F (recur (next xs) (next ys) (clojure.core/conj result (update-interval x (first x) (first y))))
+             \o (recur (next xs) ys (clojure.core/conj result (update-interval x (first x) (first y))))
              \D (recur (cons (interval (second y) (second x)) (next xs))
                        (next ys)
-                       (clojure.core/conj result (derive-interval (first x) (first y) x)))))
+                       (clojure.core/conj result (update-interval x (first x) (first y))))))
          (apply clojure.core/conj result xs))
        result)))
   ([s1 s2 & sets]


fix console.log issue for older chrome versions

--- src/main/shadow/cljs/devtools/client/browser.cljs
+++ src/main/shadow/cljs/devtools/client/browser.cljs
@@ -22,7 +22,7 @@
 (defonce socket-ref (volatile! nil))

 (defn devtools-msg [msg & args]
-  (.apply (.-log js/console) nil (into-array (into [(str "%cshadow-cljs: " msg) "color: blue;"] args))))
+  (js/console.log.apply js/console (into-array (into [(str "%cshadow-cljs: " msg) "color: blue;"] args))))

 (defn ws-msg [msg]
   (if-let [s @socket-ref]


back/forward buttons always enabled in @browse

--- src/status_im/chat/views/input/input_actions.cljs
+++ src/status_im/chat/views/input/input_actions.cljs
@@ -29,11 +29,12 @@
   (let [result-box (subscribe [:chat-ui-props :result-box])
         webview    (subscribe [:get :webview-bridge])]
     (fn []
-      (if (:can-go-back? @result-box)
-        [touchable-highlight
-         {:on-press #(.goBack @webview)}
-         [view (style/action-view true)
-          [icon :action_back style/action-view-icon-tinted]]]
+      [touchable-highlight
+       {:on-press #(.goBack @webview)}
+       [view (style/action-view true)
+        [icon :action_back style/action-view-icon-tinted]]]
+      #_(if (:can-go-back? @result-box)
+
         [view (style/action-view false)
          [icon :action_back style/action-view-icon]]))))

@@ -42,11 +43,12 @@
   (let [result-box (subscribe [:chat-ui-props :result-box])
         webview    (subscribe [:get :webview-bridge])]
     (fn []
-      (if (:can-go-forward? @result-box)
-        [touchable-highlight
-         {:on-press #(.goForward @webview)}
-         [view (style/action-view true)
-          [icon :action_forward style/action-view-icon-tinted]]]
+      [touchable-highlight
+       {:on-press #(.goForward @webview)}
+       [view (style/action-view true)
+        [icon :action_forward style/action-view-icon-tinted]]]
+      #_(if (:can-go-forward? @result-box)
+
         [view (style/action-view false)
          [icon :action_forward style/action-view-icon]]))))

@@ -65,4 +67,4 @@
         [view style/actions-container
          (for [{:keys [type] :as action} actions]
            ^{:key type}
-           [action-view action])]))))+           [action-view action])]))))


remove useless block

remove useless block

Former-commit-id: 4ae0236cd06840054f8f02c4d412536895cb339c

--- src/syng_im/components/chat/chat_message_new.cljs
+++ src/syng_im/components/chat/chat_message_new.cljs
@@ -32,8 +32,7 @@
   (let [input-command-atom (subscribe [:get-input-command])]
     (fn []
       (let [input-command @input-command-atom]
-        [view ;; TODO temp to show input above react-native warning
-         {:style {:marginBottom 50}}
+        [view
          (if input-command
            [special-input-view input-command]
            [plain-message-input-view])]))))


Disable new tests for not-implemented features

--- pigpen-cascading/src/test/clojure/pigpen/cascading/functional_test.clj
+++ pigpen-cascading/src/test/clojure/pigpen/cascading/functional_test.clj
@@ -73,6 +73,37 @@
     pigpen.functional.code-test/test-for
     ;pigpen.functional.filter-test/test-filter
     ;pigpen.functional.filter-test/test-remove
+    pigpen.functional.filter-test/test-take
+    pigpen.functional.filter-test/test-sample
+    pigpen.functional.fold-test/test-vec
+    pigpen.functional.fold-test/test-map
+    pigpen.functional.fold-test/test-mapcat
+    pigpen.functional.fold-test/test-filter
+    pigpen.functional.fold-test/test-remove
+    pigpen.functional.fold-test/test-keep
+    pigpen.functional.fold-test/test-distinct
+    pigpen.functional.fold-test/test-take
+    pigpen.functional.fold-test/test-first
+    pigpen.functional.fold-test/test-last
+    pigpen.functional.fold-test/test-sort
+    pigpen.functional.fold-test/test-sort-desc
+    pigpen.functional.fold-test/test-sort-by
+    pigpen.functional.fold-test/test-sort-by-desc
+    pigpen.functional.fold-test/test-juxt-stats
+    pigpen.functional.fold-test/test-juxt-min-max
+    pigpen.functional.fold-test/test-count
+    pigpen.functional.fold-test/test-sum
+    pigpen.functional.fold-test/test-avg
+    pigpen.functional.fold-test/test-avg-with-cogroup
+    pigpen.functional.fold-test/test-top
+    pigpen.functional.fold-test/test-top-desc
+    pigpen.functional.fold-test/test-top-by
+    pigpen.functional.fold-test/test-top-by-desc
+    pigpen.functional.fold-test/test-min
+    pigpen.functional.fold-test/test-min+map
+    pigpen.functional.fold-test/test-min-key
+    pigpen.functional.fold-test/test-max
+    pigpen.functional.fold-test/test-max-key
     pigpen.functional.io-test/test-load-string
     pigpen.functional.io-test/test-load-tsv
     pigpen.functional.io-test/test-load-tsv-non-tab
@@ -137,6 +168,7 @@
     pigpen.functional.map-test/test-sort-by-with-duplicates
     pigpen.functional.map-test/test-map+fold1
     pigpen.functional.map-test/test-map+fold2
+    ;pigpen.functional.set-test/test-distinct
     pigpen.functional.set-test/test-concat
     pigpen.functional.set-test/test-union
     pigpen.functional.set-test/test-union-multiset


cleanup

cleanup

--- src/babel/italiano/lexicon.cljc
+++ src/babel/italiano/lexicon.cljc
@@ -504,7 +504,6 @@
    "caricare" {:italiano {:future-stem "carich"}
                :synsem {:cat :verb
                         :sem {:pred :caricare}}}
-
    "camicia"
     (unify agreement-noun
            common-noun


+TODO

+TODO

--- src/babel/english/grammar.cljc
+++ src/babel/english/grammar.cljc
@@ -550,6 +550,7 @@
          :language "en"
          :language-keyword :english

+         ;; TODO: unused; remove.
          :lexical-cache (atom (cache/fifo-cache-factory {} :threshold 1024))
          :lexicon lexicon
          :lookup (fn [arg]