I hereby claim:
- I am CmdrDats on github.
- I am cmdrdats (https://keybase.io/cmdrdats) on keybase.
- I have a public key whose fingerprint is 98C4 B1D0 D1E3 7C6C AFBC 9E24 9739 BC96 EC14 C7F6
To claim this, I am signing this object:
(ns rush-hour) | |
;; We were curious what a rush how solver would look like.. and here it is. Ugly, but fast enough. | |
;; Solves the below expert level one in about 21 seconds on my work core i9 | |
(def cars | |
[{:car :orange | |
:char "O" | |
:pos [0 3] | |
:size 2 |
I hereby claim:
To claim this, I am signing this object:
At its core, FX (feature expressions) allow writing a set of forms which provide different implementations depending on the 'mode' in which compilation is done.
While FX is great for convenience, the tradeoff is that it strongly encourages conflating the notion of 'how' (platform specific instructions) something is done with 'what' (logical operation) is being done.
FX lets you can now shoehorn all the different implementations (currently java & javascript, but probably CLR down the line) into a single function, walk away and pretend its a fully portable solution.
(ns server.db.cqrs | |
(:use | |
[datomic-schema.schema :only [schema fields part]]) | |
(:require | |
[datomic.api :as d] | |
[datomic.function :as df] | |
[datomic-schema.schema :as s])) | |
;; Some simple helper functions: | |
(defn error [^String msg] |
Check out README.md to get started editing Clojure with Emacs. |
;; Some helper functions that adds support for currying-like syntax to function definitions but | |
;; still enable you to use variadic arguments in each function call. | |
(defn collect-vec | |
([l] (collect-vec l [])) | |
([[h & t :as p] acc] | |
(cond | |
(not (vector? h)) [acc p] | |
(nil? t) [acc [h]] | |
:else |
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |
(defentity-template base-entity | |
(fields | |
[id :auto-index] | |
[version :version] | |
[uuid :uuid :indexed] | |
[dateadded :datetime]) | |
(post-create-fn server.entities.all/add-entity-triggers)) | |
(defentity group | |
(tablename "groups") ; Optional, but mysql doesn't respond well to 'group' as a table name, so better just avoid this altogether. |