As an example, this morning I noticed an old Twitter direct message from the author of Nozzle library asking me if I had a chance to try it. Instead of setting up a separate Leiningen project directory, I just did a cljr install com.ashafa/nozzle 0.2.1, went to my catch-all directory where I keep short snippets of Clojure code, and entered Tunde's test program for Nozzle:
;; assumes: cljr install com.ashafa/nozzle 0.2.1and running it is as simple as:
(use 'com.ashafa.nozzle)
(def username (System/getenv "TWITTER_ACCOUNT"))
(def passwd (System/getenv "TWITTER_PASSWD"))
(defn my-callback
[message]
(println message))
(def noz (create-nozzle "filter" username passwd my-callback {:track "twitter"}))
cljr run nozzle-twitter-test.cljor, if you want to use emacs+swank:
cljr swankand after starting Emacs in the same directory:
M-x slime-connectand in the repl:
(load "nozzle-twitter-test")I still use IntelliJ with the Clojure plugin for some projects also.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.