Skip to content

Instantly share code, notes, and snippets.

@devn
Created January 28, 2014 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devn/8663262 to your computer and use it in GitHub Desktop.
Save devn/8663262 to your computer and use it in GitHub Desktop.
winamp skins for clojure
(ns defjam.core)
(defn __verb [__noun __noun_place]
(filter #{__noun} __noun_place))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(ns defjam.dude
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :as pp]
[defjam.roar :as roar]))
(def evald
(let [template (slurp (io/file "/Users/devn/dev/defjam/src/defjam/core.clj"))]
(-> template
(str/replace #"__verb" "snarf")
(str/replace #"__noun_place" "swamp")
(str/replace #"__noun" "gold"))))
(defn roar! []
(with-open [f (io/writer (io/file "/Users/devn/dev/defjam/src/defjam/roar.clj"))]
(binding [*out* f]
(println evald))))
(roar/snarf :gold [:armpits :banks :clouds :gold :air :gold])
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(ns defjam.roar)
(defn snarf [gold swamp]
(filter #{gold} swamp))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment