Skip to content

Instantly share code, notes, and snippets.

View athos's full-sized avatar
🤷‍♂️
I know the value and cost of nothing

Shogo Ohta athos

🤷‍♂️
I know the value and cost of nothing
View GitHub Profile
@tyano
tyano / core.clj
Created February 11, 2014 18:20
MD5ハッシュ突き合わせ(Clojure) - 単体でパフォーマンスチューニングしたものを、core.asyncを使って並列化。引数の末尾に :map をつけると、map/filterを使ったバージョンでもテスト可能。primitiveのloopのほうがちょっとだけ速い。並列化はcore数程度で頭打ち。100とかにしても遅くなるだけ。
(ns mdsample.core
(:require [clojure.core.reducers :as r]
[clojure.core.async :refer [chan >! <!! go close! alts!!]])
(:import [java.security MessageDigest]
[javax.xml.bind DatatypeConverter]
[java.util Arrays]
[java.util Queue]
[java.util.concurrent ConcurrentLinkedQueue]))
(defn- hexdigest
@pesterhazy
pesterhazy / reagent-ref-functions.clj
Last active January 19, 2023 11:31
Using ref functions with reagent
;; React supports "refs" as a way for a component to get a
;; handle to its children. Classically, refs were string-based.
;; Recent versions of React support callback attributes as a
;; more elegant variant of accessing DOM notes or components.
;;
;; This example uses a Form-3 component as per
;; https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components
;;
;; For callback refs, see React's documentation
;; https://facebook.github.io/react/docs/more-about-refs.html
@bhb
bhb / README.md
Last active May 15, 2023 01:28
Clojure friendly mode, inspired by https://github.com/slipset/friendly