 ;;; Air on a \G String ;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(comment
-  (repeat 1000000000000 \G)
-  )
+(comment (repeat 1000000000000 \G))
 
 (defmacro description-length [expr]
   (-> expr print-str count))

      expand
      (cons []))))

(defn babel []
  (let [ascii (->> (range 32 127) (map char))]
    (->> ascii
       kleene*
       (map (partial apply str)))))

(fact "We can construct all strings as a lazy sequence."
  (->> (babel) (take 5)) => ["" " " "!" "\"" "#"]
  (nth (babel) 364645) => "GEB")

(defn dna []
  (->> "GATC"
       kleene*
       (map (partial apply str))))

(fact "We can construct all genes as a lazy sequence."
  (->> (dna) (take 5)) => ["" "G" "A" "T" "C"]
  (nth (dna) 7154) => "GATTACA")

(fact "Lexicons aren't very random."
  (randomness (take 1000 (babel))) => #(< % 1/100)
  (randomness (take 1000 (dna))) => #(< % 1/100))


;;;;;;;;;;;;;;;;;;;;;

;;; Blurred Lines ;;;
;;;;;;;;;;;;;;;;;;;;;

(defmethod live/play-note :default
  [{hertz :pitch seconds :duration}]
  (when hertz (instrument/overchauffeur (midi->hz hertz) seconds 0.02)))
