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
error in process filter: Error in nrepl-refactor: java.util.concurrent.ExecutionException: java.lang.AssertionError: Assert failed: (instance? java.io.PushbackReader rdr) | |
at java.util.concurrent.FutureTask.report (FutureTask.java:122) | |
java.util.concurrent.FutureTask.get (FutureTask.java:192) | |
clojure.core$deref_future.invoke (core.clj:2186) | |
clojure.core$future_call$reify__6736.deref (core.clj:6683) | |
clojure.core$deref.invoke (core.clj:2206) | |
refactor_nrepl.find.find_symbol$find_symbol.invoke (find_symbol.clj:242) | |
refactor_nrepl.middleware$find_symbol_reply.invoke (middleware.clj:60) | |
refactor_nrepl.middleware$wrap_refactor$fn__29401.invoke (middleware.clj:135) | |
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__11848.invoke (middleware.clj:22) |
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 uberjar *[master] | |
(:repositories detected in user-level profiles! [:user] | |
See https://github.com/technomancy/leiningen/wiki/Repeatability) | |
Compiling specter-reproduce.core | |
Compiling specter-reproduce.core-path | |
nil | |
Exception in thread "main" java.lang.ExceptionInInitializerError, compiling:(/private/var/folders/yj/j9klbwj11zj95bz657t_x44m0000gn/T/form-init4932202852423350160.clj:1:125) | |
at clojure.lang.Compiler.load(Compiler.java:7391) | |
at clojure.lang.Compiler.loadFile(Compiler.java:7317) | |
at clojure.main$load_script.invokeStatic(main.clj:275) |
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
Benchmark: get value in nested map (2500000 iterations) | |
Avg(ms) vs best Code | |
44.233 1.00 (-> data (get :a) (get :b) (get :c)) | |
55.461 1.25 (-> data :a :b :c identity) | |
59.315 1.34 (-> data :a :b :c) | |
69.111 1.56 (get-a-b-c data) | |
119.58 2.70 (compiled-select-any p data) | |
126.31 2.86 (select-any [(keypath :a) (keypath :b) (keypath :c)] data) | |
131.44 2.97 (select-any (keypath :a :b :c) data) |
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
Benchmark: get value in nested map (2500000 iterations) | |
Avg(ms) vs best Code | |
43.279 1.00 (-> data (get :a) (get :b) (get :c)) | |
54.564 1.26 (-> data :a :b :c) | |
58.446 1.35 (-> data :a :b :c identity) | |
76.612 1.77 (get-a-b-c data) | |
101.11 2.34 (compiled-select-any p data) | |
128.99 2.98 (select-any [(keypath :a) (keypath :b) (keypath :c)] data) | |
132.83 3.07 (select-any [:a :b :c] data) |
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
Benchmark: get value in nested map (2500000 iterations) | |
Avg(ms) vs best Code | |
42.623 1.00 (-> data (get :a) (get :b) (get :c)) | |
49.893 1.17 (-> data :a :b :c) | |
53.703 1.26 (-> data :a :b :c identity) | |
65.554 1.54 (get-a-b-c data) | |
106.54 2.50 (compiled-select-any p data) | |
111.64 2.62 (select-any [(keypath :a) (keypath :b) (keypath :c)] data) | |
113.60 2.67 (select-any [:a :b :c] data) |
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
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <bitset> | |
#include <list> | |
#include <stack> | |
#include <queue> | |
#include <deque> | |
#include <string> |
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 cats-spec.either | |
(:require [cats.monad.either :as m.either] | |
[clojure.spec.alpha :as s] | |
[clojure.spec.gen.alpha :as gen])) | |
(defn either-impl | |
[form-r pred-r form-l pred-l] | |
(let [spec-r (delay (s/specize* pred-r form-r)) | |
spec-l (delay (s/specize* pred-l form-l))] | |
(reify |
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 split-frame-eql-parts* (group dir amt) | |
(when (not (eq amt 1)) | |
(when-let ((new-frame (split-frame group dir (/ (- amt 1) amt)))) | |
(cons new-frame (split-frame-eql-parts* group dir (- amt 1)))))) | |
(defun split-frame-eql-parts (group dir amt) | |
"Splits frame in equal parts defined by amt." | |
(assert (> amt 1)) | |
(let ((f (tile-group-current-frame group)) | |
(new-frame-numbers (split-frame-eql-parts* group dir amt))) |
OlderNewer