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
// ==UserScript== | |
// @name wordnik-links | |
// @namespace com.cemerick | |
// @description links all words in wordnik definitions to their corresponding wordnik page | |
// @version 1 | |
// @grant none | |
// @match http://www.wordnik.com/words/* | |
// @match https://www.wordnik.com/words/* | |
// ==/UserScript== |
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
user=> (require 'cemerick.splice.rank) | |
nil | |
user=> (in-ns 'cemerick.splice.rank) | |
#<Namespace cemerick.splice.rank> | |
cemerick.splice.rank=> low | |
#cemerick.splice.rank.Rank[0] | |
cemerick.splice.rank=> high | |
#cemerick.splice.rank.Rank[2047] | |
cemerick.splice.rank=> (between low high) | |
#cemerick.splice.rank.Rank[1023] |
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
chas@t440p:~$ ls /etc/fonts/conf.d/ | |
10-antialias.conf 58-dejavu-lgc-sans-mono.conf 70-no-bitmaps.conf | |
10-hinting.conf 58-dejavu-lgc-serif.conf 80-delicious.conf | |
10-hinting-slight.conf 60-latin.conf 89-tlwg-garuda-synthetic.conf | |
10-scale-bitmap-fonts.conf 64-01-tlwg-kinnari.conf 89-tlwg-kinnari-synthetic.conf | |
11-lcdfilter-default.conf 64-02-tlwg-norasi.conf 89-tlwg-loma-synthetic.conf | |
20-unhint-small-dejavu-lgc-sans.conf 64-11-tlwg-waree.conf 89-tlwg-umpush-synthetic.conf | |
20-unhint-small-dejavu-lgc-sans-mono.conf 64-12-tlwg-loma.conf 89-tlwg-waree-synthetic.conf | |
20-unhint-small-dejavu-lgc-serif.conf 64-13-tlwg-garuda.conf 90-fonts-nanum.conf | |
20-unhint-small-dejavu-sans.conf 64-14-tlwg-umpush.conf 90-fonts-unfonts-core.conf |
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
; compilers are cool | |
(when-let [missing-methods (->> possible-dispatch-values | |
(map #(when-not (get-method multimethod %) %)) | |
(filter identity) | |
seq)] | |
(throw (ex-info "Missing methods for `multimethod`" {:dispatch-vals missing-methods}))) |
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
; add to your user.clj to recover pre-1.7.0 printing of Objects and Throwables in the REPL | |
; https://github.com/clojure/clojure/blob/master/changes.md#17-printing-as-data | |
(in-ns 'clojure.core) | |
; from 1242c48 | |
(defn- print-object [o, ^Writer w] | |
(when (instance? clojure.lang.IMeta o) | |
(print-meta o w)) | |
(.write w "#<") |
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
chas@t440p:~/Downloads$ java -cp cljs.jar:/home/chas/.m2/repository/org/clojure/tools.nrepl/0.2.10/tools.nrepl-0.2.10.jar:/home/chas/.m2/repository/com/cemerick/piggieback/0.2.1/piggieback-0.2.1.jar clojure.main nrepl_piggieback.clj & | |
nREPL server running on port 7888 | |
# using Leiningen here _only_ to connect to the running nREPL server | |
# any nREPL client will do | |
chas@t440p:~/Downloads$ lein repl :connect 7888 | |
Connecting to nREPL at 127.0.0.1:7888 | |
REPL-y 0.3.5, nREPL 0.2.10 | |
Clojure 1.7.0-beta1 |
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
foo=> (defn x [y] (+ 5 y)) | |
"(defn x [y] (+ 5 y))" | |
"ns-form?" false | |
Type Error (/tmp/form-init580281525933880320.clj) Static method clojure.lang.Numbers/add could not be applied to arguments: | |
Domains: | |
java.lang.Long java.lang.Long | |
java.lang.Double java.lang.Double | |
clojure.core.typed/AnyInteger clojure.core.typed/AnyInteger |
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 repl | |
nREPL server started on port 50811 on host 127.0.0.1 - nrepl://127.0.0.1:50811 | |
REPL-y 0.3.2, nREPL 0.2.3 | |
Clojure 1.6.0 | |
Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b25 | |
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) |
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
; CIDER 0.6.0alpha (package: 0.5.0) (Clojure 1.6.0, nREPL 0.2.3) | |
=> (schedule #(println "foo")) | |
=> (schedule #(println "foo")) | |
=> (schedule #(println "foo")) | |
... | |
=> (def s (immutant.scheduling.internal/scheduler {})) | |
#<Var@5f67764a: | |
#<QuartzScheduling org.projectodd.wunderboss.scheduling.QuartzScheduling@450109d4>> | |
; scheduled job names (and thus their JobKeys) are retained, even if they're not repeating |
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
(define-pass optimize-direct-call L0 [x] L0 | |
[] | |
{Expr | |
[[((fn [x*] e*) e1*) | |
(== (count x*) (count e1*)) | |
`(let [~@(interleave x* e1*)] ~@e*)]]} | |
(Expr x)) | |
lang> (optimize-direct-call '((fn [a b] _) 1 2)) | |
(clojure.core/let [a 1 b 2] _) |