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
[c:writing] rpython_jit_backend_llsupport_descr.c | |
[c:writing] rpython_jit_backend_llsupport_gc.c | |
[c:writing] rpython_jit_backend_llsupport_gcmap.c | |
[c:writing] rpython_jit_backend_llsupport_jitframe.c | |
[c:writing] rpython_jit_backend_llsupport_llmodel.c | |
[c:writing] rpython_jit_backend_llsupport_regalloc.c | |
[c:writing] rpython_jit_backend_llsupport_rewrite.c | |
[8c06] translation-task} | |
[Timer] Timings: | |
[Timer] annotate --- 4.9 s |
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
REPL-y 0.3.7, nREPL 0.2.12 | |
Clojure 1.8.0 | |
Java HotSpot(TM) 64-Bit Server VM 1.8.0_74-b02 | |
Docs: (doc function-name-here) | |
(find-doc "part-of-name-here") | |
Source: (source function-name-here) | |
Javadoc: (javadoc java-object-or-class-here) | |
Exit: Control+D or (exit) or (quit) | |
Results: Stored in vars *1, *2, *3, an exception in *e |
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
(q '[:find ?student-id ?model | |
:in $ ?year | |
:where | |
[?student-id :student/teacher ?teacher-id] | |
[?teacher-id :teacher/car ?car-id] | |
[?car-id :car/year ?year] | |
[?car-id :car/model ?model]] | |
db | |
2012) |
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
(flow :error-handler ex | |
(->> (dbc/subscribe broker topic expr) | |
(map (partial transform alert-id transform)) | |
(throttled 400) | |
(on-each #(println "Writing Batch")) | |
(dbc/put broker) | |
(on-completed #(println "Shutting down")))) |
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
(flow :error-handler ex | |
(->> (dbc/subscribe broker topic expr) | |
(map (partial transform alert-id transform)) | |
(throttled 400) | |
(on-each #(println "Writing Batch")) | |
(dbc/put broker) | |
(on-completed #(println "Shutting down")))) |
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
(deftype NotFound []) | |
(def not-found (NotFound.)) | |
(defn get-check [m k] | |
(let [r (get m k not-found)] | |
(assert (not (identical? not-found r))) | |
r)) | |
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-let* [bindings & body] | |
(reduce | |
(fn [acc x] | |
`(when-let ~(vec x) | |
~acc)) | |
`(do ~@body) | |
(reverse (partition 2 bindings)))) |
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
(defun nrepl-eval-expression-at-point-in-repl () | |
(interactive) | |
(let ((form (nrepl-expression-at-point))) | |
;; Strip excess whitespace | |
(while (string-match "\\`\s+\\|\n+\\'" form) | |
(setq form (replace-match "" t t form))) | |
(set-buffer (nrepl-find-or-create-repl-buffer)) | |
(goto-char (point-max)) | |
(insert form) | |
(nrepl-return))) |
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 [take-c (chan 1)] | |
(go | |
(loop [pending [] | |
tout (timeout 1000)] | |
(alt! [take-c] ([v] (let [new-pending (conj pending v)] | |
(if (> max-pending (count new-pending)) | |
(do (thread (process-stuff pending)) | |
(recur [] (timeout 1000))) | |
(recur new-pending tout)))) | |
[tout] ([_] |
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
(ns main-ns) | |
(defprotocol BadReify | |
(do-stuff [this])) | |
(defn wrap-stuff [x] | |
(reify | |
BadReify | |
(do-stuff [this] | |
x))) |