This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (declare look) | |
| (def test-item | |
| {:noun "chest" :material "wooden" | |
| :closed false | |
| :container | |
| [{:noun "spoon" :material "tin"} | |
| {:noun "bag" :material "leather" | |
| :closed true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;predicate maker | |
| (defn name-is? [s] (fn [x] (if-let [go (->go x)] (= (.name go) s) false))) | |
| (defn mat-tint [go color] | |
| ((tween.core/material-color color 0.2 :pow2) go)) | |
| (rule collide-with [a b] {} | |
| (mat-tint a (color 1 1 1))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns warmup.core | |
| (:require arcadia.core) | |
| (:use | |
| hard.core | |
| hard.input | |
| tween.core | |
| hard.edit | |
| hard.dispatch) | |
| (:import [UnityEngine Vector3])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def-str form "") | |
| (scene river-bank | |
| (title "Your birthplace on the river") | |
| (initial-desc | |
| "Wetness and cold. | |
| The sweet taste of mud fills your nose and coats your teeth. | |
| You are a:") | |
| (link "forbidden hybrid of human and toad" | |
| (set! form "half-toad") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cljs.user=> (require '[fast.core :refer [-o -styles -rules -add]] ) | |
| nil | |
| cljs.user=> (require 'css.units) | |
| nil | |
| cljs.user=> (-o 80) | |
| <span.tab> | |
| cljs.user=> (-add (-o 80) "width" "3em") | |
| #<width:3em;> | |
| cljs.user=> (-add (-o 80) "height" "5%") | |
| #<height:5%;> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns fast.core | |
| (:require [css.units :as u])) | |
| (def -UID (atom 0)) | |
| (defn new-uid [] (swap! -UID inc)) | |
| (defonce m-u-m (js/Array.)) | |
| (aset js/window "mum" m-u-m) | |
| (defn indexed-iterate [col f] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (1:14:36 PM) seangrove: Anyone know how to acess the js "arguments" keyword in cljs? | |
| (1:15:06 PM) seangrove: I want to do the equivalent of (fn [] (.apply some-fn some-context js-arguments)) | |
| (1:19:20 PM) profil: seangrove: js/arguments? | |
| (1:19:36 PM) seangrove: profil: Oh, that looks like it might be it | |
| (1:19:47 PM) seangrove: Yup! Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C("drawsort", | |
| {fn:function(a, b){ return a.position.y - b.position.y; }}, | |
| {update: | |
| function(c){ | |
| c.owner.transform.children.sort(c.fn); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defmacro sandwich [col args & code] | |
| "[col [prev current next] first-form 1-n-forms last-form]" | |
| (let [top# (first code) | |
| meat# (butlast (rest code)) | |
| bottom# (last code)] | |
| `(remove nil? (apply concat (map-indexed | |
| (fn [i# v#] | |
| (let [~args [(get ~col (dec i#)) v# (get ~col (inc i#))]] | |
| (cond (= i# 0) [~top# ~@meat#] |