This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro as | |
"Binds name to the result of each of the forms. Within each form the previous | |
binding is available. Returns the final binding." | |
[name & forms] | |
`(let [~@(interleave (repeat name) forms)] | |
~name)) | |
;; (as a | |
;; 1 | |
;; (+ a 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro when-> | |
"When expr is logical true, threads it into the first form (via ->), | |
and when that result is logical true, through the next etc" | |
{:added "1.5"} | |
[expr & forms] | |
(let [[g forms] (if (vector? (first forms)) | |
[(ffirst forms) (rest forms)] | |
[(gensym) forms]) | |
pstep (fn [step] `(when ~g (-> ~g ~step)))] | |
`(let [~g ~expr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> lein deps :tree | |
Performing task 'deps' with profile(s): 'default,dev' | |
This could be due to a typo in :dependencies or network issues. | |
Error encountered performing task 'deps' with profile(s): 'default,dev' | |
Could not resolve dependencies | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No implementation of method: :lb of protocol: #'clojure.core.logic/IInterval found for class: clojure.lang.Keyword | |
java.lang.IllegalArgumentException | |
Restarts: | |
0: [CONTINUE] Pass exception to program | |
1: [ABORT] Abort request. | |
2: [IGNORE] Do not enter debugger for this exception type | |
3: [IGNORE-MSG] Do not enter debugger for this exception message | |
4: [IGNORE-CATCH] Do not enter debugger for exceptions with catch location clojure.lang.LazySeq.* | |
5: [IGNORE-LOC] Do not enter debugger for exceptions with throw location clojure.core.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No implementation of method: :lb of protocol: #'clojure.core.logic/IInterval found for class: clojure.lang.Keyword | |
java.lang.IllegalArgumentException | |
Restarts: | |
0: [CONTINUE] Pass exception to program | |
1: [ABORT] Abort request. | |
2: [IGNORE] Do not enter debugger for this exception type | |
3: [IGNORE-MSG] Do not enter debugger for this exception message | |
4: [IGNORE-CATCH] Do not enter debugger for exceptions with catch location clojure.lang.LazySeq.* | |
5: [IGNORE-LOC] Do not enter debugger for exceptions with throw location clojure.core.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rewrite-layer | |
{:mapping {:y :mpg} | |
:stat (stat/quantiles)}) | |
;; => | |
{:mapping {:upper :q75, :min :min, :lower :q25, :max :max, :middle :q50, :y :mpg} | |
:stat #com.keminglabs/c2po$stat$quantiles {:dimension :mpg} | |
:geom #com.keminglabs/c2po$geom$boxplot {}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(run* [q] | |
(fresh [pattern production guards rule rule-name] | |
(membero | |
{:pattern pattern :production production} | |
[{:pattern (partial-map {:a :clojure.core.logic/not-found :x 1}) | |
:production {:a 1}} | |
{:pattern (partial-map {:a '?a :c :clojure.core.logic/not-found}) | |
:production {:c '(* ?a 2)}}]) | |
(== {:x 1} pattern) | |
(== q production))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender"> | |
<discriminator> | |
<key>target</key> | |
<defaultValue>unspecified</defaultValue> | |
</discriminator> | |
<sift> | |
<appender name="FILE-${target}" class="ch.qos.logback.core.FileAppender"> | |
<file>logs/target-${target}.log</file> | |
<append>false</append> | |
<encoder> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:dependencies | |
[[org.cloudhoist/pallet-jclouds "1.5.0-SNAPSHOT"] | |
[org.jclouds.provider/aws-ec2 "1.5.2"] | |
[org.jclouds.provider/aws-s3 "1.5.2"] | |
[org.jclouds.driver/jclouds-slf4j "1.5.2" | |
;; the declared version is old and can overrule the resolved version | |
:exclusions [org.slf4j/slf4j-api]] | |
[org.jclouds.driver/jclouds-sshj "1.5.2"]]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [s @(#'clojure.tools.nrepl.middleware.session/create-session | |
(:transport connection) | |
@(:bindings connection)) | |
out (#'clojure.tools.nrepl.middleware.session/session-out | |
:out new-session (:transport connection)) | |
err (#'clojure.tools.nrepl.middleware.session/session-out | |
:err new-session (:transport connection))] | |
....) | |
(binding [clojure.tools.nrepl.middleware.interruptible-eval/*msg* msg] |