I hereby claim:
- I am kriyative on github.
- I am kriyative (https://keybase.io/kriyative) on keybase.
- I have a public key ASDVywUMRecXvN790Ek_OwvexKhPQXoVZyVGsq7Z5g5inwo
To claim this, I am signing this object:
(ns extmap | |
(:import | |
[clojure.lang ILookup Associative])) | |
;; ---------------------------------------------------------------- | |
;; TrackableMap is a persistent map which keeps track of the number of | |
;; times `get` was called on it. | |
(defprotocol Trackable | |
(getStats [self])) |
(def ^{:dynamic true} *print-progress* true) | |
(defmacro with-progress | |
"Bind a `reportfn` function, and evaluate `body` wherein | |
calling (report!) will invoke the report function with the current | |
state of the iteration." | |
[reportfn & body] | |
`(let [iter# (atom 0) | |
reporter# ~reportfn] | |
(letfn [(~'report! [] |
(defn uuid [] | |
"Return an RFC1422 ver.4 compliant UUID" | |
(let [format "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" | |
hex "0123456789abcdef" | |
gen #(case % | |
\x (get hex (rand-int 16)) | |
\y (get hex (bit-or 0x8 (bit-and 0x3 (rand-int 16)))) | |
%)] | |
(apply str (map gen format)))) |
(defun set-inputs-parse-devices () | |
(let ((dev-re (concat | |
"^[^A-Za-z]*\\([A-Za-z][-A-Za-z0-9/:,_ ]+" | |
"[-A-Za-z0-9/:,_]\\)" | |
"[ \t]*id=\\([0-9]+\\)" | |
"[ \t]*\\[\\(\\w+\\)" | |
"[ \t]*\\(\\w+\\)")) | |
devices) | |
(with-temp-buffer | |
(call-process "xinput" nil t) |
I hereby claim:
To claim this, I am signing this object: