Skip to content

Instantly share code, notes, and snippets.

How Clojure's documentation can leapfrog other languages

Summary

I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.

The Problem

Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."

@thheller
thheller / repl.clj
Created November 26, 2016 14:33
find dependent names for namespace using shadow-build
;; [thheller/shadow-build "1.0.239"]
(require '[shadow.cljs.build :as cljs])
(-> (cljs/init-state)
(cljs/find-resources-in-classpath)
(cljs/find-dependent-names 'goog.testing.PseudoRandom))