Stuart talking about them as part of the Day of Datomic videos:
https://youtu.be/ZP-E2IgqKfA?t=2412
Simple data structure for anomalies.
Stuart talking about them as part of the Day of Datomic videos:
https://youtu.be/ZP-E2IgqKfA?t=2412
Simple data structure for anomalies.
... | |
# Fake a fuse install | |
RUN apt-get install libfuse2 | |
RUN cd /tmp ; apt-get download fuse | |
RUN cd /tmp ; dpkg-deb -x fuse_* . | |
RUN cd /tmp ; dpkg-deb -e fuse_* | |
RUN cd /tmp ; rm fuse_*.deb | |
RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst | |
RUN cd /tmp ; dpkg-deb -b . /fuse.deb |
;; Datomic example code | |
;; demonstrates various update scenarios, using a news database | |
;; that contains stories, users, and upvotes | |
;; grab an in memory database | |
(use '[datomic.api :only (q db) :as d]) | |
(def uri "datomic:mem://foo") | |
(d/create-database uri) | |
(def conn (d/connect uri)) |
This is a handy bit of code I've written more than once. I thought I'd throw it in here so I can refer back to it later. Basically, it lets you read a config file to produce a Clojure map. The config files themselves can contain one or more forms, each of which can be either a map or a list. Maps are simply merged. Lists correspond to invocations of extension points, which in turn produces a map, which is merged along with everything else.
Consider the following files:
names.edn
(ns groupon.joda-instant-reader | |
(:require [clojure.instant :as i]) | |
(:import org.joda.time.DateTime)) | |
(defmethod print-method org.joda.time.DateTime | |
[^org.joda.time.DateTime d ^java.io.Writer w] | |
(#'i/print-date (java.util.Date. (.getMillis d)) w)) | |
(defmethod print-dup org.joda.time.DateTime |