I hereby claim:
- I am hadronzoo on github.
- I am joshua (https://keybase.io/joshua) on keybase.
- I have a public key whose fingerprint is 23CE 2108 CFCE 83A5 B09C B4CE ADF9 100C 2284 C5DB
To claim this, I am signing this object:
(def input "bbbddddaaacccc") | |
(defn- lowest-code-point [coll] | |
(first (into (sorted-map-by #(< (int %1) (int %2))) coll))) | |
(defn- take-while= [value coll] | |
(take-while (fn [[_ v]] (== value v)) coll)) | |
(let [counts (frequencies input) | |
sorted (sorted-map-by |
;; Replace hash rockets with Ruby 1.9 symbol keys | |
(defun replace-hash-rockets () | |
(interactive) | |
(goto-char 1) | |
(while (search-forward-regexp ":\\(\\(\\w\\|_\\)+\\) =>" nil t) | |
(replace-match (concat (match-string 1) ":") t nil))) |
I hereby claim:
To claim this, I am signing this object:
#include<stdio.h> | |
#include<stdlib.h> | |
int *add_counts(char *corpus, int *counts) { | |
int i = 0; | |
while (corpus[i]) { | |
counts[corpus[i]]++; | |
i++; | |
} | |
return counts; |
#include<stdio.h> | |
#include<stdlib.h> | |
struct list_node { | |
int val; | |
struct list_node *next; | |
}; | |
int node_size = sizeof(struct list_node); |
(defn gaps [coll] | |
"Find gaps in collection coll, containing a sequence of monotonic integers" | |
(letfn [(intervals [[cur & rst] prev] | |
(when cur | |
(cons [(inc prev) (dec cur)] | |
(lazy-seq (intervals rst cur)))))] | |
(lazy-seq | |
(when-let [[cur & rst] (seq coll)] | |
(remove (fn [[x y]] (> x y)) | |
(intervals rst cur)))))) |
(deftype TestType [key] | |
IHash | |
(-hash [this] | |
(hash key))) | |
(def a (TestType. [1 2 3])) | |
(def b (TestType. [1 2 3])) | |
;; the resulting PersistentHashSet should have one item, but has two: | |
(.log js/console (pr-str (conj #{} a b))) |
module DataMapper | |
module Model | |
alias _load load | |
def load(records, query) | |
p "here" | |
r = _load(records, query) | |
end | |
end |
diff --git a/interfaces/emacs/imaxima/imaxima.el b/interfaces/emacs/imaxima/imaxima.el | |
index e3feaa6..3a52a0b 100644 | |
--- a/interfaces/emacs/imaxima/imaxima.el | |
+++ b/interfaces/emacs/imaxima/imaxima.el | |
@@ -296,6 +296,8 @@ nil means no scaling at all, t allows any scaling." | |
(temp-directory)) | |
((eql system-type 'cygwin) | |
"/tmp/") | |
+ ((eql system-type 'darwin) | |
+ "/tmp/") |