Fork me on GitHub

Is there a way to unify two logic variables together, similar to how ground unifies a logic variable with a constant? I tried =, but it doesn't appear to work, as this contrived example shows:

(def query '[:find ?x ?y
             :in $ % ?x
             (foo? ?x ?y)])

(def ground-y '[[(foo? ?x ?y)
                 [(ground :y) ?y]]])

(def unify-x-y '[[(foo? ?x ?y)
                  [(= ?x ?y)]]])

(d/q query (d/db conn) ground-y :x)
; #{[:x :y]}

(d/q query (d/db conn) unify-x-y :x)
; Execution error (Exceptions$IllegalArgumentExceptionInfo) at datomic.error/arg
; (error.clj:79). :db.error/insufficient-binding [?y] not bound in expression
; clause: [(= ?x ?y)]


the identity function


[(identity ?x) ?y]


I’m not sure what you want to do is called unification


you want a “alias” or “clone” of a set with a different name so you can avoid some unifications or unify in different clauses


this identity is also useful for self-joins:


[(identity ?x) ?y] [(!= ?x ?y)] [?x :foo/position ?xp] [?y :foo/position ?yp] [(> ?xp ?yp)] silly example


@U09R86PA4 That did it, thanks!

Ramon Rios10:07:28

:db.error/not-an-entity Unable to resolve entity: :policy-coverage/vt" Hello, what could be the reasons that my datomic is not founding this field?


you have likely not installed an attribute :policy-coverage/vt

Ramon Rios13:07:16

I did it, it was that. Now my issue is convert the date type

Ramon Rios13:07:56

Now i'm looking after how to convert local-date to inst

Ertugrul Cetin11:07:16

Hi all, there is a Datomic migration library called conformity which supports only Peer API not Client API, so I was considering to use Datomic Cloud and is there any migration library that supports Client API?


Depending on how active is this repo, I would consider reaching out to conformity's maintainers and ask if there are any plans on supporting client api, if not, maybe asses how much work would be needed to add it yourself, If you're lucky, maybe it isnt much of a hassle

Ertugrul Cetin13:07:24

@UNAPH1QMN how are you guys handling migrations in Datomic Cloud? Just sending all edns to transact fn?


Basically, yes. We centered our schema in a exclusive repository, shared among the contexts where it is relevant and agreed upon only extend it, never removing fields, something along the lines of:


@U0UL1KDLN I am considering updating conformity for use with cloud (I am still not completely settled on migration). It should not be too difficult I rewrote the internals to work with datascript at one point (never submitted a pr though as it seemed pretty specific to our use case). I am trying to get my cloud instance up and running first though.

👍 3

@lanejo01 Thanks I got the logging working. I am back to the IAM permissions problem again unfortunately. I am getting arn:aws:sts::<42>:assumed-role/<my-datomic>-Compute-<compute-id>-us-east-1/i-<other-id> is not authorized to perform: dynamodb:PutItem on resource: arn:aws:dynamodb:us-east-1:<42>:table/sockets (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: AccessDeniedException; Request ID: <ABCDEFG>) in my lambda output I have attached arn:aws:iam::<42>:policy/sockets-lambda-policy to the Optional Configuration Existing IAM policy for instances for my <my-datomic> stack. (that is root stack, not the compute stack, I am not sure if that was correct, but when I went to update the compute stack it recommended I update the root stack) The policy is the following:

    "Version": "2012-10-17",
    "Statement": [
            "Effect": "Allow",
            "Action": [
            "Resource": "arn:aws:dynamodb:us-east-1:<42>:table/socket"

Joe Lane21:07:47

You have to bounce the compute nodes before the policy is picked up, have you done that?

Joe Lane21:07:14

Also, your resource is socket but the error message is sockets

Joe Lane21:07:26

@mail524 ^ Maybe check that first?


I don't know what bounding the compute nodes means

Joe Lane21:07:24

Restarting the machines, either through a deployment, redeployment, an upgrade, or adjusting the EC2 ASG. A deployment would likely be simplest

Joe Lane21:07:14

But first I would check if the resource name in your policy is correct.


the names was in fact the problem


thanks again 🙂


Hello I'm getting

(cast/dev {:msg "ok"})
Execution error (IllegalArgumentException) at datomic.ion.cast.impl/fn$G (impl.clj:14).


When I look at datomic.ion.cast.impl/Cast There is no :impls key


com.datomic/ion          {:mvn/version "0.9.43"}
com.datomic/client-cloud {:mvn/version "0.8.96"}


Is this running locally or deployed in an ion?



(cast/initialize-redirect :stdout)

=> :stdout
(cast/initialize-redirect :stderr)

=> :stdout
(cast/initialize-redirect "out.txt")

=> :stdout


{:on datomic.ion.cast.impl.Cast,
 :on-interface datomic.ion.cast.impl.Cast,
 :sigs {:-alert {:name -alert, :arglists ([_ alert-map]), :doc nil},
        :-event {:name -event, :arglists ([_ event-map]), :doc nil},
        :-dev {:name -dev, :arglists ([_ dev-map]), :doc nil},
        :-metric {:name -metric, :arglists ([_ metric-map]), :doc nil}},
 :var #'datomic.ion.cast.impl/Cast,
 :method-map {:-metric :-metric, :-event :-event, :-dev :-dev, :-alert :-alert},
 :method-builders {#'datomic.ion.cast.impl/-event #object[datomic.ion.cast.impl$fn__2905
                   #'datomic.ion.cast.impl/-alert #object[datomic.ion.cast.impl$fn__2918
                   #'datomic.ion.cast.impl/-dev #object[datomic.ion.cast.impl$fn__2931
                   #'datomic.ion.cast.impl/-metric #object[datomic.ion.cast.impl$fn__2944


can you share the full stack trace when you called cast/dev please


It's working today 😞 What should i do in the days that it's not working?