Display tracks when selecting playlists

Display tracks when selecting playlists

--- src/trak/ui/app.cljs
+++ src/trak/ui/app.cljs
@@ -6,7 +6,9 @@
             [trak.ui.components :as components]
             [trak.globals :as globals]
             [trak.ui.components.landing :as landing]
-            [trak.ui.components.profile :as profile]))
+            [trak.ui.components.profile :as profile]
+            [trak.ui.components.tracks :as tracks]
+            ))

 ;(defn album-artists [artists]
@@ -20,8 +22,8 @@
 ;    [:h6.card-subtitle (album-artists (:album/artists album))]]
 ;   [:.card-body "Available markets " (map (fn [m] (str m " ")) (:album/available_markets album))]])
 ;
-;(rum/defc albums [*db]
-;  (let [albums (db/get-albums *db)]
+;(rum/defc albums [db]
+;  (let [albums (db/get-albums db)]
 ;    [:.columns (map (fn [album] [:.column.col-6.col-xs-12 {:key (:db/id album)} (album-card album)]) albums)]))

 ;(rum/defc profile-login []
@@ -32,16 +34,16 @@
 ;(rum/defc profile [me]
 ;  [:div [:h2 (:me/display_name me)] (:me/country me)])
 ;
-;(rum/defc profile-base [*db]
-;  (let [me (db/me *db)]
+;(rum/defc profile-base [db]
+;  (let [me (db/me db)]
 ;    (utils/info me (:me/status me))
 ;    (cond
 ;      (= :logged-out (:me/status me)) (profile-login)
 ;      (= :logged-in (:me/status me)) (profile me)
 ;      (= :loading (:me/status me)) [:div "Loading..."])))

-(rum/defc topbar [*db]
-  (let [me (db/me *db)]
+(rum/defc topbar [db]
+  (let [me (db/me db)]
     [:section.section.section-header.bg-gray
      [:section.grid-header.container.grid-960
       [:nav.navbar
@@ -53,33 +55,47 @@
                                                   :class-name "btn btn-primary"}
                                                  "Log out")]]]]))

-(rum/defc sidebar [*db]
-  [:section.columns
-   [:div.trak-sidebar.column.col-3.col-sm-12 (profile/profile *db)]])
+(rum/defc sidebar [db]
+  [:div.trak-sidebar.column.col-3.col-sm-12 (profile/profile db)])

-(rum/defc fullpage [*db]
+(rum/defc main [db]
+  (let [current-page (:handler (db/app-state db))]
+    (cond
+      (= :playlist current-page)
+      (let [page (db/page-state db)
+            status (:application/status page)
+            title (:title (:application/state page))]
+        [:.column.col-9.col-sm-12.main
+         [:h1.text-center title]
+         (cond
+           (= status :loading) [:.loading]
+           (= status :loaded) (tracks/tracks db))]))))
+
+(rum/defc fullpage [db]
   [:section
-   (topbar *db)
+   (topbar db)
    [:section.container.grid-960
-    (sidebar *db)]])
+    [:section.columns
+     (sidebar db)
+     (main db)]]])

-(rum/defc app [*db]
-  (when-let [match (utils/current-path *db)]
+(rum/defc app [db]
+  (when-let [match (utils/current-path db)]
     (utils/info "Application mounted. Matched: " match)
-    (let [status (:me/status (db/me *db))]
+    (let [status (:me/status (db/me db))]
       (cond
         (= :logged-out status) (landing/landing status)
         (= :loading status) (landing/landing status)
-        (= :logged-in status) (fullpage *db)
+        (= :logged-in status) (fullpage db)
         ))
     ;[:div
-    ; (profile-base *db)
+    ; (profile-base db)
     ; ;
     ; ;(cond
-    ; ;  (empty? (db/me *db)) (components/link
+    ; ;  (empty? (db/me db)) (components/link
     ; ;                         {:href (globals/spotify-authorization-link "user-read-private user-read-email") :class-name "btn btn-primary"}
     ; ;                         "Log in")
     ; ;  :else "noi")
     ; (cond
-    ;   (= (:handler (utils/current-path *db)) :index) (albums *db))])
+    ;   (= (:handler (utils/current-path db)) :index) (albums db))])
     ))


Bootstrap styles corrected

Bootstrap styles corrected

--- src/zerohedgecl/views/pageVw.clj
+++ src/zerohedgecl/views/pageVw.clj
@@ -47,7 +47,7 @@

   [:div#blogItems.col-md-12 {:style "margin-top: 60px;"}
     (for [{:keys [title updated introduction reference]} all-items]
-      [:div {:class "panel-primary"}
+      [:div {:class "panel panel-primary"}
         [:div {:class "panel-heading"}
           [:h3 {:class "panel-title"}
             [:a {:href (str "../story/" reference)}
@@ -145,7 +145,7 @@

 (defn display-story-html [title body updated]
-  [:div {:class "panel-primary"}
+  [:div {:class "panel panel-primary"}
     [:div {:class "panel-heading"}
       [:h3 {:class "panel-title"}
         title


fix: regression in async tests

fix: regression in async tests


Revert "Add styling to api docs"

Revert "Add styling to api docs"

Introduced some styling bugs related to `:focus` styles on headings.

This reverts commit 0ca10b891a5bf320bf9d6e77e479683f4acb7cd9.

--- docs/src/ns_to_markdown.clj
+++ docs/src/ns_to_markdown.clj
@@ -88,12 +88,9 @@
     (catch Exception e
       (println e))))

-(def markdown-styles
-  "<style>\n.md-typeset h3 {\nbackground: #777;\ncolor: white;\npadding-left: 5px;\nline-height: 1.15em;\nheight: 2em;\n}\n</style>\n\n")
-
 (defn ns->markdown
   [m]
-  (format "%s# %s\n\n" markdown-styles (:name m)))
+  (format "# %s\n\n" (:name m)))

 (defn arglist->markdown
   [arglist]


Bump Elastisch to 2.1.0-beta6

Bump Elastisch to 2.1.0-beta6

--- joplin.elasticsearch/project.clj
+++ joplin.elasticsearch/project.clj
@@ -6,6 +6,6 @@
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [clojurewerkz/elastisch "2.1.0-beta4"]
+                 [clojurewerkz/elastisch "2.1.0-beta6"]
                  [joplin.core "0.1.12-SNAPSHOT"]
                  [clj-time "0.7.0"]])


fix app-state getting cleared when maybe-add-subscriber-data changes

--- src-cljs/frontend/subscribers.cljs
+++ src-cljs/frontend/subscribers.cljs
@@ -23,7 +23,7 @@
 (defn maybe-add-subscriber-data [app-state client-id subscriber-data]
   (if (get-in app-state [:subscribers :info client-id])
     (add-subscriber-data app-state client-id subscriber-data)
-    subscriber-data))
+    app-state))


Rearrange deps

Rearrange deps

--- template/src/leiningen/new/play_clj/android-project.clj
+++ template/src/leiningen/new/play_clj/android-project.clj
@@ -3,9 +3,9 @@

   :dependencies [[com.badlogicgames.gdx/gdx "1.0.0" :use-resources true]
                  [com.badlogicgames.gdx/gdx-backend-android "1.0.0"]
-                 [neko/neko "3.0.1"]
                  [com.badlogicgames.gdx/gdx-box2d "1.0.0"]
                  [com.badlogicgames.gdx/gdx-bullet "1.0.0"]
+                 [neko/neko "3.0.1"]
                  [org.clojure-android/clojure "1.6.0-RC1" :use-resources true]
                  [play-clj "0.3.0"]]
   :profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]


Ensure only cookies with values are consumed

--- src/yada/cookies.clj
+++ src/yada/cookies.clj
@@ -134,12 +134,15 @@
           (reduce-kv
            (fn [ctx k resource-cookie]
              (let [n (:name resource-cookie)
-                   v (get request-cookies n)
-                   consumer (:consumer resource-cookie)
-                   pxy (fn [ctx cookie v]
-                         (let [res (consumer ctx cookie v)]
-                           (interpret-cookie-consumer-result res ctx)))]
-               (cond-> ctx consumer (pxy resource-cookie v))))
+                   cookie-val (get request-cookies n)]
+               (if cookie-val
+                 (let [consumer (:consumer resource-cookie)
+                       pxy (fn [ctx cookie cookie-val]
+                             (let [res (consumer ctx cookie cookie-val)]
+                               (interpret-cookie-consumer-result res ctx)))]
+                   (cond-> ctx consumer (pxy resource-cookie cookie-val)))
+                 ;; No cookie-val, return ctx unchanged
+                 ctx)))
            ctx
            resource-cookies))]


logelei dschungel improved

logelei dschungel improved

--- src/examples/logelei_2.clj
+++ src/examples/logelei_2.clj
@@ -40,27 +40,27 @@
 (defn tiere-ein-geraeusch []
   (list 'and (map ein-geraeusch
                   '(fiedertiger, beutelaffen, tentakelläufer,
-                    ohrhörner, rüsselratten, naagekühe))))
+                    ohrhörner, rüsselratten, nagekühe))))

 (def fml
   (list 'and
         (tiere-ein-geraeusch)
-        (impl 'fiedertiger-surren  'beutelaffen-miauen)
-        (impl 'fiedertiger-miauen  'tentakelläufer-zischen)
-        (impl 'fiedertiger-kratzen 'beutelaffen-oinken)
-        (impl 'fiedertiger-zischen 'ohrhörner-kratzen)
-        (impl 'fiedertiger-pfeifen 'rüsselratten-miauen)
-        (impl 'fiedertiger-oinken  'tentakelläufer-pfeifen)
-        (impl 'ohrhörner-miauen    'tentakelläufer-kratzen)
-        (impl 'beutelaffen-miauen  'fiedertiger-kratzen)
-        (impl 'rüsselratten-surren 'ohrhörner-zischen)
-        (impl 'nagekühe-miauen     'ohrhörner-pfeifen)
-        (impl 'beutelaffen-oinken  'fiedertiger-kratzen)
-        (impl 'ohrhörner-surren    'tentakelläufer-kratzen)
-        (impl 'beutelaffen-surren  'nagekühe-zischen)
-        (impl 'nagekühe-surren     'fiedertiger-kratzen)
-        (impl 'rüsselratten-miauen 'ohrhörner-surren)
-        (impl 'beutelaffen-oinken  'ohrhörner-surren)
+        '(impl fiedertiger-surren  beutelaffen-miauen)
+        '(impl fiedertiger-miauen  tentakelläufer-zischen)
+        '(impl fiedertiger-kratzen beutelaffen-oinken)
+        '(impl fiedertiger-zischen ohrhörner-kratzen)
+        '(impl fiedertiger-pfeifen rüsselratten-miauen)
+        '(impl fiedertiger-oinken  tentakelläufer-pfeifen)
+        '(impl ohrhörner-miauen    tentakelläufer-kratzen)
+        '(impl beutelaffen-miauen  fiedertiger-kratzen)
+        '(impl rüsselratten-surren ohrhörner-zischen)
+        '(impl nagekühe-miauen     ohrhörner-pfeifen)
+        '(impl beutelaffen-oinken  fiedertiger-kratzen)
+        '(impl ohrhörner-surren    tentakelläufer-kratzen)
+        '(impl beutelaffen-surren  nagekühe-zischen)
+        '(impl nagekühe-surren     fiedertiger-kratzen)
+        '(impl rüsselratten-miauen ohrhörner-surren)
+        '(impl beutelaffen-oinken  ohrhörner-surren)
         ))


removed ios support and added build insights/timings to add projects value table

--- src-cljs/frontend/components/add_projects.cljs
+++ src-cljs/frontend/components/add_projects.cljs
@@ -454,7 +454,11 @@
         [:td.cell.unpaid [:i.material-icons.ex "close"]]
         [:td.cell.paid [:i.material-icons.check "check"]]]
        [:tr.row
-        [:td.cell.metric "iOS Support"]
+        [:td.cell.metric "Build Insights"]
+        [:td.cell.unpaid [:i.material-icons.ex "close"]]
+        [:td.cell.paid [:i.material-icons.check "check"]]]
+       [:tr.row
+        [:td.cell.metric "Build Timings"]
         [:td.cell.unpaid [:i.material-icons.ex "close"]]
         [:td.cell.paid [:i.material-icons.check "check"]]]]]]))


Keep stop overlay above all others.

Keep stop overlay above all others.

--- src/afterglow/controllers/ableton_push_2.clj
+++ src/afterglow/controllers/ableton_push_2.clj
@@ -1850,7 +1850,8 @@
                                (handle-note-on [this message])
                                (handle-note-off [this message])
                                (handle-aftertouch [this message])
-                               (handle-pitch-bend [this message])))))
+                               (handle-pitch-bend [this message]))
+                             :priority 100))) ; Draw the stop overlay after all others.

 (defn add-button-held-feedback-overlay
   "Adds a simple overlay which keeps a control button bright as long


(SERVER-2654) Remove cipher-suite config tests

These tests, while valuable when plumbing through the Java/Ruby interop
are testing basic configurability of the underlying Java library and are
better suited (and duplicated) in its tests.

The use cases are also problematic with changing supported defaults and
FIPS support. This patch removes the tests and defers the testing of
the http client libraries configuration to the library itself.

--- test/unit/puppetlabs/puppetserver/ruby/http_client_test.clj
+++ test/unit/puppetlabs/puppetserver/ruby/http_client_test.clj
@@ -293,32 +293,6 @@
           (is (= "200" (.runScriptlet sc "$response.code")))
           (is (= "hi" (.runScriptlet sc "$response.body"))))))))

-
-(deftest https-cipher-suites
-  (logutils/with-test-logging
-    (with-webserver-with-protocols ["SSLv3"] ["SSL_RSA_WITH_RC4_128_SHA"]
-      (testing "Should not be able to connect if no matching ciphers"
-        (with-scripting-container sc
-          (with-http-client sc 10080
-           {:ssl-protocols ["SSLv3"]
-            :cipher-suites ["SSL_RSA_WITH_RC4_128_MD5"]
-            :use-ssl true}
-           (try
-             (.runScriptlet sc (raise-caught-http-error "$c.get('/', {})"))
-             (is false "Expected HTTP connection to HTTPS port to fail")
-             (catch EvalFailedException e
-               (is (ssl-connection-exception? (.. e getCause))))))))
-
-      (testing "Should be able to connect if explicit matching ciphers are configured"
-        (with-scripting-container sc
-          (with-http-client sc 10080
-            {:ssl-protocols ["SSLv3"]
-             :cipher-suites ["SSL_RSA_WITH_RC4_128_SHA"]
-             :use-ssl true}
-            (.runScriptlet sc "$response = $c.get('/', {})")
-            (is (= "200" (.runScriptlet sc "$response.code")))
-            (is (= "hi" (.runScriptlet sc "$response.body")))))))))
-
 (deftest clients-persist
   (testing "client persists when making HTTP requests"
     (logutils/with-test-logging


WIP. Start of improved profile display.

WIP. Start of improved profile display.

--- src-cljs/kixi/hecuba/tabs/profiles.cljs
+++ src-cljs/kixi/hecuba/tabs/profiles.cljs
@@ -1,6 +1,7 @@
 (ns kixi.hecuba.tabs.profiles
   (:require [om.core :as om :include-macros true]
-            [sablono.core :as html :refer-macros [html]]))
+            [sablono.core :as html :refer-macros [html]]
+            [kixi.hecuba.bootstrap :as bs]))

 (defn get-profiles [selected-property-id data]
   (->>  data
@@ -10,9 +11,65 @@
         first
         :profiles))

-(defn format-profiles [profiles]
-  (let [profile_data (:profile_data (first profiles))]
-    [:div.col-md-12
+(defn profile-rows [profiles owner]
+  (reify
+    om/IRenderState
+    (render-state [_ state]
+      (html
+       [:div.col-md-12
+        (om/build occupancy profiles)
+        (om/build measurements profiles)
+        (om/build energy profiles)
+        (om/build efficiency profiles)
+        (om/build flats profiles)
+        (om/build firepalces profiles)
+        (om/build glazing profiles)
+        (om/build issues profiles)
+        (om/build sap-results profiles)
+        (om/build documents profiles)
+        (om/build co-heating profiles)
+        (om/build air-tightness profiles)
+        (om/build conservatories profiles)
+        (om/build extensions profiles)
+        (om/build heating-systems profiles)
+        (om/build hot-water-systems profiles)
+        (om/build storeys profiles)
+        (om/build walls profiles)
+        (om/build roofs profiles)
+        (om/build window-types profiles)
+        (om/build door-types profiles)
+        (om/build floors profiles)
+        (om/build roof-rooms profiles)
+        (om/build low-energy-lights profiles)
+        (om/build ventilation-systems profiles)
+        (om/build photovoltaic-panels profiles)
+        (om/build solar-thermal-panels profiles)
+        (om/build wind-turbines profiles)
+        (om/build small-hydro-plants profiles)
+        (om/build heat-pumps profiles)
+        (om/build biomass-boilers profiles)
+        (om/build mCHP-systems profiles)])))
+
+  )
+
+(defn profiles-div [data owner]
+  (reify
+    om/IRender
+    (render [_]
+      (let [selected-property-id (-> data :active-components :properties)
+            profiles             (get-profiles selected-property-id data)]
+        (html
+         [:div
+          [:h3 "Profiles"]
+          (if (seq profiles)
+            (om/build profiles-rows profiles)
+            [:div.col-md-12.text-center
+             [:p.lead {:style {:padding-top 30}}
+              "No profile data to display"]])])))))
+
+
+(comment
+  [:div.col-md-12
      [:dl
       [:dt "Number Of Storeys"] [:dd (get profile_data :number_of_storeys "")]
       [:dt "Air Tightness Equipment"] [:dd (get profile_data :air_tightness_equipment "")]
@@ -134,20 +191,4 @@
       [:dt "Planning Considerations"] [:dd (get profile_data :planning_considerations "")]
       [:dt "Draught Proofing"] [:dd (get profile_data :draught_proofing "")]
       [:dt "Occupancy Under 18"] [:dd (get profile_data :occupancy_under_18 "")]
-      [:dt "Profile Health"] [:dd (get profile_data :profile_health "")]]]
-    ))
-
-(defn profiles-div [data owner]
-  (reify
-    om/IRender
-    (render [_]
-      (let [selected-property-id (-> data :active-components :properties)
-            profiles             (get-profiles selected-property-id data)]
-        (html
-         [:div
-          [:h3 "Profiles"]
-          (if (seq profiles)
-            (format-profiles profiles)
-            [:div.col-md-12.text-center
-             [:p.lead {:style {:padding-top 30}}
-              "No profile data to display"]])])))))
+      [:dt "Profile Health"] [:dd (get profile_data :profile_health "")]]])


tidied up

tidied up

--- src/flow_labeller/core.clj
+++ src/flow_labeller/core.clj
@@ -8,22 +8,11 @@

 (require '[clojure.string :as str])

-(def working-directory "/home/oblivia/cs/6706-network-design+management/assignments/A2/DARPA/")
-
-;; (def ports-filename "/etc/services")
-
+;; Some handy numerical constants:
 (def tcp 6)
 (def udp 17)
-(def proto-index 4)
+(def proto-index 4) ;; which is also the index at which we'll crop the flow

-(defn pathname [filename]
-  (str/join [working-directory filename]))
-
-(defn pathname* [filename]
-  (System/getenv "FLOW_DATA_DIR"))
-
-(def flow-filename (pathname "outside.flow"))
-
 (defn csv->map [csvpath]
   (let [txt (str/split (slurp csvpath) #"[\n,]")]
     (apply hash-map txt)))
@@ -49,7 +38,7 @@
 (defn port-vectorize [the-flows]
   (map
    (fn [x] (vector (min (bigint (nth x p1)) (bigint (nth x p2)))
-                  (bigint (nth x proto-index))))
+                       (bigint (nth x proto-index))))
    the-flows))

 (defn map-port


Fix indentation

Fix indentation

--- src/afrey/ring_html5_handler.clj
+++ src/afrey/ring_html5_handler.clj
@@ -13,6 +13,7 @@
     [:headers "Content-Type"]
     "text/html;charset=UTF-8"))

-(def handler (-> index-handler
-                 (wrap-resource "")
-                 (wrap-file dir {:index-files? false})))
+(def handler
+  (-> index-handler
+    (wrap-resource "")
+    (wrap-file dir {:index-files? false})))


Fix for error due to update to latest QGIS.

Hacky and root cause of error needs fixing.

Perhaps http://osgeo-org.1560.x6.nabble.com/QGIS-Server-with-Postgis-layers-td5239195.html

--- src/clj/popchange/lib/raster_calculation.clj
+++ src/clj/popchange/lib/raster_calculation.clj
@@ -107,7 +107,16 @@
   [filename]
   (do
     (prep-scripts!)
-    (let [vals (s/split (python cumulative-cut-script filename) #" ")]
+    ;; (println filename)
+    (let [outp (python cumulative-cut-script filename)
+          clnd (-> outp
+                   (s/replace "ERROR: Auth db directory path could not be created" "")
+                   (s/replace "ERROR: Opening of authentication db FAILED" "")
+                   s/trim)
+          vals (s/split clnd #" ")]
+      ;; (println outp)
+      ;; (spit "/var/opt/popchange/btmp.log" outp)
+      ;; (println vals)
       {:min (Double. (first vals))
        :max (Double. (second vals))})))


Removing debug statement.

Removing debug statement.

--- src/cmr/metadata_db/data/oracle/concepts.clj
+++ src/cmr/metadata_db/data/oracle/concepts.clj
@@ -271,7 +271,6 @@
                       stmt (su/build (select [:*]
                                        (from table)
                                        (where (cons `and conditions))))]
-                  (println stmt)
                   (mapv (partial db-result->concept-map concept-type conn provider-id)
                         (j/query db stmt)))))
             (lazy-find


Update action icons

Update action icons

--- src/hatti/views/table.cljs
+++ src/hatti/views/table.cljs
@@ -94,15 +94,18 @@
       (generate-html
        (when value
          [:ul
+          [:li [:input {:type "checkbox"
+                        :data-id value
+                        :class "delete-record"}]]
           [:li.tooltip.middle-right
            [:span.tip-info "View"]
            [:a.view-record
-            [:i.fa.fa-clone {:data-id value}]]]
+            [:i.fa.fa-eye {:data-id value}]]]
           [:li.tooltip
            [:span.tip-info "Edit"]
            [:a.edit-record {:data-id value :target "_blank"
                             :href edit-link}
-            [:i.fa.fa-pencil-square-o]]]])))))
+            [:i.fa.fa-pencil]]]])))))

 (defn column-name-html-string
   "The html needed for a column name as a string.


Delete changelog from /privacy

Delete changelog from /privacy

--- src-cljs/frontend/components/privacy.cljs
+++ src-cljs/frontend/components/privacy.cljs
@@ -87,20 +87,7 @@
                "http://www.google.co.uk/intl/en/analytics/privacyoverview.html"
                :target "_blank"}
               "Google Analytics' privacy policy"]
-             " discusses how they use this information."]]
-           [:h2 "Changelog"]
-           [:ul.privacy-changelog
-            [:li
-             [:span.label.label-primary "Mar 31, 2015"]
-             " Remove HipChat."]
-            [:li
-             [:span.label.label-primary "Mar 17, 2014"]
-             " Moved the security content to its own page, "
-             [:a {:href "/security"} "located here"]]
-            [:li [:span.label.label-primary "Nov 5, 2013"] " Add mixpanel; remove KissMetrics."]
-            [:li [:span.label.label-primary "Mar 10, 2013"] " Discuss Hipchat usage."]
-            [:li [:span.label.label-primary "Dec 22, 2012"] " Include KissMetrics and their privacy policy. Expand Intercom discussion."]
-            [:li [:span.label.label-primary "March 26, 2012"] " Initial version."]]]]]
+             " discusses how they use this information."]]]]]
         [:div.bottom-cta.outer-section.outer-section-condensed
          common/language-background
          [:h2 "Start shipping faster, build for free using CircleCI today."]


Fixed postal address display.

Fixed postal address display.

Got rid of ,,, in the case of blank address fields.

--- src-cljs/kixi/hecuba/tabs/programmes.cljs
+++ src-cljs/kixi/hecuba/tabs/programmes.cljs
@@ -343,6 +343,14 @@
 (defmethod properties-table-html :error [properties owner]
   (error-row properties))

+(defn postal-address [property_data]
+  (str/join
+   ", "
+   (keep identity [(:address_street_two property_data)
+                   (:address_city property_data)
+                   (:address_code property_data)
+                   (:address_country property_data)])))
+
 (defmethod properties-table-html :has-data [properties owner]
   (let [table-id "properties-table"
         history  (om/get-shared owner :history)]
@@ -362,11 +370,7 @@
             :id (str table-id "-selected")}
            [:td (:property_code row)]
            [:td (:property_type property_data)]
-           [:td (:address_street_two property_data)
-            (when-let [address_two (:address_street_two property_data)]
-              (str ", " address_two))
-            (str ", " (:address_city property_data))
-            (str ", " (:address_code property_data) ", " (:address_country property_data))]
+           [:td (postal-address property_data)]
            [:td (:address_region property_data)]
            [:td (:ownership property_data)]
            [:td (for [ti (:technology_icons property_data)]


Page-dependent sidebar

Page-dependent sidebar

--- src-cljs/tamarack/components/sidebar.cljs
+++ src-cljs/tamarack/components/sidebar.cljs
@@ -1,12 +1,19 @@
 (ns tamarack.components.sidebar
   (:require [om.core :as om :include-macros true]
+            [clojure.string :as string]
             [sablono.core :as html :refer-macros [html]]))

-(defn all-apps-items []
+(defn- all-apps-items []
   (html
    [:ol
     [:li.active
      [:a {:href "#"} "Applications"]]]))
+
+(defn- app-items [view app]
+  (html
+   [:ol
+    [:li {:class (when (= view :app-dashboard) "active")}
+     [:a {:href (string/join "/" [ "#/applications" (:name app)])} "Dashboard"]]]))

 (defn component [app owner]
   (reify
@@ -15,5 +22,10 @@

     om/IRender
     (render [_]
-      :all-apps
-      (all-apps-items))))
+      (case (:view app)
+        :all-apps (all-apps-items)
+
+        (:app-dashboard :app-endpoint-overview)
+        (app-items (:view app) (:current-app app))
+
+        (html [:ol])))))


Fix navigate test

Fix navigate test

--- test/elite_mfd/navigate_test.clj
+++ test/elite_mfd/navigate_test.clj
@@ -8,12 +8,12 @@
 (def dummy-plot-result
   "[{\"jump\":0,\"name\":\"Yakabugai\",\"distance\":\"0\"},{\"jump\":1,\"name\":\"Chamunda\",\"distance\":\"4.3770084675495\"},{\"jump\":2,\"name\":\"LTT 18486\",\"distance\":\"7.9636012778453\"}]")

-(defn- do-test [func & {:keys [start end jump-distance then]} ]
+(defn- do-test [func & {:keys [start end jump-range then]} ]
   (let [called (ref false)
         result @(func
                   :start start
                   :end end
-                  :jump-distance jump-distance
+                  :jump-range jump-range
                   :callback (fn [result]
                               (dosync (ref-set called true))
                               (then result)))]
@@ -30,7 +30,7 @@
         plot-route
         :start "Yakabugai " ; sic: just in case, we trim off whitespace
         :end "LTT 18486"
-        :jump-distance 10
+        :jump-range 10
         :then (fn [result]
                 (is (seq? result))
                 (is (= 3 (count result)))


Just did a fresh checkout test and found out this file was missing.

--- src/brevis/graphics/basic_3D.clj
+++ src/brevis/graphics/basic_3D.clj
@@ -2,6 +2,7 @@
   (:use [penumbra opengl compute]
         [penumbra.opengl core]
         [cantor]
+        [brevis.physics.space]
         [brevis.shape.box])
   (:require [penumbra.app :as app]
             [penumbra.text :as text]
@@ -12,16 +13,19 @@
 (defn draw-shape
   "Draw a shape. Call this after translating, scaling, and setting color."
   [obj]
-  (push-matrix
-   #_(apply color (:color obj))
-   (material :front-and-back
-    :ambient-and-diffuse (into [] (conj (:color obj) 1)); [1 1 1 1]
-    :specular            [0.5 0.4 0.4 1]
-    :shininess           64)
-   (translate (:position obj))
-   (apply scale (:dim (:shape obj)))
-   (rotate (.x (:velocity obj)) 1 0 0)
-   (rotate (.y (:velocity obj)) 0 1 0)
-   (rotate (.z (:velocity obj)) 0 0 1)
-   (draw-textured-cube)
-   #_(call-display-list (cond (= (:type (:shape obj)) :box) box-graphic))))
+  (let [pos (get-position obj)
+        vel (get-velocity obj)
+        col (:color obj)]
+	  (push-matrix
+	   #_(apply color (:color obj))
+	   (material :front-and-back
+	    :ambient-and-diffuse (into [] (conj col 1)); [1 1 1 1]
+	    :specular            [0.5 0.4 0.4 1]
+	    :shininess           64)
+	   (translate pos)
+	   (apply scale (:dim (:shape obj)))
+	   (rotate (.x vel) 1 0 0)
+	   (rotate (.y vel) 0 1 0)
+	   (rotate (.z vel) 0 0 1)
+	   (draw-textured-cube)
+	   #_(call-display-list (cond (= (:type (:shape obj)) :box) box-graphic)))))


(SERVER-1315) Add tests for revoking cert with ca cert bundle

--- test/unit/puppetlabs/puppetserver/certificate_authority_test.clj
+++ test/unit/puppetlabs/puppetserver/certificate_authority_test.clj
@@ -462,6 +462,20 @@
                          (utils/pem->crl)
                          (utils/revoked? cert)))]
       (fs/delete (:capub settings))
+      (is (false? (revoked? cert)))
+      (revoke-existing-cert! settings "localhost")
+      (is (true? (revoked? cert))))))
+
+(deftest revoke-with-bundled-ca-certs
+  (testing "The CA certificate file can be a bundle when revoking a certificate"
+    (let [settings (testutils/ca-sandbox! bundle-cadir)
+          cert     (-> (:signeddir settings)
+                       (path-to-cert "localhost")
+                       (utils/pem->cert))
+          revoked? (fn [cert]
+                     (-> (:cacrl settings)
+                         (utils/pem->crl)
+                         (utils/revoked? cert)))]
       (is (false? (revoked? cert)))
       (revoke-existing-cert! settings "localhost")
       (is (true? (revoked? cert))))))


CMR-354: Added test for browse_only sort parameter.

--- test/cmr/system_int_test/search/granule_sorting_search_test.clj
+++ test/cmr/system_int_test/search/granule_sorting_search_test.clj
@@ -268,3 +268,17 @@
          "online_only" [g2 g1]
          "-downloadable" [g1 g2]
          "-online_only" [g1 g2])))
+
+(deftest granule-browse-only-sorting-test
+  (let [ru1 (dc/related-url "GET RELATED VISUALIZATION")
+        coll (d/ingest "PROV1" (dc/collection {}))
+        g1 (d/ingest "PROV1" (dg/granule coll {:related-urls [ru1]}))
+        g2 (d/ingest "PROV1" (dg/granule coll {}))]
+    (index/refresh-elastic-index)
+    (are [sort-key items]
+         (d/refs-match-order? items
+                              (search/find-refs :granule {:page-size 20
+                                                          :sort-key sort-key}))
+
+         "browse_only" [g2 g1]
+         "-browse_only" [g1 g2])))


~(def patterns): adding preposition+article

--- src/babel/italiano/morphology.cljc
+++ src/babel/italiano/morphology.cljc
@@ -25,6 +25,15 @@
 (def patterns
   [[#"\b(c)i ([eè])"      "$1'$2"]  ;; ci è -> c'è
    [#"\bl[ao] ([aeiouh])" "l'$1"]   ;; io la ho visto-> l'ho visto
+
+   ;; <preposition+article>
+   [#"\ba il\b"           "al"]     ;; a il -> al
+   [#"\ba lo\b"           "allo"]
+   [#"\ba la\b"           "alla"]   ;; a la -> alla
+   [#"\ba l'\b"           "all'"]
+   ;; TODO: add all of preposition-plus-article below.
+   ;;   [#"\b\b"               ""]       ;; ->
+   ;; </preposition+article>
    ])

 ;; TODO: move this to morphology/prepositions.edn,


Make options resettable at any re-render

Simple to do by storing them in an atom.

--- src/cljs/comic_reader/ui/waypoints.cljs
+++ src/cljs/comic_reader/ui/waypoints.cljs
@@ -8,21 +8,22 @@
   (let [rect (.getBoundingClientRect node)]
     (+ (.-top rect) (.-pageYOffset js/window))))

-(defn- make-reset-trigger-point [id]
+(defn- make-reset-trigger-point [id options]
   (fn [this]
     (swap! waypoints assoc-in
            [id :trigger-point]
            (get-element-top (reagent/dom-node this)))))

-(defn waypoint [child-el options]
+(defn waypoint [child-el opts]
   (let [id (gensym "waypoint-id")
-        reset-trigger-point! (make-reset-trigger-point id)]
+        options (atom opts)
+        reset-trigger-point! (make-reset-trigger-point id options)]
     (reagent/create-class
      {:display-name "waypoint"

       :component-will-mount
       (fn []
-        (swap! waypoints assoc id {:callback (:callback options)}))
+        (swap! waypoints assoc id {:options options}))
       :component-will-unmount
       (fn []
         (swap! waypoints dissoc id))
@@ -31,7 +32,8 @@
       :component-did-update reset-trigger-point!

       :reagent-render
-      (fn [child-el]
+      (fn [child-el opts]
+        (reset! options opts)
         child-el)})))

 (defn- page-offset []
@@ -39,7 +41,7 @@

 (defn check-waypoints [last-scroll-y]
   (let [new-scroll-y (page-offset)]
-    (doseq [[id {:keys [callback trigger-point]}] @waypoints]
+    (doseq [[id {:keys [options trigger-point]}] @waypoints]
       (when trigger-point
         (let [was-before-trigger (< last-scroll-y trigger-point)
               now-after-trigger (>= new-scroll-y trigger-point)
@@ -49,7 +51,8 @@
           (when (or crossed-forward crossed-backward)
             (let [direction (if crossed-forward :forward :backward)]
               (.log js/console "Passed" id "going" direction)
-              (when callback (callback direction)))))))))
+              (when-let [callback (:callback @options)]
+                (callback direction)))))))))

 (defn waypoint-context [_]
   (let [state (atom {})


Use more generic class for response in some protocol implementations.

--- src/clojure/catacumba/impl/handlers.clj
+++ src/clojure/catacumba/impl/handlers.clj
@@ -13,6 +13,7 @@
            ratpack.handling.Context
            ratpack.http.Request
            ratpack.http.Response
+           ratpack.http.ResponseMetaData
            ratpack.http.Headers
            ratpack.http.TypedData
            ratpack.http.MutableHeaders
@@ -159,8 +160,8 @@
   (set-status* [^DefaultContext ctx ^long status]
     (set-status* (:response ctx) status))

-  Response
-  (set-status* [^Response response ^long status]
+  ResponseMetaData
+  (set-status* [^ResponseMetaData response ^long status]
     (.status response status)))

 (extend-protocol IRequest
@@ -177,7 +178,7 @@
   (get-headers* [^DefaultContext ctx]
     (get-headers* ^Request (:request ctx)))
   (set-headers* [^DefaultContext ctx headers]
-    (set-headers* ^Response (:response ctx) headers))
+    (set-headers* ^ResponseMetaData (:response ctx) headers))

   Request
   (get-headers* [^Request request]
@@ -193,17 +194,16 @@
   (set-headers* [_ _]
     (throw (UnsupportedOperationException.)))

-  Response
+  ResponseMetaData
   (get-headers* [_]
     (throw (UnsupportedOperationException.)))

-  (set-headers* [^Response response headers]
+  (set-headers* [^ResponseMetaData response headers]
     (let [^MutableHeaders headersmap (.getHeaders response)]
       (loop [headers headers]
         (when-let [[key vals] (first headers)]
           (.set headersmap (name key) vals)
           (recur (rest headers)))))))
-

 (defn- cookie->map
   [^Cookie cookie]
@@ -226,19 +226,19 @@
   (get-cookies* [^Request request]
     (persistent!
      (reduce (fn [acc ^Cookie cookie]
-               (let [name (keyword (.getname cookie))]
-                 (assoc acc name (cookie->map cookie))))
+               (let [name (keyword (.getName cookie))]
+                 (assoc! acc name (cookie->map cookie))))
              (transient {})
              (into [] (.getCookies request)))))

   (set-cookies* [_ _]
     (throw (UnsupportedOperationException.)))

-  Response
+  ResponseMetaData
   (get-cookies* [_]
     (throw (UnsupportedOperationException.)))

-  (set-cookies* [response cookies]
+  (set-cookies* [^ResponseMetaData response cookies]
     (loop [cookies (into [] cookies)]
       (when-let [[cookiename cookiedata] (first cookies)]
         (let [^Cookie cookie (.cookie response (name cookiename) "")]


Before lexicase starts, it retains only one indvidual per different error vector. This does not change the behavior of lexicase at all, but may speed it up.

--- src/clojush/pushgp/parent_selection.clj
+++ src/clojush/pushgp/parent_selection.clj
@@ -5,10 +5,15 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; lexicase selection

+(defn retain-one-individual-per-error-vector
+  "Retains one random individual to represent each error vector."
+  [pop]
+  (map lrand-nth (vals (group-by #(:errors %) pop))))
+
 (defn lexicase-selection
   "Returns an individual that does the best on a randomly selected set of fitness cases"
   [pop]
-  (loop [survivors pop
+  (loop [survivors (retain-one-individual-per-error-vector pop)
          cases (shuffle (range (count (:errors (first pop)))))]
     (if (or (empty? cases)
             (empty? (rest survivors)))


Update icaps tr results to point in right place (and re-verify after new tiebreaking impl.

--- src/edu/berkeley/ai/scripts/z09_icaps08_tr.clj
+++ src/edu/berkeley/ai/scripts/z09_icaps08_tr.clj
@@ -12,7 +12,7 @@
 	   )
  )

-(def *run-folder* "/Users/jawolfe/Projects/reports/09-icaps08-tr/results/")
+(def *run-folder* "/Users/jawolfe/Projects/reports/archive/09-icaps08-tr/results/")

 (def *warehouse-args*
      [[3 4 [2 3] true {0 '[a] 2 '[c baz]} nil '[[c a]]]


Disable button while typing and doing remote validations

--- src/braid/client/gateway/subs.cljs
+++ src/braid/client/gateway/subs.cljs
@@ -29,7 +29,10 @@
   (fn [state [_ fields]]
     (->> fields
          (map (fn [field]
-                (empty? (get-in state [:fields field :errors]))))
+                (and
+                  (empty? (get-in state [:fields field :errors]))
+                  (= 0 (get-in state [:fields field :validations-left]))
+                  (not (get-in state [:fields field :typing?])))))
          (every? true?))))

 (reg-sub


Factor-out an exit-search! fn

Factor-out an exit-search! fn

--- src/braid/ui/views/search_bar.cljs
+++ src/braid/ui/views/search_bar.cljs
@@ -14,7 +14,9 @@
   (let [open-group-id (subscribe [:open-group-id])
         search-query (subscribe [:search-query])
         kill-chan (chan)
-        search-chan (chan)]
+        search-chan (chan)
+        exit-search! (fn []
+                       (routes/go-to! (routes/inbox-page-path {:group-id @open-group-id})))]
     (r/create-class
       {:component-will-mount
        (fn []
@@ -26,7 +28,7 @@
                    (let [{:keys [query]} v]
                      (store/set-search-results! query {})
                      (if (string/blank? query)
-                       (routes/go-to! (routes/inbox-page-path {:group-id @open-group-id}))
+                       (exit-search!)
                        (do (dispatch! :search-history [query @open-group-id])
                            (routes/go-to! (routes/search-page-path {:group-id @open-group-id
                                                                     :query query})))))
@@ -49,6 +51,5 @@
                        (put! search-chan {:query query})))}]
           (if (seq @search-query)
             [:div.action.clear {:on-click (fn []
-                                            (put! search-chan {:query ""})
-                                            (store/set-search-query! ""))}]
+                                            (exit-search!))}]
             [:div.action.search])])})))


Example of speed changing in dev

Example of speed changing in dev

--- env/dev/cljs/asciinema_player/main.cljs
+++ env/dev/cljs/asciinema_player/main.cljs
@@ -24,3 +24,4 @@
 ; (swap! player-state assoc :theme "seti")
 ; (swap! player-state assoc :current-time 45)
 ; (swap! player-state assoc :font-size "small")
+; (swap! player-state assoc :speed 1)


Started work on a boot task for the devserver.

--- src/clj/io/cogitat/devserver.clj
+++ src/clj/io/cogitat/devserver.clj
@@ -3,7 +3,8 @@
             [compojure.route :as route]
             [compojure.core :refer [defroutes]]
             [compojure.handler :refer [site]]
-            [org.httpkit.server :as httpd]))
+            [org.httpkit.server :as httpd]
+            [tailrecursion.boot.core :refer [deftask]]))

 (defn- log [msg & vals]
@@ -25,6 +26,27 @@
   (route/files "/" {:root "resources/public/"})
   (route/not-found "404"))

-(defn run []
+(defn run [port]
   (httpd/run-server
-    (site (-> server-routes logging)) {:port 9999}))
+    (site (-> server-routes logging)) {:port port}))
+
+(defn stop [pid]
+  nil)
+
+(defn taillog [logfile]
+  nil)
+
+(deftask devserver
+  "[NOT READY] start|stop|taillog dev server for Hoplon files."
+  [boot & [[command] {:keys [port pid] :or {:port 9999}}]]
+  (fn [continue]
+    (fn [event]
+      (case command
+        "start" (fn []
+                  (run port)
+                  ; XXX set the pid for for the spawned process in the boot env
+                  ; XXX set the log file location
+                  )
+        "stop" (stop "pid"))
+        "taillog" (taillog "log file)")
+      (continue event))))


memoize parse-code func

memoize parse-code func

--- src/cljs/om_lette/templater.cljs
+++ src/cljs/om_lette/templater.cljs
@@ -116,6 +116,7 @@
   [s]
   (.parse js/parser (gstring/unescapeEntities s)))

+(def mem-parse-code (memoize parse-code)) ;; this should probably go in the template cache instead

 (defn eval-parsed-cljs-code
   [c state]
@@ -191,7 +192,7 @@
 (defn processors
   [state]
   [[is-om-text? identity]
-   [is-om-code? #(eval-parsed-code (-> % parse-code last) state)]
+   [is-om-code? #(eval-parsed-code (-> % mem-parse-code last) state)]
    [has-om-if? (fn [[h ifx]]
                  (if (eval-om-if-expr ifx state)
                    h
@@ -205,7 +206,7 @@
                            (-> repx
                                first
                                second
-                               parse-code
+                               mem-parse-code
                                (eval-parsed-code state))))]
    [has-listeners? (fn [[h onkeys]]
                      (update-in h [1]
@@ -221,7 +222,7 @@
                                                                                k
                                                                                (mapcat second)
                                                                                (apply str)
-                                                                                parse-code
+                                                                                mem-parse-code
                                                                                last)
                                                                                state))
                                                             (dissoc k))))


prepare embed-view for integration with link extraction

--- src/chat/client/views/message.cljs
+++ src/chat/client/views/message.cljs
@@ -206,11 +206,11 @@
               (sender :nickname))
             (dom/span #js {:className "time"
                            :title (message :created-at)} (helpers/format-date (message :created-at))))
+
           (apply dom/div #js {:className "content"}
             (format-message (message :content)))

-          (EmbedView. #js {:url "https://www.youtube.com/watch?v=J9FImc2LOr8"})
-          (EmbedView. #js {:url "http://imgur.com/gallery/nRwhbNa"})
-          (EmbedView. #js {:url "http://thenext36.ca"}))))))
-
-
+          (when-let [url "http://thenext36.ca"] ;TODO extract the url from message
+            (EmbedView. #js {:url url})))))))
+
+


remove google+ share button

remove google+ share button

--- src/cljs/salava/core/ui/share.cljs
+++ src/cljs/salava/core/ui/share.cljs
@@ -215,7 +215,7 @@
            [:i {:title "LinkedIn Share" :class "fa fa-linkedin-square"}]]]
          )
        ]
-      [:div.share-button
+      #_[:div.share-button
        [google-plus url]]
       [:div.share-button
        [:a {:href (str "https://www.facebook.com/sharer/sharer.php?u=" url) :target "_blank"} [:i {:class "fa fa-facebook-square"}]]]


Comb back through basic event scheduling (WIP)

Trying to convert the basic logic to use cond-> to see whether anything
shakes loose to give me ideas about why my version seems so broken.

--- src/clojure/frereth_cp/message.clj
+++ src/clojure/frereth_cp/message.clj
@@ -65,7 +65,7 @@
 ;;; Internal API

 ;;;; Q: what else is in the reference implementation?
-;;;; A:
+;;;; A: Lots. Scattered around quite a bit now
 ;;;; 186-654 main
 ;;;          186-204 boilerplate

@@ -75,19 +75,19 @@
 ;;;          652-653 exit codes

 ;;; 264-645 main event loop
-;;; 263-269: exit if done
-;;; 271-306: Decide what and when to poll, based on global state
+;;;     263-269: exit if done
+;;;     271-306: Decide what and when to poll, based on global state

 ;;; This next piece seems like it deserves a prominent place.
 ;;; But, really, it needs to be deeply hidden from the end-programmer.
 ;;; I want it to be easy for me to change out and swap around, but
 ;;; that means no one else should ever really even need to know that
 ;;; it happens (no matter how vital it obviously is)
-;;; 307-318: Poll for incoming data
-;;;     317 XXX: keepalives
-
-;;; 444-609 handle this message if it's comprehensible: (DJB)
-;;; (in more depth)
+;;;     307-318: Poll for incoming data
+;;;         317 XXX: keepalives
+
+;;;     444-609 handle this message if it's comprehensible: (DJB)
+;;;     (in more depth)
 ;;;         445-450: boilerplate
 ;;;         452-453: short-circuiting
 ;;;         455: extract ID
@@ -115,8 +115,8 @@
 ;;;                 Evidence:
 ;;;        606: /* XXX: incorporate selective acknowledgents */ (DJB)

-;;;  634-643: try closing pipe to child: (DJB)
-;;;           Well, maybe. If we're done with it
+;;;     634-643: try closing pipe to child: (DJB)
+;;;         Well, maybe. If we're done with it

 (defn choose-next-scheduled-time
   [{{:keys [::specs/n-sec-per-block
@@ -134,6 +134,8 @@
     :keys [::specs/message-loop-name
            ::specs/recent]
     :as state}]
+  ;;; This amounts to lines 286-305
+
   ;; I should be able to just completely bypass this if there's
   ;; more new data pending.
   ;; TODO: Figure out how to make that work
@@ -222,6 +224,15 @@
                                 next-based-on-eof))
         ;; Lines 293-296
         rtt-resend-time (+ earliest-time rtt-timeout)
+        ;; In the reference implementation, 0 for a block's time
+        ;; means it's been ACK'd.
+        ;; => if earliest-time for all blocks is 0, they've all been
+        ;; ACK'd.
+        ;; This is another place where I'm botching that.
+        ;; I've started relying on a ::ackd? flag in each block
+        ;; instead.
+        ;; But calculating earliest-time based on that isn't working
+        ;; the way I expect/want.
         next-based-on-earliest-block-time (if (and (not= 0 earliest-time)
                                                    (> rtt-resend-time
                                                       min-resend-time))
@@ -249,10 +260,32 @@
                                 based-on-closed-child))
         ;; Lines 302-305
         actual-next (max based-on-closed-child recent)
+        mid-time (System/nanoTime)
+        alt (cond-> default-next
+              (= want-ping ::specs/second-1) (do (+ recent (utils/seconds->nanos 1)))
+              (= want-ping ::specs/immediate) (min min-resend-time)
+              ;; If the outgoing buffer is not full
+              ;; And:
+              ;;   If sendeof, but not sendeofprocessed
+              ;;   else (!sendeof):
+              ;;     if there are buffered bytes that have not been sent yet
+              (let [un-ackd-count (count un-ackd-blocks)
+                    un-sent-count(count un-sent-blocks)]
+                (and (< (+ un-ackd-count
+                           un-sent-count)
+                        K/max-outgoing-blocks)
+                     (if send-eof
+                       (not send-eof-processed)
+                       (< 0 un-sent-count)))) (min min-resend-time)
+              (and (not= 0 earliest-time)
+                   (>= rtt-resend-time min-resend-time)) (min rtt-resend-time))
         end-time (System/nanoTime)]
     (log/debug (utils/pre-log message-loop-name)
-               (cl-format nil "Calculating next scheduled time took ~:d nanoseconds"
-                          (- end-time now)))
+               (cl-format nil "Calculating next scheduled time took ~:d nanoseconds and calculated ~:d. Alt approach took ~:d and calculated ~:d"
+                          (- mid-time now)
+                          actual-next
+                          (- end-time mid-time)
+                          alt))
     actual-next))

 ;;; I really want to move schedule-next-timeout to flow-control.
@@ -294,7 +327,9 @@
               ;; (I keep running across bugs that have issues with this,
               ;; and it wreaks havoc with my REPL)
               delta-nanos (max 0 scheduled-delay)
-              delta (inc (utils/nanos->millis delta-nanos))
+              delta (if (< delta-nanos 0)
+                      0
+                      (inc (utils/nanos->millis delta-nanos)))
               delta_f (float delta)  ; For printing
               ;; Creating this isn't a huge overhead, but I'm skeptical
               ;; about this approach.


feature(ring-analytics): configurable “{optimize,close} index after days”

--- systems/ring-analytics/src/containium/systems/ring_analytics.clj
+++ systems/ring-analytics/src/containium/systems/ring_analytics.clj
@@ -4,8 +4,9 @@

 (ns containium.systems.ring-analytics
   "Analytics is a system that can store ring requests."
-  (:require [containium.systems :as systems :refer (Startable Stoppable)]
+  (:require [containium.systems :as systems :refer (require-system Startable Stoppable)]
             [containium.systems.elasticsearch :as es-system :refer (Elastic)]
+            [containium.systems.config :refer (Config get-config)]
             [containium.systems.logging :as logging :refer (SystemLogger refer-logging)]
             [containium.exceptions :as ex]
             [simple-time.core :as time]
@@ -123,7 +124,7 @@
   which the operations should take place."
   [{:keys [^Client client logger] :as elastic-ring-analytics}
    {:keys [optimize-after close-after] :or {optimize-after 2 close-after 7}}]
-  (info logger "Optimizing and closing old ring-analytics logs...")
+  (info logger "Optimizing:" optimize-after " days or older; and Closing:" close-after " days or older log indices...")
   (try
     (let [metas (let [request (.. client admin cluster prepareState (setMetaData true)
                                   (setIndices (into-array String ["log-*"]))
@@ -171,15 +172,16 @@
 (def elasticsearch
   (reify Startable
     (start [this systems]
-      (let [elastic (systems/require-system Elastic systems)
-            logger (systems/require-system SystemLogger systems)]
-        (info logger "Starting Analytics based on ElasticSearch...")
+      (let [config (get-config (require-system Config systems) :ring-analytics)
+            logger (require-system SystemLogger systems)
+            elastic (require-system Elastic systems)]
+        (info logger "Starting Analytics based on ElasticSearch..." config)
         (let [client (es-system/client elastic)
               atat (at/mk-pool)
               elastic-ring-analytics (ElasticAnalytics. client logger atat)]
           (put-template client)
           (at/every (* 1000 60 60 24) ; 24 hours
-                    (partial indices-operations elastic-ring-analytics nil) atat
+                    (partial indices-operations elastic-ring-analytics config) atat
                     :initial-delay (* 1000 60 10)) ; 10 minutes
           (info logger "Started Analytics based on ElasticSearch.")
           elastic-ring-analytics)))))


Removing debug message.

Removing debug message.

--- src/cmr/indexer/data/index_set.clj
+++ src/cmr/indexer/data/index_set.clj
@@ -195,7 +195,6 @@
   [context]
   (let [colls-w-separate-indexes ((get-in context [:system :colls-with-separate-indexes-fn]))
         granule-indices (remove empty? (concat colls-w-separate-indexes ["small_collections"]))]
-    (println (pr-str granule-indices))
     {:index-set {:name "cmr-base-index-set"
                  :id 1
                  :create-reason "indexer app requires this index set"


update names

update names

--- src/clj/org/openforis/ceo/db/projects.clj
+++ src/clj/org/openforis/ceo/db/projects.clj
@@ -382,23 +382,23 @@
                           (sh-wrapper folder-name {} (str "7z e -y " ext-file " -o" type))
                           (let [table-name (str "project_" project-id "_" type "_shp")
                                 shp-name   (find-file-by-ext (str folder-name type) "shp")]
-                            (let [[info geom _] (-> (sh-wrapper-slurp (str folder-name type)
+                            (let [[info body _] (-> (sh-wrapper-slurp (str folder-name type)
                                                                       {:PASSWORD "ceo"}
                                                                       (str "shp2pgsql -s 4326 -t 2D -D " shp-name))
                                                     (str/split #"stdin;\n|\n\\\."))
-                                  col-string    (as-> info i
+                                  column-string (as-> info i
                                                   (str/replace i #"\n" "")
                                                   (re-find #"(?<=CREATE TABLE.*gid serial,).*?(?=\);)" i)
                                                   (str i ",geom geometry (geometry,4326)"))]
                               ;; TODO: Check headers before creating new table.
                               (call-sql "create_new_table"
                                         table-name
-                                        col-string)
+                                        column-string)
                               (sh-wrapper-spit (str folder-name type)
                                                {:PASSWORD "ceo"}
                                                (format-simple "psql -h localhost -U ceo -d ceo -c `\\copy ext_tables.%1 FROM stdin`"
                                                               table-name)
-                                               geom)
+                                               body)
                               (call-sql "add_index_col" table-name))
                             table-name))
                         ;; TODO: Explore loading CSVs with a bulk insert.


refactor

refactor

--- src/kondolisp/compiler.clj
+++ src/kondolisp/compiler.clj
@@ -384,11 +384,14 @@
          compile-resolve-labels assemble)

 (defn kondo-compile [exp]
+  (let [vm-inst-program
+        (compile-resolve-labels
+         (compile-compact
+          (compile-pass1 exp)))]
   (assemble
    (pp-program
-    (compile-resolve-labels
-     (compile-compact
-      (compile-pass1 exp))))))
+    `(~@vm-inst-program
+      (:VM_EXIT))))))

 (defn compile-pass1 [exp]
   (cond


Initiate phonebook nextval properly

Initiate phonebook nextval properly

--- examples/phonebook/src/phonebook/db.clj
+++ examples/phonebook/src/phonebook/db.clj
@@ -3,12 +3,17 @@
 (ns phonebook.db)

 (defn create-db [entries]
-  {:phonebook (ref entries) :next-entry (ref (inc (count entries)))})
+  {:phonebook (ref entries)
+   :next-entry (ref (inc (apply max (keys entries))))})

 (defn add-entry
-  "Add a new entry to the database"
+  "Add a new entry to the database. Returns the id of the newly added
+  entry."
   [db entry]
   (dosync
+   ;; Why use 2 refs when one atom would do? It comes down to being able
+   ;; to return nextval from this function. While this is possible to do
+   ;; with an atom, its feels less elegant.
    (let [nextval @(:next-entry db)]
      (alter (:phonebook db) conj [nextval entry])
      (alter (:next-entry db) inc)


Add view-table viz function.

Add view-table viz function.

--- dev/merkle_db/viz.clj
+++ dev/merkle_db/viz.clj
@@ -156,6 +156,17 @@
   (apply graph-tree rhizome/save-graph store root-id follow? :filename filename args))

+(defn view-table
+  ([table]
+   (view-table table (constantly true)))
+  ([^merkle_db.db.Table table follow?]
+   (when-not (::node/id table)
+     (throw (IllegalArgumentException.
+              (str "Cannot vizualize database with no node id: "
+                   (pr-str db)))))
+   (view-tree (.store store) (::node/id store) follow?)))
+
+
 (defn view-database
   ([db]
    (view-database db (constantly true)))


Comment metrics in search

Comment metrics in search


Fix cljs warnings

Fix cljs warnings

--- src/cljs/clojuredocs/mods/search.cljs
+++ src/cljs/clojuredocs/mods/search.cljs
@@ -2,7 +2,7 @@
   (:require [om.core :as om :include-macros true]
             [dommy.core :as dommy]
             [cljs.core.async :as async
-             :refer [<! >! chan close! sliding-buffer put! alts! alts!! timeout pipe mult tap]]
+             :refer [<! >! chan close! sliding-buffer put! alts! timeout pipe mult tap]]
             [clojuredocs.ajax :refer [ajax]]
             [clojuredocs.anim :as anim]
             [clojure.string :as str]
@@ -177,11 +177,6 @@
                 ($ac-entry res)])
              ac-results))]))))

-(defn handle-search-scroll-to [app prev-props]
-  (when (and (= 0 (count (:ac-text prev-props)))
-             (= 1 (count (:ac-text app))))
-    (anim/scroll-to (om/get-node owner "input") {:pad 35})))
-
 (defn $quick-lookup-widget
   [{:keys [highlighted-index ac-results ac-text search-loading? results-empty?]
     :or {highlighted-index 0}
@@ -199,7 +194,8 @@
          [:div.not-finding {:class "not-finding"}
           "Can't find what you're looking for? "
           [:a.search-feedback
-           {:href (str "/search-feedback" (when text (str "?query=" (util/url-encode text))))}
+           {:href (str "/search-feedback"
+                       (when ac-text (str "?query=" (util/url-encode ac-text))))}
            "Help make ClojureDocs better"]
           "."]
          (om/build $ac-results app {:init-state {:action-ch action-ch}})]))))


fix hashtag replacement

fix hashtag replacement

--- src/cljs/link_collective/plugins.cljs
+++ src/cljs/link_collective/plugins.cljs
@@ -16,7 +16,7 @@
 (defn replace-hashtags
   "Replace hashtags in string with html references"
   [s]
-  (str/replace s hashtag-regexp "$2" ))
+  (str/replace s hashtag-regexp "$1$2"))

 (defn img-responsive [s]
   (str/replace s "<img " "<img class=\"img-responsive\""))


ui update

ui update

- added site title
- added style checkboxes

--- src/listopia/item/view.clj
+++ src/listopia/item/view.clj
@@ -54,8 +54,8 @@
              :value (if checked "false" "true")}]
     [:div.btn-group
      (if checked
-       [:button.btn.btn-success.btn-xs "DONE"]
-       [:button.btn.btn-primary.btn-xs "TODO"])]]))
+       [:button.btn.btn-success.btn-xs [:i {:class "fa fa-check-square-o"}]]
+       [:button.btn.btn-primary.btn-xs [:i {:class "fa fa-square-o"}]])]]))

 (defn items-page [items]
   (html5
@@ -72,7 +72,8 @@
             :rel :stylesheet}]]
    [:body
     [:div.container
-     [:h1 "My Items"]
+     [:h1 "Listopia"]
+     [:h2 "My Items"]
      [:div.row
       (if (seq items)
         [:table.table.table-striped


refactor: prettify highlight.js inclusion

--- src/blogiseq/core.clj
+++ src/blogiseq/core.clj
@@ -36,11 +36,10 @@
    [:p "Hi, my name is Franky, I do this and that...ble blehh lorem ipsum."]
    [:p [:i "testing some stuff"]]])

-(defn include-js-code-highlight [] ; todo use def
-  [:div ; do i have to use wrapping div?
+(def include-js-code-highlight
+  [:div
    (hiccup-page/include-css "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/styles/atelier-dune-light.min.css")
-   ;(hiccup-page/include-css "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/styles/gruvbox-light.min.css")
-   [:script {:src "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/highlight.min.js"}]
+   (hiccup-page/include-js "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/highlight.min.js")
    (hiccup-element/javascript-tag "hljs.initHighlightingOnLoad();")])

 (defn embed-disqus [page-id]
@@ -69,7 +68,7 @@
   [content]
   [:div
    (hiccup-page/include-css "/css/franky.css")
-   (include-js-code-highlight)
+   include-js-code-highlight
    [:div.container
     [:div.left left]
     [:div.right (generate-menu-navi "resources/meta.edn")]


Fix file extension checks

Fix file extension checks

--- src/boot_fmt/core.clj
+++ src/boot_fmt/core.clj
@@ -13,8 +13,9 @@
   []
   (let [{:keys [exit out err]} (clojure.java.shell/sh "git"
                                                       "ls-files" "-z"
-                                                      "*.clj" "*.cljs"
-                                                      "*.cljc" "*.cljs.hl"
+                                                      "*.clj" "*.cljs" "*.cljc"
+                                                      "*.cljx"
+                                                      "*.cljs.hl"
                                                       "*.boot")]
     (when (not= exit 0) (throw (ex-info "git ls-files failed" {:err err})))
     (-> out
@@ -80,9 +81,7 @@
                                              (.isFile f)
                                              (not (.isHidden f))
                                              (->> (.. f getName toLowerCase)
-                                                  (partial
-                                                    re-find
-                                                    #"\.(clj|cljs|cljc|cljx|cljs\.hl|boot)$")))))
+                                                  (re-find #"\.(clj|cljs|cljc|cljx|cljs\.hl|boot)$")))))
                               (map #(.getPath %))
                               set
                               sort)]


Fix implementation for general complex multiplication

--- src/main/clj/clojure/core/matrix/complex.clj
+++ src/main/clj/clojure/core/matrix/complex.clj
@@ -149,6 +149,26 @@
 	  (supports-dimensionality? [m dims]
 	    true))

+(extend-protocol mp/PMatrixScaling
+  Complex
+    (scale [m a]
+      (cond
+        (or (instance? Complex a) (number? a)) (c/* m a)
+        (instance? ComplexArray a) (mp/pre-scale a m)
+        (m/array? a) (mp/pre-scale (complex-array a) m)
+        :else (error "Unable to multiply " (class a) " with a Complex value")))
+    (pre-scale [m a]
+      (cond
+        (or (instance? Complex a) (number? a)) (c/* a m)
+        (instance? ComplexArray a) (mp/scale a m)
+        (m/array? a) (mp/scale (complex-array a) m)
+        :else (error "Unable to multiply " (class a) " with a Complex value")))
+  Object
+    (scale [m a]
+      (mp/element-map m #(* % a)))
+    (pre-scale [m a]
+      (mp/element-map m (partial * a))))
+
 ;; ========================================================================
 ;;
 ;; Functions for handling complex arrays


Logging when creating publications

Logging when creating publications

--- src/onyx/messaging/aeron/publication_group.clj
+++ src/onyx/messaging/aeron/publication_group.clj
@@ -83,6 +83,7 @@
         (:publication pub))
       (let [publication-creation-timeout (arg-or-default :onyx.messaging.aeron/publication-creation-timeout opts)
             tracked-pub (promise)]
+        (info "Creating publication at:" (into {} conn-spec))
         (>!! (:command-ch this) [:add-publication conn-spec tracked-pub])
         (:publication (deref tracked-pub publication-creation-timeout nil)))))
   component/Lifecycle


properly munge :node-library exports

properly munge :node-library exports

--- src/main/shadow/build/targets/node_library.clj
+++ src/main/shadow/build/targets/node_library.clj
@@ -11,7 +11,8 @@
             [shadow.cljs.repl :as repl]
             [shadow.build.node :as node]
             [shadow.cljs.util :as util]
-            [shadow.build.data :as data]))
+            [shadow.build.data :as data]
+            [cljs.compiler :as cljs-comp]))

 (s/def ::exports
   (s/map-of
@@ -70,7 +71,7 @@
                 (map namespace)
                 (map symbol)
                 (into #{}))
-           `(cljs.core/js-obj ~@(->> exports (mapcat (fn [[k v]] [(name k) v]))))
+           `(cljs.core/js-obj ~@(->> exports (mapcat (fn [[k v]] [(-> k (name) (cljs-comp/munge)) v]))))
            ])

         requires


Use reader conditionals

Use reader conditionals

--- src/montebot/connect4.cljc
+++ src/montebot/connect4.cljc
@@ -91,16 +91,27 @@
        longs))

 (defn check-win [player-positions]
-  (if (>= (count player-positions) 4)
+  (if (< (count player-positions) 4)
+    false
     (let [board-bitfield (coll-to-bitfield player-positions)]
       ; Check the board state against each of the winning positions
-      (areduce ^longs victory-positions
-               idx, ret, false
-               (or ret
-                   (.equals (aget victory-positions idx)
-                            (.and (aget victory-positions idx) board-bitfield)))))))
-
-;(crit/quick-bench (check-win [0 1 2 3]))
+      (loop [pos 0]
+        (if (= pos 69)
+          false
+          (if (#?(:clj  =
+                  :cljs .equals) (aget ^longs victory-positions pos)
+                                 (#?(:clj  bit-and
+                                     :cljs .and) (aget ^longs victory-positions pos) board-bitfield))
+            true
+            (recur (inc pos)))))
+      #_(areduce ^longs victory-positions
+                 idx, ret, false
+                 (or ret
+                     (.equals (aget victory-positions idx)
+                              (.and (aget victory-positions idx) board-bitfield)))))))
+
+
+#_(crit/quick-bench (check-win [19 10 1 3 2 3 4 5 38 32 26 20]))

 (defn check-terminal [state]
   (cond (check-win (:p1 state)) :p1
@@ -156,8 +167,8 @@
     (let [move (rand-nth (valid-moves state))]
       (recur (perform-move state move)))))

-;(crit/quick-bench (simulate-game (initial-state)))
-;(crit/quick-bench (check-terminal (initial-state)))
+#_(crit/quick-bench (simulate-game (initial-state)))
+#_(crit/quick-bench (check-terminal (initial-state)))

 (defn state-from-moves [state move-list]
   (if (empty? move-list)


More newlines.

More newlines.

--- src/cbfg/zgo/core.clj
+++ src/cbfg/zgo/core.clj
@@ -67,8 +67,9 @@
 (declare cvt-expr)

 (defn cvt-body [lvl scope forms]
-  (map (fn [form] [(cvt-expr (inc lvl) scope form) ";"])
-       forms))
+  (interpose (nl lvl)
+             (map (fn [form] [(cvt-expr (inc lvl) scope form) ";"])
+                  forms)))

 (defn cvt-cond [lvl scope op test-expr-forms]
   [(interpose "else"
@@ -90,7 +91,8 @@
 (defn cvt-let [lvl scope op [bindings & body]]
   [(interpose (nl lvl)
               (map (fn [[var-name init-val]]
-                     [(cvt-sym var-name) ":= (" (cvt-expr (inc lvl) scope init-val) ")"])
+                     [(cvt-sym var-name) ":= ("
+                      (cvt-expr (inc lvl) scope init-val) ")"])
                    (partition 2 bindings)))
    (nl lvl)
    (cvt-body (inc lvl) scope body)])
@@ -98,7 +100,8 @@
 (defn cvt-recur [lvl scope op args]
   [(interpose (nl lvl)
               (map-indexed (fn [idx arg]
-                             [(str "l" idx) "=" (cvt-expr (inc lvl) scope arg)])
+                             [(str "l" idx) "="
+                              (cvt-expr (inc lvl) scope arg)])
                            args))
    (nl lvl)
    "continue"])
@@ -116,7 +119,8 @@
    "go (func() {" (nl lvl)
    (interpose (nl lvl)
               (map-indexed (fn [idx [var-name init-val]]
-                             [(str "l" idx) ":=" (cvt-expr (inc lvl) scope init-val)])
+                             [(str "l" idx) ":="
+                              (cvt-expr (inc lvl) scope init-val)])
                            (partition 2 bindings)))
    (nl lvl)
    "for {" (nl lvl)
@@ -176,10 +180,11 @@
    ")"])

 (defn cvt-fn-body [lvl params forms]
-  (map-indexed (fn [idx form]
-                 [(when (= idx (dec (count forms))) "return")
-                  (cvt-expr (inc lvl) params form) ";"])
-               forms))
+  (interpose (nl lvl)
+             (map-indexed (fn [idx form]
+                            [(when (= idx (dec (count forms))) "return")
+                             (cvt-expr (inc lvl) params form) ";"])
+                          forms)))

 (defn cvt-fn [lvl params forms]
   ["func" (cvt-fn-params params) "{" (nl lvl)


CLJS-1087: with-out-str unexpectedly affected by *print-newline*

--- src/clj/cljs/core.clj
+++ src/clj/cljs/core.clj
@@ -1882,7 +1882,8 @@
   printing calls."
   [& body]
   `(let [sb# (goog.string.StringBuffer.)]
-     (binding [cljs.core/*print-fn* (fn [x#] (.append sb# x#))]
+     (binding [cljs.core/*print-newline* true
+               cljs.core/*print-fn* (fn [x#] (.append sb# x#))]
        ~@body)
      (cljs.core/str sb#)))


CLJS-1154: Unmunged function names for stacktrace

When source-mapping stacktraces, obtain unmunged function names from source map

--- src/clj/cljs/repl.clj
+++ src/clj/cljs/repl.clj
@@ -224,24 +224,25 @@
     (when (.exists f')
       (ana/parse-ns f'))))

-(defn mapped-line-and-column
+(defn- mapped-line-column-call
   "Given a cljs.source-map source map data structure map a generated line
-   and column back to the original line and column."
+   and column back to the original line, column, and function called."
   [source-map line column]
-  (let [default [line column]]
+  (let [default [line column nil]]
     ;; source maps are 0 indexed for lines
     (if-let [columns (get source-map (dec line))]
       (vec
-        (map inc
+        (map #(%1 %2)
+          [inc inc identity]
           (map
             ;; source maps are 0 indexed for columns
             ;; multiple segments may exist at column
             ;; the last segment seems most accurate
             (last
-              (if-let [mapping (get columns (dec column))]
-                mapping
+              (or
+                (get columns (last (filter #(<= % (dec column)) (sort (keys columns)))))
                 (second (first columns))))
-            [:line :col])))
+            [:line :col :name])))
       default)))

 (defn mapped-stacktrace
@@ -263,42 +264,51 @@
     (let [read-source-map' (memoize read-source-map)
           ns-info' (memoize ns-info)]
       (vec
-        (for [{:keys [function file line column] :as frame} stacktrace]
-          ;; need to convert file, a relative URL style path, to host-specific file
-          (let [no-source-file? (if-not file
-                                  true
-                                  (.startsWith file "<"))
-                rfile (when-not no-source-file?
-                        (io/file (URL. (.toURL (io/file (util/output-directory opts))) file)))
-                [sm {:keys [ns source-file] :as ns-info}]
-                (when-not no-source-file?
-                  ((juxt read-source-map' ns-info') rfile))
-                [line' column'] (if ns-info
-                                  (mapped-line-and-column sm line column)
-                                  [line column])
-                name' (when (and ns-info function)
-                        function)
-                file' (if no-source-file?
-                        file
-                        (string/replace
-                         (.getCanonicalFile
-                           (if ns-info
-                             source-file
-                             (io/file rfile)))
-                         (str (System/getProperty "user.dir") File/separator) ""))
-                url   (or (and ns-info (io/resource (util/ns->relpath ns)))
-                          (and file (io/resource file)))]
-            (merge
-              {:function name'
-               :file (if no-source-file?
-                       (str "NO_SOURCE_FILE"
-                         (when file
-                           (str " " file)))
-                       (io/file file'))
-               :line line'
-               :column column'}
-              (when url
-                {:url url}))))))))
+        (let [with-calls
+              (for [{:keys [function file line column] :as frame} stacktrace]
+                ;; need to convert file, a relative URL style path, to host-specific file
+                (let [no-source-file? (if-not file
+                                        true
+                                        (.startsWith file "<"))
+                      rfile (when-not no-source-file?
+                              (io/file (URL. (.toURL (io/file (util/output-directory opts))) file)))
+                      [sm {:keys [ns source-file] :as ns-info}]
+                      (when-not no-source-file?
+                        ((juxt read-source-map' ns-info') rfile))
+                      [line' column' call] (if ns-info
+                                             (mapped-line-column-call sm line column)
+                                             [line column])
+                      name' (when (and ns-info function)
+                              function)
+                      file' (if no-source-file?
+                              file
+                              (string/replace
+                                (.getCanonicalFile
+                                  (if ns-info
+                                    source-file
+                                    (io/file rfile)))
+                                (str (System/getProperty "user.dir") File/separator) ""))
+                      url (or (and ns-info (io/resource (util/ns->relpath ns)))
+                            (and file (io/resource file)))]
+                  (merge
+                    {:function name'
+                     :call     call
+                     :file     (if no-source-file?
+                                 (str "NO_SOURCE_FILE"
+                                   (when file
+                                     (str " " file)))
+                                 (io/file file'))
+                     :line     line'
+                     :column   column'}
+                    (when url
+                      {:url url}))))]
+          ;; take each non-nil :call and merge it into :function one-level up
+          (map merge
+            (map #(dissoc % :call) with-calls)
+            (concat (rest (map #(if (:call %)
+                                 (hash-map :function (:call %))
+                                 {})
+                            with-calls)) [{}])))))))

 (defn print-mapped-stacktrace
   "Given a vector representing the canonicalized JavaScript stacktrace


update-in -> assoc-in in 'in-ns REPL special fn

--- src/clj/cljs/repl.clj
+++ src/clj/cljs/repl.clj
@@ -183,9 +183,8 @@
        ([_ form]
          (self _ form nil))
        ([_ [_ [quote ns-name] :as form] _]
-         (util/debug-prn "in-ns " ns-name)
          (when-not (ana/get-namespace ns-name)
-           (swap! env/*compiler* update-in [::ana/namespaces ns-name] {:name ns-name}))
+           (swap! env/*compiler* assoc-in [::ana/namespaces ns-name] {:name ns-name}))
          (set! ana/*cljs-ns* ns-name)))
      'load-file load-file-fn
      'clojure.core/load-file load-file-fn


Revert :ice-strength-changed tweak.

Revert :ice-strength-changed tweak.

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -417,8 +417,7 @@
       (swap! state update-in [:bonus] dissoc :ice-strength)
       (trigger-event state side :pre-ice-strength ice)
       (update! state side (assoc ice :current-strength (ice-strength state side ice)))
-      (when (not= oldstren (:current-strength (get-card state ice)))
-        (trigger-event state side :ice-strength-changed (get-card state ice) oldstren)))))
+      (trigger-event state side :ice-strength-changed (get-card state ice) oldstren))))

 (defn update-ice-in-server [state side server]
   (doseq [ice (:ices server)] (update-ice-strength state side ice) ))


identify server of exposed cards

identify server of exposed cards

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -1545,7 +1545,10 @@
   (move state :corp card :rfg))

 (defn expose [state side target]
-  (system-msg state side (str "exposes " (:title target)))
+  (system-msg state side
+              (str "exposes " (:title target)
+                   (if (= (last (:zone target)) :ices) " protecting " " in ")
+                   (zone->name (second (:zone target)))))
   (when-let [ability (:expose (card-def target))]
     (resolve-ability state side ability target nil))
   (trigger-event state side :expose target))


add top menu utm_source

add top menu utm_source

--- src/clj/hsm/views.clj
+++ src/clj/hsm/views.clj
@@ -120,8 +120,8 @@
                 [:a.navbar-brand {:href (format "http://%s" website)}  "Hackersome" ]]
                 [:div.navbar-collapse.collapse
                  [:ul.nav.navbar-nav
-                  [:li [:a {:href "/users"} "Users"]]
-                  [:li [:a {:href "/open-source/"} "Top Projects"]]
+                  [:li [:a {:href "/users?utm_source=top_menu_link"} "Users"]]
+                  [:li [:a {:href "/open-source/?utm_source=top_menu_link"} "Top Projects"]]
                   ; [:li [:a {:href "/collections"} "Collections"]]
                   [:li [:a {:href "/discussions"} "Discussions"]]


A network is now a map structure rather than a vector of cells. Use destructuring to get at the cell contents. Hoist make-cell-func into an inline func in make-network.

--- src/clj/rbn_2/rbn.clj
+++ src/clj/rbn_2/rbn.clj
@@ -15,29 +15,37 @@
   (let [pool (shuffle (filter #(not= exc %1) (range size)))]
     (take n pool)))

-(defn make-cell-func [size]
-  (fn [n]
-    {:idx n
-     :state (random-state)
-     :connections (potential-connections 2 size n)
-     :oper (random-oper)}))
+(defn make-network [dim]
+  (let [size (* dim dim)]
+    {
+     :generation 1
+     :cells (map (fn [n] {
+                          :idx n
+                          :state (random-state)
+                          :connections (potential-connections 2 size n)
+                          :oper (random-oper)
+                          }) (range size))
+    }
+    ))

-(defn make-network [dim]
-  (let [size (* dim dim)
-        make-cell (make-cell-func size)]
-    (map make-cell (range size))))
-
-(defn evolve-cell
-  [cell network]
-  (let [connections (map #(nth network %1) (:connections cell))
+(defn next-cell-state
+  [cell cells]
+  (let [connections (map #(nth cells %1) (:connections cell))
         operands (map :state connections)
         new-state (apply (:oper cell) operands)]
         (assoc cell :state new-state)))

 (defn evolve-network
   [network]
-  (map #(evolve-cell %1 network) network))
+  (let [{:keys [generation cells]} network]
+    {
+     :generation (inc generation)
+     :cells (map #(next-cell-state %1 cells) cells)
+    }))
+

 (def first-gen-net (make-network 8))

 (def second-gen-net (evolve-network first-gen-net))
+
+(println second-gen-net)


oops, fix healthcheck

oops, fix healthcheck

--- src/clj/tictag/db.clj
+++ src/clj/tictag/db.clj
@@ -35,6 +35,7 @@
            :pends (atom (ring-buffer 16))))
   (stop [component]
     (when-let [ds (get-in component [:db :datasource])]
+      (timbre/debugf "Closing database pool: %s" ds)
       (hikari/close-datasource ds))
     (dissoc component :db)))

@@ -270,3 +271,7 @@
         (from :beeminder_goals)
         (where [:= (:id beeminder-user) :beeminder_id])
         sql/format))))
+
+(defn test-query! [db]
+  (try (j/query (:db db) (sql/format (select 1)))
+       (catch Exception e nil)))


Pass unify post-fn the current dataset.

Pass unify post-fn the current dataset.

--- src/cljs/c2/core.cljs
+++ src/cljs/c2/core.cljs
@@ -217,7 +217,7 @@
     (if post-fn
       ;;Give the browser 10 ms to get its shit together, if the post-fn involves advanced layout.
       ;;Without this delay, CSS3 animations sometimes don't happen.
-      (timeout 10 post-fn))))
+      (timeout 10 #(post-fn data)))))

 (defn instantiate-attrs


Make the list of supported methods public

--- src/io/aviso/rook/dispatcher.clj
+++ src/io/aviso/rook/dispatcher.clj
@@ -16,7 +16,7 @@
             [medley.core :as medley])
   (:import [java.net URLDecoder]))

-(def ^:private supported-methods
+(def supported-methods
   "The supported methods, used to \"split\" a route with method :all."
   #{:get :put :post :patch :delete :head :options})


Move period outside quotes, in debug logging output

--- src/io/aviso/rook/dispatcher.clj
+++ src/io/aviso/rook/dispatcher.clj
@@ -628,7 +628,7 @@
      (simple-namespace-dispatch-table context-pathvec ns-sym default-namespace-middleware))
   ([context-pathvec ns-sym middleware]
    (t/track
-     #(format "Identifying resource handler functions in `%s.'" ns-sym)
+     #(format "Identifying resource handler functions in `%s'." ns-sym)
      (try
        (if-not (find-ns ns-sym)
          (require ns-sym))


Run the linear test over 60,000 segments.

--- test/onyx/peer/simulant/linear_cluster_sim.clj
+++ test/onyx/peer/simulant/linear_cluster_sim.clj
@@ -4,6 +4,7 @@
             [simulant.sim :as sim]
             [simulant.util :as u]
             [datomic.api :as d]
+            [taoensso.timbre :refer [info]]
             [onyx.coordinator.sim-test-utils :as sim-utils]
             [onyx.peer.hornetq-util :as hq-util]
             [onyx.api]))
@@ -14,7 +15,7 @@

 (def out-queue (str (java.util.UUID/randomUUID)))

-(def n-messages 40000)
+(def n-messages 60000)

 (def batch-size 1320)

@@ -157,17 +158,19 @@

 (defmethod sim/perform-action :action.type/register-linear-peer
   [action process]
-  (let [peer (first (onyx.api/start-peers conn 1 peer-opts))]
-    (swap! cluster conj peer)))
+  (let [peers (onyx.api/start-peers conn 1 peer-opts)]
+    (info (count @cluster) "in the cluster")
+    (swap! cluster concat peers)))

 (defmethod sim/perform-action :action.type/unregister-linear-peer
   [action process]
   (let [peer (first @cluster)]
     (swap! cluster rest)
-    (prn "---------> " (count @cluster) "left <-------------")
+    (info (count @cluster) "left in the cluster")
     (try
       ((:shutdown-fn peer))
-      (catch Exception e))))
+      (catch Exception e
+        (.printStackTrace e)))))

 (def linear-cluster-test
   (sim/create-test sim-conn
@@ -187,7 +190,7 @@
 (sim/create-action-log sim-conn linear-cluster-sim)

 (doseq [n (range 3)]
-  (swap! cluster conj (onyx.api/start-peers conn 1 peer-opts)))
+  (swap! cluster concat (onyx.api/start-peers conn 1 peer-opts)))

 (def pruns
   (->> #(sim/run-sim-process sim-uri (:db/id linear-cluster-sim))


provide a mock json serialization for InputStreams This fixes audit logging for pierone.

--- src/org/zalando/stups/friboo/system/http.clj
+++ src/org/zalando/stups/friboo/system/http.clj
@@ -45,7 +45,7 @@
            (org.eclipse.jetty.server Server)
            (org.eclipse.jetty.servlet ServletHolder ServletContextHandler)
            (com.netflix.hystrix.exception HystrixRuntimeException)
-           (java.io ByteArrayInputStream)
+           (java.io ByteArrayInputStream InputStream PrintWriter)
            (java.util UUID)))

 (defn flatten-parameters
@@ -181,6 +181,12 @@
     (.start server)
     (when (:join? options true) (.join server))
     server))
+
+; Mock json capability for java.io.InputStream.
+; Needed to serialize non-text requests, e.g. in Pierone
+(extend InputStream json/JSONWriter
+  {:-write (fn [^InputStream is #^PrintWriter out]
+             (.print out (json/write-str (str "Some " (.getName (class is)) ". Content omitted."))))})

 (defn add-logs
   "Adds a list of log entries to the audit logs container."


Contact list toolbar color

Contact list toolbar color

Former-commit-id: dc1c32210647b198c27d9a792d3af3996e5790cb

--- src/status_im/contacts/views/contact_list.cljs
+++ src/status_im/contacts/views/contact_list.cljs
@@ -7,7 +7,6 @@
                                                 list-view
                                                 list-item]]
             [status-im.contacts.views.contact :refer [contact-view]]
-            [status-im.components.styles :refer [toolbar-background2]]
             [status-im.components.toolbar :refer [toolbar]]
             [status-im.components.drawer.view :refer [drawer-view open-drawer]]
             [status-im.components.icons.ionicons :refer [icon]]
@@ -15,7 +14,7 @@
                                                  hamburger-icon
                                                  icon-search
                                                  create-icon
-                                                 toolbar-background2]]
+                                                 toolbar-background1]]
             [status-im.contacts.styles :as st]
             [status-im.utils.listview :as lw]
             [status-im.i18n :refer [label]]))
@@ -25,11 +24,10 @@

 (defview contact-list-toolbar []
   [group [:get :contacts-group]]
-  [toolbar {;; TODO contacts group name
-            :title            (label (if (= group :dapps)
+  [toolbar {:title            (label (if (= group :dapps)
                                        :t/contacs-group-dapps
                                        :t/contacs-group-people))
-            :background-color toolbar-background2
+            :background-color toolbar-background1
             :action           {:image   {:source {:uri :icon_search}
                                          :style  icon-search}
                                :handler (fn [])}}])


Made Date sql column unique attribute

Made Date sql column unique attribute

--- src/hackerati_interval_web_app/jdbc.clj
+++ src/hackerati_interval_web_app/jdbc.clj
@@ -32,6 +32,6 @@
   (db-do-commands db (create-table-ddl :prices
                                             [:priceid :integer "PRIMARY KEY" "AUTO_INCREMENT"]
                                             [:productid :integer "references products (productid)"]
-                                            [:date "date"]
+                                            [:date "date" "UNIQUE"]
                                             [:price "decimal(7,2)"])))


Updated word to use new positional syllable support.

--- src/hxgm30/language/syntagmata/rand.clj
+++ src/hxgm30/language/syntagmata/rand.clj
@@ -10,23 +10,39 @@
   (util/percent-> (rand) (get-in stats [:pseudo-syllables :percent-ranges])))

 (defn syllable
-  [stats]
-  (util/percent-> (rand) (get-in stats [:sound-transitions :percent-ranges])))
+  [stats position]
+  (case position
+    :initial (util/percent->
+              (rand)
+              (get-in stats [:sound-transitions :initial :percent-ranges]))
+    :medial (util/percent->
+              (rand)
+              (get-in stats [:sound-transitions :medial :percent-ranges]))
+    :final (util/percent->
+              (rand)
+              (get-in stats [:sound-transitions :final :percent-ranges]))))

 (defn word
-  [stats]
-  (->> stats
-       syllable-count
-       inc
-       range
-       (mapcat (fn [_] (syllable stats)))
-       (apply str)))
+  ([stats]
+    (word stats (syllable-count stats)))
+  ([stats syllables]
+    (case syllables
+      1 (syllable stats :initial)
+      2 (str (syllable stats :initial)
+             (syllable stats :final))
+      (str (syllable stats :initial)
+           (->> syllables
+                dec
+                range
+                (mapcat (fn [_] (syllable stats :medial)))
+                (string/join ""))
+           (syllable stats :final)))))

 (defn sentence
   ([stats]
     (sentence stats (rand-int 10)))
-  ([stats word-count]
-    (->> word-count
+  ([stats words]
+    (->> words
          inc
          range
          (map (fn [_] (word stats)))


make docset category links to updated headers

--- src/main/cljs_api_gen/docset.clj
+++ src/main/cljs_api_gen/docset.clj
@@ -153,8 +153,8 @@
     (j/insert! sqlite-db :searchIndex
        ;; insert categories
        {:name "Syntax API" :type "Category" :path (resolve-path "README.html#syntax-api")}
-       {:name "Library API"  :type "Category" :path (resolve-path "README.html#library-api-reference")}
-       {:name "Compiler API" :type "Category" :path (resolve-path "README.html#compiler-api-reference")}
+       {:name "Library API"  :type "Category" :path (resolve-path "README.html#library-api")}
+       {:name "Compiler API" :type "Category" :path (resolve-path "README.html#compiler-api")}

        ;; insert sections
        {:name "Overview"                :type "Section" :path (resolve-path "README.html")}


Optimize deduping

Optimize deduping

--- src/main/clojure/pigpen/oven.clj
+++ src/main/clojure/pigpen/oven.clj
@@ -193,7 +193,7 @@
    distinct commands, find the first two that can be merged, and merge them to
    produce graph'. Rinse & repeat until there are no more duplicate commands."
   [commands]
-  (let [distinct-commands (distinct commands)
+  (let [distinct-commands (vec (distinct commands))
         next-merge (next-match distinct-commands)]
     (if next-merge
       (recur (merge-command distinct-commands next-merge))


Add :primitive group to default hierarchy

--- src/main/cljc/mikron/compiler/schema.cljc
+++ src/main/cljc/mikron/compiler/schema.cljc
@@ -25,10 +25,11 @@
     "The semantic schema hierarchy."
     (reduce-kv derive-all
                (make-hierarchy)
-               {:integer  [:byte :ubyte :short :ushort :int :uint :long :varint]
-                :floating [:float :double]
-                :number   [:integer :floating]
-                :coll     [:list :vector :set]}))
+               {:integer   [:byte :ubyte :short :ushort :int :uint :long :varint]
+                :floating  [:float :double]
+                :number    [:integer :floating]
+                :primitive [:number :boolean :binary]
+                :coll      [:list :vector :set]}))

   (def extended-hierarchy
     "The schema hierarchy extended with syntactic groupings."


finally - a working nested split/count/union inside another split :-) - now for the pivot

--- src/main/clojure/org/dada/demo/whales.clj
+++ src/main/clojure/org/dada/demo/whales.clj
@@ -231,8 +231,7 @@
 		  (doall (map (fn [#^Update insertion] (apply f tgt-metamodel (.getNewValue insertion))) insertions)))))
   tgt-metamodel))

-(defn split [[#^Model src-metamodel #^Metadata src-metadata #^Collection extra-keys] split-key
-	     & [split-key-fn]]
+(defn split [[#^Model src-metamodel #^Metadata src-metadata #^Collection extra-keys] split-key & [split-key-fn subchain]]
   [(meta-view
     (str ".split(" split-key")")
     src-metamodel
@@ -246,6 +245,19 @@
 	     (let [model-entry (list* model (concat extra-values [extra-value]))]
 	       (insert tgt-metamodel model-entry)
 	       (insert *metamodel* model)
+	       (if subchain
+		 (subchain
+		  [(meta-view
+		    (str "=" extra-value)
+		    tgt-metamodel
+		    (fn [tgt-metamodel2 model & extra-values]
+			;;(insert tgt-metamodel tgt-metamodel2)
+			(insert tgt-metamodel2 model-entry)
+			;;(insert *metamodel* model)
+			))
+		   src-metadata
+		   (concat extra-keys [split-key])]))
+	       model
 	       )))))
    src-metadata
    (concat extra-keys [split-key])])
@@ -274,8 +286,8 @@
      extra-keys]))

-(defn union [[#^Model src-metamodel #^Metadata src-metadata #^Collection extra-keys] #^String prefix]
-  (let [tgt-model (model (str prefix ".union()") nil src-metadata)
+(defn union [[#^Model src-metamodel #^Metadata src-metadata #^Collection extra-keys] & [#^String prefix]]
+  (let [tgt-model (model (str (or prefix (name (gensym "HERE"))) ".union()") nil src-metadata)
 	tgt-metamodel (meta-view ".union()" src-metamodel (fn [tgt-metamodel src-model & extra-values] (connect src-model tgt-model)))]
     (insert *metamodel* tgt-model)
     (insert tgt-metamodel [tgt-model])
@@ -285,10 +297,6 @@

 (def all-whales (metamodel whales-model))
 (def counted-whales (ccount all-whales))
-
-(def whales-by-type (split all-whales :type))
-(def counted-whales-by-type (ccount whales-by-type))
-(def grouped-counted-whales-by-type (union counted-whales-by-type "Whales.split(:type).count()"))

 (def #^NavigableSet years
      (TreeSet.
@@ -304,18 +312,31 @@
        (Date. 8 0 1)
        (Date. 9 0 1))))

-(def whales-by-type-and-year (split whales-by-type
-				    :time
-				    (fn [time] (list (or (.lower years time) time)))))
-
-(def counted-whales-by-type-and-year (ccount whales-by-type-and-year))
-(def grouped-counted-whales-by-type-and-year (union counted-whales-by-type-and-year "Whales.split(:type).split(:time).count()"))
+(def whales-by-type
+     (split
+      all-whales
+      :type
+      nil
+      #(union
+	(ccount
+	 (split
+	  %
+	  :time
+	  (fn [time] (list (or (.lower years time) time)))
+	  )))
+      ))
+
+;;(def counted-whales-by-type (ccount whales-by-type))
+;;(def grouped-counted-whales-by-type (union counted-whales-by-type "Whales.split(:type).count()"))
+
+;;(def counted-whales-by-type-and-year (ccount whales-by-type-and-year))
+;;(def grouped-counted-whales-by-type-and-year (union counted-whales-by-type-and-year "Whales.split(:type).split(:time).count()"))

 ;;--------------------------------------------------------------------------------

 ;; create some whales...

-(def num-whales 1000)
+(def num-whales 1000000)

 (time
  (doall


[#160] Convert instant to UTC

[#160] Convert instant to UTC

--- priv/clojure/instant.clj
+++ priv/clojure/instant.clj
@@ -234,8 +234,12 @@
 milliseconds since the epoch, UTC."
   [years months days hours minutes seconds nanoseconds
    offset-sign offset-hours offset-minutes]
-  #[#[years months days]
-    #[hours minutes seconds]])
+  (let [offset-secs (+ (* offset-sign offset-hours 60 60)
+                       (* offset-sign offset-minutes 60))
+        datetime #[#[years months days]
+                   #[hours minutes seconds]]
+        greg-seconds (calendar/datetime_to_gregorian_seconds.e datetime)]
+    (calendar/gregorian_seconds_to_datetime.e (- greg-seconds offset-secs))))

 (defn read-instant-date
   "To read an instant as a java.util.Date, bind *data-readers* to a map with


improved warning message

improved warning message

--- src/evalback/core.clj
+++ src/evalback/core.clj
@@ -66,7 +66,7 @@
         pu (.getPParseUnit ast)
         pred (.getPredicate pu)]
     (if (instance? AImplicationPredicate pred)
-      "\nYou use an implication at the top level. This is most likely not what you meant. Remember that free variables are existentially quantified.\n\n"
+      "\nYou use an implication at the top level. This may not be what you meant. Remember that free variables are existentially quantified.\n\n"
       "")))


Improved Cljs compilation times by 4-5x

Improved Cljs compilation times by 4-5x

Based on http://swannodette.github.io/2014/12/22/waitin/

- added "target/classes" to :source-paths
- added :clean-targets to remove only project specific out
- updated cljs to 0.0-2511
- added :cache-analysis true to compiler settings

On my MBP (2013 2.3ghz quadcore i7), a cold compilation takes ~6s. Subsequent compilations ~2.1s.

With these settingsm, subsequent `lein clean` and `lein cljsbuild once` compilations take
~0.35s.

--- src/leiningen/new/mies/project.clj
+++ src/leiningen/new/mies/project.clj
@@ -7,7 +7,9 @@

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

-  :source-paths ["src"]
+  :source-paths ["src" "target/classes"]
+
+  :clean-targets ["out/{{sanitized}}" "{{sanitized}}.js"]

   :cljsbuild {
     :builds [{:id "{{name}}"
@@ -16,4 +18,5 @@
                 :output-to "{{sanitized}}.js"
                 :output-dir "out"
                 :optimizations :none
+                :cache-analysis true
                 :source-map true}}]})


Added ability to filter flows on eventSource

--- src/hydrant/utils.clj
+++ src/hydrant/utils.clj
@@ -1,5 +1,34 @@
 (ns hydrant.utils
   (:require [taoensso.timbre :as log]))
+
+(defn match-any
+  ([poss-vals]
+   (fn [target-val]
+     (match-any poss-vals target-val)))
+
+  ([poss-vals target-val]
+   (match-any #(.equals %1 %2) poss-vals target-val))
+
+  ([f poss-vals target-val]
+   (some (partial f target-val) poss-vals)))
+
+
+(defmacro call-flows [events  flows]
+  `(do
+     ~@(map #(list % events) flows))
+;;  `(do
+;;     (doseq [flow# ~flows]
+;;       (try
+;;         (flow# ~events)
+;;         (catch Throwable t#
+;;           (log/warn t#))))
+;;  )
+)
+
+(defmacro filter-source [pred & body]
+  `(fn [events#]
+     (when (~pred (-> events# first :eventSource))
+      (call-flows events# ~body))))

 (defn sensibly-print-events [events]


Pass leave cluster test.

Pass leave cluster test.

--- src/onyx/log/commands/leave_cluster.clj
+++ src/onyx/log/commands/leave_cluster.clj
@@ -39,23 +39,22 @@
      :updated-watch {:observer observer
                      :subject subject}}))

-;; (let [peer-counts (common/balance-jobs new)
-;;       peers (get (common/job->peers new) (:job allocation))]
-;;   (when (> (count peers) (get peer-counts (:job allocation)))
-;;     (let [n (- (count peers) (get peer-counts (:job allocation)))
-;;           peers-to-drop (common/drop-peers new (:job allocation) n)]
-;;       (when (and (some #{(:id peer-args)} (into #{} peers-to-drop))
-;;                  (common/volunteer? old new peer-args (:job peer-args)))
-;;         [{:fn :volunteer-for-task :args {:id (:id peer-args)}}]))))
-
 (defmethod extensions/reactions :leave-cluster
   [{:keys [args]} old new diff state]
   (let [allocation (common/peer->allocated-job (:allocations new) (:id state))]
-    (when (or (= (:id state) (get (:prepared old) (:id args)))
+    (cond (or (= (:id state) (get (:prepared old) (:id args)))
               (= (:id state) (get (:accepted old) (:id args))))
-      [{:fn :abort-join-cluster
-        :args {:id (:id state)}
-        :immediate? true}])))
+          [{:fn :abort-join-cluster
+            :args {:id (:id state)}
+            :immediate? true}]
+          allocation
+          (let [peer-counts (common/balance-jobs new)
+                peers (get (common/job->peers new) (:job allocation))]
+            (when (> (count peers) (get peer-counts (:job allocation)))
+              (let [n (- (count peers) (get peer-counts (:job allocation)))
+                    peers-to-drop (common/drop-peers new (:job allocation) n)]
+                (when (some #{(:id state)} (into #{} peers-to-drop))
+                  [{:fn :volunteer-for-task :args {:id (:id state)}}])))))))

 (defmethod extensions/fire-side-effects! :leave-cluster
   [{:keys [message-id args]} old new {:keys [updated-watch]} state]


Improve warning message.

Improve warning message.

--- src/re_frame/handlers.cljs
+++ src/re_frame/handlers.cljs
@@ -16,7 +16,7 @@
             [v]
             (remove nil? (map name-of-factory v)))]
     (doseq [name (factory-names-in v)]
-      (error "re-frame: \"" name "\" used incorrectly. Must be used like this \"(" name " ...)\", whereas you just used \"" name "\"."))))
+      (error "re-frame: \"" name "\" is a factory. It must be called like this \"(" name " ...)\", whereas you just used \"" name "\"."))))

 (defn comp-middleware