PLD: whitespace, use cond->

PLD: whitespace, use cond->

--- src/hatti/ona/forms.cljs
+++ src/hatti/ona/forms.cljs
@@ -11,13 +11,18 @@
 (def currency-regex #"£|$")
 (def newline-regex #"[\n\r]")
 (def no-answer "No Answer")
+
 (def submission-time-field
-  {:name _submission_time :full-name _submission_time
-   :label "Submission Time" :type "dateTime"})
+  {:name _submission_time
+   :full-name _submission_time
+   :label "Submission Time"
+   :type "dateTime"})

 (def submitted-by-field
-  {:name _submitted_by :full-name _submitted_by
-   :label "Submitted by" :type "text"})
+  {:name _submitted_by
+   :full-name _submitted_by
+   :label "Submitted by"
+   :type "text"})

 (def last_edited
   {:name _last_edited
@@ -252,8 +257,8 @@

 (defn relabel-meta-field
   "Try and produce a label for meta field if non-existent."
-  [field]
-  (let [label (if-let [type (:type field)]
+  [{:keys [label name type] :as field}]
+  (let [label (if type
                 (case type
                   "start"         "Start time"
                   "end"           "End time"
@@ -265,12 +270,12 @@
                   "uuid"          "UUID"
                   "instanceID"    "Instance ID"
                   "phonenumber"   "Phone number"
-                  (:name field))
-                (case (:name field)
+                  name)
+                (case name
                   _submission_time "Submission time"
-                  _submitted_by "Submitted by"
+                  _submitted_by    "Submitted by"
                   ""))]
-    (if (:label field) field (assoc field :label label))))
+    (cond-> field (not label) (assoc :label label))))

 ;; UTILITY: Form Flattening
 (defn flatten-form


hartes d

hartes d

--- src/hello_world/core.clj
+++ src/hello_world/core.clj
@@ -23,7 +23,7 @@
 (defn sqlquery [name]

 ;(first (jdbc/query mysql-db [(str "select * from konten where Name='" name "'")])))
-(jdbc/execute! mysql-db ["UPDATE konten SET Kontostant = Kontostand - 1 WHERE Name = ?" name]))
+(jdbc/execute! mysql-db ["UPDATE konten SET Kontostand = Kontostand - 1 WHERE Name = ?" name]))
 ;(jdbc/update! mysql-db :konten {:Kontostand 99} ["Name = ?" name]))
 ; maybe this sets the guthaben to 99


parse almost done

parse almost done

--- src/bitcoinrpc/core.clj
+++ src/bitcoinrpc/core.clj
@@ -129,7 +129,6 @@
 (def-rpc-opt verifychain 0 checklevel nblocks)
 (def-rpc verifytxoutproof proof)

-
 ;== Control ==
 (def-rpc getinfo)
 (def-rpc getmemoryinfo)
@@ -144,7 +143,7 @@
 (def-rpc-opt getblocktemplate 0 TemplateRequest )
 (def-rpc getmininginfo)
 (def-rpc-opt getnetworkhashps 0 nblocks height)
-(def-rpc prioritisetransaction txid priority_delta fee_delta)
+#_(def-rpc prioritisetransaction txid priority_delta fee_delta)
 (def-rpc-opt submitblock 1 hexdata jsonparametersobject)

 ;== Network ==
@@ -173,7 +172,7 @@
                 :no-lock (s/cat :input ::txid-opts, :output ::address-amount)
                 :lock (s/cat :input ::txid-opts, :output ::address-amount, :locktime integer?))
         :ret ::hex-string)
-(def-rpc-opt createrawtransaction 2 txids addresses locktime)
+#_(def-rpc-opt createrawtransaction 2 txids addresses locktime)

 (def-rpc decoderawtransaction hexstring)
 (def-rpc decodescript hexstring)
@@ -231,12 +230,12 @@
 (def-rpc-opt listreceivedbyaddress 0 minconf include_empty include_watchonly)
 (def-rpc-opt listsinceblock 0 blockhash target_confirmations include_watchonly)
 (def-rpc-opt listtransactions 0 account count skip include_watchonly)
-(def-rpc-opt listunspent 0 minconf maxconf  addresses include_unsafe)
+#_(def-rpc-opt listunspent 0 minconf maxconf  addresses include_unsafe)
 (def-rpc-opt lockunspent 0 unlock todo)
 (def-rpc-opt move 3 fromaccount toaccount amount minconf comment)
 (def-rpc removeprunedfunds txid)
 (def-rpc-opt sendfrom 3 fromaccount toaddress amount  minconf comment comment_to)
-(def-rpc-opt sendmany 2 fromaccount addess-map minconf comment addresses)
+#_(def-rpc-opt sendmany 2 fromaccount addess-map minconf comment addresses)

@@ -244,6 +243,8 @@
 (def-rpc setaccount address account)
 (def-rpc settxfee amount)
 (def-rpc signmessage address message)
+
+

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

@@ -280,13 +281,14 @@
      TITLE = (<'=='> SPACE SYMBOL SPACE <'=='>)
      FUNCTION = SYMBOL | (SYMBOL SPACE ARGS)
      ARGS = ((ARG SPACE)* ARG) | Epsilon
-     <ARG> = MAP-ARG | LIST-ARG | STRING-SYMBOL | SYMBOL  | OPTIONAL-ARG
+     <ARG> = MAP-ARG | LIST-ARG | STRING-SYMBOL | SYMBOL  | OPTIONAL-ARG | ENUM
+     ENUM = ((SYMBOL <'|'>)* SYMBOL) | Epsilon
      OPTIONAL-ARG = (<'('> OPTIONAL-SPACE (ARG | ARGS) OPTIONAL-SPACE <')'>)
      LIST-ARG = <'['> ARG <',...'> <']'>
      MAP-ARG = (<'{'>) ((KEY-VALUE <','>)* KEY-VALUE) (<'}'>)
      KEY-VALUE = ARG <':'> ARG
      OPEN-KEY-VALUE = (KEY-VALUE <',...'>)
-     STRING-SYMBOL = ('\"' SYMBOL '\"')
+     STRING-SYMBOL = ('\"' ARG '\"')

      NEW-LINE = '\n' | Epsilon
      SYMBOL = #'[a-zA-Z_]'  #'\\w'*
@@ -323,6 +325,7 @@
    :TITLE str
    :MAP-ARG (fn [& args] (symbol (str (reduce (fn [acc [_ k v]] (format "%s%s_%s" (if acc (str acc "-") "") k v)) nil args) "-map")))
    :LIST-ARG #(symbol (format "%s-list" %))
+   :ENUM (fn [& args] (reduce (fn [acc v] (format "%s%s" (if acc (str acc "-") "") v)) nil args))
    :BTC (fn
           ([a] a)
           ([] nil))
@@ -333,18 +336,23 @@
     ast->clj-map
     ast))

-(def not-working #{"sendmany" "listunspent" "prioritisetransaction" "addnode" "disconnectnode" "setban" "setnetworkactive" "createrawtransaction" "bumpfee"})
+(def not-working #{"prioritisetransaction" "createrawtransaction" "listunspent" "sendmany"})

 (defn valid-fn [l]
   (let [n (first (.split l " "))]
     (not (contains? not-working n))))

+(defn parse [l]
+  (let [r (help-parser l)]
+    (if (insta/failure? r)
+      (throw (IllegalStateException. (pr-str (insta/get-failure r))))
+      (ast->clj r))))
+
 (defn def-rpcs []
-  (conj
-    (map
-      #(let [r (help-parser %)]
-         (ast->clj r)) (filter valid-fn (split-help)))
-    'do))
+  (let [e (conj
+            (map parse (filter valid-fn (split-help)))
+            'do)]
+    e))

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


Fixed bug in HTTP library caused by change in update-proxy in Clojure

--- src/compojure/http.clj
+++ src/compojure/http.clj
@@ -328,8 +328,8 @@
   "Update an existing servlet proxy with a new set of handlers."
   [object & handlers]
   (update-proxy object
-    {'service (fn [this request response]
-                (http-service this request response handlers))}))
+    {"service" (fn [this request response]
+                 (http-service this request response handlers))}))

 (defmacro defservlet
   "Defines a new servlet with an optional doc-string, or if a servlet is


removed outdated presentation code. will add back at some point, after project is operational at 500m


Fix margins a little

Fix margins a little

--- src/clj_simple_chart/ncs/goliatdiagram.clj
+++ src/clj_simple_chart/ncs/goliatdiagram.clj
@@ -61,9 +61,13 @@
     (rect (mapv make-rect data))
     (render-axis y)
     (map make-text data)
-    [:g {:transform (translate (- marg (:left margin)) height)} (opentype/text {:dy "2em"} "Kjelde: OD")]
+    [:g {:transform (translate (- (:left margin)) height)}
+     (opentype/text {:dx marg :dy "2em"} "Kjelde: OD")]
     #_[:g {:transform (translate width height)} (opentype/text {:dy "2em" :text-anchor "end"} "@ivarref")]
-    [:g {:transform (translate width height)} (opentype/text {:dy "2em" :text-anchor "end"} "Diagram: Refsdal.Ivar@gmail.com")]]])
+    [:g {:transform (translate (+ (:right margin) width) height)}
+     (opentype/text {:dx (- marg)
+                     :dy "2em" :text-anchor "end"
+                     } "Diagram: Refsdal.Ivar@gmail.com")]]])

 (defn render-self []
   (render "goliat.png" "goliat.svg" (diagram)))


Imporoved session storage protocol.

Imporoved session storage protocol.

--- src/clojure/catacumba/handlers/session.clj
+++ src/clojure/catacumba/handlers/session.clj
@@ -7,7 +7,8 @@
   (:require [futura.atomic :as atomic]
             [buddy.core.nonce :as nonce]
             [buddy.core.codecs :as codecs]
-            [catacumba.core :as ct])
+            [catacumba.impl.handlers :as handlers]
+            [catacumba.impl.context :as context])
   (:import clojure.lang.IAtom
            clojure.lang.IDeref
            clojure.lang.Counted
@@ -31,8 +32,9 @@
   (^:private modified? [_] "Check if session is modified"))

 (defprotocol ISessionStorage
-  (^:private load-data [_ key] "")
-  (^:private persist-data [_ key data] ""))
+  (^:private read-session [_ key] "")
+  (^:private write-session [_ key data] "")
+  (^:private delete-session [_ key] ""))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Types
@@ -81,32 +83,38 @@

 (alter-meta! #'->Session assoc :private true)

-(defn session
+(defn- ->session
   "A session object constructor."
-  ([sessionid] (session sessionid {}))
+  ([sessionid] (->session sessionid {}))
   ([sessionid data]
    (Session. (atom data)
              sessionid
              (atomic/boolean false)
              (atomic/boolean false))))

-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Storages
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 (defn memory-storage
+  "In memmory session storage constructor."
   []
   (let [internalstore (atom {})]
     (reify ISessionStorage
-      (load-data [_ key]
+      (read-session [_ key]
         (let [key (keyword key)]
           (get @internalstore key nil)))
-      (persist-data [_ key data]
+      (write-session [_ key data]
         (let [key (keyword key)]
-          (swap! internalstore assoc key data))))))
+          (swap! internalstore assoc key data)))
+      (delete-session [_ key]
+        (let [key (keyword key)]
+          (swap! internalstore dissoc key))))))

 (defn lookup-storage
+  "A helper for create session storages with
+  helpfull shortcuts."
+  {:no-doc true}
   [storage]
   (case storage
     :inmemory (memory-storage)
@@ -134,40 +142,33 @@
 (defn- context->session
   [context {:keys [storage cookie-name]
             :or {cookie-name default-cookie-name}}]
-  (let [cookies (ct/get-cookies context)
+  (let [cookies (handlers/get-cookies context)
         cookie (get cookies (keyword cookie-name) nil)
         sid (:value cookie)]
     (if sid
-      (let [data (load-data storage sid)]
-        [sid (session sid data)])
+      (let [data (read-session storage sid)]
+        [sid (->session sid data)])
       (let [sid (codecs/bytes->safebase64 (nonce/random-nonce 48))]
-        [sid (session sid)]))))
+        [sid (->session sid)]))))

-(defn- patch-vary-headers
-  [response])
+(defn session
+  ([] (session {}))
+  ([{:keys [storage cookie-name]
+     :or {storage :inmemory cookie-name default-cookie-name}
+     :as options}]
+   (let [storage (lookup-storage storage)
+         options (assoc options :storage storage)]
+     (fn [context]
+       (let [[sid session] (context->session context options)]
+         (context/before-send context (fn [^ResponseMetaData response]
+                                        (cond
+                                          (empty? session)
+                                          (let [cookie (-> (make-cookie sid options)
+                                                           (assoc :max-age 0))]
+                                            (handlers/set-cookies! context {cookie-name cookie}))

-
-(defn session-handler
-  [{:keys [storage cookie-name]
-    :or {storage :inmemory cookie-name default-cookie-name}
-    :as options}]
-  (let [storage (lookup-storage storage)
-        options (assoc options :storage storage)]
-    (fn [context]
-      (let [[sid session] (context->session context options)]
-        (ct/before-send context (fn [^ResponseMetaData response]
-                                  (cond
-                                    (empty? session)
-                                    (let [cookie (-> (make-cookie sid options)
-                                                     (assoc :max-age 0))]
-                                      (ct/set-cookies! context {cookie-name cookie}))
-
-                                    (modified? session)
-                                    (let [cookie (make-cookie sid options)]
-                                      (persist-data storage sid @session)
-                                      (patch-vary-headers response)
-                                      (ct/set-cookies! context {cookie-name cookie}))
-
-                                    (accessed? session)
-                                    (patch-vary-headers response))))
-        (ct/delegate context {:session session})))))
+                                          (modified? session)
+                                          (let [cookie (make-cookie sid options)]
+                                            (write-session storage sid @session)
+                                            (handlers/set-cookies! context {cookie-name cookie})))))
+         (context/delegate context {:session session}))))))


add port binding

add port binding

--- src/clj/bulldog/core.clj
+++ src/clj/bulldog/core.clj
@@ -90,7 +90,7 @@
                      :store (<!! (new-mem-store)) #_(<!! (new-fs-store "data"))})]
     (create-routes @state)
     (-> state deref :store (-assoc-in [:articles] test-articles) <!!)
-    (swap! state assoc :server (run-server #'all-routes {:port 8080}))
+    (swap! state assoc :server (run-server #'all-routes {:port (or (System/getenv "PORT") 8080)}))
     state))

 (defn -main [& args]


Remove kryo from schema.

Remove kryo from schema.

--- src/clj/forma/schema.clj
+++ src/clj/forma/schema.clj
@@ -53,25 +53,7 @@
         :end-idx   end-idx
         :series    (vec series)})))

-(gen-class :name forma.kryo.RecordComparator
-           :prefix "fields-"
-           :methods
-           [^{:static true}
-            [recordCompare [java.util.Map java.util.Map java.util.List] int]])
-
-(defn fields-recordCompare
-  [m1 m2 fn-seq]
-  (loop [[f & more] fn-seq]
-    (let [val (compare (f m1) (f m2))]
-      (if (and more (zero? val))
-        (recur more)
-        val))))
-
-(defrecord TimeSeriesValue [start-idx end-idx series]
-  Comparable
-  (compareTo [m1 m2]
-    (forma.kryo.RecordComparator/recordCompare
-     m1 m2 [:start-idx :end-idx (comp vec :series)])))
+(defrecord TimeSeriesValue [start-idx end-idx series])

 (defn ts-record
   ([start-idx series]
@@ -112,11 +94,7 @@
    :count      "number of fires on the given day."})

 ;; Record to hold a FireValue.
-(defrecord FireValue [temp-330 conf-50 both-preds count]
-  Comparable
-  (compareTo [m1 m2]
-    (forma.kryo.RecordComparator/recordCompare
-     m1 m2 [:temp-330 :conf-50 :both-preds :count])))
+(defrecord FireValue [temp-330 conf-50 both-preds count])

 (defn fire-value
   "Creates a `fire-value` object with counts of fires meeting certain criteria:
@@ -177,11 +155,7 @@
    :t-stat      "t-statistic for the relevant month."})

 (defrecord FormaValue
-    [fire-value short-drop param-break long-drop t-stat]
-  Comparable
-  (compareTo [m1 m2]
-    (forma.kryo.RecordComparator/recordCompare
-     m1 m2 [:t-stat :fire :short :param-break :long])))
+    [fire-value short-drop param-break long-drop t-stat])

 (defn forma-value
   "Returns a vector containing a FireValue, short-term drop,
@@ -196,13 +170,7 @@
 (defrecord NeighborValue
     [fire-value neighbor-count avg-short-drop min-short-drop
      avg-param-break min-param-break avg-long-drop min-long-drop
-     avg-t-stat min-t-stat]
-  Comparable
-  (compareTo [m1 m2]
-    (forma.kryo.RecordComparator/recordCompare
-     m1 m2 [:neighbor-count :fire-value :avg-short-drop :min-short-drop
-            :avg-param-break :min-param-break :avg-long-drop :min-long-drop
-            :avg-t-stat :min-t-stat])))
+     avg-t-stat min-t-stat])

 (defn neighbor-value
   "Accepts either a forma value or a sequence of sub-values."


adjusted static.clj to reflect new distance to border file


Regeocode newest reports first.

Regeocode newest reports first.

--- src/clj/hbg_crime/db.clj
+++ src/clj/hbg_crime/db.clj
@@ -48,7 +48,7 @@

 (defn ungeocoded-reports
   []
-  (j/query db (s/select * :reports "where neighborhood is null")))
+  (j/query db (s/select * :reports "where neighborhood is null order by endtime::date desc")))

 (defn all-reports
   []


Might revisit, but for now we don't specfially use emit-apply-to

--- src/cljs/go/compiler.clj
+++ src/cljs/go/compiler.clj
@@ -463,41 +463,6 @@
       (when-let [export (and export (-> export munge go-short-name go-public))]
         (when-not (= export mname)
           (emitln "var "export  " = " mname))))))
-
-(defn emit-apply-to
-  [{:keys [name params env]}]
-  (let [arglist (gensym "arglist__")
-        delegate-name (str (munge name) "__delegate")]
-    (emitln "func (" arglist " interface{}) interface{} {")
-    (doseq [[i param] (map-indexed vector (drop-last 2 params))]
-      (emits "var ")
-      (emit param)
-      (emits " = First(")
-      (emitln arglist ")")
-      (emitln arglist " = Next(" arglist ")"))
-    (if (< 1 (count params))
-      (do
-        (emits "var ")
-        (emit (last (butlast params)))
-        (emitln " = First(" arglist ")")
-        (emits "var ")
-        (emit (last params))
-        (emitln " = Rest(" arglist ")")
-        (emits "return " delegate-name "(")
-        (doseq [param params]
-          (emit param)
-          (when-not (= param (last params)) (emits ",")))
-        (emitln ")"))
-      (do
-        (emits "var ")
-        (emit (last params))
-        (emitln " = Seq(" arglist ")")
-        (emits "return " delegate-name "(")
-        (doseq [param params]
-          (emit param)
-          (when-not (= param (last params)) (emits ",")))
-        (emitln ")")))
-    (emits "}")))

 (defn emit-fn-params [params]
   (doseq [param params]


Minor refactor

Minor refactor

--- src/cljs/gtfve/maps.cljs
+++ src/cljs/gtfve/maps.cljs
@@ -95,8 +95,9 @@
     (r/create-class
      {:component-did-mount (fn [this]
                              (let [opts (:opts @state)
-                                   node (.getDOMNode this)]
-                               (reset! gmap (Maps.Map. node (clj->js opts)))))
+                                   node (.getDOMNode this)
+                                   google-map (Maps.Map. node (clj->js opts))]
+                               (reset! gmap google-map)))
       :component-function (fn [state]
                             [:div {:id :map-canvas
                                    :style {:height "100%"


Hack around

Hack around

--- src/clojush/evaluate.clj
+++ src/clojush/evaluate.clj
@@ -221,13 +221,13 @@
                                          (- 1.0 (/ (reduce + improvements)
                                                    (count improvements))))))))) ;;;;;;;;;;;;;; HACK
                           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;HACK
-                          (if (not (:print-history argmap))
-                            (throw
-                              (Exception.
-                                ":print-history must be true for :case-stagnation"))
-                            (if (empty? (rest (:history ind)))
-                              (vec (repeat (count (:errors ind)) 1000000))
-                              (vec (for [case-history (map (partial take 10) (apply map list (:history ind)))] ;;;; NOTE WINDOW
+                          #_(if (not (:print-history argmap))
+                            (throw
+                              (Exception.
+                                ":print-history must be true for :case-stagnation"))
+                            (if (empty? (rest (:history ind)))
+                              (vec (repeat (count (:errors ind)) 1000000))
+                              (vec (for [case-history (map (partial take 5) (apply map list (:history ind)))] ;;;; NOTE WINDOW
                                      (if (zero? (first case-history))
                                        ;; note only zero is solved
                                        ;; error-threshold applies to total so can't be used here
@@ -242,6 +242,50 @@
                                                                 (partition 2 1 case-history))]
                                          (- 1.0 (/ (max 0 (reduce + improvements))
                                                    (count improvements))))))))) ;;;;;;;;;;;;;; HACK
+                          ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;HACKED STABILITY
+                          #_(if (not (:print-history argmap))
+                            (throw
+                              (Exception.
+                                ":print-history must be true for :case-stagnation"))
+                            (if (empty? (rest (:history ind)))
+                              (vec (repeat (count (:errors ind)) 1000000))
+                              (vec (for [case-history (map (partial take 20) (apply map list (:history ind)))] ;;;; NOTE WINDOW
+                                     (if (zero? (first case-history))
+                                       ;; note only zero is solved
+                                       ;; error-threshold applies to total so can't be used here
+                                       0 ;; solved, improvement doesn't matter
+                                       (let [improvements (mapv (fn [[newer-error older-error]]
+                                                                  (let [imp (- older-error newer-error)]
+                                                                    (if (> imp 0)
+                                                                      1.0
+                                                                      (if (< imp 0)
+                                                                        1.0  ;;;;;; HACK
+                                                                        0.0))))
+                                                                (partition 2 1 case-history))]
+                                         (- 1.0 (/ (max 0 (reduce + improvements))
+                                                   (count improvements))))))))) ;;;;;;;;;;;;;; HACK
+                          ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;HACKED STABILITY
+                          (if (not (:print-history argmap))
+                            (throw
+                              (Exception.
+                                ":print-history must be true for :case-stagnation"))
+                            (if (empty? (rest (:history ind)))
+                              (vec (repeat (count (:errors ind)) 1000000))
+                              (vec (for [case-history (apply map list (:history ind))]
+                                     (if false ;(zero? (first case-history)) ;;;;;;;;;; HACK
+                                       ;; note only zero is solved
+                                       ;; error-threshold applies to total so can't be used here
+                                       0 ;; solved, improvement doesn't matter
+                                       (let [changes (mapv (fn [[newer-error older-error]]
+                                                             (if (= older-error newer-error)
+                                                               0.0
+                                                               1.0))
+                                                           (partition 2 1 case-history))
+                                             weights (take (count changes)
+                                                           (iterate (partial * (- 1 improvement-discount)) 1.0))
+                                             sum (reduce + (mapv * changes weights))]
+                                         (/ 1.0 (inc (/ sum
+                                                        (reduce + weights)))))))))) ;;;;;;;;;;;;;; HACK
                           (= cat :reproductive-infidelity)
                           (let [g (:genome ind)]
                             (- 1.0


Minor cosmetics for conexp.contrib.algorithms.concepts

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

--- src/conexp/contrib/algorithms/concepts.clj
+++ src/conexp/contrib/algorithms/concepts.clj
@@ -13,11 +13,11 @@
   (fn [& args] (first args)))

-;; NextClosure with BitSets (:next-closure)
+;; NextClosure (:next-closure)

 (defn- lectic-<_i
   ""
-  [i #^BitSet A #^BitSet B]
+  [i, #^BitSet A, #^BitSet B]
   (let [i (int i)]
     (and (.get B i)
 	 (not (.get A i))
@@ -32,9 +32,9 @@

 (defn- oplus
   ""
-  [object-count attribute-count incidence-matrix #^BitSet A i]
-  (let [#^BitSet A-short (.clone A)
-	#^BitSet B (BitSet.)
+  [object-count, attribute-count, incidence-matrix, #^BitSet A, i]
+  (let [#^BitSet A-short (.clone A),
+	#^BitSet B (BitSet.),
 	i (int i)]
     (.set A-short i true)
     (.set A-short (inc i) (int attribute-count) false)
@@ -51,7 +51,7 @@

 (defn- next-closed-set
   ""
-  [object-count attribute-count incidence-matrix #^BitSet A]
+  [object-count, attribute-count, incidence-matrix, #^BitSet A]
   (loop [i (dec (int attribute-count))]
     (cond
       (== -1 i)
@@ -228,6 +228,6 @@
 	 (persistent! Bs))))

-;; Close-by-One?, Nourine-Raynaud?, Bordat?, Lindig? Some other fancy stuff?
+;; Close-by-One?, Nourine-Raynaud?, Bordat?, Lindig?, Berry? Some other fancy stuff?

 nil


load om js in body, add root element

load om js in body, add root element

--- src/clj/sally/views.clj
+++ src/clj/sally/views.clj
@@ -28,8 +28,10 @@
       [:div#page-wrapper content]]
      (page/include-css "/boots/css/bootstrap.min.css"
                        "/boots/css/font-awesome.min.css"
-                       "/boots/css/local.css")]))
+                       "/boots/css/local.css")
+     (page/include-js "/app.js")]))

 (defn root-page [request]
   (layout
-    [:h1 "Welcome!"]))
+    [:h1 "Welcome!"]
+    [:div#app]))


Improve readability of -equiv, #41.

Improve readability of -equiv, #41.

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -1826,9 +1826,8 @@
     (and
      (set? other)
      (= (count coll) (count other))
-     (reduce #(and %1 (-contains? coll %2))
-             true
-             (seq other))))
+     (every? #(-contains? coll %)
+             other)))

   IHash
   (-hash [coll] (hash-coll coll))


name function throws exception with unexpected input.

--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -2297,7 +2297,7 @@
         (if (< i 0)
           (subs x 2)
           (subs x (inc i))))
-    :else nil #_(throw (str "Doesn't support name: " x))))
+    :else (throw (js/Error. (str "Doesn't support name: " x)))))

 (defn namespace
   "Returns the namespace String of a symbol or keyword, or nil if not present."


Added comments.

Added comments.

--- src/clouseau/server.clj
+++ src/clouseau/server.clj
@@ -39,11 +39,10 @@
 (ns clouseau.server)

 (require '[ring.util.response     :as http-response])
-(require '[hiccup.core :as hiccup])
-(require '[hiccup.page :as page])
-(require '[hiccup.form :as form])
-
-(require '[clojure.java.jdbc :as jdbc])
+(require '[hiccup.core            :as hiccup])
+(require '[hiccup.page            :as page])
+(require '[hiccup.form            :as form])
+(require '[clojure.java.jdbc      :as jdbc])

 (require '[clouseau.products :as products])
 (require '[clouseau.calendar :as calendar])
@@ -133,10 +132,12 @@
     (jdbc/insert! db-spec/ccs-db :packages {:name package :description description}))

 (defn not-empty-parameter?
+    "Returns true if given parameter is not null and not empty at the same time."
     [parameter]
     (and parameter (not (empty? parameter))))

 (defn store-changes
+    "Store changes into the 'changes' table."
     [user-name package description]
     (if (and (not-empty-parameter? package) (not-empty-parameter? description))
         (let [date (calendar/format-date-time (calendar/get-calendar))]
@@ -145,6 +146,7 @@
         )))

 (defn render-html-header
+    "Renders part of HTML page - the header."
     [package]
     [:head
         [:title "Clouseau   " package]
@@ -159,11 +161,13 @@
 )

 (defn render-footer
+    "Renders part of HTML page - the footer."
     []
     [:div "

Author: Pavel Tisnovsky <ptisnovs@redhat.com>   "
           "RFE and general discussion about Clouseau in Mojo
"])

 (defn render-search-field
+    "Renders search box on the top side of HTML page."
     [package]
     (form/form-to {:class "navbar-form navbar-left" :role "search"} [:get "/" ]
         [:div {:class "input-group"}
@@ -173,6 +177,7 @@
                 (form/submit-button {:class "btn btn-default"} "Search")]]))

 (defn render-name-field
+    "Renders box for typing user name on the top side of HTML page."
     [user-name]
     (form/form-to {:class "navbar-form navbar-left" :role "search"} [:get "/" ]
         [:div {:class "input-group"}
@@ -182,6 +187,7 @@
                 (form/submit-button {:class "btn btn-default"} "Remember me")]]))

 (defn render-navigation-bar-section
+    "Renders whole navigation bar."
     [package user-name]
     [:nav {:class "navbar navbar-inverse navbar-fixed-top" :role "navigation"}
         [:div {:class "container-fluid"}


Add label for builds triggered by API.

Add label for builds triggered by API.

--- src-cljs/frontend/components/build_head.cljs
+++ src-cljs/frontend/components/build_head.cljs
@@ -724,6 +724,7 @@
       "trigger" (if (:user build)
                   (list user-link " on CircleCI.com")
                   (list "CircleCI.com"))
+      "api" "API"
       (if (:job_name build)
         (:job_name build)
         "unknown"))))


Styling tweaks from Dan

Styling tweaks from Dan

--- src-cljs/frontend/components/build_head.cljs
+++ src-cljs/frontend/components/build_head.cljs
@@ -540,10 +540,10 @@
        (string/join " - in ")))

 (defmethod format-test-name-v2 "lein-test" [test]
-  [:strong (str (:classname test) "/" (:name test))])
+  [:strong.build-test-name (str (:classname test) "/" (:name test))])

 (defmethod format-test-name-v2 "cucumber" [test]
-  [:strong (if (string/blank? (:name test))
+  [:strong.build-test-name (if (string/blank? (:name test))
              (:classname test)
              (:name test))])

@@ -575,7 +575,7 @@
                                    :on-click #(raise! owner [:show-test-message-toggled {:test-index (:i test)}])}
             (if (:show-message test) "less info" "more info")])
          (when (:show-message test)
-           [:pre (:message test)])]))))
+           [:pre.build-test-output (:message test)])]))))

 (defn build-tests-list [data owner]
   (reify
@@ -610,6 +610,8 @@
                        (list (when file [:div.filename (str file ":")])
                              (om/build-all test-item
                                            (vec (sort-by test-model/format-test-name tests-by-file)))))]]))]))])))))
+
+(def initial-test-render-count 5)

 (defn build-tests-list-v2 [data owner]
   (reify
@@ -646,9 +648,22 @@
                                      [:div.build-tests-list-container
                                       [:ol.list-unstyled.build-tests-list
                                        (for [[file tests-by-file] (group-by :file tests-by-source)]
+                                         (let [sorted-tests (sort-by test-model/format-test-name tests-by-file)
+                                               initial-test-results (take initial-test-render-count sorted-tests)
+                                               other-tests (drop initial-test-render-count sorted-tests)]
+
                                          (list (when file [:div.filename (str file ":")])
                                                (om/build-all test-item-v2
-                                                             (vec (sort-by test-model/format-test-name tests-by-file)))))]]]])
+                                                             (vec initial-test-results))
+                                               (when (seq other-tests)
+                                                 (list
+                                                   [:hr]
+                                                   [:li
+                                                    [:button.btn-link.build-tests-toggle
+                                                     [:i.fa.fa-chevron-right.build-tests-toggle-icon]
+                                                     "More"]]
+                                                   (om/build-all test-item-v2
+                                                                 (vec other-tests)))))))]]]])

               (seq tests) [:div
                            "Your build ran "


Fix up form section at the end

Fix up form section at the end

--- src-cljs/frontend/components/enterprise.cljs
+++ src-cljs/frontend/components/enterprise.cljs
@@ -106,6 +106,7 @@
              "Test against any version of any browser with CircleCI's Enterprise SauceLabs integration. Using the Sauce Connect tunnel, you can even test applications running securely within CircleCI build containers behind your firewall. Automate your cross-browser and mobile testing."
              [:a.integration-learn-more {:href "/integrations"} "Learn more"]]]]
          [:section
+          [:img.enterprise-icon {:src (utils/cdn-path "/img/outer/enterprise/feature-phone.svg")}]
           [:h2.text-center "Learn More About CircleCI Enterprise"]
           [:div.enterprise-cta-contact
            [:form.form-horizontal
@@ -124,7 +125,7 @@
                                 :placeholder "# of Developers"}]
               [:div.telephone-info
                "Or call "
-               [:a.telephone-number {:href "#"} "415.851.5247"]
+               [:a.telephone-number {:href "tel:+14158515247"} "415.851.5247"]
                " for an Enterprise quote."]]]
             [:div.row
              [:div.col-xs-12.text-center


Invite modal: Include invitee name in invite payload

--- src-cljs/frontend/components/pages/team.cljs
+++ src-cljs/frontend/components/pages/team.cljs
@@ -75,7 +75,7 @@
             (when selected?
               (-> vcs-user
                   (assoc :email (:entered-email component-user))
-                  (select-keys [:id :login :email])))))
+                  (select-keys [:id :login :email :name])))))
         vcs-users-by-handle))

 (defn invite-teammates-modal [{:keys [selected-org close-fn show-modal?]} owner]


sketched exec-noop instruction

sketched exec-noop instruction

--- design_spikes/instruction_spike.clj
+++ design_spikes/instruction_spike.clj
@@ -66,3 +66,11 @@
     (record-nth-as float1 :float (mod int1 (count-of :float)))
     (send-to :float float1)]
     )
+
+
+(def-pushinstruction
+  exec-noop
+  :doc "Does nothing."
+  :tags [:core]
+  ;; everything else is default behavior
+  )


Shell out to git rm in checkout-orphaned-branch.

clj-jgit's git-rm does not do what I wanted it to.

--- src/incise/deploy/workflows/git_branch.clj
+++ src/incise/deploy/workflows/git_branch.clj
@@ -39,7 +39,7 @@
 (defn checkout-orphaned-branch [branch]
   (let [{:keys [exit err]} (sh "git" "checkout" "--orphan" branch)]
     (if (= 0 exit)
-      (git-rm *repo* ".")
+      (sh "git" "rm" "-rf" "*")
       (throw (RuntimeException. err)))))

 (defn setup-branch


Fix sample pipeline arg passing

Fix sample pipeline arg passing

--- example/clj/todopipeline/steps.clj
+++ example/clj/todopipeline/steps.clj
@@ -19,10 +19,15 @@
 (defn build-label [ctx]
   (str (time-format/unparse (time-format/formatters :date) (time/now)) "." (:build-number ctx)))

+(defn- pass-on-previous [args]
+  ; previous steps need what came back from the initial trigger so we just pass this stuff on to the next step...
+  ; Could also use :global instead
+  args)
+
 ; Let's try out some custom metadata:
 (defn set-build-name [args ctx]
   (metadata/assoc-build-metadata! ctx :human-readable-build-label (build-label ctx))
-  {:status :success})
+  (pass-on-previous args))

 ;; This step does nothing more than to delegate to a library-function.
 ;; It's a function that just waits until something changes in the repo.


CMR-1852-2: Removed leftover merge conflict tag

--- umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/echo10.clj
+++ umm-spec-lib/src/cmr/umm_spec/xml_to_umm_mappings/echo10.clj
@@ -103,8 +103,6 @@
                             :EntryId (str (value-of ca "ShortName") "_" (value-of ca "VersionId"))
                             :Version (value-of ca "VersionId")
                             })})
->>>>>>> CMR-1852: Very partial implementation for handoff to James.
-
 (defn echo10-xml-to-umm-c
   "Returns UMM-C collection record from ECHO10 collection XML document."
   [metadata]


spreadsheet example: reactive updates

spreadsheet example: reactive updates

--- examples/examples/spreadsheet.cljs
+++ examples/examples/spreadsheet.cljs
@@ -57,22 +57,38 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Behavior

-(defn- display-edited [state]
-  [[:display (:edit state)] :value
-   (gstring/format "%.2f" (cell-value (:focus state) state))])
+(defn- format-value [v]
+  (if (number? v) (gstring/format "%.2f" v) v))
+
+(defn- calculate [xy state]
+  [[:display xy] :value (format-value (cell-value xy state))])
+
+(defn- update-dependencies [xy state]
+  (map #(calculate % state)
+    (get-in state [:dependencies xy])))

 (defn- blur [state]
   (case (:mode state)
     :formula [[] state]
-    [[(display-mode (:edit state))
-      (display-edited state)]
+    [(into [(display-mode (:edit state))
+            (calculate (:focus state) state)]
+           (update-dependencies (:focus state) state))
      (dissoc state :source)]))
+
+(defn- edit [xy v state]
+  (if (formula? v)
+    [[(formula-mode xy)] (assoc state :mode :formula xy {:formula v})]
+    [[] (assoc state :mode :value xy {:value v})]))

 (defn- enter [state]
   [[(display-mode (:edit state))
     (display-mode (:source state))
-    (display-edited state)]
+    (calculate (:focus state) state)]
    (dissoc state :mode :edit :source)])
+
+(defn- add-dependency [xy]
+  (fn [deps]
+    (if (set? deps) (conj deps xy) #{xy})))

 (defn- click [xy state]
   (case (:mode state)
@@ -81,17 +97,13 @@
       [[(source-mode xy)
         (display-mode (:source state))
         [[:edit (:focus state)] :value formula]]
-       (assoc state :source xy (:focus state) {:formula formula})])
+       (-> (assoc state :source xy (:focus state) {:formula formula})
+           (update-in [:dependencies xy] (add-dependency (:edit state))))])
     [[(edit-mode xy)
       (display-mode (:edit state))]
      (assoc state :edit xy)]))

-(defn- edit [xy v state]
-  (if (formula? v)
-    [[(formula-mode xy)] (assoc state :mode :formula xy {:formula v})]
-    [[] (assoc state :mode :value xy {:value v})]))
-
-(defn- keydown-on-display [k state]
+(defn- keydown [k state]
   (case (:mode state)
     :formula
     (if (= k 13)
@@ -109,7 +121,7 @@
     [[:edit xy]    :value    v]     (edit xy v state)
     [[:edit _]     :key-down 13]    (enter state)
     [[:display xy] :click    _]     (click xy state)
-    [[:display _]  :key-down k]     (keydown-on-display k state)
+    [[:display _]  :key-down k]     (keydown k state)
     :else [[] state]))

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


map repository/image config from digest

map repository/image config from digest

#58

--- src/clj/swarmpit/registry/mapper/inbound.clj
+++ src/clj/swarmpit/registry/mapper/inbound.clj
@@ -1,7 +1,17 @@
-(ns swarmpit.registry.mapper.inbound)
+(ns swarmpit.registry.mapper.inbound
+  (:require [cheshire.core :refer [parse-string]]
+            [clojure.string :as str]))

 (defn ->repositories
   [repositories]
   (->> repositories
        (map (fn [repo] (into {:id   (hash repo)
-                              :name repo})))))+                              :name repo})))))
+
+(defn ->repository-config
+  [manifest]
+  (-> manifest
+      (get "history")
+      (first)
+      (get "v1Compatibility")
+      (parse-string true)))


Show the buttons disabled if we don't have the artifacts

so the user knows there is some problem

--- src/cljs/mdr2/productions/in_production.cljs
+++ src/cljs/mdr2/productions/in_production.cljs
@@ -250,26 +250,27 @@
      ;; with productions that are repaired
      (when (and (seq (set/intersection #{:it :admin} roles))
                 (#{"structured"} state)
-                (or (:library_number production) (> (:revision production) 0))
-                has-manifest?)
+                (or (:library_number production) (> (:revision production) 0)))
        (if @(rf/subscribe [::notifications/button-loading? uuid :recorded])
          [:button.button.is-loading]
          (tooltip-button
           {:on-click (fn [e] (rf/dispatch [::recorded-production uuid]))
            :tooltip :mark-recorded
+           :disabled (not has-manifest?)
            :icon "task"})))
      ;; show the "Split" button if the next state is "split" and the user is
      ;; authorized
      (when (and (seq (set/intersection #{:it :admin} roles))
-                (#{"pending-split"} state)
-                has-manual-split?)
+                (#{"pending-split"} state))
          (if @(rf/subscribe [::notifications/button-loading? uuid :split])
            [:button.button.is-loading]
            (tooltip-button
-            {:href (str "#/productions/" id "/split")
-             :on-click (fn [e] (rf/dispatch [::production/set-current production]))
-             :tooltip :mark-split
-             :icon "call_split"})))
+            (cond-> {:on-click (fn [e] (rf/dispatch [::production/set-current production]))
+                     :disabled (not has-manual-split?)
+                     :tooltip :mark-split
+                     :icon "call_split"}
+              ;; only add a link (enable the button) if there is a manual split
+              has-manual-split? (assoc :href (str "#/productions/" id "/split"))))))
      (when (seq (set/intersection #{:it} roles))
        (if @(rf/subscribe [::notifications/button-loading? uuid :delete])
          [:button.button.is-danger.is-loading]


update terms and privacy notice

update terms and privacy notice

--- src/cljs/salava/extra/passport/ui/block.cljs
+++ src/cljs/salava/extra/passport/ui/block.cljs
@@ -6,7 +6,7 @@
   [:footer.footer
    [:div.footer-container
     [:p.text-muted
-     "Copyright © 2015-2017 Discendum Oy | "
+     "Copyright © 2015-2019 Discendum Oy | "
      [:a {:class "bottom-link" :href "/terms" }
       "Terms of Use"]
      " | "
@@ -23,6 +23,8 @@
   [:div {:style {:padding "30px"}}
    [:div
     [:h1 {:style {:text-align "center"}} (clojure.string/upper-case "Conditions d’utilisation")]]
+   [:div
+    [:p "Mis à jour le 29.1.2019 "]]
    [:div
     [:h2 "Informations générales sur l’utilisation du service Open Badge Passport"]
     [:p  "Le service Open Badge Passport (ci-après dénommé ” le service ”) est
@@ -72,28 +74,30 @@
     [:div {:style {:padding "15px"}}
      [:h1 {:style {:text-align "center"}} "Déclaration de protection des données"]
      [:div
+      [:p "Mis à jour le 29.1.2019 "]
+      [:p " "]
       [:ol {:style {:list-style-type "none"}}
        [:li [:h3 "Responsable du traitement"]
         [:div
-         [:p "Discendum Oy" ]
+         [:p "Open Badge Factory Oy" ]
          [:p ""]
          [:p "Kiviharjunlenkki 1 E, 90220 Oulu"]
-         [:p "Numéro de téléphone: 020 718 1850 "]
-         [:p [:a {:href "mailto:info@discendum.com"} "info@discendum.com"]]
-         [:p "(ci-après dénommé ” nous ” ou ” Discendum ”)"]]
+         [:p "FINLAND"]
+         [:p [:a {:href "mailto:contact@openbadgefactory.com"} "contact@openbadgefactory.com"]]
+         [:p "(ci-après dénommé ” nous ” ou ” Open Badge Factory ”)"]]
         ]
        [:li [:h3 "Interlocuteur pour les questions liées au registre "]
         [:div
-         [:p "Esko Pulkkinen" ]
+         [:p "Eric Rouselle" ]
          [:p "Kiviharjunlenkki 1 E, 90220 Oulu"]
-         [:p "Numéro de téléphone: 020 718 1850"]
+         [:p "Phone number: +358 400 587 373"]
          [:p [:a {:href "mailto:dataprotection@openbadgefactory.com"} "dataprotection@openbadgefactory.com"]]]]
        [:li  [:h3 "Nom du registre"]
         [:div
          [:p "REGISTRE DES CLIENTS ET DE PROSPECTION DU SERVICE OPEN BADGE PASSPORT" ]]]
        [:li [:h3 "Quelles sont la base juridique et la finalité du traitement des données à caractère personnel?"]
         [:div
-         [:p "La base du traitement de données à caractère personnel est l’intérêt légitime de Discendum reposant sur une relation avec le client ou la mise en œuvre d’un contrat avec la personne concernée, ainsi que l’obtention d’un consentement à la prospection." ]
+         [:p "La base du traitement de données à caractère personnel est l’intérêt légitime de Open Badge Factory reposant sur une relation avec le client ou la mise en œuvre d’un contrat avec la personne concernée, ainsi que l’obtention d’un consentement à la prospection." ]
          [:p "La base du traitement de données à caractère personnel est la suivante : "]
          [:ul
           [:li "fournir et développer notre service Open Badge Passport (ci-après dénommé le ” service ”),"]
@@ -162,9 +166,11 @@
    [:div
     [:h1 {:style {:text-align "center"}} "TERMS OF USE"]]
    [:div
+    [:p "Updated 29.1.2019 "]]
+   [:div
     [:h2 "General information about the use of Open Badge Passport service"]
     [:p  "The Open Badge Passport service (later referred to as Service) is
-     offered by Discendum Oy (later referred to as Service Provider). The Service delivered by the Service Provider consist of a cloud based platform,
+     offered by Open Badge Factory Oy (later referred to as Service Provider). The Service delivered by the Service Provider consist of a cloud based platform,
      where Open Badges earners can receive, share, manage and publish their badges.  The terms of Use apply to the users
      of the Service (later referred to as User(s)). User refers to 2 user levels: 1) Users, who use the service for personal
      purposes 2) customer organization, which has it’s own environment in the Service."]
@@ -219,21 +225,23 @@
     [:div {:style {:padding "15px"}}
      [:h1 {:style {:text-align "center"}} " Privacy Notice"]
      [:div
+      [:p "Updated 29.01.2019"]
+      [:p ""]
       [:ol {:style {:list-style-type "none"}}
        [:li [:h3 "Controller"]
         [:div
-         [:p "Discendum Oy" ]
+         [:p "Open Badge Factory Oy" ]
          [:p ""]
          [:p "Kiviharjunlenkki 1 E, 90220 Oulu"]
-         [:p "Phone number: 020 718 1850 "]
-         [:p [:a {:href "mailto:info@discendum.com"} "info@discendum.com"]]
-         [:p "(hereafter ”we” or  ”Discendum”)"]]
+         [:p "FINLAND"]
+         [:p [:a {:href "mailto:contact@openbadgefactory.com"} "contact@openbadgefactory.com"]]
+         [:p "(hereafter ”we” or  ”Open Badge Factory”)"]]
         ]
        [:li [:h3 "Contact person for register matters "]
         [:div
-         [:p "Esko Pulkkinen" ]
+         [:p "Eric Rouselle" ]
          [:p "Kiviharjunlenkki 1 E, 90220 Oulu"]
-         [:p "Phone number: 020 718 1850"]
+         [:p "Phone number: +358 400 587 373"]
          [:p [:a {:href "mailto:dataprotection@openbadgefactory.com"} "dataprotection@openbadgefactory.com"]]]]

        [:li  [:h3 "Name of register"]
@@ -241,11 +249,11 @@
          [:p "CUSTOMER AND MARKETING REGISTER FOR OPEN BADGE PASSPORT SERVICE" ]]]
        [:li [:h3 "What is the legal basis for and purpose of the processing of personal data?"]
         [:div
-         [:p "The basis of processing personal data is Discendum’s justified interest on the basis of a customer
+         [:p "The basis of processing personal data is Open Badge Factory's justified interest on the basis of a customer
           relationship or implementing a contract with the data subject, as well as consent as regards direct marketing." ]
          [:p "The basis of processing personal data is: "]
          [:ul
-          [:li "the delivery and development of our Open Badge Passeport Service (“Service”),"]
+          [:li "the delivery and development of our Open Badge Passport Service (“Service”),"]
           [:li "fulfilling our contractual and other promises and obligations, "]
           [:li "taking care of the customer relationship, "]
           [:li "analyzing and profiling behaviour of the data subject, "]


fixed freshly created service logging & autoscroll retoggling

--- src/cljs/swarmpit/component/service/log.cljs
+++ src/cljs/swarmpit/component/service/log.cljs
@@ -65,7 +65,7 @@
   (ajax/get
     (routes/path-for-backend :service-logs {:id service-id})
     {:state      [:fetching]
-     :params     {:from from-timestamp}
+     :params     (if from-timestamp {:from from-timestamp})
      :on-success (fn [{:keys [response]}]
                    (state/set-value (-> (state/get-value state/form-value-cursor)
                                         (concat (filter-logs task-id response))) state/form-value-cursor))}))
@@ -123,7 +123,9 @@
             {:variant "fab"
              :color   (if autoscroll "primary")
              :mini    true
-             :onClick #(state/update-value [:autoscroll] (not autoscroll) state/form-state-cursor)}
+             :onClick (fn []
+                        (reset! last-scroll 0)
+                        (state/update-value [:autoscroll] (not autoscroll) state/form-state-cursor))}
             icon/scroll-down)]
          [:div#autoscroll.Swarmpit-log
           (cond


Add hook to check connectivity whenever the hosts have changed

--- src/discuss/parser.cljs
+++ src/discuss/parser.cljs
@@ -81,7 +81,19 @@

 (s/def ::reconciler #(instance? om/Reconciler %))

+(defn- change-hooks [tx-data changes]
+  (let [touched-symbols (->> changes
+                             :tx
+                             (map first)
+                             (map keyword)
+                             (into #{}))]
+    (cond
+      (or
+       (contains? touched-symbols :host/dbas)
+       (contains? touched-symbols :host/eden)) ((resolve 'discuss.communication.connectivity/check-connectivity-of-hosts)))))
+
 (defonce reconciler
   (om/reconciler
    {:state  init-data
-    :parser (om/parser {:read read :mutate mutate})}))
+    :parser (om/parser {:read read :mutate mutate})
+    :tx-listen change-hooks}))


Allow directions key when not speedy

Allow directions key when not speedy


Refactor require definitions.

Refactor require definitions.

--- src/dsbdp/local_data_processing_pipeline.clj
+++ src/dsbdp/local_data_processing_pipeline.clj
@@ -10,9 +10,10 @@
   ^{:author "Ruediger Gad",
     :doc "Pipeline for processing data"}
   dsbdp.local-data-processing-pipeline
-  (:require [dsbdp.data-processing-dsl :refer :all])
-  (:require [clj-assorted-utils.util :refer :all])
-  (:require [clojure.core.async :as async])
+  (:require
+    [dsbdp.data-processing-dsl :refer :all]
+    [clj-assorted-utils.util :refer :all]
+    [clojure.core.async :as async])
   (:import
     (dsbdp Counter LocalTransferContainer ProcessingLoop)
     (java.util Queue)


execute middleware: hushed code update exe counter

--- src/clojupyter/kernel/middleware/execute.clj
+++ src/clojupyter/kernel/middleware/execute.clj
@@ -32,7 +32,7 @@
   (handler-when (parent-msgtype-pred jup/EXECUTE-REQUEST)
     (fn [{:keys [transport parent-message] :as ctx}]
       (let [code			(jup/message-code parent-message)
-            silent?			(or (jup/message-silent parent-message) (code-empty? code) (code-hushed? code))
+            silent?			(or (jup/message-silent parent-message) (code-empty? code))
             store-history?		(if silent? false (jup/message-store-history? parent-message))
             {:keys [err result]}	(submit-eval-request ctx)
             content 			(-> err
@@ -46,7 +46,7 @@
           err
           ,, (when-not silent?
                (tp/send-iopub transport jup/ERROR content))
-          (not silent?)
+          (and (not silent?) (not (code-hushed? code)))
           ,, (tp/send-iopub transport jup/EXECUTE-RESULT
                {:execution_count (state/execute-count)
                 :code code


CMR-548: Updated first connect to elasticsearch to report explicit error when failed.

--- src/cmr/search/data/elastic_search_index.clj
+++ src/cmr/search/data/elastic_search_index.clj
@@ -1,13 +1,13 @@
 (ns cmr.search.data.elastic-search-index
   "Implements the search index protocols for searching against Elasticsearch."
-  (:require [clojurewerkz.elastisch.rest :as esr]
-            [clojurewerkz.elastisch.rest.document :as esd]
+  (:require [clojurewerkz.elastisch.rest.document :as esd]
             [clojurewerkz.elastisch.query :as q]
             [clojurewerkz.elastisch.rest.response :as esrsp]
             [clojure.string :as s]
             [cmr.common.log :refer (debug info warn error)]
             [cmr.common.lifecycle :as lifecycle]
             [cmr.common.cache :as cache]
+            [cmr.transmit.elasticsearch :as es]
             [cmr.transmit.index-set :as index-set]
             [cmr.search.models.results :as results]
             [cmr.search.data.query-to-elastic :as q2e]
@@ -82,8 +82,7 @@

   (start
     [this system]
-    (let [{{:keys [host port]} :config} this]
-      (assoc this :conn (esr/connect (str "http://" host ":" port)))))
+    (assoc this :conn (es/try-connect (:config this))))

   (stop [this system]
         this))


Put some whitespace into run.

Put some whitespace into run.

--- src/overtunes/songs/canone_alla_quarta.clj
+++ src/overtunes/songs/canone_alla_quarta.clj
@@ -22,9 +22,14 @@

 (defn bpm [per-minute] #(-> % (/ per-minute) (* 60) (* 1000)))
 (defn run [[a & bs]]
-  (let [up-or-down #(if (<= %1 %2) (range %1 %2) (reverse (range (inc %2) (inc %1))))]
+  (let [up-or-down
+          #(if (<= %1 %2)
+            (range %1 %2)
+            (reverse (range (inc %2) (inc %1))))]
     (if bs
-      (concat (up-or-down a (first bs)) (run bs))
+      (concat
+        (up-or-down a (first bs))
+        (run bs))
       [a])))

 (def melody


redirect front page to games list

redirect front page to games list

--- src/greybear/server.clj
+++ src/greybear/server.clj
@@ -24,7 +24,7 @@
        (friend/authenticated "Thanks for authenticating!"))
   ;; (GET "/role-user" request
   ;;      (friend/authorize #{::users/user} "You're a user"))
-  (GET "/" request (html5 request))
+  (GET "/" request (resp/redirect "/games"))
   (route/resources "/")
   (route/not-found "Page not found"))


handle empty path base case

handle empty path base case

--- src/strictly_specking/annotated_pprint.clj
+++ src/strictly_specking/annotated_pprint.clj
@@ -251,7 +251,9 @@
                                  (vary-meta % merge annotation)))))

 (defn annotate-path [data path annotation]
-  (update-in data path #(vary-meta % merge annotation)))
+  (if (empty? path)
+    (vary-meta data merge annotation)
+    (update-in data path #(vary-meta % merge annotation))))

 (defn annotate-paths [data path-to-annotation-map]
   (reduce #(annotate-path %1 (first %2) (second %2))


Rewrite in negated form.

Rewrite in negated form.

--- src/onyx/log/commands/volunteer_for_task.clj
+++ src/onyx/log/commands/volunteer_for_task.clj
@@ -62,17 +62,20 @@
        (common/alive-jobs replica)
        (common/jobs-with-available-tasks replica)))

-(defn allowed-to-be-acker? [replica job task args]
+(defn exempt-from-acker? [replica job task args]
   (or (some #{task} (:acker-exempt-tasks replica))
-      (some #{task} (get-in replica [:input-tasks job]))
-      (some #{task} (get-in replica [:output-tasks job]))))
+      (when (:acker-exclude-input-tasks replica)
+        (some #{task} (get-in replica [:input-tasks job])))
+      (when (:acker-exclude-output-tasks replica)
+        (some #{task} (get-in replica [:output-tasks job]))
+        true)))

 (defn offer-acker [replica job task args]
   (let [peers (count (apply concat (vals (get-in replica [:allocations job]))))
         ackers (count (get-in replica [:ackers job]))
         pct (get-in replica [:acker-percentage job])
         current-pct (int (Math/ceil (* 10 (double (/ ackers peers)))))]
-    (if (and (< current-pct pct) (allowed-to-be-acker? replica job task args))
+    (if (and (< current-pct pct) (exempt-from-acker? replica job task args))
       (-> replica
           (update-in [:ackers job] conj (:id args))
           (update-in [:ackers job] vec))


fix seq in cljs

fix seq in cljs

--- src/datascript/db.cljc
+++ src/datascript/db.cljc
@@ -529,7 +529,7 @@
   #?@(:cljs
       [IHash                (-hash  [db]        (hash-fdb db))
        IEquiv               (-equiv [db other]  (equiv-db db other))
-       ISeqable             (-seq   [db]        (-datoms db :eavt []))
+       ISeqable             (-seq   [db]        (seq (-datoms db :eavt [])))
        ICounted             (-count [db]        (count (-datoms db :eavt [])))
        IPrintWithWriter     (-pr-writer [db w opts] (pr-db db w opts))


Wrap font-awesome icons

Wrap font-awesome icons

--- src/discuss/views.cljs
+++ src/discuss/views.cljs
@@ -11,15 +11,21 @@
             [discuss.auth :as auth]))

 ;; Auxiliary functions
+(defn fa-icon
+  "Wrapper for font-awesome icons."
+  ([class]
+   (dom/i #js {:className (str "fa " class)}))
+  ([class f]
+   (dom/i #js {:className (str "pointer fa " class)
+               :onClick   f})))
+
 (defn logo
   "If no function is provided, show logo as is. Else bind function to onClick-event and add
    pointer-class."
   ([]
-   (logo nil))
+   (fa-icon "fa-comments"))
   ([f]
-   (let [icon "fa fa-comments"]
-     (dom/i #js {:className (if f (str "pointer " icon) icon)
-                 :onClick   f}))))
+   (fa-icon "fa-comments" f)))

 (defn safe-html
   "Creates DOM element with interpreted HTML."
@@ -57,13 +63,11 @@
 (defn control-elements []
   (dom/div #js {:className "text-center"}
            (dom/h4 nil
-                   (dom/i #js {:className (str (lib/prefix-name "control-buttons") " fa fa-angle-double-left fa-border pointer")
-                               :onClick   com/init!})
+                   (fa-icon (str (lib/prefix-name "control-buttons") " fa-angle-double-left fa-border") com/init!)
                    " "
-                   (dom/i #js {:className (str (lib/prefix-name "control-buttons") " fa fa-angle-left fa-border pointer")
-                               :onClick   history/back!})
+                   (fa-icon (str (lib/prefix-name "control-buttons") " fa-angle-left fa-border") history/back!)
                    " "
-                   (dom/i #js {:className (str (lib/prefix-name "control-buttons") " fa fa-angle-right fa-border pointer")}))))
+                   (fa-icon (str (lib/prefix-name "control-buttons") " fa fa-angle-right fa-border pointer")))))

 (defn login-view-buttons [data]
   (dom/div #js {:className "text-muted"}
@@ -95,14 +99,14 @@
                (dom/h5 #js {:className "text-center"} "Login")
                (dom/div #js {:className "input-group"}
                         (dom/span #js {:className "input-group-addon"}
-                                  (dom/i #js {:className "fa fa-user fa-fw"}))
+                                  (fa-icon "fa-user fa-fw"))
                         (dom/input #js {:className   "form-control"
                                         :onChange    #(commit-target-value :nickname % owner)
                                         :value       nickname
                                         :placeholder "nickname"}))
                (dom/div #js {:className "input-group"}
                         (dom/span #js {:className "input-group-addon"}
-                                  (dom/i #js {:className "fa fa-key fa-fw"}))
+                                  (fa-icon "fa-key fa-fw"))
                         (dom/input #js {:className   "form-control"
                                         :onChange    #(commit-target-value :password % owner)
                                         :value       password
@@ -183,18 +187,18 @@
                         (error-view)
                         (dom/div #js {:className "input-group"}
                                  (dom/span #js {:className "input-group-addon"}
-                                           (dom/i #js {:className "fa fa-comment"}))
+                                           (fa-icon "fa-comment"))
                                  (dom/input #js {:className "form-control"
                                                  :onChange  #(commit-target-value :statement % owner)
                                                  :value     statement}))
                         (when (lib/get-selection)
                           (dom/div #js {:className "input-group"}
                                    (dom/span #js {:className "input-group-addon"}
-                                             (dom/i #js {:className "fa fa-quote-left"}))
+                                             (fa-icon "fa-quote-left"))
                                    (dom/input #js {:className "form-control"
                                                    :value     (lib/get-selection)})
                                    (dom/span #js {:className "input-group-addon"}
-                                             (dom/i #js {:className "fa fa-quote-right"}))))
+                                             (fa-icon "fa-quote-right"))))
                         (dom/button #js {:className "btn btn-default"
                                          :onClick   #(com/dispatch-add-action statement (lib/get-selection))}
                                     "Submit"))))))
@@ -255,4 +259,6 @@
   (reify om/IRender
     (render [_]
       (dom/div nil
-               "Awesome tooltip"))))+               (logo)
+               " "
+               "Save as reference"))))


Extract add-shutdown-hook!

Extract add-shutdown-hook!

--- src/desdemona/launcher/launch_prod_peers.clj
+++ src/desdemona/launcher/launch_prod_peers.clj
@@ -22,6 +22,10 @@
   []
   (aero/read-config (io/resource "config.edn") {:profile :default}))

+(defn ^:private add-shutdown-hook!
+  [f]
+  (.addShutdownHook (Runtime/getRuntime) (Thread. f)))
+
 (defn -main [n & args]
   (let [n-peers (Integer/parseInt n)
         {:keys [peer-config env-config]} (read-config!)
@@ -38,13 +42,11 @@
         env (onyx.api/start-env env-config)
         peers (onyx.api/start-peers n-peers peer-group)]
     (println "Attempting to connect to Zookeeper: " (:zookeeper/address peer-config))
-    (.addShutdownHook (Runtime/getRuntime)
-                      (Thread.
-                       (fn []
-                         (doseq [v-peer peers]
-                           (onyx.api/shutdown-peer v-peer))
-                         (onyx.api/shutdown-peer-group peer-group)
-                         (shutdown-agents))))
+    (add-shutdown-hook! (fn []
+                          (doseq [v-peer peers]
+                            (onyx.api/shutdown-peer v-peer))
+                          (onyx.api/shutdown-peer-group peer-group)
+                          (shutdown-agents)))
     (println "Started peers. Blocking forever.")
     ;; Block forever.
     (<!! (chan))))


Simple route re-ordering

Simple route re-ordering

--- src/kixi/hecuba/web.clj
+++ src/kixi/hecuba/web.clj
@@ -61,9 +61,9 @@
     (kixi.hecuba.web.messages/create-routes querier commander)

     ;; Projects
-    [["project/" :hecuba/id] (:project handlers)]
     ["projects/" (:projects handlers)]
     ["projects" (->Redirect 307 (:projects handlers))]
+    [["project/" :hecuba/id] (:project handlers)]

     ;; Properties, with an 'X' suffix to avoid conflicting with Anna's
     ;; work until we integrate this.


another todo

another todo

--- src/loudmoauth/core.clj
+++ src/loudmoauth/core.clj
@@ -9,6 +9,7 @@
 ;TODO - Deal with errors and exceptions
 ;TODO - Deal with missing :redirect-uri key, if that is possible?
 ;TODO - Make the oauth-params map accept keys on this format :client-id instead of :client_id.
+;TODO - Go over doc strings one more time.

 (def code-chan (a/chan))


Temporarily removing application-config...

to avoid upsetting deployments that don't know how to interpret the new action.

--- src/maestro/actions.clj
+++ src/maestro/actions.clj
@@ -16,7 +16,6 @@
    :maestro.messages.data/ensure-tyrant-hash
    :maestro.messages.data/verify-tyrant-hash
    :maestro.messages.data/get-tyrant-application-properties
-   :maestro.messages.data/get-tyrant-application-config
    :maestro.messages.data/get-tyrant-deployment-params
    :maestro.messages.data/validate-deployment-params
    :maestro.messages.data/get-tyrant-launch-data


Added bassed and a couple of examples.

Added bassed and a couple of examples.

--- src/overtunes/pitch.clj
+++ src/overtunes/pitch.clj
@@ -86,6 +86,7 @@
 (defn add [key] #(assoc % key (key major-scale)))
 (defn omit [key] #(dissoc % key))
 (defn bass [key] (comp (lowered :bass) #(assoc % :bass (key major-scale))))
+(def bassed (bass :i))

 ; Qualities
 (def major (select-keys major-scale [:i :iii :v]))
@@ -97,3 +98,6 @@
 ; Let's play!
 (def note# sampled-piano)
 (def chord# #(map note# %))
+
+; (chord# (C 5 minor ninth bassed (omit :iii)))
+; (chord# (G 5 major seventh second-inversion bassed (omit :v)))


Documented keys-except and got rid of explicit reference to clojure.set/difference.

--- src/overtunes/pitch.clj
+++ src/overtunes/pitch.clj
@@ -1,5 +1,6 @@
 (ns overtunes.pitch
   (:use
+    [clojure.set :only [difference]]
     [overtone.live :exclude [scale octave sharp flat sixth]]
     [overtone.inst.sampled-piano :only [sampled-piano]]))

@@ -23,8 +24,9 @@
                    f)
                  m))

-
-(defn keys-except [m ks] (clojure.set/difference (set (keys m)) ks))
+(defn keys-except
+  "Gets the keys from m, excluding any that are present in ks."
+  [m ks] (difference (set (keys m)) ks))

 ; Basic intervals
 (def semitone 1)


fix macro reference that referred to incorrect file

--- src/datascript/core.cljc
+++ src/datascript/core.cljc
@@ -1,11 +1,11 @@
 (ns datascript.core
   #?(:cljs (:refer-clojure :exclude [array? seqable?]))
+  #?(:cljs (:require-macros [datascript :refer [case-tree combine-cmp raise]]))
   (:require
    #?@(:cljs [[cljs.core :as c]
               [goog.array :as garray]]
        :clj  [[clojure.core :as c]])
-   [datascript.btset :as btset]
-   [datascript.macro #?(:cljs :refer-macros :clj :refer) [case-tree combine-cmp raise]]))
+   [datascript.btset :as btset]))

 (def array?
   #?(:cljs c/array?


Drop a redundant return

Drop a redundant return

--- src/player/ha_eval.cljs
+++ src/player/ha_eval.cljs
@@ -7,17 +7,6 @@
 (def time-units-per-frame 10000)
 (def time-unit (/ frame-length time-units-per-frame))
 (def precision 0.1)
-
-(defn transition-intervals [ha-defs ha-vals ha before-t transitions]
-  (let [valid-interval (iv/interval -Infinity before-t)]
-    (ha/sort-transitions
-      (filter #(not (iv/empty-interval? (:interval %)))
-              (map #(let [transition-data (ha/transition-interval ha-defs ha-vals ha % time-unit)]
-                     (update transition-data
-                             :interval
-                             (fn [i]
-                               (iv/intersection i valid-interval))))
-                   transitions)))))

 (defn recalculate-edge [ha-defs ha-vals ha tr-cache index t]
   (let [valid-interval (iv/interval t Infinity)
@@ -88,19 +77,18 @@
         ; No need to worry about ordering effects here, recalculating edges will not change any behaviors
         ; or entry times so there's no problem with doing it in any order.
         ;_ (println "memo hit 1" ha/memo-hit ha/guard-check)
-        [ha-vals tr-caches] (with-guard-memo
-                              (reduce (fn [[ha-vals tr-caches] [id _sid idx _deps]]
+        tr-caches (with-guard-memo
+                              (reduce (fn [tr-caches [id _sid idx _deps]]
                                         (let [ha (get ha-vals id)
                                               tr-cache (get tr-caches id)
                                               tr-cache (recalculate-edge ha-defs ha-vals ha tr-cache idx t)]
                                           #_(println "T recalc" id idx)
-                                          [(assoc ha-vals id ha)
-                                           (assoc tr-caches id tr-cache)]))
-                                      [ha-vals tr-caches]
+                                          (assoc tr-caches id tr-cache)))
+                                      tr-caches
                                       dependencies))
         ;_ (println "memo hit 2" ha/memo-hit ha/guard-check)
         ]
-    [ha-vals tr-caches]))
+    tr-caches))

 (defn follow-transitions [ha-defs ha-vals tr-caches transitions]
   (let [t (iv/start (:interval (first transitions)))
@@ -113,7 +101,7 @@
                                 (follow-single-transition ha-defs ha-vals tr-caches transition))
                               [ha-vals tr-caches]
                               transitions)]
-    (recalculate-dirtied-edges ha-defs ha-vals tr-caches transitions t)))
+    [ha-vals (recalculate-dirtied-edges ha-defs ha-vals tr-caches transitions t)]))

 (defn init-has [ha-defs ha-val-seq]
   (let [obj-ids (map :id ha-val-seq)


Fix incorrect parameter args

Fix incorrect parameter args

--- src/re_com/buttons.cljs
+++ src/re_com/buttons.cljs
@@ -12,7 +12,7 @@

 (def button-args-desc
   [{:name :label            :required true                           :type "string"     :description "Label for the button (can be artitrary markup)."}
-   {:name :on-click         :required false                          :type "keyword"    :description "Callback when the button is clicked."}
+   {:name :on-click         :required false                          :type "() -> nil"  :description "a callback function to be invoked when button is clicked."}
    {:name :tooltip          :required false                          :type "string"     :description "show a popover-tooltip using this text."}
    {:name :tooltip-position :required false :default :below-center   :type "keyword"    :description "position of the popover-tooltip. e.g. :right-below."}
    {:name :disabled?        :required false :default false           :type "boolean"    :description "Set to true to disable the button."}
@@ -67,7 +67,7 @@

 (def md-circle-icon-button-args-desc
   [{:name :md-icon-name     :required true   :default "md-add"       :type "string"     :description "the name of the icon. See http://zavoloklom.github.io/material-design-iconic-font/icons.html"}
-   {:name :on-click         :required false                          :type "() -> nil"  :description "the fucntion to call when the button is clicked."}
+   {:name :on-click         :required false                          :type "() -> nil"  :description "a callback function to be invoked when button is clicked."}
    {:name :size             :required false  :default "nil"          :type "keyword"    :description "set size of button (nil = regular, or :smaller or :larger."}
    {:name :tooltip          :required false                          :type "string"     :description "show a popover-tooltip using this text."}
    {:name :tooltip-position :required false :default ":below-center" :type "keyword"    :description "position of the popover-tooltip. e.g. :right-below."}


Add spinner back into basic.clj

Add spinner back into basic.clj

--- src/re_demo/basics.cljs
+++ src/re_demo/basics.cljs
@@ -41,7 +41,14 @@
                              :align :center   ;; Cnote: centered text wrt the button
                              :child  [label
                                       :label (nth click-outcomes (:outcome-index @state))
-                                      :style {:margin-left "15px"}]]]]]]))
+                                      :style {:margin-left "15px"}]]]]
+
+                [gap "20px"]
+                [h-box
+                 :children [[button
+                             :label    (if (:see-spinner @state)  "Stop it!" "See Spinner")
+                             :on-click #(swap! state update-in [:see-spinner] not)]
+                            (when (:see-spinner @state)  [spinner])]]]]))

 (defn combo-box-demo


streams/fwd -> streams/forward.

streams/fwd -> streams/forward.

Also, streams/forward sends *events*, not states.

--- src/reimann/streams.clj
+++ src/reimann/streams.clj
@@ -298,11 +298,11 @@
   (fn [event]
     (dosync (ref-set reference event))))

-(defn fwd
-  "Sends a map to a client, coerced to state"
+(defn forward
+  "Sends an event through a client"
   [client]
-  (fn [statelike]
-    (reimann.client/send-state client statelike)))
+  (fn [event]
+    (reimann.client/send-event client event)))

 (defn match
   "Passes events on to children only when (f event) is equal to value. If f is


Fixes #374 - Librato error without metric

Checks if an event being sent to Library has a metric
and errors out if it does not.

--- src/riemann/librato.clj
+++ src/riemann/librato.clj
@@ -3,6 +3,7 @@
   (:require [clojure.string :as string])
   (:use [clj-librato.metrics :only [collate annotate connection-manager
                                     update-annotation]]
+        [clojure.tools.logging :only [error]]
         clojure.math.numeric-tower))

 (defn safe-name
@@ -18,10 +19,12 @@
 (defn event->gauge
   "Converts an event to a gauge."
   [event]
-  {:name          (safe-name (:service event))
-   :source        (safe-name (:host event))
-   :value         (:metric event)
-   :measure-time  (round (:time event))})
+  (if-not (:metric event)
+    (error "Can't send events without metrics")
+    {:name          (safe-name (:service event))
+     :source        (safe-name (:host event))
+     :value         (:metric event)
+     :measure-time  (round (:time event))}))

 (def event->counter event->gauge)


Reformat ambiguous indents

Reformat ambiguous indents

--- src/robip_tool/core.clj
+++ src/robip_tool/core.clj
@@ -30,8 +30,11 @@
   (let [{:keys [options arguments errors summary]} (parse-opts args cli-options)]
     (cond
       (:help options) (exit 0 (usage summary))
+
       (or (not= (mod (count arguments) 2) 0)
-          (= (count arguments) 0)) (exit 1 (usage summary))
+          (= (count arguments) 0))
+      (exit 1 (usage summary))
+
       errors (exit 1 (error-msg errors)))
     (let [esp (esprom/esprom (:port options))]
       (Thread/sleep 0.2)


Cleaned up Clojure test script fpor pgraph morphism problems

--- clojure/org/gavrog/clojure/test.clj
+++ clojure/org/gavrog/clojure/test.clj
@@ -8,12 +8,3 @@

 (def phi
   (org.gavrog.joss.pgraphs.basic.Morphism. (nth nodes 0) (nth nodes 1) I))
-
-
-(def L (first (iterator-seq (org.gavrog.joss.pgraphs.io.Net/iterator
-                              "ladder-1d.cgd"))))
-(def nodes (iterator-seq (.nodes L)))
-(def I (org.gavrog.joss.geometry.Operator/identity 1))
-
-(def phi
-  (org.gavrog.joss.pgraphs.basic.Morphism. (nth nodes 0) (nth nodes 1) I))


1st step to standardise url wrt trailing /.

There is an issue in bidi that needs fixing, so for now we accept URIs
with either a trailing / or not. Eventually without trailing slash URIs
will redirect.

See https://github.com/juxt/bidi/issues/14

--- src/kixi/hecuba/amon.clj
+++ src/kixi/hecuba/amon.clj
@@ -749,23 +749,35 @@
          ["programmes/" (:programmes handlers)]
          ["programmes" (->Redirect 307 (:programmes handlers))]
          [["programmes/" [sha1-regex :programme-id]] (:programme handlers)]
-         [["programmes/" [sha1-regex :programme-id] "/projects"] (:projects handlers)]
+         [["programmes/" [sha1-regex :programme-id] "/projects/"] (:projects handlers)]
+         [["programmes/" [sha1-regex :programme-id] "/projects"] (:projects handlers)] ;;TODO redirect after https://github.com/juxt/bidi/issues/14

          ["projects/" (:allprojects handlers)]
          ["projects" (->Redirect 307 (:allprojects handlers))]
          [["projects/" [sha1-regex :project-id]] (:project handlers)]
-         [["projects/" [sha1-regex :project-id] "/properties"] (:properties handlers)]
+         [["projects/" [sha1-regex :project-id] "/properties/"] (:properties handlers)]
+         [["projects/" [sha1-regex :project-id] "/properties"] (:properties handlers)] ;;TODO redirect after https://github.com/juxt/bidi/issues/14
+

          ["entities/" (:entities handlers)]
          ["entities" (->Redirect 307 (:entities handlers))]
          [["entities/" [sha1-regex :entity-id]] (:entity handlers)]
-         [["entities/" [sha1-regex :entity-id] "/datasets"] (:datasets handlers)]
+         [["entities/" [sha1-regex :entity-id] "/datasets/"] (:datasets handlers)]
+         [["entities/" [sha1-regex :entity-id] "/datasets"] (:datasets handlers)] ;;TODO redirect after https://github.com/juxt/bidi/issues/14
+
          [["entities/" [sha1-regex :entity-id] "/datasets/" :name] (:dataset handlers)]
-         [["entities/" [sha1-regex :entity-id] "/sensors"] (:sensors-by-property handlers)]
-         [["entities/" [sha1-regex :entity-id] "/devices"] (:devices handlers)]
+         [["entities/" [sha1-regex :entity-id] "/sensors/"] (:sensors-by-property handlers)]
+         [["entities/" [sha1-regex :entity-id] "/devices/"] (:devices handlers)]
+         [["entities/" [sha1-regex :entity-id] "/devices"] (:devices handlers)] ;;TODO redirect after https://github.com/juxt/bidi/issues/14
+
+
          [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id]] (:device handlers)]
-         [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/metadata"] (:sensor-metadata handlers)]
-         [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/measurements"] (:measurements handlers)]
+         [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/metadata/"] (:sensor-metadata handlers)]
+         [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/metadata/"] (:sensor-metadata handlers)] ;;TODO redirect after https://github.com/juxt/bidi/issues/14
+
+         [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/measurements/"] (:measurements handlers)]
+         [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/measurements/"] (:measurements handlers)] ;;TODO redirect after https://github.com/juxt/bidi/issues/14
+
          [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/measurements/" :reading-type] (:measurement-slice handlers)]
          [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/measurements/" :reading-type "/" :timestamp] (:measurement handlers)]
          [["entities/" [sha1-regex :entity-id] "/devices/" [sha1-regex :device-id] "/hourly_rollups/" :reading-type] (:hourly-rollups handlers)]


Use beta terms modal and join beta is a card component

--- src-cljs/frontend/components/account.cljs
+++ src-cljs/frontend/components/account.cljs
@@ -236,43 +236,20 @@
     om/IRenderState
     (render-state [_ {:keys [clicked-join?]}]
       (html
-       [:div.card
-        [:div.header [:h2 "Beta Program"]]
-        [:div.body
-         [:div.section
-          [:p
-           "We invite you to join Inner Circle, our new beta program. As a
+       (card/titled {:title "Beta Program"}
+                    [:div
+                     (om/build beta-terms-modal {:close-fn #(om/set-state! owner :clicked-join? false)
+                                                 :show-modal? clicked-join?})
+                     [:p
+                      "We invite you to join Inner Circle, our new beta program. As a
          member of CircleCI’s Inner Circle you get exclusive access to new
          features and settings before they are released publicly!"]
-          [:form
-           (if (not clicked-join?)
-             (button/button
-              {:on-click #(do
-                            (om/set-state! owner :clicked-join? true)
-                            ((om/get-shared owner :track-event) {:event-type :beta-join-clicked}))
-               :primary? true}
-              "Join Beta Program")
-             [:div
-              [:div.card
-               [:h1 "Beta Terms"]
-               [:p
-                "Our beta program is a way to engage with our most
-               thoughtful and dedicated users. We want to build the
-               best features with your help. To that end, in joining
-               the beta program you should be comfortable with these
-               expectations:"]
-               [:ul
-                [:li "You’ll find out about new features through e-mail and in-app messages"]
-                [:li "Please give us feedback about new features when we release them"]
-                [:li "Keep the private beta, private. Please no tweets, blogs, or other public
-                    posting, but we do encourage you to talk with your
-                    coworkers!"]]]
-              [:p]
-              (button/button
-               {:on-click #(do
-                             (set-beta-program-preference! owner true)
-                             ((om/get-shared owner :track-event) {:event-type :beta-accept-terms-clicked}))}
-               "Accept")])]]]]))))
+                     (button/button
+                      {:on-click #(do
+                                    (om/set-state! owner :clicked-join? true)
+                                    ((om/get-shared owner :track-event) {:event-type :beta-join-clicked}))
+                       :primary? true}
+                      "Join Beta Program")])))))

 (defn beta-program-member [app owner]
   (reify


update shortcuts menu with correct slash

--- src-cljs/frontend/components/overlay.cljs
+++ src-cljs/frontend/components/overlay.cljs
@@ -426,7 +426,7 @@
                [:td [:div.shortcuts-key {:title "L Key"} "L"]]
                [:td [:div.shortcuts-result {:title "Switch to Circle Tool."} "Circle"]]]
               [:tr
-               [:td [:div.shortcuts-key {:title "Forward Slash Key"} "/"]]
+               [:td [:div.shortcuts-key {:title "Backslash Key"} "\\"]]
                [:td [:div.shortcuts-result {:title "Switch to Line Tool."} "Line"]]]
               [:tr
                [:td [:div.shortcuts-key {:title "N Key"} "N"]]


Remove self-mentions

Remove self-mentions

Signed-off-by: andrey <b713972e59b8e606e23253c4a13e948139fea4d1@gmail.com>

--- src/status_im/subs.cljs
+++ src/status_im/subs.cljs
@@ -1203,7 +1203,7 @@
                                    {:alias      name
                                     :name       (or preferred-name name)
                                     :public-key public-key})))
-            blocked))))
+            [blocked public-key]))))

 (re-frame/reg-sub
  :chat/mention-suggestions


pass system to do-work, instead of just do-conn

--- src/gangway/worker.clj
+++ src/gangway/worker.clj
@@ -23,9 +23,10 @@
   (let [wf (get-worker-fn message)]
     ((get-worker-fn message) db-conn (construct-data message))))

-(defn do-work [db-conn messages]
-  (let [parsed-messages (json/read-str messages :key-fn keyword)]
-    (doall (map (partial dispatch db-conn) parsed-messages))))
+(defn do-work [system messages]
+  (let [db-conn (:db-conn system)]
+    (let [parsed-messages (json/read-str messages :key-fn keyword)]
+      (doall (map (partial dispatch db-conn) parsed-messages)))))

 (comment


Similarly corrected matrix-add so either matrix could be non-complex.

--- src/main/clj/clojure/core/matrix/complex.clj
+++ src/main/clj/clojure/core/matrix/complex.clj
@@ -86,8 +86,10 @@

    mp/PMatrixAdd
      (matrix-add [m a]
-       (ComplexArray. (mp/matrix-add (.real m) (clojure.core.matrix.complex/real a))
-                      (mp/matrix-add (.imag m) (clojure.core.matrix.complex/imag a))))
+       (ComplexArray. (mp/matrix-add (clojure.core.matrix.complex/real m)
+                                     (clojure.core.matrix.complex/real a))
+                      (mp/matrix-add (clojure.core.matrix.complex/imag m)
+                                     (clojure.core.matrix.complex/imag a))))

    mp/PMatrixProducts
      (inner-product [m a]


:construction: Temporary disable okulary atoms.

--- frontend/src/uxbox/main/store.cljs
+++ frontend/src/uxbox/main/store.cljs
@@ -18,8 +18,8 @@

 (def ^:dynamic *on-error* identity)

-(defonce state (l/atom {}))
-(defonce loader (l/atom false))
+(defonce state (atom {}))
+(defonce loader (atom false))
 (defonce store (ptk/store {:on-error #(*on-error* %)}))
 (defonce stream (ptk/input-stream store))


RS | Refactoring oauth.clj requires

RS | Refactoring oauth.clj requires

--- test/stonecutter/test/controller/oauth.clj
+++ test/stonecutter/test/controller/oauth.clj
@@ -1,13 +1,10 @@
 (ns stonecutter.test.controller.oauth
   (:require [midje.sweet :refer :all]
-            [stonecutter.controller.oauth :as oauth]
             [ring.mock.request :as r]
-            [clauth.client :as client]
-            [clauth.token :as token]
-            [clauth.user :as user]
-            [clauth.auth-code :as auth-code]
+            [clauth.client :as cl-client]
+            [clauth.token :as cl-token]
+            [clauth.auth-code :as cl-auth-code]
             [cheshire.core :as json]
-            [stonecutter.controller.user :as u]
             [stonecutter.controller.oauth :as oauth]
             [stonecutter.db.storage :as storage])
   (:import (org.apache.commons.codec.binary Base64)))
@@ -23,7 +20,7 @@
                (:status response) => 403))

        (fact "request with client-id, response_type and redirect_uri returns redirect to login page if there is no user session"
-             (let [client-details (client/register-client "ClientTestApp" "localhost:3001") ;FORMAT => {:client-secret "XLFCQRKJXSV3T6YQJL5ZJJVGFUJNT6LD", :client-id "RXBX6ZXAER5KPDSZ3ZCZJDOBS27FLDE7", :name "ClientTestApp", :url "localhost:3001"}
+             (let [client-details (cl-client/register-client "ClientTestApp" "localhost:3001") ;FORMAT => {:client-secret "XLFCQRKJXSV3T6YQJL5ZJJVGFUJNT6LD", :client-id "RXBX6ZXAER5KPDSZ3ZCZJDOBS27FLDE7", :name "ClientTestApp", :url "localhost:3001"}
                    request (-> (r/request :get "/authorisation" {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback"})
                                (assoc :params {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback"})
                                (r/header "accept" "text/html"))
@@ -36,8 +33,8 @@
        (fact "valid request goes to authorisation page with auth_code and email when there is an existing user session"
              (let [user-email "email@user.com"
                    user (storage/store-user! user-email "password")
-                   client-details (client/register-client "MYAPP" "myapp.com") ; NB this saves into the client store
-                   access-token (token/create-token client-details user) ; NB this saves into the token store
+                   client-details (cl-client/register-client "MYAPP" "myapp.com") ; NB this saves into the client store
+                   access-token (cl-token/create-token client-details user) ; NB this saves into the token store
                    request (-> (r/request :get "/authorisation")
                                (assoc :params {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback"})
                                (r/header "accept" "text/html")
@@ -56,8 +53,8 @@
        (fact "posting to authorisation endpoint redirects to callback with auth code"
              (let [user-email "email@user.com"
                    user (storage/store-user! user-email "password")
-                   client-details (client/register-client "MYAPP" "myapp.com")
-                   access-token (token/create-token client-details user)
+                   client-details (cl-client/register-client "MYAPP" "myapp.com")
+                   access-token (cl-token/create-token client-details user)
                    csrf-token "CSRF-TOKEN"
                    request (-> (r/request :post "/authorisation")
                                (assoc :params {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback" :csrf-token csrf-token})
@@ -72,8 +69,8 @@
        (fact "user-email and access_token in session stay in session if user is logged in"
              (let [user-email "email@user.com"
                    user (storage/store-user! user-email "password")
-                   client-details (client/register-client "MYAPP" "myapp.com")
-                   access-token (token/create-token client-details user)
+                   client-details (cl-client/register-client "MYAPP" "myapp.com")
+                   access-token (cl-token/create-token client-details user)
                    request (-> (r/request :post "/authorisation")
                                (assoc :params {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback"})
                                (assoc-in [:session :access_token] (:token access-token))
@@ -103,8 +100,8 @@
 (facts "about token endpoint"
        (let [user-email "email@user.com"
              user (storage/store-user! user-email "password")
-             client-details (client/register-client "MYAPP" "myapp.com")
-             auth-code (auth-code/create-auth-code client-details user "callback")
+             client-details (cl-client/register-client "MYAPP" "myapp.com")
+             auth-code (cl-auth-code/create-auth-code client-details user "callback")
              request (-> (r/request :get "/token")
                          (assoc :params {:grant_type   "authorization_code"
                                          :redirect_uri "callback"
@@ -126,4 +123,4 @@
                (:uid user) =not=> nil?)

          (fact "user email stays in the session after validating token"
-               (get-in response [:session :user :email]) => user-email)))+               (get-in response [:session :user :email]) => user-email)))


Modified and extended the view model, log task failures.

--- src/fm/simrunner/app.clj
+++ src/fm/simrunner/app.clj
@@ -28,32 +28,32 @@
 (defn- run-task [{worker :worker :as app} task & args]
   (send-off worker
             (fn [_ &]
-              (apply task app args) nil)))
+              (try
+                (apply task app args)
+                nil
+                (catch Exception task-failed
+                  (.printStackTrace task-failed)
+                  nil)))))

 (defn- mark-dirty [app-state]
-  (update-in app-state [:ui :model :dirty-marks] inc))
-
-(defn- unmark-dirty [app-state unmark]
-  (update-in app-state [:ui :model :dirty-marks] #(max 0 (- % unmark))))
+  (assoc-in app-state [:ui :model :dirty?] true))

 (defn- start-rendering [app-state]
-  (if (-> app-state :ui :model :dirty-marks pos?)
-    (assoc-in app-state [:ui :model :rendering?] true)
+  (if (-> app-state :ui :model :dirty?)
+    (update-in app-state [:ui :model] assoc :rendering? true :dirty? false)
     app-state))

 (defn- start-rendering! [{app-state :state}]
-  (-> (swap! app-state start-rendering) :ui :model :dirty-marks))
+  (swap! app-state start-rendering))

-(defn- stop-rendering [app-state unmark unlock?]
-  (let [app-state (-> app-state
-                      (assoc-in [:ui :model :rendering?] false)
-                      (unmark-dirty unmark))]
+(defn- stop-rendering [app-state unlock?]
+  (let [app-state (assoc-in app-state [:ui :model :rendering?] false)]
     (if unlock?
       (assoc-in app-state [:ui :model :locked?] false)
       app-state)))

-(defn- stop-rendering! [{app-state :state} unmark unlock?]
-  (swap! app-state stop-rendering unmark unlock?)
+(defn- stop-rendering! [{app-state :state} unlock?]
+  (swap! app-state stop-rendering unlock?)
   (when unlock?
     (view/unlock (-> @app-state :ui :view))))

@@ -63,18 +63,19 @@
   ([{app-state :state :as app} update unlock?]
     (swap! app-state update)
     (gui/gui-do
-      (let [dirty-marks (start-rendering! app)]
-        (when (pos? dirty-marks)
-          (try
-            (let [{:keys [view model]} (:ui @app-state)]
-              (io! "Do not update the ui in a transaction!"
-                (view/render view model)))
-            (finally
-              (stop-rendering! app dirty-marks unlock?))))))))
+      (let [app-state (start-rendering! app)]
+        (try
+          (let [{:keys [view model]} (:ui app-state)]
+            (io! "Do not update the ui in a transaction!"
+              (view/render view model)))
+          (finally
+            (stop-rendering! app unlock?)))))))

 (defn- apply-config [app-state config]
   (-> app-state
       (update-in [:ui :model :input-values] merge config)
+      (assoc-in [:ui :model :invalid-ids] (config/invalid-ids config))
+      (assoc-in [:model :config] config)
       mark-dirty))

 (defn- open-config [{app-state :state :as app} widget file]
@@ -129,14 +130,18 @@
   (println (format "on-event{id: %s args: %s}" event-id args)))

 (defn- app [config view]
-  {:config config
-   :worker (agent nil)
-   :state  (atom {:ui    {:view  view
-                          :model {:input-values {}
-                                  :dirty-marks  0
-                                  :locked?      false
-                                  :rendering?   false}}
-                  :model {}})})
+  (let [blank-config (config/validate nil)
+        invalid-ids  (config/invalid-ids blank-config)]
+    {:config config
+     :worker (agent nil)
+     :state  (atom {:ui    {:view  view
+                            :model {:enabled-actions #{:open-config}
+                                    :input-values    {}
+                                    :invalid-values  invalid-ids
+                                    :dirty?          false
+                                    :locked?         false
+                                    :rendering?      false}}
+                    :model {:config blank-config}})}))

 (defn- event-handler [app]
   (fn [& args]


Pre-rainbow switch

Pre-rainbow switch

--- src/org/playasophy/wonderdome/mode/pulse.clj
+++ src/org/playasophy/wonderdome/mode/pulse.clj
@@ -21,6 +21,18 @@
         h (mod (* t deg-per-ms) 360)]
     (color/hsv* h 1.0 v)))

+(def ^:private ^:const adjustment-rate
+  "Rate at which the deg-per-ms changes per-ms"
+  0.0005)
+
+(def ^:private ^:const max-rate
+  ""
+  (/ 1.0 1000))
+
+(def ^:private ^:const min-rate
+  ""
+  0.0)
+
 (defrecord PulseMode
   [colors alpha deg-per-ms accum-time]

@@ -28,14 +40,21 @@

   (update
    [this event]
-    (if (= :time/tick (:type event))
+    (case [(:type event) (:button event)]
+      [:time/tick nil]
       (assoc this
         :accum-time
         (+ (:accum-time this) (:elapsed event))
         :colors
         (generate-color (:accum-time this) alpha deg-per-ms))
-      this)
-    )
+
+      [:button/repeat :x-axis]
+      (let [delta (* (or (:value event) 0)
+                     (or (:elapsed event) 0)
+                     adjustment-rate)
+            new-rate (-> deg-per-ms (+ delta) (min max-rate) (max min-rate))]
+        (assoc this :deg-per-ms new-rate))
+      this))

   (render
    [this pixel]
@@ -44,4 +63,4 @@
 (defn pulse
   [color]
   "Creates a pulse mode starting at the given color/hsv"
-  (PulseMode. color 1.0 (/ 6.0 100000) 0))
+  (PulseMode. color 1.0 (/ 6.0 100000.0) 0))


Discover: Public chats hooked up, hardcoded topics

--- src/status_im/ui/screens/discover/views.cljs
+++ src/status_im/ui/screens/discover/views.cljs
@@ -103,23 +103,33 @@
                                            :contacts        contacts}]])]
        [empty-section :empty-recent :t/no-statuses-discovered :t/no-statuses-discovered-body])]))

+;; TODO(oskarth): Figure out chat count how to get from public chat list subscription
 (def public-chats-mock-data
-  [{:name  "Status team"
+  [{:name  "Status"
+    :topic "status"
     :count 25
     :color "#B2F3E3"}
    {:name  "ETH news"
+    :topic "ethnews"
     :count 12
     :color "#F7A7E8"}
    {:name  "All about Ethereum"
+    :topic "ethereum"
     :count 32
     :color "#C1B8F0"}])

-(defn render-public-chats-item [item]
+
+(defn navigate-to-public-chat [topic]
+  (re-frame/dispatch [:create-new-public-chat topic]))
+
+(defn render-public-chats-item [{:keys [name color topic] :as item}]
+  [react/touchable-highlight {:on-press #(navigate-to-public-chat topic)}
+
   [react/view styles/public-chats-item-container
    [react/view styles/public-chats-icon-container
-    [react/view (styles/public-chats-icon (:color item))
+    [react/view (styles/public-chats-icon color)
      [react/text {:style styles/public-chats-icon-text}
-                 (-> item :name first str)]]]
+      (-> name first str)]]]
    [react/view styles/public-chats-item-inner
     [react/view styles/public-chats-item-name-container
      ;; TODO(goranjovic) lightgray intentionally hardcoded while only a teaser
@@ -127,10 +137,10 @@
      [vector-icons/icon :icons/public {:color "lightgray"}]
      [react/text {:font  :medium
                   :style styles/public-chats-item-name-text}
-                 (:name item)]]
+      name]]
     [react/view {}
      [react/text {:style {:color :lightgray}}
-      (i18n/label :t/public-chat-user-count {:count (:count item)})]]]])
+      (str "#" topic)]]]]])

 (defn public-chats-teaser []
   [react/view styles/public-chats-container


Handmade compilation

Handmade compilation

--- src/test/clojure/ru/flamefork/fleet/test.clj
+++ src/test/clojure/ru/flamefork/fleet/test.clj
@@ -1,6 +1,8 @@
 (ns ru.flamefork.fleet
-  (:use clojure.test)
-  (:use clojure.contrib.pprint))
+  (:use
+    [clojure.test]
+    [clojure.contrib.pprint]
+    [clojure.contrib.def]))

 (deftest basics
   (pprint (fleet
@@ -12,10 +14,13 @@

")))

 (deftest handmade-compilation
+  (defvar f
+    (partial apply str))
+
   (println
     ((fn [post]
-      (apply str ["
" (apply str (post :body)) "
\n
\n"
-                  (apply str (for [tag (post :tags)]
-                    (apply str ["
" (apply str (str tag)) "
\n"])))
+      (f ["
" (f (post :body)) "
\n
\n"
+                  (f (for [tag (post :tags)]
+                    (f ["
" (f (str tag)) "
\n"])))
                   "
"])
       ) {:body "Body" :tags ["tag1" "tag2" "tag3"]})))


Revert sandbox changes

Revert sandbox changes

--- src/nightmod/sandbox.clj
+++ src/nightmod/sandbox.clj
@@ -12,12 +12,14 @@
    (jail-test/blacklist-packages
      ["java.lang.reflect"
       "java.security"
+      "java.util.concurrent"
       "java.awt"])
    (jail-test/blacklist-symbols
     '#{alter-var-root eval catch
        load-string load-reader addMethod ns-resolve resolve find-var
-       *read-eval* ns ns-publics ns-unmap ns-map ns-interns the-ns
-       in-ns System/out System/in System/err
+       *read-eval* ns-publics ns-unmap set! ns-map ns-interns the-ns
+       push-thread-bindings pop-thread-bindings future-call agent send
+       send-off pmap pcalls pvals in-ns System/out System/in System/err
        with-redefs-fn Class/forName})
    (jail-test/blacklist-nses '[clojure.main])
    (jail-test/blanket "clojail")])