new-outer-ize links in header too

new-outer-ize links in header too

--- src-cljs/frontend/components/header.cljs
+++ src-cljs/frontend/components/header.cljs
@@ -146,7 +146,7 @@
          [:ul.nav.navbar-nav
           (for [[point {:keys [path title]}] %]
             [:li.list-item (maybe-active nav-point point)
-             [:a.menu-item {:href path} title]])]]])
+             [:a.menu-item {:href path :class "new-outer"} title]])]]])
     nav-maps))

 (defn outer-header [app owner]
@@ -182,7 +182,7 @@
                                     :height 25})]
               (if logged-in?
                 [:a.mobile-nav {:href "/"} "Back to app"]
-                [:a.mobile-nav.signup {:href "/signup"} "Sign up"])
+                [:a.mobile-nav.signup {:href "/signup/" :class "new-outer"} "Sign up"])
               ]
              [:div.navbar-container {:class hamburger-state}
               [:ul.nav.navbar-nav
@@ -196,7 +196,7 @@
                                                             :enterprise}
                                                           nav-point)
                                            "active")}
-                    [:a.menu-item {:href "/features"}
+                    [:a.menu-item {:href "/features/" :class "new-outer"}
                      "Product "
                      [:i.fa.fa-caret-down]]
                     [:ul.dropdown-menu
@@ -206,31 +206,31 @@
                                           (maybe-active nav-point :features)
                                           {:role "menuitem"
                                            :tabIndex "-1"
-                                           :href "/features"})
+                                           :href "/features/" :class "new-outer"})
                        "Features"]]
                      [:li {:role "presentation"}
                       [:a.sub.menu-item (merge
                                           (maybe-active nav-point :mobile)
                                           {:role "menuitem"
                                            :tabIndex "-1"
-                                           :href "/mobile"})
+                                           :href "/mobile/" :class "new-outer"})
                        "Mobile"]]
                      [:li {:role "presentation"}
                       [:a.sub.menu-item (merge
                                           (maybe-active nav-point :integrations)
                                           {:role "menuitem"
                                            :tabIndex "-1"
-                                           :href "/integrations/docker"})
+                                           :href "/integrations/docker/" :class "new-outer"})
                        "Docker"]]
                      [:li {:role "presentation"}
                       [:a.sub.menu-item (merge
                                           (maybe-active nav-point :enterprise)
                                           { :role "menuitem"
                                            :tabIndex "-1"
-                                           :href "/enterprise"})
+                                           :href "/enterprise/" :class "new-outer"})
                        "Enterprise"]]]]
                    [:li (maybe-active nav-point :pricing)
-                    [:a.menu-item {:href "/pricing"} "Pricing"]]))
+                    [:a.menu-item {:href "/pricing/" :class "new-outer"} "Pricing"]]))
                [:li (maybe-active nav-point :documentation)
                 [:a.menu-item {:href "/docs"} "Documentation"]]
                [:li [:a.menu-item {:href "https://discuss.circleci.com" :target "_blank"} "Discuss"]]
@@ -243,7 +243,7 @@
                                                    :press}
                                                  nav-point)
                                   "active")}
-                    [:a.menu-item {:href "/about"} "About Us"]]
+                    [:a.menu-item {:href "/about/" :class "new-outer"} "About Us"]]
                    [:li [:a.menu-item {:href "http://blog.circleci.com"} "Blog"]]))]
               (if logged-in?
                 [:ul.nav.navbar-nav.navbar-right.back-to-app
@@ -256,7 +256,7 @@
                    "Log In"]]
                  [:li
                   (if (= :page (om/get-shared owner [:ab-tests :auth-button-vs-page]))
-                    [:a.signup-link.btn.btn-success.navbar-btn.menu-item {:href "/signup" :on-mouse-up #(analytics/track-signup-click {})} "Sign Up"]
+                    [:a.signup-link.btn.btn-success.navbar-btn.menu-item {:href "/signup/" :class "new-outer" :on-mouse-up #(analytics/track-signup-click {})} "Sign Up"]
                     [:a.signup-link.btn.btn-success.navbar-btn.menu-item
                      {:href (auth-url :destination "/")
                       :on-click #(raise! owner [:track-external-link-clicked


update metadata discovery

update metadata discovery

--- kafka-clj/src/kafka_clj/metadata.clj
+++ kafka-clj/src/kafka_clj/metadata.clj
@@ -13,7 +13,8 @@

 (defn convert-metadata-response [resp]
   ;; transform the resp into a map
-  ;; {topic-name { partition-n :host {:host host :port port} } }
+  ;; {topic-name [{:host host :port port} ] }
+  ;; the index of the vector (value of the topic-name) is sorted by partition number
   ;; here topic-name:String and partition-n:Integer are keys but not keywords
   ;;{:correlation-id 2,
 	;;											 :brokers [{:node-id 0, :host a, :port 9092}],


revert accidental commit of ":-model" field in carry core API

--- src/carry/core.cljc
+++ src/carry/core.cljc
@@ -85,5 +85,4 @@
     (letfn [(dispatch-action [action] (reset! model-atom (reconcile @model-atom action)) nil)
             (dispatch-signal [signal] (control read-only-model-atom signal dispatch-signal dispatch-action) nil)]
       {:model           read-only-model-atom
-       :-model          model-atom
        :dispatch-signal dispatch-signal})))


minor

minor

--- src/jarkeeper/core.clj
+++ src/jarkeeper/core.clj
@@ -29,6 +29,7 @@
                    :version (nth project-def 2)
                    :github-url github-url
                    :description (nth project-def 4)}]
+       (log/info "project-def" project-def)
        (project-view/index project))))


no args

no args

--- src/leech/receive.cljs
+++ src/leech/receive.cljs
@@ -93,7 +93,7 @@
                      (.publish redis-client events-key event-serialized)))))))))
   (log {:fn "start-bleeders" :at "finish"}))

-(defn start [& _]
+(defn start []
   (log {:fn "start" :at "start"})
   (let [receive-watch (watch/init)
         publish-watch (watch/init)


Make paths absolute when reading project.clj.

Relative paths are assumed to be relative to the root of the project.

--- src/leiningen/core.clj
+++ src/leiningen/core.clj
@@ -15,13 +15,18 @@
         identity
         args))

+(defn- normalize-path [project-root path]
+  (when path
+    (let [f (File. path)]
+      (.getAbsolutePath (if (.isAbsolute f) f (File. project-root path))))))
+
 (defmacro defproject [project-name version & args]
   ;; This is necessary since we must allow defproject to be eval'd in
   ;; any namespace due to load-file; we can't just create a var with
   ;; def or we would not have access to it once load-file returned.
   `(let [m# (apply hash-map ~(cons 'list (unquote-project args)))
          root# ~(.getParent (File. *file*))
-         normalize-path# (fn [p#] (when p# (.getPath (File. p#))))]
+         normalize-path# (partial ~normalize-path root#)]
      (alter-var-root #'project
                      (fn [_#] (assoc m#
                                :name ~(name project-name)
@@ -29,31 +34,25 @@
                                            (name project-name))
                                :version ~version
                                :compile-path (normalize-path#
-                                              (or (:compile-path m#)
-                                                  (str root# "/classes")))
+                                              (or (:compile-path m#) "classes"))
                                :source-path (normalize-path#
-                                             (or (:source-path m#)
-                                                 (str root# "/src")))
+                                             (or (:source-path m#) "src"))
                                :library-path (normalize-path#
-                                              (or (:library-path m#)
-                                                  (str root# "/lib")))
+                                              (or (:library-path m#) "lib"))
                                :test-path (normalize-path#
-                                           (or (:test-path m#)
-                                           (str root# "/test")))
+                                           (or (:test-path m#) "test"))
                                :resources-path (normalize-path#
                                                 (or (:resources-path m#)
-                                                    (str root# "/resources")))
+                                                    "resources"))
                                :dev-resources-path
-                               (normalize-path#
-                                (or (:dev-resources-path m#)
-                                    (:test-resources-path m#)
-                                    (str root# "/test-resources")))
+                               (normalize-path# (or (:dev-resources-path m#)
+                                                    (:test-resources-path m#)
+                                                    "test-resources"))
                                ;; TODO: remove in 2.0
                                :test-resources-path
-                               (normalize-path#
-                                (or (:dev-resources-path m#)
-                                    (:test-resources-path m#)
-                                    (str root# "/test-resources")))
+                               (normalize-path# (or (:dev-resources-path m#)
+                                                    (:test-resources-path m#)
+                                                    "test-resources"))
                                :target-dir (normalize-path#
                                             (or (:target-dir m#) (:jar-dir m#)
                                                 root#))
@@ -61,6 +60,8 @@
                                :jar-dir (normalize-path#
                                          (or (:target-dir m#) (:jar-dir m#)
                                              root#))
+                               :java-source-path (normalize-path#
+                                                  (:java-source-path m#))
                                :root root#)))
      (when (:test-resources-path m#)
        (println (str "WARNING: :test-resources-path is deprecated; use "


Fix error message on missing task.

Fix error message on missing task.

--- src/leiningen/core.clj
+++ src/leiningen/core.clj
@@ -54,10 +54,11 @@
 (defn resolve-task [task]
   (let [task-ns (symbol (str "leiningen." task))
         task (symbol task)
-        error-fn (fn [& _]
-                   (abort
-                    (format "%s is not a task. Use \"help\" to list all tasks."
-                             task)))]
+        ;; code is expecting a var, so it derefs. fake with an atom.
+        error-fn (atom (fn [& _]
+                         (abort
+                          (str task " is not a task. Use \"help\" "
+                               "to list all tasks."))))]
     (try
      (when-not (find-ns task-ns)
        (require task-ns))
@@ -92,7 +93,7 @@
   (let [task (resolve-task task-name)]
     (load-hooks task-name)
     ((join-hooks (::hooks (meta @task)))
-     #(apply task args))))
+     #(apply @task args))))

 (defn ns->path [n]
   (str (.. (str n)


Assoc the var onto the metadata for test selectors.

--- src/leiningen/test.clj
+++ src/leiningen/test.clj
@@ -16,7 +16,8 @@
      (if-let [add-hook# (resolve 'robert.hooke/add-hook)]
        (add-hook# (resolve 'clojure.test/test-var)
                   (fn test-var-with-selector [test-var# var#]
-                    (when (reduce #(or %1 (%2 (meta var#))) false ~selectors)
+                    (when (reduce #(or %1 (%2 (assoc (meta var#) ::var var#)))
+                                  false ~selectors)
                       (test-var# var#))))
        (throw (Exception. "Test selectors require robert/hooke dep.")))))


Handle subprocess forking without eating output.

Also ensures checkout state prior to running build-deps.

--- src/leiningen/voom.clj
+++ src/leiningen/voom.clj
@@ -46,6 +46,13 @@
                           %)
                        cmdline)))

+(defn subprocess
+  [{:keys [dir]} & cmdline]
+  (let [proc (doto (ProcessBuilder. ^java.util.List cmdline)
+               (.directory (File. ^String dir))
+               (.inheritIO))]
+    (.waitFor (.start proc))))
+
 (defn box-cmd
   [& cmd]
   (swap! *box-cmds* conj (apply str cmd)))
@@ -295,7 +302,8 @@
 (defn install-versioned-artifact
   [version proot]
   (println "Calling recursive build-deps on:" proot)
-  (print (:out (sh "lein" "voom" "build-deps" :dir proot)))
+  (safe-checkout proot (-> version ver-parse :sha))
+  (subprocess {:dir proot} "lein" "voom" "build-deps")
   ;; Before getting here 'find-matching-projects had already called
   ;; 'safe-checkout but "build-deps" dependencies may have modified
   ;; the working-copy along the way so we make sure we're again at the
@@ -306,9 +314,9 @@
   ;; 'safe-checkout above.
   (let [install-cmd ["lein" "voom" "wrap" ":insanely-allow-dirty-working-copy"
                      (str ":expected-version--" version)
-                     "install" :dir proot]
-        _ (apply println "install-versioned-artifact:" install-cmd)
-        rtn (apply sh install-cmd)]
+                     "install"]
+        _ (apply println "install-versioned-artifact:" install-cmd {:dir proot})
+        rtn {:exit (apply subprocess {:dir proot} install-cmd)}]
     (when-not (zero? (:exit rtn))
       (throw (ex-info "lein voom install error" (assoc rtn :cmd install-cmd))))
     rtn))


Minor edits

Minor edits

--- src/cia/threats.clj
+++ src/cia/threats.clj
@@ -23,6 +23,7 @@
               [ring.swagger.schema :refer [coerce!]]))

 ;; TODO - README for each section
+;; TODO - Determine which fields should be required

 ;; References
 (def COAReference m/Reference)
@@ -61,7 +62,7 @@
     (s/optional-key :victim_targeting) m/VictimTargeting
     (s/optional-key :exploit_targets) [RelatedExploitTargetReference]
     (s/optional-key :related_TTPs) RelatedTTPsReference
-    (s/optional-key :source) m/Source ; Renamed from information_source
+    (s/optional-key :source) m/Source

     ;; Extension fields:
     :type  s/Str
@@ -110,7 +111,7 @@
 (s/defschema RelatedCOA
   "See http://stixproject.github.data-model/1.2/stixCommon/RelatedCourseOfActionType/"
   {(s/optional-key :confidence) m/Confidence
-   (s/optional-key :information_source) m/Source
+   (s/optional-key :source) m/Source
    (s/optional-key :relationship) s/Str
    (s/optional-key :course_of_action) COAReference})

@@ -141,7 +142,6 @@

    })

-;; TODO - Record any fields that are left out, or any squashing in the code
 ;; TODO - Write up transforms and variations in the README, include notes for serialization
 ;; TODO - Add NewIncident and StoredIncident
 (s/defschema Incident
@@ -161,7 +161,7 @@
     (s/optional-key :victim) s/Str
     (s/optional-key :affected_assets) m/AffectedAsset
     (s/optional-key :impact_assessment) m/ImpactAssessment
-    (s/optional-key :source) m/Source ;; was information_source
+    (s/optional-key :source) m/Source
     (s/optional-key :security_compromise) m/SecurityCompromise
     (s/optional-key :discovery_method) m/DiscoveryMethod
     (s/optional-key :coa_requested) [m/Reference]
@@ -173,7 +173,7 @@
     ;; structured data such as confidence and source for each element).
     (s/optional-key :related_indicators) [m/Reference]
     (s/optional-key :related_observables) [m/Reference]
-    (s/optional-key :leveraged_ttps) [m/Reference]
+    (s/optional-key :leveraged_TTPs) [m/Reference]
     (s/optional-key :attributed_actors) [m/Reference] ;; was attributed_threat_actors
     (s/optional-key :related_incidents) [m/Reference]
     (s/optional-key :intended_effect) m/IntendedEffect
@@ -206,7 +206,7 @@
   (merge
    m/GenericStixIdentifiers
    {:timestamp m/Time
-    :vesion s/Str
+    :version s/Str
     :vulnerability [m/Vulnerability]
     :weakness [m/Weakness]
     :configuration [m/Configuration]


Drawing a line.

Drawing a line.

--- 03-analog-clock/src/cljs/analog_clock/client.cljs
+++ 03-analog-clock/src/cljs/analog_clock/client.cljs
@@ -6,11 +6,19 @@
   (dom/set-text (dom/get-element "digital-clock")
                 (js/Date)))

+(defn draw-line [context start-point end-point color line-width]
+  (set! (. context -strokeStyle) color)
+  (set! (. context -lineCap) "round")
+  (set! (. context -lineWidth) line-width)
+  (.beginPath context)
+  (.moveTo context (first start-point) (second start-point))
+  (.lineTo context (first end-point) (second end-point))
+  (.stroke context))
+
 (defn update-analog-clock []
   (let [canvas (dom/get-element "analog-clock")
         context (.getContext canvas "2d")]
-    (set! (. context -fillStyle) "#ff0000")
-    (.fillRect context 0 0 100 100)))
+    (draw-line context [200 200] [300 300] "red" 20)))

 (defn update-clock []
   (update-digital-clock)


recognize defmethod scope

recognize defmethod scope

--- cljs/src/main/quark/cogs/editor/analysis/scopes.cljs
+++ cljs/src/main/quark/cogs/editor/analysis/scopes.cljs
@@ -10,10 +10,11 @@
   *scope-id*)

 (def scope-openers
-  {'defn  :params
-   'defn- :params
-   'fn    :params
-   'let   :pairs})
+  {'defn      :params
+   'defn-     :params
+   'fn        :params
+   'defmethod :params
+   'let       :pairs})

 (defn filter-non-args [arg-nodes]
   (let [arg? (fn [[node _]]
@@ -46,8 +47,8 @@
 (defn node-scope [node]
   (condp = (node/tag node)
     :list (if-let [opener-type (scope-openers (node/sexpr (first (node/children node))))]
-                                {:id     (next-scope-id!)
-                                 :locals (collect-params node opener-type)})
+            {:id     (next-scope-id!)
+             :locals (collect-params node opener-type)})
     :fn {:id     (next-scope-id!)
          :locals [[#(re-find #"^%" (node/string %)) (:id node)]]}
     nil))


fix for issue #86, updating the jboss repo in the sample.project.clj

--- sample.project.clj
+++ sample.project.clj
@@ -64,7 +64,7 @@
   ;; Set this in order to only use the :repositories you list below.
   :omit-default-repositories true
   :repositories { "java.net" "http://download.java.net/maven/2"
-                  "jboss" "http://repository.jboss.com/maven2/"}
+                  "jboss" "https://repository.jboss.org/nexus/content/groups/public/"}
   ;; If you'd rather use a different directory structure, you can set these.
   :source-path "src/main/clojure"
   :library-path "target/dependency"


Fix per https://github.com/MastodonC/kixi.hecuba/pull/638#discussion_r39149769

--- src/clj/kixi/hecuba/api/measurements.clj
+++ src/clj/kixi/hecuba/api/measurements.clj
@@ -156,7 +156,6 @@
         {:keys [start-date end-date device_id type]} (:items ctx)
         sensor_id (-> (:sensor ctx) :sensor_id)]
     (let [measurements (measurements/retrieve-measurements db-session start-date end-date device_id sensor_id)]
-      (println ctx)
       (format-measurements ctx measurements))))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Remove force-lang from opensubtitles

Remove force-lang from opensubtitles

--- src/clj/subman/sources/opensubtitles.clj
+++ src/clj/subman/sources/opensubtitles.clj
@@ -3,8 +3,6 @@
             [net.cgrand.enlive-html :as html]
             [subman.helpers :as helpers]
             [subman.const :as const]))
-
-(def force-lang "English")

 (defn- make-url
   "Make absolute url from relative"


Add architecture into SHARED-LIB-PATH in kernelloader

--- src/clojure/gpu/matrix/kernel_loader.clj
+++ src/clojure/gpu/matrix/kernel_loader.clj
@@ -6,16 +6,26 @@
                          ^{:static true} [getIncludeProgramDir [] String]
                          ^{:static true} [loadLibrary [String] void]]))

-(def OPENCL-PREFIX "opencl/")
-(def OPENCL-INCLUDE-DIR (.. ClassLoader (getSystemResource OPENCL-PREFIX) (getPath)))
-(def SHARED-LIB-PATH "native/")
-
 (defmacro cond-starts-with [string & args]
   `(cond
      ~@(mapcat (fn [prefix ret]
                  [`(.startsWith ~string ~prefix) ret])
                (take-nth 2 args)
                (take-nth 2 (next args)))))
+
+(def OPENCL-PREFIX "opencl/")
+(def OPENCL-INCLUDE-DIR (.. ClassLoader (getSystemResource OPENCL-PREFIX) (getPath)))
+(def SHARED-LIB-PATH
+  (let [os-name (.. System (getProperty "os.name") (toLowerCase))
+        os-arch (.. System (getProperty "os.arch"))]
+    (str "native/"
+         (cond-starts-with os-name
+                           "win"      "win/"
+                           "mac"      "mac/"
+                           "linux"    "linux/"
+                           "freebsd"  "freebsd"
+                           "solaris"  "solaris/")
+         os-arch "/")))

 (defn get-lib-extension []
   (let [os-name (.. System (getProperty "os.name") (toLowerCase))]


Give product of genesis operator an empty history

--- src/clojush/pushgp/genetic_operators.clj
+++ src/clojush/pushgp/genetic_operators.clj
@@ -169,7 +169,7 @@
                           atom-generators
                           argmap))]
     (make-individual :genome genome
-                     :history (:history ind)
+                     :history ()
                      :age 0
                      :grain-size (compute-grain-size genome argmap)
                      :ancestors (if maintain-ancestors


Make «forall» and «exists» to return boolean values

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/util.clj
+++ src/conexp/util.clj
@@ -387,17 +387,17 @@

 (defmacro forall
   "Implements logical forall quantor. Bindings is of the form [var-1
-  seq-1 var-2 seq-2 ...]."
+  seq-1 var-2 seq-2 ...]. Returns boolean value."
   [bindings condition]
   (when-not (let [c (count bindings)]
               (and (<= 0 c)
                    (zero? (mod c 2))))
     (illegal-argument "forall requires even number of bindings."))
-  (expand-bindings (map vec (partition 2 bindings)) condition))
+  `(boolean ~(expand-bindings (map vec (partition 2 bindings)) condition)))

 (defmacro exists
   "Implements logical exists quantor. Bindings is of the form [var-1
-  seq-1 var-2 seq-2 ...]."
+  seq-1 var-2 seq-2 ...]. Returns boolean value."
   [bindings condition]
   (when-not (let [c (count bindings)]
               (and (<= 0 c)


use toDateTimeAtStartOfDay() instead of toDateMidnight(), which is deprecated.

--- src/metabase/pulse.clj
+++ src/metabase/pulse.clj
@@ -79,7 +79,7 @@
                 (cond (t/within? (t/interval d-start (t/plus d-start (t/days 1))) date) "Today"
                       (t/within? (t/interval (t/minus d-start (t/days 1)) d-start) date) "Yesterday"))
     :week     (let [date    (c/from-long timestamp)
-                    w-start (-> (new org.joda.time.LocalDate) .weekOfWeekyear .roundFloorCopy .toDateMidnight)]
+                    w-start (-> (new org.joda.time.LocalDate) .weekOfWeekyear .roundFloorCopy .toDateTimeAtStartOfDay)]
                 (cond (t/within? (t/interval w-start (t/plus w-start (t/weeks 1))) date) "This week"
                       (t/within? (t/interval (t/minus w-start (t/weeks 1)) w-start) date) "Last week"))
     :month    (let [date    (c/from-long timestamp)


attempt to ensure input from mirth doesn't result in path traversal

--- src/mirthsync/apis.clj
+++ src/mirthsync/apis.clj
@@ -92,6 +92,21 @@
         server-groups (zip/append-child server-groups (zip/node el-loc))]
     (assoc app-conf :server-groups server-groups)))

+(defn safe-name?
+  "Takes and returns an unmodified string that should represent a
+  creatable file that doesn't span paths. Logs a human readable error
+  and then throws an exception if any problems are detected."
+  [name]
+  (if (and
+       name
+       (not= name (.getName (File. name))))
+    (do
+      (cli/out (str name " has invalid characters."))
+      (throw (AssertionError. (str "Name does not appear to be safe"
+                                    " for file creation: " name))))
+    name))
+
+
 (defn file-path
   "Returns a function that, when given an app conf, returns a string file
   path for the current api with path appended."
@@ -100,7 +115,7 @@
        {:keys [local-path find-name] :as api} :api}]
     (str (local-path app-conf)
          File/separator
-         (find-name el-loc)
+         (safe-name? (find-name el-loc))
          path)))

 (defn channel-file-path
@@ -109,12 +124,12 @@
     {:keys [local-path find-name find-id] :as api} :api}]
   (str (local-path app-conf)
        File/separator
-       (let [id (find-id el-loc)]
-         (zx/xml1-> server-groups
-                    :channelGroup :channels :channel
-                    :id id
-                    zip/up zip/up zip/up
-                    :name zx/text))
+       (safe-name? (let [id (find-id el-loc)]
+                     (zx/xml1-> server-groups
+                                :channelGroup :channels :channel
+                                :id id
+                                zip/up zip/up zip/up
+                                :name zx/text)))
        File/separator
        (find-name el-loc)
        ".xml"))


[WM] pass rabbit config to connect-with-retries

--- resources/leiningen/new/kraken_http_api/queue.clj
+++ resources/leiningen/new/kraken_http_api/queue.clj
@@ -9,7 +9,8 @@

 (defn initialize []
   (let [max-retries 5
-        connection (kehaar.rabbitmq/connect-with-retries max-retries)]
+        rabbit-config (config [:rabbitmq :connection])
+        connection (kehaar.rabbitmq/connect-with-retries rabbit-config max-retries)]
     (let [incoming-events []
           incoming-services [(wire-up/incoming-service
                               connection


print ModelInstances as vanilla maps

print ModelInstances as vanilla maps

--- src/er_cassandra/model/model_session.clj
+++ src/er_cassandra/model/model_session.clj
@@ -42,3 +42,7 @@
   (init-row [_] (transient {}))
   (conj-row [_ row k v] (assoc! row (keyword k) v))
   (finalize-row [_ row] (map->ModelInstance (persistent! row))))
+
+;; print the ModelInstance records as vanilla maps for now
+(defmethod print-method er_cassandra.model.model_session.ModelInstance [x writer]
+  (print-method (into {} x) writer))


Set up simple test of ain and gpio functionality

--- src/chicken_coop/core.clj
+++ src/chicken_coop/core.clj
@@ -1,6 +1,26 @@
-(ns chicken-coop.core)
+(ns chicken-coop.core
+  (:require [clojure.java.io :as io]
+            [chicken-coop.util :refer :all]
+            [chicken-coop.bbbpin :as bb]
+            [chicken-coop.gpio :as gpio]
+            [chicken-coop.ain :as ain]))

-(defn foo
-  "I don't do a whole lot."
-  [x]
-  (println x "Hello, World!"))
+
+(defn -main []
+  (println "ready to initialize")
+  (let [g (gpio/gpio :P8 11 :low)
+        a (ain/ain 33)]
+    (setup-shutdown-hook!
+      (fn [] (gpio/close! g)))
+    (println "Pin settings" ((bb/pinout-spec*) [:P8 11]))
+    (println "initialized successfully")
+    (doseq [_ (range 100)]
+      (println "Writing :on")
+      (gpio/write! g :on)
+      (Thread/sleep 1000)
+      (println "Writing :off")
+      (gpio/write! g :off)
+      (println "Reading ain:" (ain/read! a))
+      (Thread/sleep 1000))))
+
+


fix next-piece draw bug by drawing it in sync with the main board

--- src/client/game/core.cljs
+++ src/client/game/core.cljs
@@ -103,12 +103,14 @@
         (let [[_ c] (alts! [(:quit-chan @state) redraw-chan])]
           (if (= c redraw-chan)
             (let [new-board (drawable-board)
-                  new-theme (:theme @state)]
+                  new-theme (:theme @state)
+                  next-piece (:next-piece @state)]
               (when (or (not= board new-board)
                         (not= theme new-theme))
                 (.emit @socket "board-update" (pr-str {:level (:level @state)
                                                        :board new-board}))
                 (draw-board! "game-canvas" new-board cell-size new-theme rows-cutoff)
+                (draw-board! "next-canvas" (next-piece-board next-piece) cell-size new-theme)
                 (if (:recording @vcr)
                   (record-frame!)))
               (recur new-board new-theme))))))))
@@ -143,7 +145,6 @@
         board (:board @state)]

     (swap! state assoc :next-piece next-piece)
-    (draw-board! "next-canvas" (next-piece-board next-piece) cell-size (:theme @state))

     (if (piece-fits? piece x y board)
       (spawn-piece! piece)


add parents to diffusion

add parents to diffusion

--- src/clj/ceres/curator.clj
+++ src/clj/ceres/curator.clj
@@ -148,15 +148,9 @@

 (defn get-tweets-from-date [month day]
-  (->> (mc/find
-        (:db @mongo-state)
-        "tweets"
-        {:created_at
-         {$gt (t/date-time 2014 month day 0 0 0 0)
-          $lte (t/date-time 2014 month day 23 59 59 999)}
-         })
-       seq
-       (pmap #(from-db-object % true))))
+  (mc/find-maps (:db @mongo-state) "tweets"
+                {:created_at {$gt (t/date-time 2014 month day 0 0 0 0)
+                              $lte (t/date-time 2014 month day 23 59 59 999)}}))

 (defn get-hashtag-frequencies [coll]
@@ -174,16 +168,18 @@
                                                     {:created_at {$gt (t/date-time 2014 7 1)}}]})))

-(defn compute-tweet-diffusion [tweet-id]
-  (let [neighbor-tweets (->> (mc/find
+(defn compute-tweet-diffusion [tweet-id parents]
+  (let [tweet (mc/find-one-as-map (:db @mongo-state) "tweets" {:id_str tweet-id})
+        neighbor-tweets (->> (mc/find-maps
                               (:db @mongo-state)
                               "tweets"
                               {$and [{$or [{"retweeted_status.id_str" tweet-id}
                                            {"in_reply_to_status_id_str" tweet-id}]}
-                                     {:created_at {$gt (t/date-time 2014 7 1)}}]})
-                             (pmap #(from-db-object % true)))
+                                     {:created_at {$gt (t/date-time 2014 7 1)}}]}
+                              [:text :user.screen_name :id_str :in_reply_to_status_id_str :retweeted_status.id_str])
+                             (pmap #(assoc % :parents (into parents [(:_id tweet)]))))
         neightbar-ids (pmap :id_str neighbor-tweets)]
-    (merge neighbor-tweets (pmap #(compute-tweet-diffusion %) neightbar-ids))))
+    (merge neighbor-tweets (pmap #(compute-tweet-diffusion % (into parents [(:_id tweet)])) neightbar-ids))))

 (defn get-news-diffusion []
@@ -238,46 +234,48 @@
       (:_id x)
       (update-in x [:created_at] #(f/parse (:custom-formatter @mongo-state) (:created_at %))))))

-  (->> (mc/find (:db @mongo-state) "articles")
-       seq
-       (map #(from-db-object % true)))
-
-  (let [raw-html (slurp "http://www.tagesschau.de/multimedia/bilder/mh17-bergung-120.html")]
-    (type raw-html)
-    (-> (enlive/html-resource (java.io.StringReader. raw-html))
-        clojure.pprint/pprint))
-
-  (take 10 (sort-by val > (-> (mc/find (:db @mongo-state) "articles")
-                              seq
-                              last
-                              (from-db-object true)
-                              :html
-                              (clojure.string/split #"\s")
-                              (into #{})
-                              frequencies)))
+

   (mc/ensure-index (:db @mongo-state) "articles" (array-map :ts 1))

-
-
-  (time
-   (loop [round 10]
-     (when (> round 0)
-
-       (recur (dec round)))))
-
-  (->> (mc/find-maps (:db @mongo-state) "urls" {:ts {$gt (t/date-time 2014 7 26 14)}})
-       (map :article)
-       frequencies
-       (sort-by val >)
-       (take 10)
-       )
-
-  (->> (mc/find-maps (:db @mongo-state) "articles" {:ts {$gt (t/today)}} [:title])
-       (take 50)
-       (map #(vec [(:title %) (find-source (:_id %))]))
-       (remove #(empty? (second %)))
-      clojure.pprint/pprint)
+  (mc/ensure-index (:db @mongo-state) "urls" (array-map :article 1))
+
+  (mc/ensure-index (:db @mongo-state) "tweets" (array-map :id 1) {:unique true})
+
+  (def sz-url (->> (mc/find-maps (:db @mongo-state) "articles" {:ts {$gt (t/today)}} [:title])
+                  (map #(vec [(:_id %) (:title %) (first (find-source (:_id %)))]))
+                  (remove #(empty? (last %)))
+                  (filter #(= "SZ" (-> % last :source)))
+                  first))
+
+
+  (def sz-tweet (mc/find-map-by-id (:db @mongo-state) "tweets" (-> sz-url last :tweet)))
+
+  (->> (compute-tweet-diffusion (:id_str sz-tweet))
+       clojure.pprint/pprint)
+
+
+
+  (->> (mc/find-maps (:db @mongo-state) "urls" {:article (first sz-url)})
+       (mapv #(assoc % :tweet  (mc/find-map-by-id (:db @mongo-state) "tweets" (:tweet %) [:in_reply_to_status_id_str :text :user.screen_name :retweeted :id_str])))
+       clojure.pprint/pprint)
+
+  (def spon-url (->> (mc/find-maps (:db @mongo-state) "articles" {:ts {$gt (t/today)}} [:title])
+                  (map #(vec [(:_id %) (:title %) (first (find-source (:_id %)))]))
+                  (remove #(empty? (last %)))
+                  (filter #(= "SPIEGELONLINE" (-> % last :source)))
+                  first))
+
+  (def spon-tweet (mc/find-map-by-id (:db @mongo-state) "tweets" (-> spon-url last :tweet)))
+
+  (->> (compute-tweet-diffusion (:id_str spon-tweet) [])
+       flatten
+       clojure.pprint/pprint)
+
+  (->> (mc/find-maps (:db @mongo-state) "urls" {:article (first spon-url)})
+       (mapv #(assoc % :tweet  (mc/find-map-by-id (:db @mongo-state) "tweets" (:tweet %) [:in_reply_to_status_id_str :text :user.screen_name :retweeted :id_str])))
+       (map #(-> % :tweet :text))
+       clojure.pprint/pprint)

   )


use line and column from symbol meta if present in analyze-symbol

--- src/clj/cljs/analyzer.clj
+++ src/clj/cljs/analyzer.clj
@@ -1087,7 +1087,11 @@
   [env sym]
   (if (:quoted? env)
     {:op :constant :env env :form sym}
-    (let [ret {:env env :form sym}
+    (let [{:keys [line column]} (meta sym)
+          env (cond-> env
+                line (assoc :line line)
+                column (assoc :column column))
+          ret {:env env :form sym}
           lb (-> env :locals sym)]
       (if lb
         (assoc ret :op :var :info lb)


Allow for docstrings in ns forms (just discard for now)

--- src/clj/cljs/compiler.clj
+++ src/clj/cljs/compiler.clj
@@ -1061,7 +1061,9 @@

 (defmethod parse 'ns
   [_ env [_ name & args :as form] _]
-  (let [excludes
+  (let [docstring (if (string? (first args)) (first args) nil)
+        args      (if docstring (next args) args)
+        excludes
         (reduce (fn [s [k exclude xs]]
                   (if (= k :refer-clojure)
                     (do


removed breaking changes from forma.staging.

--- src/clj/forma/staging.clj
+++ src/clj/forma/staging.clj
@@ -12,13 +12,9 @@
 (defn devel-namespaces []
   (use '(incanter core charts)))

-
-
 ; test data to simulate a randome time-series (will be read in later)
 (def random-ints (repeatedly #(rand-int 100)))
 (def test-ts (take 131 random-ints))
-
-

 ;; (knocked-off #(< % 0) tvec rvec)
 ;; don't need this right now for the filter
@@ -56,20 +52,3 @@
    with the trend characteristic"
   [ts V]
   ((juxt ols-coeff whiz-ols)) ts V)
-
-
-;; range between two dates in months
-
-
-
-
-(defn num-years-to-milliseconds [x] (* 365 24 60 60 1000 x))
-(def offset (num-years-to-milliseconds (- 2000 1970)))
-(def dates
-  (map (comp #(+ offset %)
-             num-years-to-milliseconds
-             #(/ % 12))
-       (range (count ndvi))))
-
-
-


remove unnecessary 'Tags:' prefix from calendar event

--- src/clj/tictag/google.clj
+++ src/clj/tictag/google.clj
@@ -42,7 +42,7 @@
         formatter (:date-time f/formatters)]
     {:start   {:dateTime (f/unparse formatter t)}
      :end     {:dateTime (f/unparse formatter t+1)}
-     :summary (format "Tags: %s" (str/join "," tags))}))
+     :summary (format "%s" (str/join "," tags))}))

 (defrecord EventInserter [db config]
   component/Lifecycle


Main api ns building

Main api ns building

--- src/clj_bots/pin_ctrl.clj
+++ src/clj_bots/pin_ctrl.clj
@@ -2,7 +2,8 @@
   "# Public API for pin-ctrl"
   (:require [clj-bots.pin-ctrl
              [protocols :as p]
-             [implementation :as impl]]
+             [implementation :as impl]
+             [state-wrapper :as sw]]
             [clojure.core.async :as async :refer [>!! <!! >! <! go go-loop chan]]))

@@ -23,8 +24,6 @@
 ;; Board objects carry with them information about what pins are available, what modes are available for those
 ;; pins, and the current mode settings for those pins.

-
-(defrecord Board [state-atom impl-board])

 (declare board? board-dispatch board-apply chan?)

@@ -39,20 +38,10 @@
   ([type]
    (create-board type {}))
   ([type config]
-   (Board. (atom {}) (impl/instantiate type config))))
+   (p/init!
+     (sw/->BoardWrapper (atom {}) (impl/instantiate type config)))))

 ;; What follows then are a suite of simple tools for dealing with the boards.
-
-(defn get-config
-  "Get board configuration."
-  [board]
-  (p/get-config board))
-
-(defn update-config
-  "Reset board configuration."
-  [board f & args]
-  (p/update-config board (fn [current-conf] (apply f current-conf args))))
-

 (defmulti pin-modes
   "Returns a map of pin numbers to possible modes for the entire board, or the available modes of a specific pin.
@@ -70,15 +59,15 @@
   (board-apply pin-modes pin))

-(defn current-pin-modes
+(defn pin-modes
   "Returns a map of pin numbers to their corresponding current modes."
   [board]
-  (p/current-pin-modes board))
+  (p/pin-modes board))

 (defn current-pin-mode
   "Return the current mode of a specific pin."
   ([board pin-n]
-   (get (current-pin-modes board) pin-n))
+   (get (pin-modes board) pin-n))
   ([pin]
    (board-apply current-pin-mode pin)))

@@ -125,21 +114,16 @@

 (defn read-value
   "Read a single value from the pin. If an analog input, returns a value between 0 and 1."
-  ([pin] (board-apply p/read-value pin))
-  ([board pin-n] (p/read-value board pin-n)))
-
-(defn read-raw-value
-  "Read a raw unprocessed value from an analog input pin."
-  ([pin] (board-apply p/read-raw-value pin))
-  ([board pin-n] (p/read-raw-value board pin-n)))
+  ([pin] (board-apply p/stateful-read-value pin))
+  ([board pin-n] (p/stateful-read-value board pin-n)))

 ;; And last but not least, control functions:

 (defn write-value!
   "Write a value to a writable pin. The kind of value supported and what it means is entirely dependent on
   what kind of pin is being used."
-  ([pin val] (board-apply p/write-value! pin val))
-  ([board pin-n val] (p/write-value! board pin-n val)))
+  ([pin val] (board-apply p/stateful-write-value! pin val))
+  ([board pin-n val] (p/stateful-write-value! board pin-n val)))

 ;; XXX Should we try to worry about race conditions here? Could make this lower level so read/write messages
 ;; don't have anything inbetween interfere.
@@ -168,16 +152,16 @@
   "Set the edge channel for the specified pin. If there is an existing channel for the pin, it will be
   closed."
   ([board pin-n ch]
-   (sw/set-edge-chan! board pin-n ch))
+   (p/set-edge-chan! board pin-n ch))
   ([pin ch]
-   (board-apply sw/set-edge-chan! pin ch)))
+   (board-apply p/set-edge-chan! pin ch)))

 (defn get-edge-chan
   "Get the current edge channel for the specified pin."
   ([board pin-n]
-   (sw/get-edge-chan board pin-n))
+   (p/get-edge-chan board pin-n))
   ([pin]
-   (board-apply sw/get-edge-chan pin)))
+   (board-apply p/get-edge-chan pin)))

 (defmulti set-edge!
   "Set the edge direction of a pin. Accepts `:falling`, `:rising`, `:both` and `:none` edges.
@@ -191,12 +175,12 @@
   [board pin-n edge & [ch-or-buffer]]
   (let [current-ch (get-edge-chan board pin-n)
         ch (cond
-             (chan? ch-or-buffer) ch
+             (chan? ch-or-buffer) ch-or-buffer
              ch-or-buffer         (chan ch-or-buffer)
              current-ch           current-ch
              :else                (chan))]
-    (sw/set-edge-chan! board pin-n ch)
-    (pcp/set-edge! board pin-n edge ch)))
+    (p/set-edge-chan! board pin-n ch)
+    (p/set-edge! board pin-n edge ch)))

 (defmethod set-edge! false
   [pin edge & [ch-or-buffer]]
@@ -207,12 +191,9 @@

 ;; Nothing to see here...

-;(defn- board?
-  ;[obj]
-  ;(satisfies? p/PBoard obj))
 (defn- board?
   [obj]
-  (= (type obj) Board))
+  (satisfies? p/PBoard obj))

 (defn- board-dispatch
   [x & args] (board? x))


edit-check integrated, seems to work

edit-check integrated, seems to work

--- src/cljs/greffe/core.cljs
+++ src/cljs/greffe/core.cljs
@@ -6,7 +6,9 @@
             [cljs.core.async :refer [<! chan put! sliding-buffer alts! mult tap untap]]
             [cljs-xml.core :as cx]
             [greffe.net :as net]
-            [greffe.doc-comps :as dc]))
+            [greffe.doc-comps :as dc]
+            [greffe.markup :as mk]
+            [greffe.analyze :as az]))

 (defonce app-state (atom {:text "Hello Chestnut!"
                           :head nil
@@ -29,7 +31,8 @@
               (let [xml-doc (<! xml-chan)
                     doc-zip (-> xml-doc
                               cx/parse
-                              zip/xml-zip)]
+                              zip/xml-zip
+                              (az/edit-check mk/markup))]
                 (om/transact! app
                   (fn [a]
                     (let [locs (take-while


add sample implementation

add sample implementation

--- src/data/atoms.cljc
+++ src/data/atoms.cljc
@@ -1,80 +1,39 @@
-(ns data.state)
+(ns data.atoms)

-(defn FSM []
-  {:states {}
-   :transitions {}
-   ;; if we add neighbors to fsm we can use the graph package to analyze it
-   :neighbors (fn  [fsm state] (map (fn [[event transition]] (transition :target))
-                                    ((fsm :transitions) (state :name))))})

-(defn State [name entry-action exit-action]
-  {:name name :entry-action entry-action :exit-action exit-action})
+;; basics -----

-(defn add-state [fsm state]
-  "Returns fsm"
-  (assoc fsm :states (assoc (fsm :states) (state :name) state)))
+(def an-atom (atom {:k1 "val"}))

-(defn Transition [target-state action]
-  {:target target-state :action action})
+(comment @an-atom
+         (reset! an-atom {:k2 "val2"})
+         @an-atom
+         (swap! an-atom assoc :k3 "val3")
+         @an-atom)

-(defn- state-transition-table [fsm state]
-  "Returns transition table for state"
-  (or ((fsm :transitions) (state :name)) {}))
+(def validatable-state
+  (atom 0 :validator
+        (fn [new-val]
+          (== 0 new-val))))

-(defn add-transition [fsm state event-name transition]
-  "Add transition to state under event-name, return fsm"
-  (let [new-state-transition-table (assoc (state-transition-table fsm state) event-name transition)
-        new-transition-table (assoc (fsm :transitions) (state :name) new-state-transition-table)]
-    (assoc fsm :transitions new-transition-table)))
+(comment
+  (swap! validatable-state inc))

-(defn Context [initial-state init-action data]
-  (if init-action (init-action {:current-state initial-state} data)
-      {:current-state initial-state}))
+(def app-state (atom nil))

-(defn- dispatch [fsm state context message]
-  "Returns context"
-  (let [transition (or ((state-transition-table fsm state) (message :event)) {})]
-    (if (empty? transition)
-      context
-      (let [context-exit ((or (state :exit-action) (fn [c m] c)) context message)
-            context-trans ((or (transition :action)
-                               (fn [c m] c))
-                           (assoc context-exit :current-state (transition :target)) message)]
-        ((or ((transition :target) :entry-action) (fn [c m] c))
-         context-trans message)))))
+;; undo/redo implementation with atoms ---

-(defn send-message [fsm context message]
-  (dispatch fsm (context :current-state) context message))
+(def history
+  (atom [@app-state]))

-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(add-watch
+ app-state :history
+ (fn [_ _ old new]
+   #_(println old new history)
+   (when-not (= (last @history) new)
+     (swap! history conj new))))

-(def state0 (State "state0" nil nil))
-(def state1 (State "state1" nil nil))
-
-(defn print-action [c e]
-  (print " trans to state " ((c :current-state) :name))
-  c)
-
-(def trans1 (Transition state1 print-action))
-(def trans0 (Transition state0 print-action))
-
-(def fsm (FSM))
-(def fsm (add-state fsm state0))
-(def fsm (add-state fsm state1))
-(def fsm (add-transition fsm state0 "go" trans1))
-(def fsm (add-transition fsm state1 "go" trans0))
-
-(def message {:event "go"})
-
-(def context (Context state0 nil nil))
-
-(def state2 (State "state2" nil nil))
-(fsm :states)
-
-(def fsm (add-state fsm state2))
-(def trans2 (Transition state2 print-action))
-(def fsm (add-transition fsm state0 "go2" trans2))
-
-(def context (send-message fsm context message))
-(def context (send-message fsm context message))
-(def context (send-message fsm context {:event "go2"}))
+(defn undo! []
+  (when (> (count @history) 1)
+    (swap! history pop)
+    (reset! app-state (last @history))))


comment why we need only the move generator

--- test/cljs/tictactoe/game_test.cljs
+++ test/cljs/tictactoe/game_test.cljs
@@ -50,18 +50,22 @@
 ;; Generators
 ;; ----------------------------------------------------------------------------

+;; This is the only valid generator to define:
+;; - Game generator based on board generator + player generator would lead to
+;; invalid state constructions. We would test too much and not precisely.
+;; - The test should be based on visible API only: it means we should not
+;; try to generate the internal state of the game. It would breach
+;; encapsulation, and would thus break at any implementation change.
 (def coord-gen
   (gen/elements cst/coordinates))

-(def player-gen
+#_(def player-gen
   (gen/elements #{:cell/cross :cell/circle}))

-(def cell-gen
+#_(def cell-gen
   (gen/elements #{:cell/empty :cell/cross :cell/circle}))

-;; Board gen is not the way to go => does not allow to have valid states
-;; And you would have to generate too much things (game, etc...)
-(def board-gen
+#_(def board-gen
   (apply gen/hash-map
     (interleave
       cst/coordinates


fix end of case

fix end of case

--- src/neuseg/prepare.clj
+++ src/neuseg/prepare.clj
@@ -24,12 +24,12 @@
           (recur (rest raw) (nthrest sgd 2) (conj ret 1 1)))))))

 (defn gen-cases [text]
-  (clojure.string/join "\n"
-    (map format-case (zip (map mdot (neighbors 4 unizero  (map get-vector (iterator-seq (NGram/unigram text)))))
-                          (map mdot (neighbors 4 bizero   (map get-vector (iterator-seq (NGram/bigram text)))))
-                          (map mdot (neighbors 4 trizero  (map get-vector (iterator-seq (NGram/trigram text)))))
-                          (map mdot (neighbors 4 quadzero (map get-vector (iterator-seq (NGram/quadgram text))))))
-                          (partition 2 (tagging text)))))
+  (str (clojure.string/join "\n"
+         (map format-case (zip (map mdot (neighbors 4 unizero  (map get-vector (iterator-seq (NGram/unigram text)))))
+                               (map mdot (neighbors 4 bizero   (map get-vector (iterator-seq (NGram/bigram text)))))
+                               (map mdot (neighbors 4 trizero  (map get-vector (iterator-seq (NGram/trigram text)))))
+                               (map mdot (neighbors 4 quadzero (map get-vector (iterator-seq (NGram/quadgram text))))))
+                               (partition 2 (tagging text)))) "\n"))

 (def counter (atom 0))


Leving out default-base-context from tx

Leving out default-base-context from tx

--- libs/datview/src/dat/view.cljs
+++ libs/datview/src/dat/view.cljs
@@ -119,8 +119,7 @@
           ;; A self installing config entity :-) Good pattern?
           (catch :default e
             (log/warn "You don't yet have a :dat.view/base-context setting defined. Creating one.")
-            (dispatch! app [:dat.reactor/local-tx [{:db/ident ::base-context
-                                                    :dat.view.base-context/value default-base-context}]])))))))
+            (dispatch! app [:dat.reactor/local-tx [{:db/ident ::base-context}]])))))))

 (defn update-base-context!
   [app f & args]


remove endophile

remove endophile

--- src/io/perun.clj
+++ src/io/perun.clj
@@ -22,8 +22,7 @@
   (->> fileset boot/input-files (boot/by-name [filename]) first))

 (def ^:private markdown-deps
-  '[[markdown-clj "0.9.40"]
-    [endophile "0.1.2"]])
+  '[[markdown-clj "0.9.40"]])

 (def ^:private +markdown-defaults+
   (merge +defaults+


Actually set metadata in images-resize

Actually set metadata in images-resize

--- src/io/perun.clj
+++ src/io/perun.clj
@@ -113,8 +113,9 @@
           updated-files (pod/with-call-in @pod
                          (io.perun.contrib.images-resize/images-resize ~(.getPath tmp) ~files ~options))]
       (perun/report-debug "images-resize" "new resized images" updated-files)
-      (pm/set-meta fileset updated-files)
-      (commit fileset tmp))))
+      (-> fileset
+          (commit tmp)
+          (pm/set-meta updated-files)))))

 (def ^:private markdown-deps
   '[[org.pegdown/pegdown "1.6.0"]


correctly measure novelty

correctly measure novelty

--- src/crawler/extractor.clj
+++ src/crawler/extractor.clj
@@ -155,8 +155,8 @@
                                      (fn [xpath]
                                        (count
                                         (set/difference
-                                         (set (in-host-xpath-hrefs xpath))
-                                         (set (in-host-map xpath)))))
+                                         (set (in-host-map xpath))
+                                         (set (in-host-xpath-hrefs xpath)))))
                                      src-xpaths))]

           (when xpaths-hrefs'
@@ -166,6 +166,7 @@
               (swap! *visited* conj sampled)
               (println sampled)
               (println page-sim)
+              (println diff)
               (if (> page-sim *page-sim-thresh*)
                 {:enum-candidate true
                  :page-sim       page-sim


remove test require

remove test require

--- src/dev/demo/browser.cljs
+++ src/dev/demo/browser.cljs
@@ -15,7 +15,6 @@
     #_["/demo/myComponent" :refer (myComponent)]
     [demo.never-load]
     [demo.always-load]
-    ["antd/es/button"]
     ))

 (js/console.log "▶❤◀")


html escape the action output before converting

--- frontend/models/action.cljs
+++ frontend/models/action.cljs
@@ -39,9 +39,10 @@

 (defn format-output [action output-index]
   (let [output (get-in action [:output output-index])
+        escaped-message (gstring/htmlEscape (:message output))
         converter (new-converter action (keyword (:type output)))]
     (-> action
-        (assoc-in [:output output-index :converted-message] (.append converter (:message output)))
+        (assoc-in [:output output-index :converted-message] (.append converter escaped-message))
         (assoc-in [:output output-index :react-key] (utils/uuid))
         (assoc-in [:converters-state (keyword (:type output))] (utils/js->clj-kw (.currentState converter))))))


decrease CLI port checker frequency

decrease CLI port checker frequency

might be the cause of unwanted shutdowns on some macOS systems. not
sure what the actual cause is though.

--- src/main/shadow/cljs/devtools/server.clj
+++ src/main/shadow/cljs/devtools/server.clj
@@ -206,7 +206,7 @@
           (loop []
             (when @keep-checking-ref
               ;; check every sec so it doesn't take too long to exit after the node process disappeared
-              (Thread/sleep 1000)
+              (Thread/sleep 5000)
               (when (try
                       (let [inet-address
                             (InetSocketAddress. "localhost" cli-port)


Match comments with clj-thrust-example-notepad version of this file

--- src/middlebrow_example_notepad/core.cljs
+++ src/middlebrow_example_notepad/core.cljs
@@ -3,7 +3,7 @@
             [ajax.core :refer [GET POST]]))

 ; Let's make FileList ISeqable so we can use the standard Clojure core
-; functions on them.
+; functions on it.
 (extend-type js/FileList
   ISeqable
   (-seq [array] (array-seq array 0)))
@@ -34,13 +34,13 @@

   ; I would consider learning how to use core.async as it can be
   ; used in cases like this. You can avoid having to nest callbacks like
-  ; this, which can make reasoning about your code much easier.
+  ; this, which can make reasoning about your code easier.
   (d/listen! (sel1 :#save) :click
     (fn [e]
       (GET "/save-dialog" :handler
         (fn [path]
           (when-not (empty? path)
-            ; Contrast to the way we're reading files (which is being done on the client side),
+            ; Contrast this to the way we're reading files (which is being done on the client side),
             ; here we are savings files on the server side.
             (POST "/save" {:params {:path path
                                     :text (d/value (sel1 :#inputTextArea))}


Fix exercises without hints

Fix exercises without hints

--- src/cljs/daveconservatoire/site/ui/exercises.cljs
+++ src/cljs/daveconservatoire/site/ui/exercises.cljs
@@ -168,8 +168,8 @@
     (let [{::keys [options ex-answer ex-total-questions streak-count notes hints hints-used]
            :as    props} (om/props this)
           [opt-type _] (s/conform ::options options)
-          parent (om/parent this)
-          hints (hints props)
+          parent       (om/parent this)
+          hints        (if hints (hints props) [])
           check-answer #(do
                           (om/transact! parent `[(dcex/check-answer)
                                                  (untangled/load {:query [{:app/me ~(om/get-query UserScore)}] :marker false})]))]
@@ -268,9 +268,9 @@

 (defn vary-pitch [{:keys [::pitch ::variation ::direction]}]
   (let [direction (or direction [-1 1])
-        a (descriptor->value pitch)
-        b (+ a (* (descriptor->value variation)
-                  (descriptor->value direction)))]
+        a         (descriptor->value pitch)
+        b         (+ a (* (descriptor->value variation)
+                          (descriptor->value direction)))]
     [a b]))

 (s/fdef vary-pitch
@@ -333,7 +333,7 @@
   (new-round [_ props]
     (let [[a b :as notes] (vary-pitch props)
           distance (- b a)
-          octave? (= (js/Math.abs distance) 12)]
+          octave?  (= (js/Math.abs distance) 12)]
       (assoc props
         ::notes notes
         ::correct-answer (if octave? "yes" "no"))))
@@ -394,10 +394,10 @@
   static IExercise
   (new-round [_ props]
     (let [{::keys [read-note-order read-note]} props
-          pos (rand-int-new (count read-note-order) read-note)
-          note (get read-note-order pos)
+          pos    (rand-int-new (count read-note-order) read-note)
+          note   (get read-note-order pos)
           octave (if (> pos 4) 4 3)
-          notes [(str note octave)]]
+          notes  [(str note octave)]]
       (assoc props
         ::read-note pos
         ::notes notes
@@ -522,7 +522,7 @@

   static IExercise
   (new-round [_ props]
-    (let [type (rand-nth ["major" "minor"])
+    (let [type      (rand-nth ["major" "minor"])
           base-note (descriptor->value ["C3" ".." "F3"])]
       (assoc props
         ::notes (audio/chord base-note (type->arrengement type))
@@ -571,10 +571,10 @@
         (uc/initial-state Exercise nil)
         {::name       "rhythm-reading"
          ::options    [["0" "A"] ["1" "B"] ["2" "C"] ["3" "D"]]
-         ::play-notes (let [last-play (atom [])
+         ::play-notes (let [last-play       (atom [])
                             time-multiplier 0.7]
                         (fn [notes]
-                          (let [time (audio/current-time)
+                          (let [time  (audio/current-time)
                                 nodes (map #(update % ::audio/duration (partial * time-multiplier)) (prepare-notes notes))
                                 metro (map #(update % ::audio/duration (partial * time-multiplier)) (prepare-notes rhytm-metronome))]
                             (run! audio/stop @last-play)
@@ -595,13 +595,13 @@
   static IExercise
   (new-round [_ props]
     (let [rhytms (partition 4 (take 16 (random-bars)))
-          idx (rand-int 4)
-          notes (->> (nth rhytms idx)
-                     (map ::vf/notes)
-                     (flatten)
-                     (map (comp #(vector "B4" %)
-                                duration->seconds
-                                ::vf/duration)))]
+          idx    (rand-int 4)
+          notes  (->> (nth rhytms idx)
+                      (map ::vf/notes)
+                      (flatten)
+                      (map (comp #(vector "B4" %)
+                                 duration->seconds
+                                 ::vf/duration)))]
       (assoc props
         ::rhytms rhytms
         ::notes notes


Make register button small to match

Make register button small to match

--- src/cljs/elevent_client/pages/events/explore.cljs
+++ src/cljs/elevent_client/pages/events/explore.cljs
@@ -63,7 +63,7 @@
                    [:div.meta
                     [event-details/component event]]
                    [:div.extra
-                    [:a.ui.right.floated.button
+                    [:a.ui.right.floated.small.button
                      {:href (routes/event-register event)}
                      "Register"
                      [:i.right.chevron.icon]]


Fix typo.

Fix typo.

--- src/oc/storage/representations/board.clj
+++ src/oc/storage/representations/board.clj
@@ -99,7 +99,7 @@
 (defn render-board
   "Create a JSON representation of the board for the REST API"
   [org-slug board access-level]
-  (let [rep-props (if (or (= :author access-level) (= :viemer access-level))
+  (let [rep-props (if (or (= :author access-level) (= :viewer access-level))
                       representation-props
                       public-representation-props)]
     (json/generate-string


Return follow-ups with entries and add mark complete action if the follow-up is for the current user.

--- src/oc/storage/representations/entry.clj
+++ src/oc/storage/representations/entry.clj
@@ -22,7 +22,7 @@
                            :board-uuid :board-slug :board-name :board-access
                            :team-id :author :publisher :published-at
                            :video-id :video-transcript :video-processed :video-error :video-image :video-duration
-                           :created-at :updated-at :revision-id :new-at])
+                           :created-at :updated-at :revision-id :new-at :follow-ups])

 ;; Utility functions

@@ -44,7 +44,10 @@
   ([org-slug board-slug entry :guard map?] (url org-slug board-slug (:uuid entry)))

   ([org-slug board-slug entry-uuid]
-  (str (url org-slug board-slug) "/" entry-uuid)))
+  (str (url org-slug board-slug) "/" entry-uuid))
+
+  ([org-slug board-slug entry-uuid follow-up-uuid]
+  (str (url org-slug board-slug entry-uuid) "/follow-up/" follow-up-uuid)))

 (defn- self-link [org-slug board-slug entry-uuid]
   (hateoas/self-link (url org-slug board-slug entry-uuid) {:accept mt/entry-media-type}))
@@ -92,6 +95,10 @@
   (hateoas/link-map "revert" hateoas/POST (str (url org-slug board-slug entry-uuid) "/revert")
     {:content-type mt/revert-request-media-type
      :accept mt/entry-media-type}))
+
+(defn- complete-follow-up-link [org-slug board-slug entry-uuid follow-up-uuid]
+  (hateoas/link-map "mark-complete" hateoas/POST (str (url org-slug board-slug entry-uuid follow-up-uuid) "/complete")
+    {:accept mt/entry-media-type}))

 (defn- include-secure-uuid
   "Include secure UUID property for authors."
@@ -131,6 +138,12 @@
         comment-list (if (= access-level :public)
                         []
                         (take config/inline-comment-count (reverse (sort-by :created-at comments))))
+        follow-ups-list (if (= access-level :public)
+                          []
+                          (map #(if (= (-> % :assignee :user-id) user-id)
+                                  (assoc % :links [(complete-follow-up-link org-uuid board-uuid entry-uuid (:uuid %))])
+                                  %)
+                           (:follow-ups entry)))
         links (if secure-access?
                 ;; secure UUID access
                 [(secure-self-link org-slug secure-uuid)]
@@ -180,6 +193,7 @@
       (include-secure-uuid secure-uuid access-level)
       (include-interactions reaction-list :reactions)
       (include-interactions comment-list :comments)
+      (assoc :follow-ups follow-ups-list)
       (assoc :links full-links))))

 (defn render-entry-for-collection


display count of active users

display count of active users

--- src/pc/views/admin.clj
+++ src/pc/views/admin.clj
@@ -259,7 +259,7 @@
                                                     (time/now)
                                                     (time/days 1))))))))]
     [:div
-     [:h3 "Users active in the last day"]
+     [:h3 (str (count active) " users active in the last day")]
      [:style "td, th { padding: 5px; text-align: left }"]
      [:table {:border 1}
       [:tr


removed unnecessary print statements

removed unnecessary print statements

--- src/frontend/uploads.cljs
+++ src/frontend/uploads.cljs
@@ -127,9 +127,6 @@
                     (start-upload first-inactive-upload))))))

 (defn handle-unpause! [uploads uploads-order upload-slots active-uploads upload-id]
-  (println uploads)
-  (println "ACTIVE-UPLOADS "  (active-uploads uploads-order uploads))
-  (println "Upload slots:" upload-slots)
   (if-not (active? (uploads upload-id))
     (swap! app-state/app-state
            assoc


Add default empty build for chenex repl

Add default empty build for chenex repl

--- src/greenyouse/chenex.clj
+++ src/greenyouse/chenex.clj
@@ -24,7 +24,8 @@
   (let [{:keys [compiling features]} @opts]
     (if compiling
       features
-      (h/get-project-value :chenex :repl))))
+      ;; this avoids throwing a nil Exception
+      (or (h/get-project-value :chenex :repl) #{}))))

 (defn- get-transforms []
   (let [trans# (get (index-transforms) (get-features))]


Convert the command to lower case keyword.

--- src/postal/parser.cljc
+++ src/postal/parser.cljc
@@ -38,7 +38,7 @@
                 "End of frame reached while reading command"))

       (= chr-in *line-end*)
-      (apply str buffer)
+      (keyword (str/lower (apply str buffer)))

       :else
       (recur (reader/read-char reader)


Some testing implications

Some testing implications

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/contrib/algorithms/downing_gallier.clj
+++ src/conexp/contrib/algorithms/downing_gallier.clj
@@ -90,6 +90,10 @@
     (test/is (= #{#{1 2} #{1 2 4} #{1 2 3 4}} (set (conexp/all-closed-sets [1 2 3 4] clop))))
     (test/is (not= #{1 2 3 4} (clop #{1 2 4})))))

+(def testing-implications (map (fn [set]
+                                 (conexp/make-implication set (conexp/adprime (conexp/diag-context 14) set)))
+                               (conexp/subsets (conexp/set-of-range 14))))
+
 ;;;

 nil


(PE-21799) Ensuring gc-packages runs

(PE-21799) Ensuring gc-packages runs

--- src/puppetlabs/puppetdb/cli/services.clj
+++ src/puppetlabs/puppetdb/cli/services.clj
@@ -362,6 +362,7 @@
                             ["purge_nodes" {:batch_limit limit}])))
              (when (some-> (:report-ttl config) seconds-pos?)
                "purge_reports")
+             "gc_packages"
              "other"])))

 (defn collect-garbage


Add store-local helper for dealing with scopes

--- src/icfp2014/compiler.clj
+++ src/icfp2014/compiler.clj
@@ -85,6 +85,14 @@
   (let [labeled (conj stmt (format "; #%s" label))]
     (vec (concat [labeled] stmts))))

+(defn store-local
+  [name]
+  (let [cur-scope (first *scope*)
+        index (.indexOf cur-scope name)]
+    (if-not (neg? index)
+      [:st 0 index (format "; store var %s" name)]
+      (throw (IllegalArgumentException. (format "Tried to store to unknown scope var: %s" name))))))
+
 (defn load-local
   [name]
   (loop [scope-stack  *scope*
@@ -185,10 +193,10 @@

               (tag-with body-tag [(load-local xs-sym)])
               [[:car]
-               [:st 0 0 (format "; store %s" x)]
+               (store-local x)
                (load-local xs-sym)
                [:cdr]
-               [:st 0 1 (format "; store %s" xs-sym)]]
+               (store-local xs-sym)]
               (compile-form fns body)

               (tag-with cond-tag [(load-local xs-sym)])
@@ -202,7 +210,7 @@
               (tag-with done-tag [[:ldc 0] [:join]])

               (tag-with start-tag (compile-form fns xs))
-              [[:st 0 1 (format "; store %s" xs-sym)]
+              [(store-local xs-sym)
                [:ldc 0]
                [:sel (str "@" cond-tag) (str "@" cond-tag)]])))))


[Fixes: #9900] Use component-did-update

[Fixes: #9900] Use component-did-update

When moving from chat to chat, component-did-mount is not fired as the
component is never unmounted, therefore messages were not loaded.
This changes the behavior to use the component-did-update lifecycle
method.

Signed-off-by: yenda <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@status.im>

--- src/status_im/ui/screens/chat/views.cljs
+++ src/status_im/ui/screens/chat/views.cljs
@@ -312,7 +312,7 @@
    modal?]
   (letsubs [messages           [:chats/current-chat-messages-stream]
             current-public-key [:multiaccount/public-key]]
-    {:component-did-mount
+    {:component-did-update
      (fn [args]
        (when-not (:messages-initialized? (second (.-argv (.-props args))))
          (re-frame/dispatch [:chat.ui/load-more-messages]))


Add conversion; typical kelly bushing

Add conversion; typical kelly bushing

--- src/test_utils/fracture_diagnostics.cljc
+++ src/test_utils/fracture_diagnostics.cljc
@@ -305,8 +305,8 @@
   (let [converter {[:psi :kPa] (partial * 6.89476)
                    [:kPa :MPa] #(/ % 1000)
                    [:C :F] #(+ (* % 1.8) 32)
-                   [:ft :m] #(/ (* % 30.48) 100)}]
-
+                   [:ft :m] #(/ (* % 30.48) 100)
+                   [:m :ft] #(/ (* % 100) 30.48)}]
     (converter [from to])))

 (defn rand-pressure-unit []
@@ -440,3 +440,8 @@

 (defn rand-depth-datum []
   (rand-nth [:ground-level :kelly-bushing :sea-level]))
+
+(defn typical-kelly-bushing-elevation []
+  (tuc/draw-normal 30.48 (/ 1.00 3.00)))
+
+


cleanup

cleanup

--- solutions/day07/solution.clj
+++ solutions/day07/solution.clj
@@ -7,7 +7,7 @@
               "NOT" #(bit-not %)
               "SET" #(identity %)})

-(defn make-input
+(defn make-wire
   [x]
   (fn [circuit]
     (if (re-find #"^[0-9]+$" x)
@@ -20,10 +20,10 @@
         parts (str/split input #" ")
         commands (set (keys cmd->fn))
         cmd (or (first (filter commands parts)) "SET")
-        operands (map make-input (remove commands parts))]
-    {:fn (cmd->fn cmd)
-     :target target
-     :inputs (fn [circuit] (map #(% circuit) operands))}))
+        operands (map make-wire (remove commands parts))]
+    {:inputs (fn [circuit] (map #(% circuit) operands))
+     :fn (cmd->fn cmd)
+     :target target}))

 (def switches (->> (slurp "input.txt")
                    (str/split-lines)
@@ -38,7 +38,7 @@
         (let [inputs ((:inputs switch) circuit)]
           (if (not-any? nil? inputs)
             (recur more (assoc circuit (:target switch) (apply (:fn switch) inputs)))
-            ; inputs for this switch aren't set, so put it at the end of the list and keep going
+            ; inputs for this switch aren't set, so put it at the end of the list
             (recur (conj (vec more) switch) circuit)))
         circuit))))


Fix infinite loop on error response

Fix infinite loop on error response

--- src/cljs/org/broadinstitute/firecloud_ui/page/method_config_importer.cljs
+++ src/cljs/org/broadinstitute/firecloud_ui/page/method_config_importer.cljs
@@ -255,7 +255,7 @@
   :component-did-update #(react/call :load-data (:this %))
   :load-data
   (fn [{:keys [this state]}]
-    (when-not (or (:configs @state) (:methods @state))
+    (when-not (some (or @state {}) [:configs :methods :error-message])
       (endpoints/call-ajax-orch
        {:endpoint endpoints/list-configurations
         :on-done


Using core.reducers to perform the fold

Using core.reducers to perform the fold

--- pigpen-rx/src/main/clojure/pigpen/rx/core.clj
+++ pigpen-rx/src/main/clojure/pigpen/rx/core.clj
@@ -21,6 +21,7 @@
             [pigpen.local :as local]
             [pigpen.oven :as oven]
             [clojure.java.io :as io]
+            [clojure.core.reducers :as reducers]
             [rx.lang.clojure.core :as rx]
             [rx.lang.clojure.interop :as rx-interop]
             [rx.lang.clojure.blocking :as rx-blocking]
@@ -45,6 +46,14 @@
       (if (next args)
         args
         (first args)))))
+
+(defmethod local/eval-func :algebraic
+  [_ {:keys [pre combinef reducef post]} [values]]
+  (->> values
+    (mapv local/remove-sentinel-nil)
+    pre
+    (reducers/fold combinef reducef)
+    post))

 (defmulti graph->observable (fn [data command] (:type command)))


Day 10 completed

Day 10 completed

--- src/adventofcode/solutions.clj
+++ src/adventofcode/solutions.clj
@@ -289,3 +289,13 @@
             (route-len (first all-routes))
             (rest all-routes))))

+(defn day10 [input iterations]
+  (count
+    (nth
+      (iterate
+        (fn [x]
+          (clojure.string/join
+            (map #(str (count %) (first %)) (partition-by identity x))))
+        input)
+      iterations)))
+


copy fixes for ph launch post

copy fixes for ph launch post

--- src/pc/views/blog/we_made_precursor_for_teams.clj
+++ src/pc/views/blog/we_made_precursor_for_teams.clj
@@ -22,7 +22,9 @@

     [:article
      [:p "Product Hunt holds a special place in our hearts. "
-         "We were featured there several months ago, back when Precursor was still just a part-time side project. "
+         "We were featured there "
+         [:a {:href "/blog/product-hunt-wake-up-call"} "several months ago"]
+         ", back when Precursor was still just a part-time side project. "
          "And as a huge thank you to the community, we're offering 50% off Precursor for Teams to all Product Hunters, for the first 6 months. "]
      [:p "To take advantage of the discount, follow the link on Product Hunt, then click on the welcome message on the homepage. "]]

@@ -30,7 +32,9 @@
      [:h3 "Our goal has always been a pretty simple one. "]
      [:p "We want to make sharing ideas with anyone effortless. "
          "To accomplish this we've been listening to your feedback, and using it to perfect the tools we've already made as well as adding exciting new ones. "]
-     [:p "These new features will include the ability to make your docs private, so that your team's hard work is always secure. "
+     [:p "These "
+         [:a {:href "/features/team"} "new features"]
+         " will include the ability to make your docs private, so that your team's hard work is always secure. "
          "We've implemented voice chat, so you can have team meetings in the same place where you share your ideas. "
          "You'll also have your own team domain, so your team's ideas are all organized in one place. "]]

@@ -43,11 +47,15 @@

     [:article
      [:h3 "And pricing is simple."]
-     [:p "We think team collaboration should be simple, and so should pricing. "
+     [:p "We think team collaboration should be simple, and so should "
+         [:a {:href "/pricing"} "pricing"]
+         ". "
          "The monthly cost for a team is $10 per active user, per month. "]
      [:p "If you prefer to work solo, that's okay too. "
-         "You can still get a private domain to use on Precursor and give people access to individual docs, without adding them to your team. "
-         "It's perfect for sharing ideas with clients."]]
+         "You can still get a "
+         [:a {:href "/trial"} "private domain"]
+         " to use on Precursor and give people access to individual docs, without adding them to your team. "
+         "It's perfect for sharing ideas with clients. "]]

     [:article
      [:h3 "Best of all, prototyping will still be free."]
@@ -59,7 +67,9 @@
      [:h3 "We're hungry for feedback."]
      [:p "Your feedback is invaluable to us, now more than ever. "
          "If you see something that we can do better, please let us know. "]
-     [:p "Ping us in your doc's chat with \"@prcrsr\" or email us. "
+     [:p "Ping us in your doc's chat with \"@prcrsr\" or "
+         [:a {:href (format "mailto:%s" (email/email-address "hi"))} "email us"]
+         ". "
          "We'll be there to answer any questions, or if you just want a sketching buddy. "]]

     [:article
@@ -67,8 +77,8 @@
      [:p "Now that Precursor has a real growth strategy, we can keep focusing on improving our core product. "]
      [:p "Our most exciting features are still ahead of us. "
          "But more importantly, we're going to continue making our current features better every day! "]
-     [:p "We don't ignore good ideas."
-         "Below are some of the feature requests we've finished in just the last few weeks..."]
+     [:p "We don't ignore good ideas. "
+         "Below are some of the feature requests we've finished in just the last few weeks. "]
      [:br]]

     [:figure


Added pagination for the home page.

Added pagination for the home page.

--- src/ackbar/core.clj
+++ src/ackbar/core.clj
@@ -5,7 +5,7 @@
             [clojure.contrib.str-utils2 :as s])
   (:import com.google.appengine.api.datastore.EntityNotFoundException))

-(ds/defentity Page [^:key title, body])
+(ds/defentity Page [^:key url, title, body, timestamp])

 (defn canonical-title
   "Converts a given page title to a standard format, suitable for use in a URL."
@@ -30,11 +30,11 @@

 (defn render-page
   "Retrieve a page from the datastore and render it for display to the user"
-  [title]
+  [url]
   (try
-    (response-wrapper title (:body (ds/retrieve Page title)))
+    (response-wrapper url (:body (ds/retrieve Page url)))
     (catch EntityNotFoundException _
-      (response-wrapper "404" (str "Unable to find page: " title) 404))))
+      (response-wrapper "404" (str "Unable to find page: " url) 404))))

 (defn add-or-edit-form
   "Returns a form to add or edit a page."
@@ -46,7 +46,7 @@
               (label "body" "Body:") [:br]
               (text-area {:cols 80 :rows 40} "body" body) [:br]
               (submit-button "Submit"))))
-
+
 (defn admin-add-page
   "Displays the Ackbar Admin 'Add Page' Page"
   []
@@ -55,26 +55,26 @@

 (defn add-page
   "Adds a page to the database with the specified title and content"
-  [title body]
-  (if (ds/exists? Page title)
+  [url title body]
+  (if (ds/exists? Page url)
     (result "ERROR: Page already exists!")
-    (do (ds/save! (Page. (canonical-title title) body))
+    (do (ds/save! (Page. url title body (System/currentTimeMillis)))
         (result "Page saved!"))))

 (defn page-link
   "Builds a link to the specified page object"
   [page]
-  (link-to (str "/" (:title page)) (:title page)))
+  (link-to (str "/" (:url page)) (:title page)))

 (defn edit-link
   "Builds a link to edit the specified page"
   [page]
-  (link-to (str "/admin/edit/" (:title page)) "edit"))
+  (link-to (str "/admin/edit/" (:url page)) "edit"))

 (defn delete-link
   "Builds a link to delete the specified page"
   [page]
-  (form-to [:post (str "/admin/delete/" (:title page))]
+  (form-to [:post (str "/admin/delete/" (:url page))]
            (submit-button "Delete")))

 (defn admin-page-list
@@ -89,34 +89,34 @@
                               (edit-link page) (delete-link page)])])))

 (defn delete-page
-  "Deletes the specified page by title."
-  [title]
+  "Deletes the specified page by url"
+  [url]
   (try
-    (do (ds/delete! (ds/retrieve Page title))
+    (do (ds/delete! (ds/retrieve Page url))
         (response-wrapper "Deleted"
-                          (str "Page deleted: " title)))
-
+                          (str "Page deleted: " url)))
+
     (catch EntityNotFoundException _
-      (response-wrapper "404" (str "Unable to find page: " title) 404))))
+      (response-wrapper "404" (str "Unable to find page: " url) 404))))

 (defn admin-edit-page
   "Displays the Ackbar Admin 'Edit Page' Page"
-  [title]
+  [url]
   (try
-    (def page (ds/retrieve Page title))
+    (def page (ds/retrieve Page url))
     (response-wrapper "Edit Page"
                       (add-or-edit-form "/admin/edit"
                                         (:title page)
                                         (:body page)))
     (catch EntityNotFoundException _
-      (response-wrapper "404" (str "Unable to find page: " title) 404))))
+      (response-wrapper "404" (str "Unable to find page: " url) 404))))

 (defn edit-page
   "Edits a page, updating its title and content"
-  [title body]
-  (if (ds/exists? Page (canonical-title title))
-    (ds/delete! (ds/retrieve Page (canonical-title title))))
-  (ds/save! (Page. (canonical-title title) body))
+  [url title body]
+  (if (ds/exists? Page url)
+    (ds/delete! (ds/retrieve Page url)))
+  (ds/save! (Page. url title body (System/currentTimeMillis)))
   (result "Page updated!"))

 (defn all-pages
@@ -128,19 +128,41 @@
    "All Pages"
    (for [page pages]
      [:div [:h1 (:title page)]
-     [:div (:body page)]])))
-
+      [:div (:body page)]])))
+
+(defn render-paginate
+  "Renders a fixed number of pages"
+  [number]
+  (def pagesize 10)
+  (def pages (ds/query :kind Page :limit pagesize
+                       :offset (* pagesize number)
+                       :sort [[:timestamp :dsc]]))
+  (response-wrapper
+   "Paginated"
+   (html (for [page pages]
+           [:div [:h1 (:title page)]
+            [:div (:body page)]])
+         (if (> number 0)
+           (html (link-to (str "/pages/" (dec number)) "prev") [:br]))
+         (if (= pagesize (count pages))
+           (link-to (str "/pages/" (inc number)) "next")))))
+
 (defroutes ackbar-app-handler
-  (GET "/" [] (render-page "home"))
+  (GET "/" [] (render-paginate 0))
+  (GET "/pages/:number" [number] (render-paginate (Integer/parseInt number)))
   (GET "/admin/add" [] (admin-add-page))
   (GET "/admin/pages" [] (admin-page-list))
   (POST "/admin/add" {params :params}
-        (add-page (params "title") (params "body")))
+        (add-page (canonical-title (params "title"))
+                  (params "title")
+                  (params "body")))
   (GET "/admin/edit/:title" [title] (admin-edit-page title))
   (POST "/admin/edit" {params :params}
-        (edit-page (params "title") (params "body")))
+        (edit-page (canonical-title (params "title"))
+                  (params "title")
+                  (params "body")))
   (POST "/admin/delete/:title" [title] (delete-page title))
-  (GET "/all" [] (all-pages))
+  (GET "/pages" [] (all-pages))
   (GET "/:title" [title] (render-page (canonical-title title)))
   (ANY "*" [] (response-wrapper "404" "NOT FOUND!" 404)))


Fix load and avow order in wrap-serve.

Fix load and avow order in wrap-serve.

--- src/incise/core.clj
+++ src/incise/core.clj
@@ -62,8 +62,8 @@
 (defn wrap-serve
   [main-func]
   (-> main-func
+      (wrap-pre conf/load)
       (wrap-pre conf/avow!)
-      (wrap-pre conf/load)
       (wrap-log-exceptions :bubble false)))

 (defn wrap-main


Not= returns a boolean itself.

Not= returns a boolean itself.

--- src/isla/parser.clj
+++ src/isla/parser.clj
@@ -127,9 +127,7 @@
 (defmethod is-type java.util.regex.Pattern [re token]
   (if (keyword? token) ;; looking for string but potential is kw so not a match
     false
-    (if (not= nil (re-matches re token))
-      true
-      false)))
+    (not= nil (re-matches re token))))

 (defn alternatives [input types]
   (vec (map (fn [t] (t input)) ;; get nodes for each matching type


When there is no match, `pattern-sequence` returns just nil rather than nil-ed out hashmap.

--- src/isla/parser.clj
+++ src/isla/parser.clj
@@ -29,18 +29,16 @@
     {:expr nil :left-tokens tokens})) ;; no expr match - return

 (defn -assignment [tokens]
-  (let [{nodes :nodes left-tokens :left-tokens}
-        (pattern-sequence tokens [-assignee -is -value -nl] [])]
-    (if (not= nodes nil)
-      {:expr (nnode :assignment (take 3 nodes)) :left-tokens left-tokens}
-      nil)))
+  (if-let [{nodes :nodes left-tokens :left-tokens}
+           (pattern-sequence tokens [-assignee -is -value -nl] [])]
+    {:expr (nnode :assignment (take 3 nodes)) :left-tokens left-tokens}
+    nil))

 (defn -invocation [tokens]
-  (let [{nodes :nodes left-tokens :left-tokens}
-        (pattern-sequence tokens [-identifier -value -nl] [])]
-    (if (not= nodes nil)
-      {:expr (nnode :invocation (take 2 nodes)) :left-tokens left-tokens}
-      nil)))
+  (if-let [{nodes :nodes left-tokens :left-tokens}
+           (pattern-sequence tokens [-identifier -value -nl] [])]
+    {:expr (nnode :invocation (take 2 nodes)) :left-tokens left-tokens}
+    nil))

 ;; atoms

@@ -87,17 +85,15 @@
                     types))))

 (defn pattern-sequence [tokens patterns collected]
-  ;; (if (and (> (count patterns) 0) ;; still patterns to test
-  ;; (>= (count tokens) (count patterns))) ;; enough tokens to satisfy pattern
   (let [pattern (first patterns)
         token (first tokens)]
     (if (nil? pattern)
       {:nodes collected :left-tokens tokens} ;; pattern matched - return
-      (if (nil? token) ;; pattern match failure - not enough tokens
-        {:nodes nil :left-tokens nil}
+      (if (nil? token)
+        nil ;; pattern match failure - not enough tokens
         (if-let [node (pattern token)] ;; matched token
           (pattern-sequence (rest tokens) (rest patterns) (conj collected node)) ;; round again
-          {:nodes nil :left-tokens nil}))))) ;; pattern match failure - return
+          nil))))) ;; pattern match failure - return

 ;; only one token, for now
 (defn pattern [input matcher tag & args]


Experimentally giving low level rule total control of tokens stream and  return value.  Worked.

--- src/isla/parser.clj
+++ src/isla/parser.clj
@@ -58,7 +58,8 @@
 (defn -identifier [tokens] (pattern tokens #"(?!^is$)[A-Za-z]+" :identifier))

 (defn -integer [tokens]
-  (pattern tokens #"[0-9]+" :integer (fn [x] [(Integer/parseInt (first tokens))])))
+  (if (is-type #"[0-9]+" (first tokens))
+    {:node (nnode :integer [(Integer/parseInt (first tokens))]) :left-tokens (rest tokens)}))

 (defn -string [tokens]
   (pattern tokens #"'[A-Za-z0-9 ]+'" :string (fn [x] [(str/replace (first tokens) "'" "")])))


Fix speed-up/slow-down keys (closes #60)

--- src/asciinema/player/view.cljs
+++ src/asciinema/player/view.cljs
@@ -245,23 +245,26 @@
   (some #(aget dom-event %) ["altKey" "shiftKey" "metaKey" "ctrlKey"]))

 (defn key-press->message [dom-event]
-  (when-not (has-modifiers? dom-event)
-    (case (.-key dom-event)
-      " " (m/->TogglePlay)
-      "f" :toggle-fullscreen
-      "0" (m/->Seek 0.0)
-      "1" (m/->Seek 0.1)
-      "2" (m/->Seek 0.2)
-      "3" (m/->Seek 0.3)
-      "4" (m/->Seek 0.4)
-      "5" (m/->Seek 0.5)
-      "6" (m/->Seek 0.6)
-      "7" (m/->Seek 0.7)
-      "8" (m/->Seek 0.8)
-      "9" (m/->Seek 0.9)
-      ">" (m/->SpeedUp)
-      "<" (m/->SpeedDown)
-      nil)))
+  (or
+   (when-not (has-modifiers? dom-event)
+     (case (.-key dom-event)
+       " " (m/->TogglePlay)
+       "f" :toggle-fullscreen
+       "0" (m/->Seek 0.0)
+       "1" (m/->Seek 0.1)
+       "2" (m/->Seek 0.2)
+       "3" (m/->Seek 0.3)
+       "4" (m/->Seek 0.4)
+       "5" (m/->Seek 0.5)
+       "6" (m/->Seek 0.6)
+       "7" (m/->Seek 0.7)
+       "8" (m/->Seek 0.8)
+       "9" (m/->Seek 0.9)
+       nil))
+   (case (.-key dom-event)
+     ">" (m/->SpeedUp)
+     "<" (m/->SpeedDown)
+     nil)))

 (defn key-down->message [dom-event]
   (when-not (has-modifiers? dom-event)


Remove not-found blocks from get-batch result.

--- src/blocks/core.clj
+++ src/blocks/core.clj
@@ -310,8 +310,8 @@
   [store ids]
   (validate-collection-of Multihash ids)
   (if (satisfies? BatchingStore store)
-    (-get-batch store ids)
-    (doall (map (partial get store) ids))))
+    (remove nil? (-get-batch store ids))
+    (doall (keep (partial get store) ids))))

 (defn put-batch!


Add byte-range note.

Add byte-range note.

--- src/blocks/core.clj
+++ src/blocks/core.clj
@@ -49,6 +49,7 @@
      (data/lazy-block id (.length file) reader))))

+; TODO: support opening a byte range
 (defn open
   "Opens an input stream to read the content of the block. Throws an IO
   exception on empty blocks."


improve docstring clarity

improve docstring clarity

--- src/keypin/core.clj
+++ src/keypin/core.clj
@@ -186,11 +186,11 @@
   | Kwarg    | Description                 |
   |----------|-----------------------------|
   |`:the-key`|(Required) Key to be used for looking up value                                |
-  |`:pred`   |Validator function `(fn [value]) -> boolean` - default fn returns always true |
+  |`:pred`   |Validator function `(fn [value]) -> boolean` - default fn just returns true   |
   |`:desc`   |Description string for the config - default: `\"No description\"`             |
   |`:lookup` |Function to look the key up (details below) - default: [[lookup-key]] - ordinary key look up |
   |`:parser` |The value parser fn `(fn [key raw-value]) -> parsed-value`, e.g. [[keypin.util/str->long]]   |
-  |`:default`|Default value to return when key is not found (unspecified implies there is no default value)|
+  |`:default`|Default value when key is not found (subject to validator, unspecified => no default value)  |
   |`:sysprop`|System property name that can override the config value (before parsing)                     |
   |`:envvar` |Environment variable that can override the config value and system property (before parsing) |
   |`:source` |Source or container (of reference type, e.g. atom/agent/promise etc.) of key/value pairs     |
@@ -270,11 +270,11 @@

   | Kwarg       | Description |
   |-------------|-------------|
-  |`:pred`      |Validator function `(fn [value]) -> boolean` - default fn returns always `true`|
+  |`:pred`      |Validator function `(fn [value]) -> boolean` - default fn just returns `true`  |
   |`:desc`      |Description string for the config - default: `\"No description\"`              |
   |`:lookup`    |Function to look the key up (details below) - default: [[lookup-key]] - ordinary key look up |
   |`:parser`    |The value parser fn `(fn [key raw-value]) -> parsed-value`, e.g. [[keypin.util/str->long]]   |
-  |`:default`   |Default value to return when key is not found (unspecified implies there is no default value)|
+  |`:default`   |Default value when key is not found (subject to validator, unspecified => no default value)  |
   |`:sysprop`   |System property name that can override the config value (before parsing)                     |
   |`:envvar`    |Environment variable that can override the config value and system property (before parsing) |
   |`:source`    |Source or container (of reference type, e.g. atom/agent/promise etc.) of key/value pairs     |


factor out new-child parse

factor out new-child parse

--- src/nml/core.clj
+++ src/nml/core.clj
@@ -34,12 +34,13 @@
   (nml-str (second x)))

 (defn nml-add [tree parent child match proxy]
-  (let [missing? (fn [children] (not-any? #(= (nml-name %) match) children))
-        f (fn [& children]
+  (let [missing?  (fn [children] (not-any? #(= (nml-name %) match) children))
+        vnew     #(parse proxy :start child)
+        f         (fn [& children]
             (if (missing? children)
-              (into [parent (parse proxy :start child)] children)
+              (into [parent (vnew)] children)
               (into [parent] children)))]
-    (if (nil? tree) [parent (parse proxy :start child)] (insta/transform {parent f} tree))))
+    (if (nil? tree) [parent (vnew)] (insta/transform {parent f} tree))))

 (defn nml-set [tree nml key val & sub]
   (let [child  (if sub :nvsubseq :stmt)


work on supporting adds of namelists and keys (missing key works)

--- src/nml/core.clj
+++ src/nml/core.clj
@@ -45,12 +45,7 @@
         parent (if sub :nvseq :s)
         vnew   (if sub (fn [tree] (parse val :start :values)) #(nml-set % nml key val true))
         f      (fn [k v] [child k (if (= (nml-str k) match) (vnew v) v)])]
-;;   (if sub (println (insta/transform {parent (fn [& children] [parent (if (some #(= (nml-str (second %)) match) children) children (conj children (parse (str key "=0") :start child)))])} tree)))
-    (println tree)
-    (println "###")
-    (let [t2 (if sub (insta/transform {parent (fn [& children] [parent (if (some #(= (nml-str (second %)) match) children) children (conj children (parse (str key "=0") :start child)))])} tree) tree)]
-      (println t2)
-      (println "###")
+    (let [t2 (if sub (insta/transform {parent (fn [& children] (into [parent (if (not-any? #(= (nml-str (second %)) match) children) (parse (str key "=0") :start child))] children))} tree) tree)]
       (insta/transform {child f} t2))))

 (defn nml-sets [tree sets]


Added up-right-script robot.

Added up-right-script robot.

--- src/cas/client.cljs
+++ src/cas/client.cljs
@@ -68,11 +68,23 @@
                      (swap! keystate assoc (.-keyCode e) false)))

 (defn player-script
-  [state response]
-  (cond (is-key-down 37) [:move :left]
-        (is-key-down 38) [:move :up]
-        (is-key-down 39) [:move :right]
-        (is-key-down 40) [:move :down]
+  [pointer response]
+  {:command
+   (cond (is-key-down 37) [:move :left]
+         (is-key-down 38) [:move :up]
+         (is-key-down 39) [:move :right]
+         (is-key-down 40) [:move :down]
+         :else nil)
+   :pointer nil})
+
+(defn up-right-script
+  [pointer response]
+  (cond (= pointer nil)
+        {:command [:move :right] :pointer 0}
+        (= pointer 0)
+        {:command [:move :up] :pointer 1}
+        (= pointer 1)
+        {:command [:move :right] :pointer 0}
         :else nil))

 (defn move-robot
@@ -89,7 +101,10 @@

 (defn command-robot
   [world {:keys [:script :pointer :response] :as robot}]
-  (let [command (script pointer response)]
+  (let [resp (script pointer response)
+        command (:command resp)
+        pointer (:pointer resp)
+        robot (assoc robot :pointer pointer)]
     (if command
       (let [kind (command 0) param (command 1)]
         (case kind


Fixes #437.

Fixes #437.

--- src/onyx/api.clj
+++ src/onyx/api.clj
@@ -1,6 +1,6 @@
 (ns onyx.api
   (:require [clojure.string :refer [split]]
-            [clojure.core.async :refer [chan alts!! >!! <!! close! alts!! timeout go]]
+            [clojure.core.async :refer [chan alts!! >!! <!! close! alts!! timeout go poll!]]
             [com.stuartsierra.component :as component]
             [taoensso.timbre :refer [info warn fatal error]]
             [onyx.log.entry :refer [create-log-entry]]
@@ -256,6 +256,20 @@
                :else
                (recur v)))))))

+(defn ^{:no-doc true} restart-peer [peer-system shutdown-ch]
+  (let [result
+        (try
+          (let [[v ch] (alts!! [shutdown-ch (timeout 0)] :priority true)]
+            (when (not= ch shutdown-ch)
+              (component/start peer-system)))
+          (catch Throwable t
+            (warn t)
+            {:retry? true
+             :system (component/stop peer-system)}))]
+    (if (and (map? result) (:retry? result))
+      (recur (:system peer-system) shutdown-ch)
+      result)))
+
 (defn ^{:no-doc true} peer-lifecycle [started-peer config shutdown-ch ack-ch]
   (try
     (loop [live @started-peer]
@@ -268,9 +282,9 @@
               (= ch restart-ch)
               (do (component/stop live)
                   (Thread/sleep (or (:onyx.peer/retry-start-interval config) 2000))
-                  (let [live (component/start live)]
-                    (reset! started-peer live)
-                    (recur live)))
+                  (when-let [live (restart-peer live shutdown-ch)]
+                    (do (reset! started-peer live)
+                        (recur live))))
               :else (throw (ex-info "Read from a channel with no response implementation" {})))))
     (catch Throwable e
       (fatal "Peer lifecycle threw an exception")


Remove all acker logic in onyx.api/submit-job

--- src/onyx/api.clj
+++ src/onyx/api.clj
@@ -106,11 +106,6 @@
                        (= :output (:onyx/type task))))
                    tasks)))

-(defn ^{:no-doc true} find-exempt-tasks [tasks exempt-task-names]
-  (let [exempt-set (into #{} exempt-task-names)
-        exempt-tasks (filter (fn [task] (some #{(:name task)} exempt-set)) tasks)]
-    (map :id exempt-tasks)))
-
 (defn ^{:no-doc true} expand-n-peers [catalog]
   (mapv
    (fn [entry]
@@ -129,7 +124,6 @@
         task-flux-policies (flux-policies (:catalog job) tasks)
         input-task-ids (find-input-tasks (:catalog job) tasks)
         output-task-ids (find-output-tasks (:catalog job) tasks)
-        exempt-task-ids (find-exempt-tasks tasks (:acker/exempt-tasks job))
         required-tags (required-tags (:catalog job) tasks)
         args {:id id
               :tasks task-ids
@@ -141,11 +135,7 @@
               :flux-policies task-flux-policies
               :inputs input-task-ids
               :outputs output-task-ids
-              :exempt-tasks exempt-task-ids
-              :required-tags required-tags
-              :acker-percentage (or (:acker/percentage job) 1)
-              :acker-exclude-inputs (or (:acker/exempt-input-tasks? job) false)
-              :acker-exclude-outputs (or (:acker/exempt-output-tasks? job) false)}
+              :required-tags required-tags}
         args (add-percentages-to-log-entry config job args tasks (:catalog job) id)]
     (create-log-entry :submit-job args)))


ensure that np2 has a non-empty mod (in contrast to np1, which has {:sem {:mod '()}}

--- src/babel/english/grammar.cljc
+++ src/babel/english/grammar.cljc
@@ -232,7 +232,8 @@
                               :synsem {:agr {:number number-agreement}
                                        :cat :noun
                                        :propernoun propernoun
-                                       :sem {:number number-agreement}}
+                                       :sem {:mod {:pred :top}
+                                             :number number-agreement}}
                               :head {:phrasal true
                                      :synsem {:propernoun propernoun}}}))
 ;                   (unify-check h10


commented out "_"

commented out "_"

--- src/babel/english/lexicon.cljc
+++ src/babel/english/lexicon.cljc
@@ -31,7 +31,10 @@
 ;          feminine-noun
 ;          countable-noun
 ;          {:synsem {:sem {:pred :blank}}})
-
+;   "_"
+;   ;(unify agreement-noun common-noun
+;          {:synsem {:sem e/animal}})
+
    "Antonia"
    {:synsem {:sem {:pred :antonia
                    :human true}


Refactor some comments

Refactor some comments

--- src/bakyeono/litedocx/wpml.clj
+++ src/bakyeono/litedocx/wpml.clj
@@ -106,7 +106,7 @@
      {:tag :w:unhideWhenUsed :attrs nil :content nil}]}])

 (defn when-v-tag
-  "Returns an xml tag node when the value exists."
+  "Returns an XML tag node when the value exists."
   [v tag]
   (cond (nil? v) nil
         (= "" v) {:tag tag}
@@ -120,7 +120,7 @@
     [k v]))

 (defn make-attrs
-  "Returns an xml tag attributes without nil values."
+  "Returns an XML tag attributes without nil values."
   [& kvs]
   (into {}
         (remove-nil
@@ -166,7 +166,7 @@
     (cons styles-xml-resource custom-resources)))

 (defn- resource-type-override
-  "Returns Override xml tag node of given resource information map.
+  "Returns Override XML tag node of given resource information map.
   Called by content-types-xml."
   [{:keys [content-type part-name]}]
   {:tag :Override
@@ -174,7 +174,7 @@
            :PartName part-name}})

 (defn content-types-xml
-  "Creates xml data for [Content_Types].xml file in DOCX package.
+  "Creates XML data for [Content_Types].xml file in DOCX package.

   Parameters:
   - resources: <vector of {:content-type <string>, :part-name <string>}>}
@@ -187,7 +187,7 @@
                   (map resource-type-override resources))})

 (defn doc-props-app-xml
-  "Creates xml data for docProps/app.xml file in DOCX pakcage.
+  "Creates XML data for docProps/app.xml file in DOCX pakcage.

   Parameters:
   - & properties: option, value, ...
@@ -204,7 +204,7 @@
                    [:properties:Application :properties:AppVersion]))})

 (defn doc-props-core-xml
-  "Creates xml data for docProps/core.xml file in DOCX pakcage.
+  "Creates XML data for docProps/core.xml file in DOCX pakcage.

   Parameters:
   - & properties: option, value, ...
@@ -222,7 +222,7 @@
                     :dc:description :cp:lastModifiedBy]))})

 (defn word-document-xml
-  "Creates xml data for word/document.xml file in DOCX pakcage."
+  "Creates XML data for word/document.xml file in DOCX pakcage."
   []
   {:tag :w:document
    :attrs word-xmlns
@@ -360,7 +360,7 @@
       [path body])))

 (defn- rels
-  "Returns Relationship xml tag node of given resource information map.
+  "Returns Relationship XML tag node of given resource information map.
   Called by word-rels-document-xml-rels."
   [{:keys [id type target]}]
   {:tag :Relationship
@@ -369,7 +369,7 @@
            :Target target}})

 (defn word-rels-document-xml-rels
-  "Creates xml data for word/_rels/document.xml.rels file in DOCX package.
+  "Creates XML data for word/_rels/document.xml.rels file in DOCX package.

   Parameters:
   - resources: <vector of {:id <number>, :type <string>, :target <string>}>}
@@ -381,13 +381,13 @@
    :content (map rels resources)})

 (defn table
-  "Creates xml data of table.
+  "Returns XML tag node of table.

   Parameters:
   - style: <string> style of table
   - h-align: <string or keyword> horizontal alignment option in each cell.
   - widths: <vector of numbers> widths of cells
-  - & body: content of the table
+  - & body: content of table (tr is expected)

   Examples:
   (table \"table-style1\" :center [964 964 8072] ...)"


Add core.async to searchable vars

Add core.async to searchable vars

--- src/clj/clojuredocs/search.clj
+++ src/clj/clojuredocs/search.clj
@@ -57,7 +57,8 @@
     clojure.test
     clojure.walk
     clojure.xml
-    clojure.zip])
+    clojure.zip
+    clojure.core.async])

 (def searchable-vars
   (do