Skip to content
View seven.clj
(require '[instaparse.core :as insta])
(require '[clojure.core.match :refer [match]])
(def circuit-parser
"<S> := (INSTRUCTION <'\n'*>)*
INSTRUCTION := EXP <#'\\s*->\\s*'> WIRE

Come democratize education with Udacity, change lives.

You might be a Udacious Operator if ...

If typing the same thing twice makes you break out in hives ...
If automating manual operations cures those hives ...
If action without measuring nauseates you ...
If monitoring is your Meclozine ...
If you take extreme pride in your work ...
If you feel deeply responsible for your work ...


Keybase proof

I hereby claim:

  • I am pmbauer on github.
  • I am pmbauer ( on keybase.
  • I have a public key whose fingerprint is 75B1 C129 A456 7CC7 8B11 2505 85A7 DDD3 3660 317A

To claim this, I am signing this object:

View node_repl.clj
(defn define-node-repl-launcher []
(fn [handler]
(fn [fileset]
(defn node-repl []
(require 'cemerick.piggieback 'cljs.repl.node)
((resolve 'cemerick.piggieback/cljs-repl)
:repl-env ((resolve 'cljs.repl.node/repl-env))
:output-dir ".noderepl"
:optimizations :none
:cache-analysis true
View fx-vs-fm.clj
;; One example of why one might want to generate platform specific feature macros
;; I'm not saying this is a good DSL, just possible with
(deftype-unified Foo [bar]
unified/Counted [(count [_] {:cljs (-count bar)
:clj (.count bar)})]
(fizz [_] :buzz))
;; where unified/Counted [...] expands to clojure.lang.Counted/count on :clj and ICounted/-count on :cljs
View build.boot
(deftask snake []
(letfn [(copy-uri-to-file [uri file]
(with-open [in ( uri)
out ( file)]
( in out)))]
(let [snake-mp3 ( "snake" ".mp3")]
(copy-uri-to-file "" snake-mp3)
(speak :success (.getPath snake-mp3)))))
View gist:a63b5916f0fa96e79282
I1212 22:03:27.103919 4515 fetcher.cpp:76] Fetching URI ''
I1212 22:03:27.104070 4515 fetcher.cpp:126] Downloading '' to '/tmp/mesos/slaves/20141212-210553-149706762-5050-2275-S5/frameworks/20141212-210553-149706762-5050-2275-0002/executors/KubeleteExecutorID/runs/f300609d-cb59-4851-a22f-7e57c183590f/proxy'
I1212 22:03:27.389055 4515 fetcher.cpp:76] Fetching URI ''
I1212 22:03:27.389119 4515 fetcher.cpp:126] Downloading '' to '/tmp/mesos/slaves/20141212-210553-149706762-5050-2275-S5/frameworks/20141212-210553-149706762-5050-2275-0002/executors/KubeleteExecutorID/runs/f300609d-cb59-4851-a22f-7e57c183590f/kubernetes-executor'
sh: 1: ./kubernetes-executor: Permission denied
View designer.html
<link rel="import" href="../code-mirror/code-mirror.html">
<polymer-element name="my-element">
:host {
position: absolute;
width: 100%;
height: 100%;
View metrics
amd64 Linux 3.2.0-52-generic, 6 cores
Java HotSpot(TM) 64-Bit Server VM 23.21-b01
*** Single UseConcMarkSweepGC ***
Runtime arguments: -XX:-UseConcMarkSweepGC
Evaluation count : 300 in 60 samples of 5 calls.
Execution time sample mean : 207.175228 ms
Execution time mean : 207.185921 ms
Execution time sample std-deviation : 1.012513 ms
Execution time std-deviation : 1.022277 ms
View async_thread_ring.clj
(require '[clojure.core.async :refer [chan go <! <!! >! >!!]])
(defn thread-ring [size n]
{:pre [(> size 1)]}
(let [result (chan 1)
[head :as ring] (vec (repeatedly size #(chan 1)))]
(dotimes [i size]
(let [id (inc i)
in (ring i)
out (ring (mod id size))]
Something went wrong with that request. Please try again.