 
 (defn make-app
   []
-  (atom {:uuid-counter 0
-         :entities     {} 
-         :systems      {}}))
+  (atom
+    {:uuid-counter 0
+     :entities     {} 
+     :systems      {}}))
 
 (defn new-entity!
   "Defines a new entity ID"

  [app-state name]
  (let [{:keys [entities systems]} (deref app-state)
        {sys-fn :fn comp-ids :comp-ids} (systems name)        
        valid-entity? (make-entity-validator comp-ids)        
        matching-entities (filter valid-entity? entities)]
     (dorun
       (map
         (fn [[eid estate]] (sys-fn app-state eid estate))
         matching-entities))))


(let (a "hello" b "whatever")

(defn foo [{c :a d :b}]
  )

(run-system app-state :render)

(def a 23)



(let [a 42
       (+ a 10)
      a :foo]
  b)
(ns resonate2015.day1.ecs
  (:require
    [clojure.set :as set]
    [thi.ng.geom.core :as g]
     [thi.ng.geom.core.vector :as v]
     [thi.ng.geom.aabb :as a]
     [thi.ng.geom.circle :as c]
     [thi.ng.geom.types.utils.ptf :as ptf]
     [thi.ng.common.math.core :as m :refer [THIRD_PI TWO_PI]]))

(require '[thi.ng.geom.mesh.io :as mio])
(require '[clojure.java.io :as io])

;; (component :position {:x 0 :y 10})

;; 1 [pos col vel renderable] ;; player
;; 2 [skill pos vel]

;; 1 {:pos [0 0] :vel [1 -1] :color :red :renderable true}
;; 2 {:pos {:x ...} :vel {....}

;; color
