This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (106)
- # boot (25)
- # cider (2)
- # cljs-dev (100)
- # cljsjs (1)
- # cljsrn (8)
- # clojure (90)
- # clojure-brasil (1)
- # clojure-dev (7)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-madison (1)
- # clojure-russia (15)
- # clojure-serbia (15)
- # clojure-spec (13)
- # clojure-uk (32)
- # clojurescript (88)
- # cursive (19)
- # datascript (13)
- # datomic (32)
- # defnpodcast (1)
- # dirac (43)
- # euroclojure (1)
- # graphql (5)
- # hoplon (11)
- # immutant (1)
- # jobs (6)
- # lein-figwheel (2)
- # liberator (2)
- # luminus (14)
- # lumo (22)
- # off-topic (12)
- # om (9)
- # onyx (49)
- # parinfer (45)
- # precept (4)
- # protorepl (2)
- # reagent (14)
- # ring-swagger (3)
- # sql (1)
- # test-check (58)
- # timbre (3)
- # untangled (86)
I’m designing a schema where ordered to-many relationships are a requirement. I’ve seen the various blog posts etc and that seems to suggest either 1/ component wrapper entities with :position attr, 2/ referenced/child entities with :position attribute or 3/ referenced/child entities with linked-list attributes
Does anybody have any experience or war stories from using these various techniques?
@steveb8n Datomic can’t really help because it can’t know which of these is most suited to your use-case. few vs many items, items-have-one-parent-list vs items-have-many-parent-lists both have an impact on what you do. by providing for one case, Datomic could mislead people on thinking about these concerns
@steveb8n you should ask on Stackoverflow or the mailing list, and we'll try and give you the tradeoffs
@val_waeselynck I’ve posted the question. Really appreciate any input. https://stackoverflow.com/questions/44645938/how-to-implemented-sorted-to-many-relationships-in-datomic
Has anyone successfully created a leiningen project with dependencies for both the datomic client and ring? I've found this unresolved issue on SO relating to the exact same problem I have and can't figure out a way around it: https://stackoverflow.com/questions/43291069/lein-ring-server-headless-fails-when-including-datomic-dependency - appears to be caused by ring and the datomic client relying on different but incompatible versions of Jetty?
@shaneprince i had issues with some AWS libs conflicting and had to add ‘[com.amazonaws/aws-java-sdk-dynamodb “1.11.0”]’ by hand to resolve it.
in your case try to include a version of jetty that will satisfy different libs
Thanks @karol.adamiec, running lein deps :tree shows the datomic client depends on jetty-util 9.3.7.v20160115 but from my investigation ring core depends on jetty-util 7.6.8.v20121106. I'm on ring 1.6.1 which I believe is the latest version. Is it even possible to include both dependencies that each require different versions of jetty?
For anyone else that comes across this issue: from what I understand it looks like ring-core is using an older jetty adapter for legacy purposes. I've found https://github.com/sunng87/ring-jetty9-adapter a worthy replacement so far.
@matthavener clj-time has comparison functions e.g. https://clj-time.github.io/clj-time/doc/clj-time.core.html#var-latest
@robert-stuttaford i’m more asking if the ability to use a predicate like
[(< ?inst1 ?inst2)] is documented
@matthavener and I think that is really odd that inside datalog we
#inst, and on clojure not.
so it's more a
clojure "problem", that cant compare
#inst, and datomic has a workaround to make it work internally ?
most likely they have a custom comparator for whatever sorted-datom-set data structure they made
I'm trying to
`[(my-ns/function-that-returns-function ~'?foo) ~bar] [(~bar ~'?var1 ~'?var2) ~'?foobar]
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Parameter declaration ?var2 should be a vectorI'm missing something?
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: Unable to resolve symbol: ?f in this context
This is the real exception. The other exception was because I'm using
~'bar) keyword and it's trying to evaluate a function 😜
`[(my-ns/function-that-returns-function ~'?foo) ~'bar] [(~'bar ~'?var1 ~'?var2) ~'?foobar]
Unable to resolve symbol: bar in this context
`[((my-ns/function-that-returns-function ~'?foo) ~'?var1 ~'?var2) ~'?foobar]
Unable to resolve symbol: ?foo in this context