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
| (defproject doc-ns "1.0.0-SNAPSHOT" | |
| :description "Writes documentation for a namespace to a text file. | |
| Usage: java -jar doc-ns.jar \"compojure\" \"~/\" \"myfile.txt\"" | |
| :dependencies [[org.clojure/clojure | |
| "1.1.0-alpha-SNAPSHOT"] | |
| [org.clojure/clojure-contrib | |
| "1.0-SNAPSHOT"] | |
| [org.clojars.ato/compojure | |
| "0.3.1"]] | |
| :dev-dependencies [[org.clojure/swank-clojure |
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 doc-ns.core | |
| (:gen-class) | |
| [:use clojure.contrib.duck-streams | |
| compojure]) | |
| (defn sort-ns | |
| "Sorts the keys from the map returned by ns-publics for a given nspace into alphabetical order." | |
| [nspace] | |
| (sort (keys (ns-publics nspace)))) |
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 doc-ns | |
| (:gen-class) | |
| [:use clojure.contrib.duck-streams | |
| compojure]) | |
| (defn sort-ns | |
| "Sorts the keys from the map returned by ns-publics for a given nspace into alphabetical order." | |
| [nspace] | |
| (sort (keys (ns-publics nspace)))) |
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
| va.lang.NullPointerException | |
| [Thrown class java.lang.RuntimeException] | |
| Restarts: | |
| 0: [ABORT] Return to SLIME's top level. | |
| 1: [CAUSE] Throw cause of this exception | |
| Backtrace: | |
| 0: clojure.lang.LazySeq.sval(LazySeq.java:47) | |
| 1: clojure.lang.LazySeq.seq(LazySeq.java:63) |
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 take-tweets [n] | |
| (take n (map read-json | |
| (line-seq (reader | |
| (get-stream)))))) | |
| (defn tweet-text [n] | |
| (map #(get % "text") | |
| (take-tweets n))) | |
| (defn search-text [s coll] |
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 twitjure | |
| (:use clojure.core) | |
| (:use clojure.contrib.http.connection) | |
| (:use clojure.contrib.base64) | |
| (:use clojure.contrib.duck-streams)) | |
| (defn get-stream [] | |
| (let [conn #^java.net.HttpURLConnection | |
| (http-connection "http://stream.twitter.com/1/statuses/sample.json")] | |
| (.setDoInput conn true) |
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 devin [walters] | |
| (println "yep, it works...")) |
NewerOlder