This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-01
Channels
- # announcements (7)
- # babashka (41)
- # beginners (117)
- # cider (3)
- # clj-kondo (145)
- # cljdoc (25)
- # cljs-dev (19)
- # clojure (197)
- # clojure-dev (14)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (11)
- # clojure-uk (21)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # code-reviews (4)
- # cursive (87)
- # data-science (11)
- # datomic (29)
- # duct (2)
- # emacs (10)
- # graalvm (1)
- # lumo (13)
- # malli (2)
- # nrepl (5)
- # off-topic (25)
- # onyx (1)
- # pathom (6)
- # reagent (20)
- # reitit (4)
- # rewrite-clj (7)
- # shadow-cljs (114)
- # spacemacs (16)
Is it possible to use wildcard matching as part of a tuple value? example query against 2-element homogenous tuple:
[:find ?e
:where [?e :nsm.entity/form [:todo _]]]
I want to match all entities with :todo
as the first tuple element regardless of the value of the second element. Currently this query always returns an empty set.I can confirm the [((comp #{:todo} first) ...)]
solution as working. Thanks @U086D6TBN!
how about something like
[:find ?e
:where
[?e :nsm.entity/form ?forms]
[((comp #{:todo} first) ?forms)]
I can confirm untuple
works in the following query:
'[:find ?e
:where
[?e :nsm.entity/form ?tup]
[(untuple ?tup) [?a ?b]]
[(= ?a :todo)]]
Thanks Joe!Hi everyone, after adding a private maven repo to my ions deps.edn I can't run the "clojure -A:dev -m datomic.ion.dev '{:op :push :creds-profile "dev" :region "eu-central-1"}'" command anymore. I always get the following error: Downloading: com/datomic/java-io/0.1.11/java-io-0.1.11.pom from <s3://datomic-releases-1fc2183a/maven/releases/>
{:command-failed
"{:op :push :creds-profile \"rsdev\" :region \"eu-central-1\"}",
:causes
({:message
"Failed to read artifact descriptor for com.datomic:java-io:jar:0.1.11",
:class ArtifactDescriptorException}
{:message
"Could not transfer artifact com.datomic:java-io:pom:0.1.11 from/to roots (): status code: 401, reason phrase: Unauthorized (401)",
:class ArtifactResolutionException}
{:message
"Could not transfer artifact com.datomic:java-io:pom:0.1.11 from/to roots (): status code: 401, reason phrase: Unauthorized (401)",
:class ArtifactTransferException}
{:message "status code: 401, reason phrase: Unauthorized (401)",
:class HttpResponseException})}
If I remove the private repo and the dependency of that repo it works again.see https://forum.datomic.com/t/issue-retrieving-com-datomic-ion-dependency-from-datomic-cloud-maven-repo/508/6 and https://forum.datomic.com/t/iam-permissions-to-access-s3-datomic-releases-1f2183a/861
By "private repo", I assume you mean one with creds in settings.xml? If so, can you successfully download deps using clj/deps.edn from it separately from the ion setup?
Hi @U064X3EF3, yes a private repo with settings.xml. If we run clojure -A:dev all the dependencies get downloaded without an issue. It's only when we run clojure -A:dev datomic.ion.dev '{...}' that we run into this problem. I've tried following both links that @U05120CBV posted but they don't seem to solve the issue.
Here's my deps.edn if that helps (with private maven repo)
{:mvn/repos {"datomic-cloud" {:url ""}
"roots" {:url ""}}
:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/data.zip {:mvn/version "0.1.3"}
org.clojure/data.xml {:mvn/version "0.2.0-alpha6"}
org.clojure/core.async {:mvn/version "0.3.442"
:exclusions [org.clojure/core.memoize]}
org.clojure/core.memoize {:mvn/version "0.7.2"}
com.datomic/ion {:mvn/version "0.9.35"}
cheshire {:mvn/version "5.8.1"}
clj-http {:mvn/version "3.10.0"}
com.cognitect.aws/api {:mvn/version "0.8.305"}
com.cognitect.aws/endpoints {:mvn/version "1.1.11.559"}
com.cognitect.aws/sqs {:mvn/version "697.2.391.0"}
com.cognitect.aws/s3 {:mvn/version "718.2.457.0"}
com.cognitect.aws/ssm {:mvn/version "718.2.451.0"}
medley {:mvn/version "1.2.0"}
camel-snake-kebab {:mvn/version "0.4.0"}
byte-transforms {:mvn/version "0.1.4"}
be.roots.mona/client {:mvn/version "1.65.5-168"}
}
:aliases {:dev {:extra-deps {com.datomic/ion-dev {:mvn/version "0.9.234"
:exclusions [org.slf4j/slf4j-nop]}
com.amazonaws/aws-java-sdk-sts {:mvn/version "1.11.210"}}}
:config {:extra-deps {com.cognitect.aws/sts {:mvn/version "697.2.391.0"}}
:extra-paths ["config"]}
:local {:extra-deps {com.datomic/client-cloud {:mvn/version "0.8.78"}
com.cognitect.aws/sts {:mvn/version "697.2.391.0"}
ch.qos.logback/logback-classic {:mvn/version "1.2.3"}
ch.qos.logback/logback-core {:mvn/version "1.2.3"}
org.clojure/test.check {:mvn/version "0.9.0"}
org.clojure/tools.namespace {:mvn/version "0.3.0-alpha4"}}
:extra-paths ["dev" "sessions" "test-resources"]}}}
What is the best approach when it comes to storing ordered data in Datomic? Say, someone wants to write yet another todo list app, where items can be reordered in a given list.
@avfonarev assert each item like {:index i :item item}
@avfonarev to add to this suggestion, you may also want to consider using bisection keys rather than numbers e.g. https://github.com/Cirru/bisection-key (I've successfully used this with DataScript before, for modelling ordered lists)
That is what I was leaning to. One can use amortization to reduce the number of writes per item this was.
I am using datomic analytics through presto and I deleted the database that was connected to it. After I recreate and populate the new database, presto cannot perform any query, always returning Datomic Client Exception
error
if you’re using cloud you can use the datomic-gateway
script to restart the access gateway
I see, thanks marshal!! I will post your response into datomic dev forum so other people may benefit from this as well
Quick question: is there any restriction around using Lambdas & HTTP Direct at the same time?
An apigateway method integration has either a lambda proxy or a vpc link of course, but datomic supports both at the same time. Note that the apigw lambda event data will not be present in the http direct request
Attempting to call datomic.api/connect with my database uri string results in
Execution error (NullPointerException) at datomic.kv-cluster/kv-cluster (kv_cluster.clj:355).
null
if anyone has an idea what that implies it would be a big help. i assume i have a connection issue, configuration of the connection string or a networking issue.Hello everyone, I am currently studying how I can use Clojure to a bioinformatics project. One of the first problems that I find is the lack of a library to work with data frames, I did some Google search but I did not find any information about some Clojure library that has any implementation like pandas (Python) or R.
Is anyone aware of open source compilers that compile a (subset, certainly) of SQL to Datalog?
Not directly. I'm a fan of http://teiid.org/ which allows you to SQL-fy just about anything. I believe https://prestodb.github.io/ has similar capabilities.