Skip to content
Browse files

import

Signed-off-by: Chris Granger <ibdknox@gmail.com>
  • Loading branch information...
0 parents commit 8ea2bf8776d4df37892f0e141a8c49592fde99a4 @ibdknox committed Feb 26, 2012
Showing with 31,255 additions and 0 deletions.
  1. +9 −0 .gitignore
  2. +1 −0 Procfile
  3. +17 −0 README.md
  4. +20 −0 project.clj
  5. +9 −0 resources/externs/codemirror.js
  6. +11,303 −0 resources/public/cljs/bootstrap.js
  7. +3,553 −0 resources/public/cljs/cljs/core.cljs
  8. +12,085 −0 resources/public/cljs/cljs/core.js
  9. +100 −0 resources/public/cljs/clojure/browser/event.cljs
  10. +143 −0 resources/public/cljs/clojure/browser/event.js
  11. +160 −0 resources/public/cljs/clojure/string.cljs
  12. +270 −0 resources/public/cljs/clojure/string.js
  13. +7 −0 resources/public/cljs/coding/client/core.js
  14. +29 −0 resources/public/cljs/coding/client/debug.js
  15. +198 −0 resources/public/cljs/coding/client/editor.js
  16. +260 −0 resources/public/cljs/coding/client/main.js
  17. +30 −0 resources/public/cljs/coding/client/util.js
  18. +476 −0 resources/public/cljs/jayq/core.js
  19. +106 −0 resources/public/cljs/jayq/util.js
  20. +385 −0 resources/public/cljs/monet/canvas.js
  21. +36 −0 resources/public/cljs/monet/core.js
  22. +125 −0 resources/public/cljs/monet/geometry.js
  23. +27 −0 resources/public/cljs/waltz/history.js
  24. +409 −0 resources/public/cljs/waltz/state.js
  25. +49 −0 resources/public/cljs/waltz/transition.js
  26. +107 −0 resources/public/css/codemirrorDark.css
  27. +32 −0 resources/public/css/defaultDark.css
  28. +57 −0 resources/public/css/reset.css
  29. BIN resources/public/img/black-Linen.png
  30. BIN resources/public/img/black-Linen2.png
  31. BIN resources/public/img/domo.png
  32. BIN resources/public/img/fabric_plaid.png
  33. +218 −0 resources/public/js/clojure-mode.js
  34. +95 −0 resources/public/js/codemirror2.js
  35. +360 −0 resources/public/js/javascript.js
  36. +18 −0 resources/public/js/jquery.js
  37. +7 −0 src/coding/client/core.cljs
  38. +7 −0 src/coding/client/debug.cljs
  39. +210 −0 src/coding/client/editor.cljs
  40. +185 −0 src/coding/client/main.cljs
  41. +11 −0 src/coding/client/util.cljs
  42. +47 −0 src/coding/models/box.clj
  43. +13 −0 src/coding/server.clj
  44. +38 −0 src/coding/views/common.clj
  45. +43 −0 src/coding/views/main.clj
9 .gitignore
@@ -0,0 +1,9 @@
+pom.xml
+*jar
+/lib/
+/classes/
+.lein-deps-sum
+src/pinot*
+src/noir*
+cljs-macros*
+.repl*
1 Procfile
@@ -0,0 +1 @@
+web: lein trampoline run prod
17 README.md
@@ -0,0 +1,17 @@
+# coding
+
+A website written in noir.
+
+## Usage
+
+```bash
+lein deps
+lein run
+```
+
+## License
+
+Copyright (C) 2011 FIXME
+
+Distributed under the Eclipse Public License, the same as Clojure.
+
20 project.clj
@@ -0,0 +1,20 @@
+(defproject coding "0.1.0-SNAPSHOT"
+ :description "FIXME: write this!"
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [noir "1.3.0-alpha7"]
+ [congomongo "0.1.7"]
+ [org.clojure/clojurescript "0.0-971"]
+ [ibdknox/clojail "0.5.2"]
+ ]
+ :cljsbuild {:repl-listen-port 9001
+ :builds
+ [{:source-path "src",
+ :compiler
+ {:output-dir "resources/public/cljs/",
+ :output-to "resources/public/cljs/bootstrap.js",
+ :optimizations :simple,
+ :externs ["checkouts/jayq/resources/externs/jquery.js"
+ "resources/externs/codemirror.js"],
+ :pretty-print true}}]}
+ :main coding.server)
+
9 resources/externs/codemirror.js
@@ -0,0 +1,9 @@
+function CodeMirror(arg) {}
+CodeMirror.prototype.setOption = function(a,b) {};
+CodeMirror.prototype.getValue = function(a,b) {};
+CodeMirror.prototype.setValue = function(a,b) {};
+CodeMirror.prototype.focus = function(a,b) {};
+CodeMirror.prototype.refresh = function(a,b) {};
+CodeMirror.prototype.setLineClass = function(a,b) {};
+CodeMirror.prototype.fromTextArea = function(a,b) {};
+
11,303 resources/public/cljs/bootstrap.js
11,303 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
3,553 resources/public/cljs/cljs/core.cljs
3,553 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
12,085 resources/public/cljs/cljs/core.js
12,085 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
100 resources/public/cljs/clojure/browser/event.cljs
@@ -0,0 +1,100 @@
+;; Copyright (c) Rich Hickey. All rights reserved.
+;; The use and distribution terms for this software are covered by the
+;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;; which can be found in the file epl-v10.html at the root of this distribution.
+;; By using this software in any fashion, you are agreeing to be bound by
+;; the terms of this license.
+;; You must not remove this notice, or any other, from this software.
+
+(ns ^{:doc "This namespace contains functions to work with browser
+events. It is based on the Google Closure Library event system."
+ :author "Bobby Calderwood"}
+ clojure.browser.event
+ (:require [goog.events :as events]
+ [goog.events.EventTarget :as gevent-target]
+ [goog.events.EventType :as gevent-type]))
+
+(defprotocol EventType
+ (event-types [this]))
+
+(extend-protocol EventType
+
+ goog.events.EventTarget
+ (event-types
+ [this]
+ (into {}
+ (map
+ (fn [[k v]]
+ [(keyword (. k (toLowerCase)))
+ v])
+ (merge
+ (js->clj goog.events.EventType)))))
+
+ js/Element
+ (event-types
+ [this]
+ (into {}
+ (map
+ (fn [[k v]]
+ [(keyword (. k (toLowerCase)))
+ v])
+ (merge
+ (js->clj goog.events.EventType))))))
+
+(defn listen
+ ([src type fn]
+ (listen src type fn false))
+ ([src type fn capture?]
+ (goog.events/listen src
+ (get (event-types src) type type)
+ fn
+ capture?)))
+
+(defn listen-once
+ ([src type fn]
+ (listen-once src type fn false))
+ ([src type fn capture?]
+ (goog.events/listenOnce src
+ (get (event-types src) type type)
+ fn
+ capture?)))
+
+(defn unlisten
+ ([src type fn]
+ (unlisten src type fn false))
+ ([src type fn capture?]
+ (goog.events/unlisten src
+ (get (event-types src) type type)
+ fn
+ capture?)))
+
+(defn unlisten-by-key
+ [key]
+ (goog.events/unlistenByKey key))
+
+(defn dispatch-event
+ [src event]
+ (goog.events/dispatchEvent src event))
+
+(defn expose [e]
+ (goog.events/expose e))
+
+(defn fire-listeners
+ [obj type capture event])
+
+(defn total-listener-count []
+ (goog.events/getTotalListenerCount))
+
+;; TODO
+(defn get-listener [src type listener opt_capt opt_handler]); ⇒ ?Listener
+(defn all-listeners [obj type capture]); ⇒ Array.<Listener>
+
+(defn unique-event-id [event-type]); ⇒ string
+
+(defn has-listener [obj opt_type opt_capture]); ⇒ boolean
+;; TODO? (defn listen-with-wrapper [src wrapper listener opt_capt opt_handler])
+;; TODO? (defn protect-browser-event-entry-point [errorHandler])
+
+(defn remove-all [opt_obj opt_type opt_capt]); ⇒ number
+;; TODO? (defn unlisten-with-wrapper [src wrapper listener opt_capt opt_handler])
+
143 resources/public/cljs/clojure/browser/event.js
@@ -0,0 +1,143 @@
+goog.provide('clojure.browser.event');
+goog.require('cljs.core');
+goog.require('goog.events');
+goog.require('goog.events.EventTarget');
+goog.require('goog.events.EventType');
+clojure.browser.event.EventType = {};
+clojure.browser.event.event_types = (function event_types(this$){
+if(cljs.core.truth_((function (){var and__3546__auto____460303 = this$;
+
+if(cljs.core.truth_(and__3546__auto____460303))
+{return this$.clojure$browser$event$EventType$event_types;
+} else
+{return and__3546__auto____460303;
+}
+})()))
+{return this$.clojure$browser$event$EventType$event_types(this$);
+} else
+{return (function (){var or__3548__auto____460304 = (clojure.browser.event.event_types[goog.typeOf.call(null,this$)]);
+
+if(cljs.core.truth_(or__3548__auto____460304))
+{return or__3548__auto____460304;
+} else
+{var or__3548__auto____460305 = (clojure.browser.event.event_types["_"]);
+
+if(cljs.core.truth_(or__3548__auto____460305))
+{return or__3548__auto____460305;
+} else
+{throw cljs.core.missing_protocol.call(null,"EventType.event-types",this$);
+}
+}
+})().call(null,this$);
+}
+});
+Element.prototype.clojure$browser$event$EventType$ = true;
+Element.prototype.clojure$browser$event$EventType$event_types = (function (this$){
+return cljs.core.into.call(null,cljs.core.ObjMap.fromObject([],{}),cljs.core.map.call(null,(function (p__460306){
+var vec__460307__460308 = p__460306;
+var k__460309 = cljs.core.nth.call(null,vec__460307__460308,0,null);
+var v__460310 = cljs.core.nth.call(null,vec__460307__460308,1,null);
+
+return cljs.core.Vector.fromArray([cljs.core.keyword.call(null,k__460309.toLowerCase()),v__460310]);
+}),cljs.core.merge.call(null,cljs.core.js__GT_clj.call(null,goog.events.EventType))));
+});
+goog.events.EventTarget.prototype.clojure$browser$event$EventType$ = true;
+goog.events.EventTarget.prototype.clojure$browser$event$EventType$event_types = (function (this$){
+return cljs.core.into.call(null,cljs.core.ObjMap.fromObject([],{}),cljs.core.map.call(null,(function (p__460311){
+var vec__460312__460313 = p__460311;
+var k__460314 = cljs.core.nth.call(null,vec__460312__460313,0,null);
+var v__460315 = cljs.core.nth.call(null,vec__460312__460313,1,null);
+
+return cljs.core.Vector.fromArray([cljs.core.keyword.call(null,k__460314.toLowerCase()),v__460315]);
+}),cljs.core.merge.call(null,cljs.core.js__GT_clj.call(null,goog.events.EventType))));
+});
+clojure.browser.event.listen = (function() {
+var listen = null;
+var listen__460316 = (function (src,type,fn){
+return listen.call(null,src,type,fn,false);
+});
+var listen__460317 = (function (src,type,fn,capture_QMARK_){
+return goog.events.listen.call(null,src,cljs.core.get.call(null,clojure.browser.event.event_types.call(null,src),type,type),fn,capture_QMARK_);
+});
+listen = function(src,type,fn,capture_QMARK_){
+switch(arguments.length){
+case 3 :
+return listen__460316.call(this,src,type,fn);
+case 4 :
+return listen__460317.call(this,src,type,fn,capture_QMARK_);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return listen;
+})()
+;
+clojure.browser.event.listen_once = (function() {
+var listen_once = null;
+var listen_once__460319 = (function (src,type,fn){
+return listen_once.call(null,src,type,fn,false);
+});
+var listen_once__460320 = (function (src,type,fn,capture_QMARK_){
+return goog.events.listenOnce.call(null,src,cljs.core.get.call(null,clojure.browser.event.event_types.call(null,src),type,type),fn,capture_QMARK_);
+});
+listen_once = function(src,type,fn,capture_QMARK_){
+switch(arguments.length){
+case 3 :
+return listen_once__460319.call(this,src,type,fn);
+case 4 :
+return listen_once__460320.call(this,src,type,fn,capture_QMARK_);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return listen_once;
+})()
+;
+clojure.browser.event.unlisten = (function() {
+var unlisten = null;
+var unlisten__460322 = (function (src,type,fn){
+return unlisten.call(null,src,type,fn,false);
+});
+var unlisten__460323 = (function (src,type,fn,capture_QMARK_){
+return goog.events.unlisten.call(null,src,cljs.core.get.call(null,clojure.browser.event.event_types.call(null,src),type,type),fn,capture_QMARK_);
+});
+unlisten = function(src,type,fn,capture_QMARK_){
+switch(arguments.length){
+case 3 :
+return unlisten__460322.call(this,src,type,fn);
+case 4 :
+return unlisten__460323.call(this,src,type,fn,capture_QMARK_);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return unlisten;
+})()
+;
+clojure.browser.event.unlisten_by_key = (function unlisten_by_key(key){
+return goog.events.unlistenByKey.call(null,key);
+});
+clojure.browser.event.dispatch_event = (function dispatch_event(src,event){
+return goog.events.dispatchEvent.call(null,src,event);
+});
+clojure.browser.event.expose = (function expose(e){
+return goog.events.expose.call(null,e);
+});
+clojure.browser.event.fire_listeners = (function fire_listeners(obj,type,capture,event){
+return null;
+});
+clojure.browser.event.total_listener_count = (function total_listener_count(){
+return goog.events.getTotalListenerCount.call(null);
+});
+clojure.browser.event.get_listener = (function get_listener(src,type,listener,opt_capt,opt_handler){
+return null;
+});
+clojure.browser.event.all_listeners = (function all_listeners(obj,type,capture){
+return null;
+});
+clojure.browser.event.unique_event_id = (function unique_event_id(event_type){
+return null;
+});
+clojure.browser.event.has_listener = (function has_listener(obj,opt_type,opt_capture){
+return null;
+});
+clojure.browser.event.remove_all = (function remove_all(opt_obj,opt_type,opt_capt){
+return null;
+});
160 resources/public/cljs/clojure/string.cljs
@@ -0,0 +1,160 @@
+; Copyright (c) Rich Hickey. All rights reserved.
+; The use and distribution terms for this software are covered by the
+; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+; which can be found in the file epl-v10.html at the root of this distribution.
+; By using this software in any fashion, you are agreeing to be bound by
+; the terms of this license.
+; You must not remove this notice, or any other, from this software.
+
+(ns clojure.string
+ (:refer-clojure :exclude [replace reverse])
+ (:require [goog.string :as gstring]
+ [goog.string.StringBuffer :as gstringbuf]))
+
+(defn- seq-reverse
+ [coll]
+ (reduce conj () coll))
+
+(defn reverse
+ "Returns s with its characters reversed."
+ [s]
+ (.. s (split "") (reverse) (join "")))
+
+(defn replace
+ "Replaces all instance of match with replacement in s.
+ match/replacement can be:
+
+ string / string
+ pattern / (string or function of match)."
+ [s match replacement]
+ (cond (string? match)
+ (.replace s (js/RegExp. (gstring/regExpEscape match) "g") replacement)
+ (.hasOwnProperty match "source")
+ (.replace s (js/RegExp. (.-source match) "g") replacement)
+ :else (throw (str "Invalid match arg: " match))))
+
+(defn replace-first
+ "Replaces the first instance of match with replacement in s.
+ match/replacement can be:
+
+ string / string
+ pattern / (string or function of match)."
+ [s match replacement]
+ (.replace s match replacement))
+
+(defn join
+ "Returns a string of all elements in coll, as returned by (seq coll),
+ separated by an optional separator."
+ ([coll]
+ (apply str coll))
+ ([separator coll]
+ (apply str (interpose separator coll))))
+
+(defn upper-case
+ "Converts string to all upper-case."
+ [s]
+ (. s (toUpperCase)))
+
+(defn lower-case
+ "Converts string to all lower-case."
+ [s]
+ (. s (toLowerCase)))
+
+(defn capitalize
+ "Converts first character of the string to upper-case, all other
+ characters to lower-case."
+ [s]
+ (if (< (count s) 2)
+ (upper-case s)
+ (str (upper-case (subs s 0 1))
+ (lower-case (subs s 1)))))
+
+;; The JavaScript split function takes a limit argument but the return
+;; value is not the same as the Java split function.
+;;
+;; Java: (.split "a-b-c" #"-" 2) => ["a" "b-c"]
+;; JavaScript: (.split "a-b-c" #"-" 2) => ["a" "b"]
+;;
+;; For consistency, the three arg version has been implemented to
+;; mimic Java's behavior.
+
+(defn split
+ "Splits string on a regular expression. Optional argument limit is
+ the maximum number of splits. Not lazy. Returns vector of the splits."
+ ([s re]
+ (vec (.split (str s) re)))
+ ([s re limit]
+ (if (< limit 1)
+ (vec (.split (str s) re))
+ (loop [s s
+ limit limit
+ parts []]
+ (if (= limit 1)
+ (conj parts s)
+ (if-let [m (re-find re s)]
+ (let [index (.indexOf s m)]
+ (recur (.substring s (+ index (count m)))
+ (dec limit)
+ (conj parts (.substring s 0 index))))
+ (conj parts s)))))))
+
+(defn split-lines
+ "Splits s on \n or \r\n."
+ [s]
+ (split s #"\n|\r\n"))
+
+(defn trim
+ "Removes whitespace from both ends of string."
+ [s]
+ (gstring/trim s))
+
+(defn triml
+ "Removes whitespace from the left side of string."
+ [s]
+ (gstring/trimLeft s))
+
+(defn trimr
+ "Removes whitespace from the right side of string."
+ [s]
+ (gstring/trimRight s))
+
+(defn trim-newline
+ "Removes all trailing newline \\n or return \\r characters from
+ string. Similar to Perl's chomp."
+ [s]
+ (loop [index (.-length s)]
+ (if (zero? index)
+ ""
+ (let [ch (get s (dec index))]
+ (if (or (= ch \newline) (= ch \return))
+ (recur (dec index))
+ (.substring s 0 index))))))
+
+(defn blank?
+ "True is s is nil, empty, or contains only whitespace."
+ [s]
+ (let [s (str s)]
+ (if (or
+ (not s)
+ (= "" s)
+ (re-matches #"\s+" s))
+ true
+ false)))
+
+(defn escape
+ "Return a new string, using cmap to escape each character ch
+ from s as follows:
+
+ If (cmap ch) is nil, append ch to the new string.
+ If (cmap ch) is non-nil, append (str (cmap ch)) instead."
+ [s cmap]
+ (let [buffer (gstring/StringBuffer.)
+ length (.-length s)]
+ (loop [index 0]
+ (if (= length index)
+ (. buffer (toString))
+ (let [ch (.charAt s index)]
+ (if-let [replacement (get cmap ch)]
+ (.append buffer (str replacement))
+ (.append buffer ch))
+ (recur (inc index)))))))
270 resources/public/cljs/clojure/string.js
@@ -0,0 +1,270 @@
+goog.provide('clojure.string');
+goog.require('cljs.core');
+goog.require('goog.string');
+goog.require('goog.string.StringBuffer');
+clojure.string.seq_reverse = (function seq_reverse(coll){
+return cljs.core.reduce.call(null,cljs.core.conj,cljs.core.List.EMPTY,coll);
+});
+/**
+* Returns s with its characters reversed.
+*/
+clojure.string.reverse = (function reverse(s){
+return s.split("").reverse().join("");
+});
+/**
+* Replaces all instance of match with replacement in s.
+* match/replacement can be:
+*
+* string / string
+* pattern / (string or function of match).
+*/
+clojure.string.replace = (function replace(s,match,replacement){
+if(cljs.core.truth_(cljs.core.string_QMARK_.call(null,match)))
+{return s.replace((new RegExp(goog.string.regExpEscape.call(null,match),"g")),replacement);
+} else
+{if(cljs.core.truth_(match.hasOwnProperty("source")))
+{return s.replace((new RegExp(match.source,"g")),replacement);
+} else
+{if(cljs.core.truth_("﷐'else"))
+{throw cljs.core.str.call(null,"Invalid match arg: ",match);
+} else
+{return null;
+}
+}
+}
+});
+/**
+* Replaces the first instance of match with replacement in s.
+* match/replacement can be:
+*
+* string / string
+* pattern / (string or function of match).
+*/
+clojure.string.replace_first = (function replace_first(s,match,replacement){
+return s.replace(match,replacement);
+});
+/**
+* Returns a string of all elements in coll, as returned by (seq coll),
+* separated by an optional separator.
+*/
+clojure.string.join = (function() {
+var join = null;
+var join__460264 = (function (coll){
+return cljs.core.apply.call(null,cljs.core.str,coll);
+});
+var join__460265 = (function (separator,coll){
+return cljs.core.apply.call(null,cljs.core.str,cljs.core.interpose.call(null,separator,coll));
+});
+join = function(separator,coll){
+switch(arguments.length){
+case 1 :
+return join__460264.call(this,separator);
+case 2 :
+return join__460265.call(this,separator,coll);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return join;
+})()
+;
+/**
+* Converts string to all upper-case.
+*/
+clojure.string.upper_case = (function upper_case(s){
+return s.toUpperCase();
+});
+/**
+* Converts string to all lower-case.
+*/
+clojure.string.lower_case = (function lower_case(s){
+return s.toLowerCase();
+});
+/**
+* Converts first character of the string to upper-case, all other
+* characters to lower-case.
+*/
+clojure.string.capitalize = (function capitalize(s){
+if(cljs.core.truth_((cljs.core.count.call(null,s) < 2)))
+{return clojure.string.upper_case.call(null,s);
+} else
+{return cljs.core.str.call(null,clojure.string.upper_case.call(null,cljs.core.subs.call(null,s,0,1)),clojure.string.lower_case.call(null,cljs.core.subs.call(null,s,1)));
+}
+});
+/**
+* Splits string on a regular expression. Optional argument limit is
+* the maximum number of splits. Not lazy. Returns vector of the splits.
+*/
+clojure.string.split = (function() {
+var split = null;
+var split__460273 = (function (s,re){
+return cljs.core.vec.call(null,cljs.core.str.call(null,s).split(re));
+});
+var split__460274 = (function (s,re,limit){
+if(cljs.core.truth_((limit < 1)))
+{return cljs.core.vec.call(null,cljs.core.str.call(null,s).split(re));
+} else
+{var s__460267 = s;
+var limit__460268 = limit;
+var parts__460269 = cljs.core.Vector.fromArray([]);
+
+while(true){
+if(cljs.core.truth_(cljs.core._EQ_.call(null,limit__460268,1)))
+{return cljs.core.conj.call(null,parts__460269,s__460267);
+} else
+{var temp__3695__auto____460270 = cljs.core.re_find.call(null,re,s__460267);
+
+if(cljs.core.truth_(temp__3695__auto____460270))
+{var m__460271 = temp__3695__auto____460270;
+
+var index__460272 = s__460267.indexOf(m__460271);
+
+{
+var G__460276 = s__460267.substring((index__460272 + cljs.core.count.call(null,m__460271)));
+var G__460277 = (limit__460268 - 1);
+var G__460278 = cljs.core.conj.call(null,parts__460269,s__460267.substring(0,index__460272));
+s__460267 = G__460276;
+limit__460268 = G__460277;
+parts__460269 = G__460278;
+continue;
+}
+} else
+{return cljs.core.conj.call(null,parts__460269,s__460267);
+}
+}
+break;
+}
+}
+});
+split = function(s,re,limit){
+switch(arguments.length){
+case 2 :
+return split__460273.call(this,s,re);
+case 3 :
+return split__460274.call(this,s,re,limit);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return split;
+})()
+;
+/**
+* Splits s on
+* or
+* .
+*/
+clojure.string.split_lines = (function split_lines(s){
+return clojure.string.split.call(null,s,/\n|\r\n/);
+});
+/**
+* Removes whitespace from both ends of string.
+*/
+clojure.string.trim = (function trim(s){
+return goog.string.trim.call(null,s);
+});
+/**
+* Removes whitespace from the left side of string.
+*/
+clojure.string.triml = (function triml(s){
+return goog.string.trimLeft.call(null,s);
+});
+/**
+* Removes whitespace from the right side of string.
+*/
+clojure.string.trimr = (function trimr(s){
+return goog.string.trimRight.call(null,s);
+});
+/**
+* Removes all trailing newline \n or return \r characters from
+* string. Similar to Perl's chomp.
+*/
+clojure.string.trim_newline = (function trim_newline(s){
+var index__460279 = s.length;
+
+while(true){
+if(cljs.core.truth_((index__460279 === 0)))
+{return "";
+} else
+{var ch__460280 = cljs.core.get.call(null,s,(index__460279 - 1));
+
+if(cljs.core.truth_((function (){var or__3548__auto____460281 = cljs.core._EQ_.call(null,ch__460280,"\n");
+
+if(cljs.core.truth_(or__3548__auto____460281))
+{return or__3548__auto____460281;
+} else
+{return cljs.core._EQ_.call(null,ch__460280,"\r");
+}
+})()))
+{{
+var G__460282 = (index__460279 - 1);
+index__460279 = G__460282;
+continue;
+}
+} else
+{return s.substring(0,index__460279);
+}
+}
+break;
+}
+});
+/**
+* True is s is nil, empty, or contains only whitespace.
+*/
+clojure.string.blank_QMARK_ = (function blank_QMARK_(s){
+var s__460283 = cljs.core.str.call(null,s);
+
+if(cljs.core.truth_((function (){var or__3548__auto____460284 = cljs.core.not.call(null,s__460283);
+
+if(cljs.core.truth_(or__3548__auto____460284))
+{return or__3548__auto____460284;
+} else
+{var or__3548__auto____460285 = cljs.core._EQ_.call(null,"",s__460283);
+
+if(cljs.core.truth_(or__3548__auto____460285))
+{return or__3548__auto____460285;
+} else
+{return cljs.core.re_matches.call(null,/\s+/,s__460283);
+}
+}
+})()))
+{return true;
+} else
+{return false;
+}
+});
+/**
+* Return a new string, using cmap to escape each character ch
+* from s as follows:
+*
+* If (cmap ch) is nil, append ch to the new string.
+* If (cmap ch) is non-nil, append (str (cmap ch)) instead.
+*/
+clojure.string.escape = (function escape(s,cmap){
+var buffer__460286 = (new goog.string.StringBuffer());
+var length__460287 = s.length;
+
+var index__460288 = 0;
+
+while(true){
+if(cljs.core.truth_(cljs.core._EQ_.call(null,length__460287,index__460288)))
+{return buffer__460286.toString();
+} else
+{var ch__460289 = s.charAt(index__460288);
+
+var temp__3695__auto____460290 = cljs.core.get.call(null,cmap,ch__460289);
+
+if(cljs.core.truth_(temp__3695__auto____460290))
+{var replacement__460291 = temp__3695__auto____460290;
+
+buffer__460286.append(cljs.core.str.call(null,replacement__460291));
+} else
+{buffer__460286.append(ch__460289);
+}
+{
+var G__460292 = (index__460288 + 1);
+index__460288 = G__460292;
+continue;
+}
+}
+break;
+}
+});
7 resources/public/cljs/coding/client/core.js
@@ -0,0 +1,7 @@
+goog.provide('coding.client.core');
+goog.require('cljs.core');
+goog.require('waltz.state');
+cljs.core._STAR_print_fn_STAR_ = (function (p1__458349_SHARP_){
+return console.log(p1__458349_SHARP_);
+});
+coding.client.core.app = waltz.state.machine.call(null,"﷐'app");
29 resources/public/cljs/coding/client/debug.js
@@ -0,0 +1,29 @@
+goog.provide('coding.client.debug');
+goog.require('cljs.core');
+coding.client.debug.debug_QMARK_ = true;
+/**
+* @param {...*} var_args
+*/
+coding.client.debug.debug_log = (function() {
+var debug_log__delegate = function (vs){
+if(cljs.core.truth_(coding.client.debug.debug_QMARK_))
+{return console.log(cljs.core.apply.call(null,cljs.core.str,vs));
+} else
+{return null;
+}
+};
+var debug_log = function (var_args){
+var vs = null;
+if (goog.isDef(var_args)) {
+ vs = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);
+}
+return debug_log__delegate.call(this, vs);
+};
+debug_log.cljs$lang$maxFixedArity = 0;
+debug_log.cljs$lang$applyTo = (function (arglist__458350){
+var vs = cljs.core.seq( arglist__458350 );;
+return debug_log__delegate.call(this, vs);
+});
+return debug_log;
+})()
+;
198 resources/public/cljs/coding/client/editor.js
@@ -0,0 +1,198 @@
+goog.provide('coding.client.editor');
+goog.require('cljs.core');
+goog.require('waltz.state');
+goog.require('coding.client.util');
+goog.require('jayq.util');
+goog.require('coding.client.core');
+goog.require('jayq.core');
+goog.require('waltz.state');
+coding.client.editor.do_submit = (function do_submit(){
+return jayq.core.trigger.call(null,jayq.core.$.call(null,"﷐'form"),"﷐'submit");
+});
+coding.client.editor.key_bindings = cljs.core.ObjMap.fromObject(["Cmd-Enter","Ctrl-Enter"],{"Cmd-Enter":coding.client.editor.do_submit,"Ctrl-Enter":coding.client.editor.do_submit});
+coding.client.editor.__GT_editor = (function __GT_editor(elem,opts){
+return CodeMirror['fromTextArea'].call(null,document.getElementById(elem),jayq.util.map__GT_js.call(null,opts));
+});
+/**
+* @param {...*} var_args
+*/
+coding.client.editor.make_editor = (function() {
+var make_editor__delegate = function (p__458351){
+var vec__458352__458353 = p__458351;
+var mode__458354 = cljs.core.nth.call(null,vec__458352__458353,0,null);
+
+var e__458356 = coding.client.editor.__GT_editor.call(null,"codes",cljs.core.ObjMap.fromObject(["﷐'mode","﷐'lineNumbers","﷐'matchBrackets","﷐'extraKeys"],{"﷐'mode":(function (){var or__3548__auto____458355 = mode__458354;
+
+if(cljs.core.truth_(or__3548__auto____458355))
+{return or__3548__auto____458355;
+} else
+{return "text/x-clojure";
+}
+})(),"﷐'lineNumbers":false,"﷐'matchBrackets":true,"﷐'extraKeys":jayq.util.map__GT_js.call(null,coding.client.editor.key_bindings)}));
+
+return e__458356;
+};
+var make_editor = function (var_args){
+var p__458351 = null;
+if (goog.isDef(var_args)) {
+ p__458351 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);
+}
+return make_editor__delegate.call(this, p__458351);
+};
+make_editor.cljs$lang$maxFixedArity = 0;
+make_editor.cljs$lang$applyTo = (function (arglist__458357){
+var p__458351 = cljs.core.seq( arglist__458357 );;
+return make_editor__delegate.call(this, p__458351);
+});
+return make_editor;
+})()
+;
+coding.client.editor.$errors = jayq.core.$.call(null,"#errors");
+coding.client.editor.error_lines = cljs.core.atom.call(null,cljs.core.Vector.fromArray([]));
+coding.client.editor.state = waltz.state.machine.call(null,"﷐'editor");
+coding.client.editor.editor = coding.client.editor.make_editor.call(null);
+coding.client.editor.clj_submit_url = "/submit";
+coding.client.editor.error_line = (function error_line(l,klass){
+return coding.client.editor.editor.setLineClass(l,cljs.core.name.call(null,klass));
+});
+coding.client.editor.submit_code = (function submit_code(){
+var codes__458358 = coding.client.editor.__GT_val.call(null,coding.client.editor.editor);
+var loc__458359 = jayq.core.attr.call(null,jayq.core.$.call(null,"﷐'form"),"﷐'action");
+
+return jayq.core.xhr.call(null,cljs.core.Vector.fromArray(["﷐'post",loc__458359]),cljs.core.ObjMap.fromObject(["﷐'codes"],{"﷐'codes":codes__458358}),(function (v){
+var map__458360__458361 = cljs.core.js__GT_clj.call(null,v,"﷐'keywordize-keys",true);
+var map__458360__458362 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__458360__458361))?cljs.core.apply.call(null,cljs.core.hash_map,map__458360__458361):map__458360__458361);
+var exception__458363 = cljs.core.get.call(null,map__458360__458362,"﷐'exception");
+var out__458364 = cljs.core.get.call(null,map__458360__458362,"﷐'out");
+var result__458365 = cljs.core.get.call(null,map__458360__458362,"﷐'result");
+var moves__458366 = cljs.core.get.call(null,map__458360__458362,"﷐'moves");
+
+if(cljs.core.truth_(exception__458363))
+{waltz.state.transition.call(null,coding.client.editor.state,"﷐'error",exception__458363);
+} else
+{}
+coding.client.util.log.call(null,cljs.core.pr_str.call(null,moves__458366));
+return waltz.state.transition.call(null,coding.client.core.app,"﷐'executing",v);
+}));
+});
+coding.client.editor.__GT_val = (function __GT_val(){
+return coding.client.editor.editor.getValue();
+});
+coding.client.editor.set_val = (function set_val(v){
+return coding.client.editor.editor.setValue(v);
+});
+coding.client.editor.set_mode = (function set_mode(m){
+return coding.client.editor.editor.setOption("mode",m);
+});
+coding.client.editor.set_submit_url = (function set_submit_url(u){
+return jayq.core.attr.call(null,jayq.core.$.call(null,"﷐'form"),"﷐'action",u);
+});
+coding.client.editor.focus = (function focus(){
+return coding.client.editor.editor.focus();
+});
+coding.client.editor.refresh = (function refresh(){
+return coding.client.editor.editor.refresh();
+});
+var s__3008__auto____458387 = waltz.state.out_STAR_.call(null,waltz.state.in_STAR_.call(null,waltz.state.state_STAR_.call(null),(function (p__458367){
+var map__458368__458369 = p__458367;
+var map__458368__458370 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__458368__458369))?cljs.core.apply.call(null,cljs.core.hash_map,map__458368__458369):map__458368__458369);
+var stack__458371 = cljs.core.get.call(null,map__458368__458370,"﷐'stack");
+var message__458372 = cljs.core.get.call(null,map__458368__458370,"﷐'message");
+
+cljs.core.reset_BANG_.call(null,coding.client.editor.error_lines,cljs.core.map.call(null,cljs.core.comp.call(null,cljs.core.dec,"﷐'line"),cljs.core.filter.call(null,"﷐'line",stack__458371)));
+var temp__3698__auto____458373 = cljs.core.seq.call(null,cljs.core.deref.call(null,coding.client.editor.error_lines));
+
+if(cljs.core.truth_(temp__3698__auto____458373))
+{var lines__458374 = temp__3698__auto____458373;
+
+coding.client.editor.error_line.call(null,cljs.core.first.call(null,lines__458374),"﷐'error-source");
+var G__458375__458376 = cljs.core.seq.call(null,cljs.core.rest.call(null,lines__458374));
+
+if(cljs.core.truth_(G__458375__458376))
+{var l__458377 = cljs.core.first.call(null,G__458375__458376);
+var G__458375__458378 = G__458375__458376;
+
+while(true){
+coding.client.editor.error_line.call(null,l__458377,"﷐'error-stack");
+var temp__3698__auto____458379 = cljs.core.next.call(null,G__458375__458378);
+
+if(cljs.core.truth_(temp__3698__auto____458379))
+{var G__458375__458380 = temp__3698__auto____458379;
+
+{
+var G__458388 = cljs.core.first.call(null,G__458375__458380);
+var G__458389 = G__458375__458380;
+l__458377 = G__458388;
+G__458375__458378 = G__458389;
+continue;
+}
+} else
+{}
+break;
+}
+} else
+{}
+} else
+{}
+jayq.core.text.call(null,coding.client.editor.$errors,message__458372);
+return jayq.core.slide_down.call(null,coding.client.editor.$errors);
+})),(function (){
+jayq.core.slide_up.call(null,coding.client.editor.$errors,"fast",(function (){
+return coding.client.editor.hide.call(null,coding.client.editor.$errors);
+}));
+var G__458381__458382 = cljs.core.seq.call(null,cljs.core.deref.call(null,coding.client.editor.error_lines));
+
+if(cljs.core.truth_(G__458381__458382))
+{var l__458383 = cljs.core.first.call(null,G__458381__458382);
+var G__458381__458384 = G__458381__458382;
+
+while(true){
+coding.client.editor.editor.setLineClass(l__458383,null);
+var temp__3698__auto____458385 = cljs.core.next.call(null,G__458381__458384);
+
+if(cljs.core.truth_(temp__3698__auto____458385))
+{var G__458381__458386 = temp__3698__auto____458385;
+
+{
+var G__458390 = cljs.core.first.call(null,G__458381__458386);
+var G__458391 = G__458381__458386;
+l__458383 = G__458390;
+G__458381__458384 = G__458391;
+continue;
+}
+} else
+{}
+break;
+}
+} else
+{}
+return cljs.core.reset_BANG_.call(null,coding.client.editor.error_lines,cljs.core.Vector.fromArray([]));
+}));
+
+waltz.state.add_state.call(null,coding.client.editor.state,"﷐'error",s__3008__auto____458387);
+var s__3008__auto____458392 = waltz.state.in_STAR_.call(null,waltz.state.state_STAR_.call(null),(function (){
+coding.client.editor.set_mode.call(null,"text/x-clojure");
+coding.client.editor.set_submit_url.call(null,coding.client.editor.clj_submit_url);
+coding.client.editor.set_val.call(null,"\n;; Click the right pane to focus the game:\n;; - Arrow keys move you left and right\n;; - Space makes you jump\n;; - Clicking the canvas will place a block\n;; - s pauses the game and show you a history of what you did.\n;; change how the game works, see how it affects the history :)\n\n(defn gravity [{:keys [vy y] :as me}]\n (let [g 0.5\n vy (or vy 0)\n neue-vy (+ vy g)\n dir (if (< neue-vy 0) :up :down)\n moved (update-in me [:y] + neue-vy)]\n (if-let [block (colliding? moved)]\n (let [block-edge (if (= dir :up)\n (+ (:y block) (:h block) (:r me))\n (- (:y block) (:r me)))]\n (assoc me :y block-edge\n :jumping (= dir :up)\n :vy 0))\n (-> moved\n (assoc :vy neue-vy)))))\n\n(defn jump [me]\n (let [speed -10]\n (if (and (input? :space)\n (and (not (:jumping me)) (zero? (:vy me))))\n (assoc me :vy speed\n :jumping true)\n me)))\n\n(defn move [me]\n (let [speed 5\n vx (cond\n (input? :left) (- speed)\n (input? :right) speed\n :else 0)\n moved (update-in me [:x] + vx)]\n (if (zero? vx) \n me\n (if-let [block (colliding? moved)]\n (let [block-edge (if (< vx 0)\n (+ (:x block) (:w block) (:r me))\n (- (:x block) (:r me)))]\n\n (assoc me :x block-edge))\n moved))))\n\n(defn reset [me]\n (if (> (:y me) 650)\n (-> me\n (assoc :x 30)\n (assoc :y 30)\n (assoc :vy 0))\n me))\n\n(defn update-player [me]\n (-> me\n (gravity)\n (move)\n (jump)\n (reset)\n ))\n\n(defn draw-player [ctx me]\n (-> ctx\n (canvas/fill-style \"#449\")\n (canvas/stroke-style \"#68d\")\n (canvas/stroke-width 2)\n (canvas/circle me)\n (canvas/stroke)))");
+return coding.client.editor.submit_code.call(null);
+}));
+
+waltz.state.add_state.call(null,coding.client.editor.state,"﷐'clojure",s__3008__auto____458392);
+waltz.state.add_transition.call(null,coding.client.editor.state,"﷐'clean",(function (){
+return waltz.state.unset.call(null,coding.client.editor.state,"﷐'error");
+}));
+waltz.state.add_transition.call(null,coding.client.editor.state,"﷐'set-language",(function (lang){
+waltz.state.transition.call(null,coding.client.editor.state,"﷐'clean");
+return waltz.state.set.call(null,coding.client.editor.state,lang);
+}));
+waltz.state.add_transition.call(null,coding.client.editor.state,"﷐'submit",(function (){
+waltz.state.unset.call(null,coding.client.editor.state,"﷐'error");
+return coding.client.editor.submit_code.call(null);
+}));
+waltz.state.add_transition.call(null,coding.client.editor.state,"﷐'error",(function (ex){
+return waltz.state.set.call(null,coding.client.editor.state,"﷐'error",ex);
+}));
+waltz.state.transition.call(null,coding.client.editor.state,"﷐'set-language","﷐'clojure");
+coding.client.editor.editor.setOption("onChange",(function (ed,delta){
+return coding.client.editor.submit_code.call(null);
+}));
260 resources/public/cljs/coding/client/main.js
@@ -0,0 +1,260 @@
+goog.provide('coding.client.main');
+goog.require('cljs.core');
+goog.require('jayq.core');
+goog.require('coding.client.util');
+goog.require('coding.client.core');
+goog.require('coding.client.editor');
+goog.require('waltz.state');
+goog.require('waltz.transition');
+goog.require('monet.canvas');
+goog.require('monet.geometry');
+coding.client.main.$body = jayq.core.$.call(null,"﷐'body");
+coding.client.main.app = waltz.state.machine.call(null,"﷐'app");
+waltz.state.add_transition.call(null,coding.client.core.app,"﷐'submitting",(function (){
+waltz.state.set.call(null,coding.client.core.app,"﷐'submitting");
+return coding.client.main.transition.call(null,coding.client.editor.state,"﷐'submit");
+}));
+waltz.state.add_transition.call(null,coding.client.core.app,"﷐'executing",(function (v){
+eval.call(null,v);
+return coding.client.main.update_history.call(null);
+}));
+jayq.core.bind.call(null,jayq.core.$.call(null,"form"),"﷐'submit",(function (e){
+e.preventDefault();
+return coding.client.main.transition.call(null,coding.client.core.app,"﷐'submitting");
+}));
+coding.client.main.canvas = monet.canvas.init.call(null,jayq.core.$.call(null,"﷐'#canvas").get(0));
+monet.canvas.add_entity.call(null,coding.client.main.canvas,"﷐'background",monet.canvas.entity.call(null,cljs.core.ObjMap.fromObject(["﷐'x","﷐'y","﷐'w","﷐'h"],{"﷐'x":0,"﷐'y":0,"﷐'w":600,"﷐'h":650}),null,(function (ctx,me){
+return monet.canvas.rect.call(null,monet.canvas.fill_style.call(null,ctx,"#222"),me);
+})));
+coding.client.main.update_player = (function update_player(me){
+return me;
+});
+coding.client.main.draw_player = (function draw_player(ctx,me){
+return monet.canvas.circle.call(null,monet.canvas.fill_style.call(null,ctx,"#888"),me);
+});
+monet.canvas.add_entity.call(null,coding.client.main.canvas,"﷐'player",monet.canvas.entity.call(null,cljs.core.ObjMap.fromObject(["﷐'x","﷐'y","﷐'r"],{"﷐'x":30,"﷐'y":500,"﷐'r":15}),(function (me){
+return coding.client.main.update_player.call(null,me);
+}),(function (ctx,me){
+return coding.client.main.draw_player.call(null,ctx,me);
+})));
+coding.client.main.draw_block = (function draw_block(ctx,me){
+return monet.canvas.stroke.call(null,monet.canvas.rect.call(null,monet.canvas.stroke_width.call(null,monet.canvas.stroke_style.call(null,monet.canvas.fill_style.call(null,ctx,"#143"),"#175"),2),me));
+});
+coding.client.main.blocks = cljs.core.atom.call(null,cljs.core.ObjMap.fromObject([],{}));
+coding.client.main.make_block = (function make_block(r,c){
+if(cljs.core.truth_(cljs.core.not.call(null,cljs.core.deref.call(null,coding.client.main.blocks).call(null,cljs.core.Vector.fromArray([r,c])))))
+{var x__458393 = (40 * r);
+var y__458394 = (40 * c);
+
+return cljs.core.swap_BANG_.call(null,coding.client.main.blocks,cljs.core.assoc,cljs.core.Vector.fromArray([r,c]),cljs.core.ObjMap.fromObject(["﷐'x","﷐'y","﷐'w","﷐'h","﷐'type"],{"﷐'x":x__458393,"﷐'y":y__458394,"﷐'w":40,"﷐'h":40,"﷐'type":"﷐'block"}));
+} else
+{return cljs.core.swap_BANG_.call(null,coding.client.main.blocks,cljs.core.dissoc,cljs.core.Vector.fromArray([r,c]));
+}
+});
+monet.canvas.add_entity.call(null,coding.client.main.canvas,"﷐'blocks",monet.canvas.entity.call(null,cljs.core.ObjMap.fromObject([],{}),null,(function (ctx,me){
+var G__458395__458396 = cljs.core.seq.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,coding.client.main.blocks)));
+
+if(cljs.core.truth_(G__458395__458396))
+{var b__458397 = cljs.core.first.call(null,G__458395__458396);
+var G__458395__458398 = G__458395__458396;
+
+while(true){
+coding.client.main.draw_block.call(null,ctx,b__458397);
+var temp__3698__auto____458399 = cljs.core.next.call(null,G__458395__458398);
+
+if(cljs.core.truth_(temp__3698__auto____458399))
+{var G__458395__458400 = temp__3698__auto____458399;
+
+{
+var G__458401 = cljs.core.first.call(null,G__458395__458400);
+var G__458402 = G__458395__458400;
+b__458397 = G__458401;
+G__458395__458398 = G__458402;
+continue;
+}
+} else
+{return null;
+}
+break;
+}
+} else
+{return null;
+}
+})));
+coding.client.main.history_count = 100;
+coding.client.main.history = cljs.core.array.call(null);
+coding.client.main.original_history_point = null;
+coding.client.main.update_history = (function update_history(){
+if(cljs.core.truth_(cljs.core.deref.call(null,"﷐'updating?".call(null,coding.client.main.canvas))))
+{return null;
+} else
+{(coding.client.main.history[0] = goog.object.unsafeClone.call(null,coding.client.main.original_history_point));
+var old__458403 = coding.client.main.history;
+var new_history__458404 = cljs.core.array.call(null);
+
+coding.client.main.history = new_history__458404;
+var cur__458405 = 0;
+var prev_dude__458406 = null;
+
+while(true){
+if(cljs.core.truth_(cljs.core.not.call(null,(cur__458405 < coding.client.main.history_count))))
+{("﷐'entities".call(null,coding.client.main.canvas)["﷐'player"] = prev_dude__458406);
+} else
+{var entry__458407 = (old__458403[cur__458405]);
+var entry__458408 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,entry__458407))?cljs.core.apply.call(null,cljs.core.hash_map,entry__458407):entry__458407);
+var entities__458409 = cljs.core.get.call(null,entry__458408,"﷐'entities");
+var input__458410 = cljs.core.get.call(null,entry__458408,"﷐'input");
+var dude__458412 = (function (){var or__3548__auto____458411 = prev_dude__458406;
+
+if(cljs.core.truth_(or__3548__auto____458411))
+{return or__3548__auto____458411;
+} else
+{return (entities__458409["﷐'player"]);
+}
+})();
+
+cljs.core.reset_BANG_.call(null,coding.client.main.inputs,input__458410);
+var neue_value__458413 = coding.client.main.update_player.call(null,"﷐'value".call(null,dude__458412));
+var neue__458414 = cljs.core.assoc.call(null,dude__458412,"﷐'value",neue_value__458413);
+
+(entities__458409["﷐'player"] = neue__458414);
+new_history__458404.push(entry__458408);
+{
+var G__458415 = (cur__458405 + 1);
+var G__458416 = neue__458414;
+cur__458405 = G__458415;
+prev_dude__458406 = G__458416;
+continue;
+}
+}
+break;
+}
+return cljs.core.reset_BANG_.call(null,coding.client.main.inputs,cljs.core.ObjMap.fromObject([],{}));
+}
+});
+monet.canvas.add_entity.call(null,coding.client.main.canvas,"﷐'recorder",monet.canvas.entity.call(null,cljs.core.ObjMap.fromObject([],{}),(function (me){
+coding.client.main.history.push(cljs.core.ObjMap.fromObject(["﷐'input","﷐'entities"],{"﷐'input":cljs.core.deref.call(null,coding.client.main.inputs),"﷐'entities":goog.object.clone.call(null,"﷐'entities".call(null,coding.client.main.canvas))}));
+if(cljs.core.truth_((coding.client.main.history.length > coding.client.main.history_count)))
+{coding.client.main.history.splice(0,1);
+} else
+{}
+return me;
+}),(function (ctx,me){
+if(cljs.core.truth_(cljs.core.deref.call(null,"﷐'updating?".call(null,coding.client.main.canvas))))
+{return null;
+} else
+{monet.canvas.save.call(null,ctx);
+monet.canvas.alpha.call(null,ctx,0.5);
+var G__458418__458419 = cljs.core.seq.call(null,cljs.core.range.call(null,0,coding.client.main.history_count,5));
+
+if(cljs.core.truth_(G__458418__458419))
+{var cur__458420 = cljs.core.first.call(null,G__458418__458419);
+var G__458418__458421 = G__458418__458419;
+
+while(true){
+var map__458422__458423 = (coding.client.main.history[cur__458420]);
+var map__458422__458424 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__458422__458423))?cljs.core.apply.call(null,cljs.core.hash_map,map__458422__458423):map__458422__458423);
+var input__458425 = cljs.core.get.call(null,map__458422__458424,"﷐'input");
+var entities__458426 = cljs.core.get.call(null,map__458422__458424,"﷐'entities");
+var dude__458427 = (entities__458426["﷐'player"]);
+
+coding.client.main.draw_player.call(null,ctx,"﷐'value".call(null,dude__458427));
+var temp__3698__auto____458428 = cljs.core.next.call(null,G__458418__458421);
+
+if(cljs.core.truth_(temp__3698__auto____458428))
+{var G__458418__458429 = temp__3698__auto____458428;
+
+{
+var G__458430 = cljs.core.first.call(null,G__458418__458429);
+var G__458431 = G__458418__458429;
+cur__458420 = G__458430;
+G__458418__458421 = G__458431;
+continue;
+}
+} else
+{}
+break;
+}
+} else
+{}
+return monet.canvas.restore.call(null,ctx);
+}
+})));
+coding.client.main.colliding_QMARK_ = (function colliding_QMARK_(me){
+var blocks__458432 = cljs.core.vals.call(null,cljs.core.deref.call(null,coding.client.main.blocks));
+
+return cljs.core.first.call(null,cljs.core.filter.call(null,(function (p1__458417_SHARP_){
+return monet.geometry.collision_QMARK_.call(null,me,p1__458417_SHARP_);
+}),blocks__458432));
+});
+coding.client.main.make_block.call(null,0,14);
+coding.client.main.make_block.call(null,1,14);
+coding.client.main.make_block.call(null,2,14);
+coding.client.main.make_block.call(null,5,14);
+coding.client.main.make_block.call(null,6,14);
+coding.client.main.make_block.call(null,7,14);
+coding.client.main.__GT_40th = (function __GT_40th(v){
+return Math.floor.call(null,(v / 40));
+});
+coding.client.main.coords__GT_block = (function coords__GT_block(x,y){
+return coding.client.main.make_block.call(null,coding.client.main.__GT_40th.call(null,x),coding.client.main.__GT_40th.call(null,y));
+});
+coding.client.main.inputs = cljs.core.atom.call(null,cljs.core.ObjMap.fromObject([],{}));
+coding.client.main.__GT_key = cljs.core.HashMap.fromArrays([37,39,32,83],["﷐'left","﷐'right","﷐'space","﷐'s"]);
+coding.client.main.input_QMARK_ = (function input_QMARK_(k){
+return cljs.core.deref.call(null,coding.client.main.inputs).call(null,k);
+});
+coding.client.main.pause_game = (function pause_game(){
+if(cljs.core.truth_(cljs.core.deref.call(null,"﷐'updating?".call(null,coding.client.main.canvas))))
+{monet.canvas.stop_updating.call(null,coding.client.main.canvas);
+return coding.client.main.original_history_point = (coding.client.main.history[0]);
+} else
+{return monet.canvas.start_updating.call(null,coding.client.main.canvas);
+}
+});
+jayq.core.bind.call(null,jayq.core.$.call(null,"﷐'#canvas"),"﷐'keydown",(function (e){
+var temp__3698__auto____458433 = coding.client.main.__GT_key.call(null,e.keyCode);
+
+if(cljs.core.truth_(temp__3698__auto____458433))
+{var k__458434 = temp__3698__auto____458433;
+
+if(cljs.core.truth_(cljs.core._EQ_.call(null,k__458434,"﷐'s")))
+{return coding.client.main.pause_game.call(null);
+} else
+{return cljs.core.swap_BANG_.call(null,coding.client.main.inputs,cljs.core.assoc,k__458434,true);
+}
+} else
+{return null;
+}
+}));
+jayq.core.bind.call(null,jayq.core.$.call(null,"﷐'#canvas"),"﷐'keyup",(function (e){
+var temp__3698__auto____458435 = coding.client.main.__GT_key.call(null,e.keyCode);
+
+if(cljs.core.truth_(temp__3698__auto____458435))
+{var k__458436 = temp__3698__auto____458435;
+
+return cljs.core.swap_BANG_.call(null,coding.client.main.inputs,cljs.core.assoc,k__458436,false);
+} else
+{return null;
+}
+}));
+jayq.core.bind.call(null,jayq.core.$.call(null,"﷐'#canvas"),"﷐'focus",(function (e){
+var me__458437 = this;
+
+return me__458437.focused = true;
+}));
+jayq.core.bind.call(null,jayq.core.$.call(null,"﷐'#canvas"),"﷐'blur",(function (e){
+var me__458438 = this;
+
+return me__458438.focused = false;
+}));
+jayq.core.bind.call(null,jayq.core.$.call(null,"﷐'#canvas"),"﷐'mousedown",(function (e){
+var me__458439 = this;
+
+if(cljs.core.truth_(me__458439.focused))
+{coding.client.main.coords__GT_block.call(null,e.offsetX,e.offsetY);
+return coding.client.main.update_history.call(null);
+} else
+{return null;
+}
+}));
30 resources/public/cljs/coding/client/util.js
@@ -0,0 +1,30 @@
+goog.provide('coding.client.util');
+goog.require('cljs.core');
+coding.client.util.wait = (function wait(ms,func){
+return setTimeout(func, ms);
+});
+/**
+* @param {...*} var_args
+*/
+coding.client.util.log = (function() {
+var log__delegate = function (v,text){
+var vs__458440 = (cljs.core.truth_(cljs.core.string_QMARK_.call(null,v))?cljs.core.apply.call(null,cljs.core.str,v,text):v);
+
+return console.log(vs__458440);
+};
+var log = function (v,var_args){
+var text = null;
+if (goog.isDef(var_args)) {
+ text = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return log__delegate.call(this, v, text);
+};
+log.cljs$lang$maxFixedArity = 1;
+log.cljs$lang$applyTo = (function (arglist__458441){
+var v = cljs.core.first(arglist__458441);
+var text = cljs.core.rest(arglist__458441);
+return log__delegate.call(this, v, text);
+});
+return log;
+})()
+;
476 resources/public/cljs/jayq/core.js
@@ -0,0 +1,476 @@
+goog.provide('jayq.core');
+goog.require('cljs.core');
+goog.require('jayq.util');
+goog.require('clojure.string');
+jayq.core.crate_meta = (function crate_meta(func){
+return func.prototype._crateGroup;
+});
+jayq.core.__GT_selector = (function __GT_selector(sel){
+if(cljs.core.truth_(cljs.core.string_QMARK_.call(null,sel)))
+{return sel;
+} else
+{if(cljs.core.truth_(cljs.core.fn_QMARK_.call(null,sel)))
+{return cljs.core.str.call(null,"[crateGroup=",jayq.core.crate_meta.call(null,sel),"]");
+} else
+{if(cljs.core.truth_(cljs.core.keyword_QMARK_.call(null,sel)))
+{return cljs.core.name.call(null,sel);
+} else
+{if(cljs.core.truth_("﷐'else"))
+{return sel;
+} else
+{return null;
+}
+}
+}
+}
+});
+/**
+* @param {...*} var_args
+*/
+jayq.core.$ = (function() {
+var $__delegate = function (sel,p__460189){
+var vec__460190__460191 = p__460189;
+var context__460192 = cljs.core.nth.call(null,vec__460190__460191,0,null);
+
+if(cljs.core.truth_(cljs.core.not.call(null,context__460192)))
+{return jQuery.call(null,jayq.core.__GT_selector.call(null,sel));
+} else
+{return jQuery.call(null,jayq.core.__GT_selector.call(null,sel),context__460192);
+}
+};
+var $ = function (sel,var_args){
+var p__460189 = null;
+if (goog.isDef(var_args)) {
+ p__460189 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return $__delegate.call(this, sel, p__460189);
+};
+$.cljs$lang$maxFixedArity = 1;
+$.cljs$lang$applyTo = (function (arglist__460193){
+var sel = cljs.core.first(arglist__460193);
+var p__460189 = cljs.core.rest(arglist__460193);
+return $__delegate.call(this, sel, p__460189);
+});
+return $;
+})()
+;
+jQuery.prototype.cljs$core$IReduce$ = true;
+jQuery.prototype.cljs$core$IReduce$_reduce = (function (this$,f){
+return cljs.core.ci_reduce.call(null,jayq.core.coll,f,cljs.core.first.call(null,this$),cljs.core.count.call(null,this$));
+});
+jQuery.prototype.cljs$core$IReduce$_reduce = (function (this$,f,start){
+return cljs.core.ci_reduce.call(null,jayq.core.coll,f,start,jayq.core.i);
+});
+jQuery.prototype.cljs$core$ILookup$ = true;
+jQuery.prototype.cljs$core$ILookup$_lookup = (function() {
+var G__460195 = null;
+var G__460195__460196 = (function (this$,k){
+var or__3548__auto____460194 = this$.slice(k,(k + 1));
+
+if(cljs.core.truth_(or__3548__auto____460194))
+{return or__3548__auto____460194;
+} else
+{return null;
+}
+});
+var G__460195__460197 = (function (this$,k,not_found){
+return cljs.core._nth.call(null,this$,k,not_found);
+});
+G__460195 = function(this$,k,not_found){
+switch(arguments.length){
+case 2 :
+return G__460195__460196.call(this,this$,k);
+case 3 :
+return G__460195__460197.call(this,this$,k,not_found);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return G__460195;
+})()
+;
+jQuery.prototype.cljs$core$ISequential$ = true;
+jQuery.prototype.cljs$core$IIndexed$ = true;
+jQuery.prototype.cljs$core$IIndexed$_nth = (function (this$,n){
+if(cljs.core.truth_((n < cljs.core.count.call(null,this$))))
+{return this$.slice(n,(n + 1));
+} else
+{return null;
+}
+});
+jQuery.prototype.cljs$core$IIndexed$_nth = (function (this$,n,not_found){
+if(cljs.core.truth_((n < cljs.core.count.call(null,this$))))
+{return this$.slice(n,(n + 1));
+} else
+{if(cljs.core.truth_((void 0 === not_found)))
+{return null;
+} else
+{return not_found;
+}
+}
+});
+jQuery.prototype.cljs$core$ICounted$ = true;
+jQuery.prototype.cljs$core$ICounted$_count = (function (this$){
+return this$.size();
+});
+jQuery.prototype.cljs$core$ISeq$ = true;
+jQuery.prototype.cljs$core$ISeq$_first = (function (this$){
+return this$.slice(0,1);
+});
+jQuery.prototype.cljs$core$ISeq$_rest = (function (this$){
+if(cljs.core.truth_((cljs.core.count.call(null,this$) > 1)))
+{return this$.slice(1);
+} else
+{return cljs.core.list.call(null);
+}
+});
+jQuery.prototype.cljs$core$ISeqable$ = true;
+jQuery.prototype.cljs$core$ISeqable$_seq = (function (this$){
+if(cljs.core.truth_(this$.get(0)))
+{return this$;
+} else
+{return null;
+}
+});
+jQuery.prototype.call = (function() {
+var G__460199 = null;
+var G__460199__460200 = (function (_,k){
+return cljs.core._lookup.call(null,this,k);
+});
+var G__460199__460201 = (function (_,k,not_found){
+return cljs.core._lookup.call(null,this,k,not_found);
+});
+G__460199 = function(_,k,not_found){
+switch(arguments.length){
+case 2 :
+return G__460199__460200.call(this,_,k);
+case 3 :
+return G__460199__460201.call(this,_,k,not_found);
+}
+throw('Invalid arity: ' + arguments.length);
+};
+return G__460199;
+})()
+;
+jayq.core.anim = (function anim(elem,props,dur){
+return elem.animate(jayq.util.map__GT_js.call(null,props),dur);
+});
+jayq.core.text = (function text($elem,txt){
+return $elem.text(txt);
+});
+jayq.core.css = (function css($elem,opts){
+if(cljs.core.truth_(cljs.core.keyword_QMARK_.call(null,opts)))
+{return $elem.css(cljs.core.name.call(null,opts));
+} else
+{return $elem.css(jayq.util.map__GT_js.call(null,opts));
+}
+});
+/**
+* @param {...*} var_args
+*/
+jayq.core.attr = (function() {
+var attr__delegate = function ($elem,a,p__460203){
+var vec__460204__460205 = p__460203;
+var v__460206 = cljs.core.nth.call(null,vec__460204__460205,0,null);
+
+var a__460207 = cljs.core.name.call(null,a);
+
+if(cljs.core.truth_(cljs.core.not.call(null,v__460206)))
+{return $elem.attr(a__460207);
+} else
+{return $elem.attr(a__460207,v__460206);
+}
+};
+var attr = function ($elem,a,var_args){
+var p__460203 = null;
+if (goog.isDef(var_args)) {
+ p__460203 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2),0);
+}
+return attr__delegate.call(this, $elem, a, p__460203);
+};
+attr.cljs$lang$maxFixedArity = 2;
+attr.cljs$lang$applyTo = (function (arglist__460208){
+var $elem = cljs.core.first(arglist__460208);
+var a = cljs.core.first(cljs.core.next(arglist__460208));
+var p__460203 = cljs.core.rest(cljs.core.next(arglist__460208));
+return attr__delegate.call(this, $elem, a, p__460203);
+});
+return attr;
+})()
+;
+/**
+* @param {...*} var_args
+*/
+jayq.core.data = (function() {
+var data__delegate = function ($elem,k,p__460209){
+var vec__460210__460211 = p__460209;
+var v__460212 = cljs.core.nth.call(null,vec__460210__460211,0,null);
+
+var k__460213 = cljs.core.name.call(null,k);
+
+if(cljs.core.truth_(cljs.core.not.call(null,v__460212)))
+{return $elem.data(k__460213);
+} else
+{return $elem.data(k__460213,v__460212);
+}
+};
+var data = function ($elem,k,var_args){
+var p__460209 = null;
+if (goog.isDef(var_args)) {
+ p__460209 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2),0);
+}
+return data__delegate.call(this, $elem, k, p__460209);
+};
+data.cljs$lang$maxFixedArity = 2;
+data.cljs$lang$applyTo = (function (arglist__460214){
+var $elem = cljs.core.first(arglist__460214);
+var k = cljs.core.first(cljs.core.next(arglist__460214));
+var p__460209 = cljs.core.rest(cljs.core.next(arglist__460214));
+return data__delegate.call(this, $elem, k, p__460209);
+});
+return data;
+})()
+;
+jayq.core.add_class = (function add_class($elem,cl){
+var cl__460215 = cljs.core.name.call(null,cl);
+
+return $elem.addClass(cl__460215);
+});
+jayq.core.remove_class = (function remove_class($elem,cl){
+var cl__460216 = cljs.core.name.call(null,cl);
+
+return $elem.removeClass(cl__460216);
+});
+jayq.core.append = (function append($elem,content){
+return $elem.append(content);
+});
+jayq.core.prepend = (function prepend($elem,content){
+return $elem.prepend(content);
+});
+jayq.core.remove = (function remove($elem){
+return $elem.remove();
+});
+/**
+* @param {...*} var_args
+*/
+jayq.core.hide = (function() {
+var hide__delegate = function ($elem,p__460217){
+var vec__460218__460219 = p__460217;
+var speed__460220 = cljs.core.nth.call(null,vec__460218__460219,0,null);
+var on_finish__460221 = cljs.core.nth.call(null,vec__460218__460219,1,null);
+
+return $elem.hide(speed__460220,on_finish__460221);
+};
+var hide = function ($elem,var_args){
+var p__460217 = null;
+if (goog.isDef(var_args)) {
+ p__460217 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return hide__delegate.call(this, $elem, p__460217);
+};
+hide.cljs$lang$maxFixedArity = 1;
+hide.cljs$lang$applyTo = (function (arglist__460222){
+var $elem = cljs.core.first(arglist__460222);
+var p__460217 = cljs.core.rest(arglist__460222);
+return hide__delegate.call(this, $elem, p__460217);
+});
+return hide;
+})()
+;
+/**
+* @param {...*} var_args
+*/
+jayq.core.show = (function() {
+var show__delegate = function ($elem,p__460223){
+var vec__460224__460225 = p__460223;
+var speed__460226 = cljs.core.nth.call(null,vec__460224__460225,0,null);
+var on_finish__460227 = cljs.core.nth.call(null,vec__460224__460225,1,null);
+
+return $elem.show(speed__460226,on_finish__460227);
+};
+var show = function ($elem,var_args){
+var p__460223 = null;
+if (goog.isDef(var_args)) {
+ p__460223 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return show__delegate.call(this, $elem, p__460223);
+};
+show.cljs$lang$maxFixedArity = 1;
+show.cljs$lang$applyTo = (function (arglist__460228){
+var $elem = cljs.core.first(arglist__460228);
+var p__460223 = cljs.core.rest(arglist__460228);
+return show__delegate.call(this, $elem, p__460223);
+});
+return show;
+})()
+;
+/**
+* @param {...*} var_args
+*/
+jayq.core.fade_out = (function() {
+var fade_out__delegate = function ($elem,p__460229){
+var vec__460230__460231 = p__460229;
+var speed__460232 = cljs.core.nth.call(null,vec__460230__460231,0,null);
+var on_finish__460233 = cljs.core.nth.call(null,vec__460230__460231,1,null);
+
+return $elem.fadeOut(speed__460232,on_finish__460233);
+};
+var fade_out = function ($elem,var_args){
+var p__460229 = null;
+if (goog.isDef(var_args)) {
+ p__460229 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return fade_out__delegate.call(this, $elem, p__460229);
+};
+fade_out.cljs$lang$maxFixedArity = 1;
+fade_out.cljs$lang$applyTo = (function (arglist__460234){
+var $elem = cljs.core.first(arglist__460234);
+var p__460229 = cljs.core.rest(arglist__460234);
+return fade_out__delegate.call(this, $elem, p__460229);
+});
+return fade_out;
+})()
+;
+/**
+* @param {...*} var_args
+*/
+jayq.core.fade_in = (function() {
+var fade_in__delegate = function ($elem,p__460235){
+var vec__460236__460237 = p__460235;
+var speed__460238 = cljs.core.nth.call(null,vec__460236__460237,0,null);
+var on_finish__460239 = cljs.core.nth.call(null,vec__460236__460237,1,null);
+
+return $elem.fadeIn(speed__460238,on_finish__460239);
+};
+var fade_in = function ($elem,var_args){
+var p__460235 = null;
+if (goog.isDef(var_args)) {
+ p__460235 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return fade_in__delegate.call(this, $elem, p__460235);
+};
+fade_in.cljs$lang$maxFixedArity = 1;
+fade_in.cljs$lang$applyTo = (function (arglist__460240){
+var $elem = cljs.core.first(arglist__460240);
+var p__460235 = cljs.core.rest(arglist__460240);
+return fade_in__delegate.call(this, $elem, p__460235);
+});
+return fade_in;
+})()
+;
+/**
+* @param {...*} var_args
+*/
+jayq.core.slide_up = (function() {
+var slide_up__delegate = function ($elem,p__460241){
+var vec__460242__460243 = p__460241;
+var speed__460244 = cljs.core.nth.call(null,vec__460242__460243,0,null);
+var on_finish__460245 = cljs.core.nth.call(null,vec__460242__460243,1,null);
+
+return $elem.slideUp(speed__460244,on_finish__460245);
+};
+var slide_up = function ($elem,var_args){
+var p__460241 = null;
+if (goog.isDef(var_args)) {
+ p__460241 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return slide_up__delegate.call(this, $elem, p__460241);
+};
+slide_up.cljs$lang$maxFixedArity = 1;
+slide_up.cljs$lang$applyTo = (function (arglist__460246){
+var $elem = cljs.core.first(arglist__460246);
+var p__460241 = cljs.core.rest(arglist__460246);
+return slide_up__delegate.call(this, $elem, p__460241);
+});
+return slide_up;
+})()
+;
+/**
+* @param {...*} var_args
+*/
+jayq.core.slide_down = (function() {
+var slide_down__delegate = function ($elem,p__460247){
+var vec__460248__460249 = p__460247;
+var speed__460250 = cljs.core.nth.call(null,vec__460248__460249,0,null);
+var on_finish__460251 = cljs.core.nth.call(null,vec__460248__460249,1,null);
+
+return $elem.slideDown(speed__460250,on_finish__460251);
+};
+var slide_down = function ($elem,var_args){
+var p__460247 = null;
+if (goog.isDef(var_args)) {
+ p__460247 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return slide_down__delegate.call(this, $elem, p__460247);
+};
+slide_down.cljs$lang$maxFixedArity = 1;
+slide_down.cljs$lang$applyTo = (function (arglist__460252){
+var $elem = cljs.core.first(arglist__460252);
+var p__460247 = cljs.core.rest(arglist__460252);
+return slide_down__delegate.call(this, $elem, p__460247);
+});
+return slide_down;
+})()
+;
+jayq.core.bind = (function bind($elem,ev,func){
+return $elem.bind(cljs.core.name.call(null,ev),func);
+});
+jayq.core.find = (function find($elem,selector){
+return $elem.find(cljs.core.name.call(null,selector));
+});
+jayq.core.trigger = (function trigger($elem,ev){
+return $elem.trigger(cljs.core.name.call(null,ev));
+});
+jayq.core.delegate = (function delegate($elem,sel,ev,func){
+return $elem.delegate(jayq.core.__GT_selector.call(null,sel),cljs.core.name.call(null,ev),func);
+});
+jayq.core.inner = (function inner($elem,v){
+return $elem.html(v);
+});
+jayq.core.empty = (function empty($elem){
+return $elem.empty();
+});
+/**
+* @param {...*} var_args
+*/
+jayq.core.val = (function() {
+var val__delegate = function ($elem,p__460253){
+var vec__460254__460255 = p__460253;
+var v__460256 = cljs.core.nth.call(null,vec__460254__460255,0,null);
+
+if(cljs.core.truth_(v__460256))
+{return $elem.val(v__460256);
+} else
+{return $elem.val();
+}
+};
+var val = function ($elem,var_args){
+var p__460253 = null;
+if (goog.isDef(var_args)) {
+ p__460253 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return val__delegate.call(this, $elem, p__460253);
+};
+val.cljs$lang$maxFixedArity = 1;
+val.cljs$lang$applyTo = (function (arglist__460257){
+var $elem = cljs.core.first(arglist__460257);
+var p__460253 = cljs.core.rest(arglist__460257);
+return val__delegate.call(this, $elem, p__460253);
+});
+return val;
+})()
+;
+jayq.core.queue = (function queue($elem,callback){
+return $elem.queue(callback);
+});
+jayq.core.dequeue = (function dequeue(elem){
+return jayq.core.$.call(null,elem).dequeue();
+});
+jayq.core.xhr = (function xhr(p__460258,content,callback){
+var vec__460259__460260 = p__460258;
+var method__460261 = cljs.core.nth.call(null,vec__460259__460260,0,null);
+var uri__460262 = cljs.core.nth.call(null,vec__460259__460260,1,null);
+
+var params__460263 = jayq.util.map__GT_js.call(null,cljs.core.ObjMap.fromObject(["﷐'type","﷐'data","﷐'success"],{"﷐'type":clojure.string.upper_case.call(null,cljs.core.name.call(null,method__460261)),"﷐'data":jayq.util.map__GT_js.call(null,content),"﷐'success":callback}));
+
+return jQuery.ajax(uri__460262,params__460263);
+});
106 resources/public/cljs/jayq/util.js
@@ -0,0 +1,106 @@
+goog.provide('jayq.util');
+goog.require('cljs.core');
+jayq.util.map__GT_js = (function map__GT_js(m){
+var out__460160 = cljs.core.js_obj.call(null);
+
+var G__460161__460162 = cljs.core.seq.call(null,m);
+
+if(cljs.core.truth_(G__460161__460162))
+{var G__460164__460166 = cljs.core.first.call(null,G__460161__460162);
+var vec__460165__460167 = G__460164__460166;
+var k__460168 = cljs.core.nth.call(null,vec__460165__460167,0,null);
+var v__460169 = cljs.core.nth.call(null,vec__460165__460167,1,null);
+var G__460161__460170 = G__460161__460162;
+
+var G__460164__460171 = G__460164__460166;
+var G__460161__460172 = G__460161__460170;
+
+while(true){
+var vec__460173__460174 = G__460164__460171;
+var k__460175 = cljs.core.nth.call(null,vec__460173__460174,0,null);
+var v__460176 = cljs.core.nth.call(null,vec__460173__460174,1,null);
+var G__460161__460177 = G__460161__460172;
+
+(out__460160[cljs.core.name.call(null,k__460175)] = v__460176);
+var temp__3698__auto____460178 = cljs.core.next.call(null,G__460161__460177);
+
+if(cljs.core.truth_(temp__3698__auto____460178))
+{var G__460161__460179 = temp__3698__auto____460178;
+
+{
+var G__460180 = cljs.core.first.call(null,G__460161__460179);
+var G__460181 = G__460161__460179;
+G__460164__460171 = G__460180;
+G__460161__460172 = G__460181;
+continue;
+}
+} else
+{}
+break;
+}
+} else
+{}
+return out__460160;
+});
+jayq.util.wait = (function wait(ms,func){
+return setTimeout(func, ms);
+});
+/**
+* @param {...*} var_args
+*/
+jayq.util.log = (function() {
+var log__delegate = function (v,text){
+var vs__460182 = (cljs.core.truth_(cljs.core.string_QMARK_.call(null,v))?cljs.core.apply.call(null,cljs.core.str,v,text):v);
+
+return console.log(vs__460182);
+};
+var log = function (v,var_args){
+var text = null;
+if (goog.isDef(var_args)) {
+ text = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);
+}
+return log__delegate.call(this, v, text);
+};
+log.cljs$lang$maxFixedArity = 1;
+log.cljs$lang$applyTo = (function (arglist__460183){
+var v = cljs.core.first(arglist__460183);
+var text = cljs.core.rest(arglist__460183);
+return log__delegate.call(this, v, text);
+});
+return log;
+})()
+;
+/**
+* Recursively transforms ClojureScript maps into Javascript objects,
+* other ClojureScript colls into JavaScript arrays, and ClojureScript
+* keywords into JavaScript strings.
+*/
+jayq.util.clj__GT_js = (function clj__GT_js(x){
+if(cljs.core.truth_(cljs.core.string_QMARK_.call(null,x)))
+{return x;
+} else
+{if(cljs.core.truth_(cljs.core.keyword_QMARK_.call(null,x)))
+{return cljs.core.name.call(null,x);
+} else
+{if(cljs.core.truth_(cljs.core.map_QMARK_.call(null,x)))
+{return cljs.core.reduce.call(null,(function (m,p__460184){
+var vec__460185__460186 = p__460184;
+var k__460187 = cljs.core.nth.call(null,vec__460185__460186,0,null);
+var v__460188 = cljs.core.nth.call(null,vec__460185__460186,1,null);
+
+return cljs.core.assoc.call(null,m,clj__GT_js.call(null,k__460187),clj__GT_js.call(null,v__460188));
+}),cljs.core.ObjMap.fromObject([],{}),x).strobj;
+} else
+{if(cljs.core.truth_(cljs.core.coll_QMARK_.call(null,x)))
+{return cljs.core.apply.call(null,cljs.core.array,cljs.core.map.call(null,clj__GT_js,x));
+} else
+{if(cljs.core.truth_("﷐'else"))
+{return x;
+} else
+{return null;
+}
+}
+}
+}
+}
+});
385 resources/public/cljs/monet/canvas.js
@@ -0,0 +1,385 @@
+goog.provide('monet.canvas');
+goog.require('cljs.core');
+goog.require('monet.core');
+monet.canvas.get_context = (function get_context(canvas,type){
+return canvas.getContext(cljs.core.name.call(null,type));
+});
+monet.canvas.begin_path = (function begin_path(ctx){
+ctx.beginPath();
+return ctx;
+});
+monet.canvas.close_path = (function close_path(ctx){
+ctx.closePath();
+return ctx;
+});
+monet.canvas.fill = (function fill(ctx){
+ctx.fill();
+return ctx;
+});
+monet.canvas.stroke = (function stroke(ctx){
+ctx.stroke();
+return ctx;
+});
+monet.canvas.clear_rect = (function clear_rect(ctx,p__460369){
+var map__460370__460371 = p__460369;
+var map__460370__460372 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__460370__460371))?cljs.core.apply.call(null,cljs.core.hash_map,map__460370__460371):map__460370__460371);
+var h__460373 = cljs.core.get.call(null,map__460370__460372,"﷐'h");
+var w__460374 = cljs.core.get.call(null,map__460370__460372,"﷐'w");
+var y__460375 = cljs.core.get.call(null,map__460370__460372,"﷐'y");
+var x__460376 = cljs.core.get.call(null,map__460370__460372,"﷐'x");
+
+ctx.clearRect(x__460376,y__460375,w__460374,h__460373);
+return ctx;
+});
+monet.canvas.rect = (function rect(ctx,p__460377){
+var map__460378__460379 = p__460377;
+var map__460378__460380 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__460378__460379))?cljs.core.apply.call(null,cljs.core.hash_map,map__460378__460379):map__460378__460379);
+var h__460381 = cljs.core.get.call(null,map__460378__460380,"﷐'h");
+var w__460382 = cljs.core.get.call(null,map__460378__460380,"﷐'w");
+var y__460383 = cljs.core.get.call(null,map__460378__460380,"﷐'y");
+var x__460384 = cljs.core.get.call(null,map__460378__460380,"﷐'x");
+
+monet.canvas.begin_path.call(null,ctx);
+ctx.rect(x__460384,y__460383,w__460382,h__460381);
+monet.canvas.close_path.call(null,ctx);
+monet.canvas.fill.call(null,ctx);
+return ctx;
+});
+monet.canvas.circle = (function circle(ctx,p__460385){
+var map__460386__460387 = p__460385;
+var map__460386__460388 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__460386__460387))?cljs.core.apply.call(null,cljs.core.hash_map,map__460386__460387):map__460386__460387);
+var r__460389 = cljs.core.get.call(null,map__460386__460388,"﷐'r");
+var y__460390 = cljs.core.get.call(null,map__460386__460388,"﷐'y");
+var x__460391 = cljs.core.get.call(null,map__460386__460388,"﷐'x");
+
+monet.canvas.begin_path.call(null,ctx);
+ctx.arc(x__460391,y__460390,r__460389,0,(Math.PI * 2),true);
+monet.canvas.close_path.call(null,ctx);
+monet.canvas.fill.call(null,ctx);
+return ctx;
+});
+monet.canvas.text = (function text(ctx,p__460392){
+var map__460393__460394 = p__460392;
+var map__460393__460395 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,map__460393__460394))?cljs.core.apply.call(null,cljs.core.hash_map,map__460393__460394):map__460393__460394);
+var y__460396 = cljs.core.get.call(null,map__460393__460395,"﷐'y");
+var x__460397 = cljs.core.get.call(null,map__460393__460395,"﷐'x");
+var text__460398 = cljs.core.get.call(null,map__460393__460395,"﷐'text");
+
+ctx.fillText(text__460398,x__460397,y__460396);
+return ctx;
+});
+monet.canvas.font_style = (function font_style(ctx,font){
+ctx.font = font;
+return ctx;
+});
+monet.canvas.fill_style = (function fill_style(ctx,color){
+ctx.fillStyle = color;
+return ctx;
+});
+monet.canvas.stroke_style = (function stroke_style(ctx,color){
+ctx.strokeStyle = color;
+return ctx;
+});
+monet.canvas.stroke_width = (function stroke_width(ctx,w){
+ctx.lineWidth = w;
+return ctx;
+});
+monet.canvas.move_to = (function move_to(ctx,x,y){
+ctx.moveTo(x,y);
+return ctx;
+});
+monet.canvas.line_to = (function line_to(ctx,x,y){
+ctx.lineTo(x,y);
+return ctx;
+});
+monet.canvas.alpha = (function alpha(ctx,a){
+ctx.globalAlpha = a;
+return ctx;
+});
+monet.canvas.save = (function save(ctx){
+ctx.save();
+return ctx;
+});
+monet.canvas.restore = (function restore(ctx){
+ctx.restore();
+return ctx;
+});
+monet.canvas.add_entity = (function add_entity(mc,k,ent){
+return ("﷐'entities".call(null,mc)[k] = ent);
+});
+monet.canvas.remove_entity = (function remove_entity(mc,k){
+return cljs.core.js_delete.call(null,"﷐'entities".call(null,mc),k);
+});
+monet.canvas.get_entity = (function get_entity(mc,k){
+return "﷐'value".call(null,("﷐'entities".call(null,mc)[k]));
+});
+/**
+* @param {...*} var_args
+*/
+monet.canvas.update_entity = (function() {
+var update_entity__delegate = function (mc,k,func,extra){
+var cur__460399 = ("﷐'entities".call(null,mc)[k]);
+var res__460400 = cljs.core.apply.call(null,func,cur__460399,extra);
+
+return ("﷐'entities".call(null,mc)[k] = res__460400);
+};
+var update_entity = function (mc,k,func,var_args){
+var extra = null;
+if (goog.isDef(var_args)) {
+ extra = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3),0);
+}
+return update_entity__delegate.call(this, mc, k, func, extra);
+};
+update_entity.cljs$lang$maxFixedArity = 3;
+update_entity.cljs$lang$applyTo = (function (arglist__460401){
+var mc = cljs.core.first(arglist__460401);
+var k = cljs.core.first(cljs.core.next(arglist__460401));
+var func = cljs.core.first(cljs.core.next(cljs.core.next(arglist__460401)));
+var extra = cljs.core.rest(cljs.core.next(cljs.core.next(arglist__460401)));
+return update_entity__delegate.call(this, mc, k, func, extra);
+});
+return update_entity;
+})()
+;
+monet.canvas.clear_BANG_ = (function clear_BANG_(mc){
+var ks__460402 = cljs.core.js_keys.call(null,"﷐'entities".call(null,mc));
+
+var G__460403__460404 = cljs.core.seq.call(null,ks__460402);
+
+if(cljs.core.truth_(G__460403__460404))
+{var k__460405 = cljs.core.first.call(null,G__460403__460404);
+var G__460403__460406 = G__460403__460404;
+
+while(true){
+monet.canvas.remove_entity.call(null,mc,k__460405);
+var temp__3698__auto____460407 = cljs.core.next.call(null,G__460403__460406);
+
+if(cljs.core.truth_(temp__3698__auto____460407))
+{var G__460403__460408 = temp__3698__auto____460407;
+
+{
+var G__460409 = cljs.core.first.call(null,G__460403__460408);
+var G__460410 = G__460403__460408;
+k__460405 = G__460409;
+G__460403__460406 = G__460410;
+continue;
+}
+} else
+{return null;
+}
+break;
+}
+} else
+{return null;
+}
+});
+monet.canvas.entity = (function entity(v,update,draw){
+return cljs.core.ObjMap.fromObject(["﷐'value","﷐'draw","﷐'update"],{"﷐'value":v,"﷐'draw":draw,"﷐'update":update});
+});
+monet.canvas.attr = (function attr(e,a){
+return e.getAttribute(a);
+});
+monet.canvas.force_update = (function force_update(p__460411){
+var mc__460412 = p__460411;
+var mc__460413 = (cljs.core.truth_(cljs.core.seq_QMARK_.call(null,mc__460412))?cljs.core.apply.call(null,cljs.core.hash_map,mc__460412):mc__460412);
+var entities__460414 = cljs.core.get.call(null,mc__460413,"﷐'entities");
+
+var ks__460415 = cljs.core.js_keys.call(null,entities__460414);
+var cnt__460416 = ks__460415.length;
+
+var i__460417 = 0;
+
+while(true){
+if(cljs.core.truth_((i__460417 < cnt__460416)))
+{var k__460418 = (ks__460415[i__460417]);