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
$ lein uberjar ; java -jar target/fan-0.0.1-standalone.jar | |
Created /Users/hlship/workspaces/fexco/fan-suite/target/fan-0.0.1.jar | |
Created /Users/hlship/workspaces/fexco/fan-suite/target/fan-0.0.1-standalone.jar | |
17:31:35.663 [main] INFO fan.auth.main - Startup 5 nil |
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
$ lein do clean, uberjar ; java -jar target/fan-0.0.1-standalone.jar | |
Compiling fan.auth.main | |
Compiling fan.auth.main | |
Created /Users/hlship/workspaces/fexco/fan-suite/target/fan-0.0.1.jar | |
Created /Users/hlship/workspaces/fexco/fan-suite/target/fan-0.0.1-standalone.jar | |
17:30:12.313 [main] INFO fan.auth.main - Startup 5 nil | |
~/workspaces/fexco/fan-suite | |
$ |
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
(defproject io.aviso/fan "0.0.1" | |
:aliases {"ci-build" ["with-profile" "ci-build,dev" "spec" "--reporter=xml" "--reporter=documentation" "--no-color"]} | |
:dependencies [[org.clojure/clojure "1.6.0"] | |
;; configuration | |
[io.aviso/tracker "0.1.0" :exclusions [org.clojure/tools.logging]] |
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
:omit-source true | |
:aot :all | |
:profiles {:client {:name "client" :main fan.client.main}} |
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 payment-codes-per-block 4096) | |
(defn create-payment-code-feed | |
[db] | |
(let [payment-code-feed (chan 10)] | |
(go-loop [] | |
(let [block-id (allocate-block db) | |
block-start (* block-id payment-codes-per-block)] | |
(-> (onto-chan payment-code-feed | |
(->> |
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
(defn next-payment-code | |
[db state] | |
(loop [] | |
(let [initial @state | |
[[code new-state] (generate-payment-code db initial)] | |
(if (compare-and-set! state initial new-state) | |
code | |
(recur))))) |
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
"Not So Simple" | |
Include Threaded Conversation by Chris Conley. | |
Section 1 - Model world | |
When play begins: | |
say "It is a long and riotous evening, full of unlikely stories and tall tales. But now most of the patrons have gone away to their rooms to sleep, or have passed out before the fire. Even the two black bitch pups are curled on the hearth-stone, snuffling through tiny wet noses, and pawing the air in sleep. Now is the time to find out whether the rumors that brought you to this neighborhood are true." | |
The Inn is a room. "The light is low and red. Above the fireplace hangs a map of this part of the Empire, and on the adjacent wall is the crimson and silver banner of Richard the Rose." |
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
(defprotocol State (state [this])) | |
(defrecord StateImpl [state-value] | |
State | |
(state [this] state-value)) | |
(-> (StateImpl. 42) state) | |
=> 42 |
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
(defprotocol State (state [this])) | |
(defrecord StateImpl [state-value] | |
State | |
(state [this] (:state-value this))) |
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
(defrecord ConnectionManager [execution-mode active-connections databases] | |
component/Lifecycle | |
(start [component] ...) | |
(stop [component] ...)) |