This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-06
Channels
- # aws-lambda (6)
- # babashka (1)
- # beginners (204)
- # calva (10)
- # chlorine-clover (17)
- # cider (57)
- # cljs-dev (3)
- # cljsrn (3)
- # clojure (148)
- # clojure-bangladesh (1)
- # clojure-berlin (3)
- # clojure-europe (30)
- # clojure-france (1)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-spec (4)
- # clojure-uk (14)
- # clojurescript (15)
- # code-reviews (8)
- # conjure (27)
- # data-science (9)
- # datomic (38)
- # duct (6)
- # figwheel-main (11)
- # fulcro (78)
- # helix (11)
- # jobs (1)
- # malli (18)
- # meander (22)
- # mount (4)
- # nrepl (3)
- # off-topic (93)
- # pathom (2)
- # pedestal (4)
- # re-frame (5)
- # reagent (6)
- # reitit (1)
- # ring-swagger (1)
- # sci (1)
- # shadow-cljs (19)
- # spacemacs (1)
- # sql (1)
- # tools-deps (76)
- # unrepl (1)
- # vim (5)
- # xtdb (8)
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
:where
(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)]
you want a “alias” or “clone” of a set with a different name so you can avoid some unifications or unify in different clauses
[(identity ?x) ?y] [(!= ?x ?y)] [?x :foo/position ?xp] [?y :foo/position ?yp] [(> ?xp ?yp)]
silly example
@U09R86PA4 That did it, thanks!
: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?
I did it, it was that. Now my issue is convert the date type
Now i'm looking after how to convert local-date to inst
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
@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: https://docs.datomic.com/on-prem/best-practices.html#grow-schema
Thanks
@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.
@joe.lane 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": [
"dynamodb:BatchGetItem",
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:Scan",
"dynamodb:PutItem",
"dynamodb:DeleteItem"
],
"Resource": "arn:aws:dynamodb:us-east-1:<42>:table/socket"
}
]
}
You have to bounce the compute nodes before the policy is picked up, have you done that?
Restarting the machines, either through a deployment, redeployment, an upgrade, or adjusting the EC2 ASG. A deployment would likely be simplest
Hello I'm getting
(cast/dev {:msg "ok"})
Execution error (IllegalArgumentException) at datomic.ion.cast.impl/fn$G (impl.clj:14).
com.datomic/ion {:mvn/version "0.9.43"}
com.datomic/client-cloud {:mvn/version "0.8.96"}
Wired:
(cast/initialize-redirect :stdout)
=> :stdout
(cast/initialize-redirect :stderr)
=> :stdout
(cast/initialize-redirect "out.txt")
=> :stdout
datomic.ion.cast.impl/Cast
=>
{: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
0x3931e29f
"datomic.ion.cast.impl$fn__2905@3931e29f"],
#'datomic.ion.cast.impl/-alert #object[datomic.ion.cast.impl$fn__2918
0x74973c24
"datomic.ion.cast.impl$fn__2918@74973c24"],
#'datomic.ion.cast.impl/-dev #object[datomic.ion.cast.impl$fn__2931
0x39a0a1ce
"datomic.ion.cast.impl$fn__2931@39a0a1ce"],
#'datomic.ion.cast.impl/-metric #object[datomic.ion.cast.impl$fn__2944
0x34926735
"datomic.ion.cast.impl$fn__2944@34926735"]}}