This file contains 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
const enemyTokens = game.canvas.scene.tokens.filter(entry => entry.disposition == -1); | |
const enemyDrawings = [ | |
// Name, Amount | |
["0HRRJvAy0DL9fZYj", "xOkLUlaf66MIWaEg"], | |
["fvEtY6HXxuWZwTaM", "3ZpYPphDlKP0qocJ"], | |
["BxYhCFss1Hxeubg1", "1cyj6HHCq1Dy5y9C"], | |
["0zVx7PfduwZbNqnj", "kkoOJOPxo6K8hIhV"], | |
].map(uis => uis.map(id => canvas.scene.drawings.get(id))); |
This file contains 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 ukanren-transducers | |
(:refer-clojure :exclude [== disj conj])) | |
(defrecord Lvar [name]) | |
(defn lvar [] (->Lvar (gensym "lvar"))) | |
(defn lvar? [v] (instance? Lvar v)) | |
(def empty-state {}) | |
(defn walk [u s] |
This file contains 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
class Bob | |
def hey(message) | |
behaviors = { | |
-> {message.nil? || message.strip.empty?} => 'Fine. Be that way!', | |
-> {message.upcase == message} => 'Woah, chill out!', | |
-> {message[-1].chr == '?'} => 'Sure.' | |
} | |
behaviors.fetch(behaviors.keys.find(&:call), "Whatever.") | |
end | |
end |
This file contains 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
(require | |
'[pallet.crate.git :refer [git clone]] | |
'[pallet.crate.java :refer [java]] | |
'[pallet.crate.lein :refer [lein leiningen]]) | |
(def repo "git://github.com/jcrossley3/random-apps-of-kindness.git") | |
(def demo-directory "random-apps-of-kindness/demo") | |
(defplan setup-machine |
This file contains 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
(defrecord JimFSFactory [] | |
component/Lifecycle | |
(start [t] (Jimfs/newFileSystem (Configuration/unix)))) | |
(extend-protocol component/Lifecycle | |
Jimfs | |
(stop [t] (.close t))) | |
(defrecord PathFactory [fs] | |
component/Lifecycle |
This file contains 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
(defrecord JimFSFactory [] | |
component/Lifecycle | |
(start [t] (Jimfs/newFileSystem (Configuration/unix)))) | |
(extend-protocol component/Lifecycle | |
Jimfs | |
(stop [t] (.close t))) | |
(defrecord PathFactory [fs] | |
component/Lifecycle |
This file contains 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
$ TEST_DBS=sqlite mvn clojure:test | |
[INFO] Scanning for projects... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building java.jdbc | |
[INFO] task-segment: [clojure:test] | |
[INFO] ------------------------------------------------------------------------ | |
Downloading: http://repo1.maven.org/maven2/net/sourceforge/jtds/jtds/1.2.4/jtds-1.2.4.pom | |
Downloading: http://repo1.maven.org/maven2/net/sourceforge/jtds/jtds/1.2.4/jtds-1.2.4.jar | |
This file contains 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
No message. | |
[Thrown class java.lang.ExceptionInInitializerError] | |
Restarts: | |
0: [QUIT] Quit to the SLIME top level | |
1: [CAUSE1] Invoke debugger on cause Attempting to call unbound fn: #'clojure.core/refer [Thrown class java.lang.IllegalStateException] | |
Backtrace: | |
0: clojure.set__init.__init0(Unknown Source) | |
1: clojure.set__init.<clinit>(Unknown Source) |
This file contains 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
user> (defn classloader-heirarchy | |
([] | |
(classloader-heirarchy (clojure.lang.RT/baseLoader))) | |
([tip] | |
(if tip | |
(conj (classloader-heirarchy (.getParent tip)) tip) []))) | |
#'user/classloader-heirarchy | |
user> (classloader-heirarchy) | |
[#<ExtClassLoader sun.misc.Launcher$ExtClassLoader@7ea2dfe> #<AppClassLoader sun.m\ | |
isc.Launcher$AppClassLoader@61ba34f2> #<DynamicClassLoader clojure.lang.DynamicCla\ |
This file contains 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
user> (binding [*ns* nil] (ns-resolve 'clojure.core '=)) | |
#'clojure.core/= | |
user> (binding [*ns* nil] (resolve 'clojure.core/=)) | |
No message. | |
[Thrown class java.lang.NullPointerException] | |
Restarts: | |
0: [QUIT] Quit to the SLIME top level | |
Backtrace: |
NewerOlder