Skip to content

Instantly share code, notes, and snippets.

I know the value and cost of nothing

Ohta Shogo athos

I know the value and cost of nothing
View GitHub Profile
View instruction_set.txt
[:add z x y]
[:sub z x y]
[:mul z x y]
[:div z x y]
[:rem z x y]
[:eq x y]
[:lt x y]
[:gt x y]
[:push z x]

Libs are blindly added into loaded-libs even if an error occurs during loading

Suppose you have a lib that causes some errors during loading, like the following:

(ns broken-lib)

(} ; this line will cause a reader error

And then, if you require the lib, it would be added into loaded-libs in spite of the reader error,

View gist:11020181
(defrecord Path [path]
(invoke [this n]
(clojure.string/replace path ":id" (str n))))
(defmethod print-method Path [o ^ w]
(.write w (str "#path\"" (:path o) "\"")))
(set! *data-readers* (assoc *data-readers* 'path ->Path))
View bowling_game.clj
(ns bowling-game)
(defn- apply-to-nonnil [op & args]
(->> (reverse args)
(drop-while nil?)
(apply op)))
(defn partition-frames [throws]
(loop [n 1, [throw & more] throws, ret []]

genuine-highlighter: マクロを認識するClojure向けのシンタックスハイライター





View highlight_test.clj
(let [name #(subs (name %) 1)]
(name 'foo))
(letfn [(name [sym] (subs (name sym) 1))]
(name 'foo))
View user.clj
(ns user
(:refer-clojure :exclude [send])
(:require [ :refer [refresh refresh-all]]
[clojure.repl :refer :all]
[clojure.pprint :refer [pp pprint]]
[clojure.core.async :as a]
[ :refer [sh]]))
(def to-listeners (a/chan))
(def pub (a/pub to-listeners :type))
Title Conference License
Transducers Strange Loop 2014 CC BY
Implementation details of core.async Channels EuroClojure CC BY-NC
Design, Composition and Performance QCon San Francisco 2013 InfoQ *1
Clojure core.async Channels Strange Loop 2013 InfoQ *1
The Language of the System Clojure/conj 2012 standard YouTube license *2
The Value of Values JaxConf 2012 standard YouTube license *2
Reducers QCon NY 2012 InfoQ *1
Simple Made Easy
athos /
Last active Aug 29, 2015
This document is translated from the interview at

Rich Hickey Q&A

by Michael Fogus

Best known as the inventor of Clojure, a Lisp that runs on the Java Virtual Machine and the first new member of the Lisp family to attract any widespread interest since Scheme and Common Lisp, Rich Hickey has been a software developer and consultant for two decades.

Rich Hickeyは20年来のソフトウェア技術者およびコンサルタントで、Clojureの創始者としてよく知られる。ClojureはJava仮想マシン上で動作するLispで、Lisp族の中ではSchemeやCommon Lisp以来はじめて幅広い人の興味を引いた新しい言語だ。

View core.clj
(ns redef-as-serializable.core)
(defmacro redef-as-serializable [& ts]
`(do ~@(for [t ts
:let [c (resolve t)
fields (mapv #(symbol (.getName %)) (.getDeclaredFields c))]]
`(deftype ~(symbol (str t \')) ~fields
You can’t perform that action at this time.