This file contains hidden or 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
| (def state (volatile! {})) | |
| (def c (chan)) | |
| (defn add-bucket! [id {:as opts | |
| :keys [ttl len] | |
| :or {ttl 1000 len 10}}] | |
| (vswap! state | |
| assoc | |
| id | |
| {:ttl ttl |
This file contains hidden or 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 type.exp | |
| (:refer-clojure :exclude [extend-type reify]) | |
| ;; state --------------------- | |
| (def types (atom {::any identity})) | |
| (def facets (atom {})) | |
| ;; helpers ------------------- |
This file contains hidden or 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 rum-slave | |
| (:require-macros [cljs.core.async.macros :refer [go-loop go]]) | |
| (:require [cljs.core.async :as async :refer [chan >! <!]] | |
| [rum.core :as rum])) | |
| ;; helpers --------------------------------------------------------------- | |
| (defn notify [s m] | |
| ((:notify s) m)) |
This file contains hidden or 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
| (defn rwrap [build deps-map] | |
| (let [this (atom (build)) | |
| deps (keys deps-map) | |
| propagating (atom nil)] | |
| (add-watch this | |
| :build | |
| (fn [_ _ _ n] | |
| (when-not @propagating | |
| (reset! propagating true) | |
| (doseq [[dep upd] deps-map] |
This file contains hidden or 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 grayscott.core | |
| "ported from toxiclibs by Karsten Schmidt | |
| https://bitbucket.org/postspectacular/toxiclibs/src/44d9932dbc9f9c69a170643e2d459f449562b750/src.sim/toxi/sim/grayscott/GrayScott.java?at=default&fileviewer=file-view-default" | |
| #?(:clj (:require [thi.ng.math.macros :as mm]) | |
| :cljs (:require-macros [thi.ng.math.macros :as mm]))) | |
| (defn clip [min max n] | |
| (cond | |
| (< n min) min | |
| (> n max) max |
This file contains hidden or 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 midi-parser.core | |
| (:use clojure.java.data) | |
| #_(:use utils.utils) | |
| #_(:use vendors.debug-repl) | |
| (:import (java.io File) | |
| #_(java.util Arrays) | |
| #_(java.nio ByteBuffer) | |
| (javax.sound.midi MidiSystem Sequence MidiMessage MidiEvent ShortMessage MetaMessage Track))) | |
| ;***************** Utils ******************** |
NewerOlder