View datomic-dynamic-find-clause.md

We're working on a project that uses the Datomic Pull API to pull specific attributes out of Datomic entities. Here's an example of query that uses the Pull API:

(d/q '[:find [(pull ?e [:sales/deal_number :sales/deal_close_date :sales/state]) ...] 
       :in $ ?date 
       :where [?e :sales/deal_close_date ?d _ _] [(> ?d ?date)]] 
       db 
       (days-ago-at-midnight 1))
View .travis.yml
1 2 3 4 5 6 7 8 9 10
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
View readme.markdown

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
View gist:128dfbe60240311faf97
1
: sum-digits ( n -- n ) number>string [EBNF rule=[0-9]+ EBNF] [ 1 swap <string> string>number ] map 0 [ + ] reduce ;
View keybase.md

Keybase proof

I hereby claim:

  • I am statonjr on github.
  • I am statonjr (https://keybase.io/statonjr) on keybase.
  • I have a public key whose fingerprint is 5017 2133 BC35 DD9A 8CBD A997 3869 FC94 42C2 D6ED

To claim this, I am signing this object:

View Makefile
1 2 3 4 5 6 7 8 9 10
# target: dist - Archive and deploy to local Immutant VM
dist:
lein immutant archive && \
scp target/charon.ima local@172.16.12.105:apps/ && \
scp resources/deployment/local.clj 'local@172.16.12.105:.immutant/current/jboss/standalone/deployments/charon.clj' && \
ssh -t local@172.16.12.105 "touch ~/.immutant/current/jboss/standalone/deployments/charon.clj.dodeploy"
 
# target: help - Display callable targets.
help:
egrep "^# target:" Makefile
View remote.rake
1 2 3 4 5 6 7 8 9 10
# Rails only allows databases local to your machine. If you run your databases in a VM
# (and you should), then you need to add this
 
namespace :db do
def local_database?(config, &block)
if config['host'].in?(['127.0.0.1', 'localhost', '172.16.12.102']) || config['host'].blank?
yield
else
$stderr.puts "This task only modifies local databases. #{config['database']} is on a remote host."
end
View normalizer.clj
1 2 3 4 5 6 7 8
07:16:13,507 ERROR [immutant.runtime] (pool-15-thread-1) Unexpected error occurred loading immutant.init #<ExceptionInInitializerError java.lang.ExceptionInInitializerError>
07:16:13,508 ERROR [org.jboss.msc.service.fail] (pool-15-thread-1) MSC00001: Failed to start service jboss.deployment.unit."charon.clj".immutant.core.application-initializer: org.jboss.msc.service.StartException in service jboss.deployment.unit."charon.clj".immutant.core.application-initializer: java.lang.ExceptionInInitializerError
at org.projectodd.polyglot.core.AsyncService$1.run(AsyncService.java:52) [polyglot-core.jar:1.x.incremental.61]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
View datomic.clj
1 2 3 4 5 6 7 8 9 10
(ns com.larrystaton.datomic
(:require [datomic.api :as d]))
 
;; (find-entity-id :person/name "Larry Staton" (d/db conn))
(defn find-entity-id
"Query Datomic for the entity ID with ATTR and VAL in DBVAL"
[attr val dbval]
(ffirst
(d/q '[:find ?e
:in $ ?a ?v
View crossword.tex
1 2 3 4 5 6 7 8 9
\documentclass[12pt]{article}
\usepackage[unboxed]{cwpuzzle}
\pagestyle{empty}
 
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Scale=MatchLowercase,Mapping=tex-text]{HelveticaNeue}
 
\begin{document}
Something went wrong with that request. Please try again.