datomic

vc 2025-05-21T09:30:05.986759Z

are there any paas/baas kind of tools built on top of datomic? ex - supabase on top of postgres

Ovi Stoica 2025-05-28T07:50:33.261909Z

Yes. Thank you @cormacc for the mention! http://shipclojure.com will have a new stack with datomic, replicant & datascript. It handles auth, user management, verification & onboarding. And I’m investigating if datomic can be deployed on http://fly.io as part of the same docker. This stack is not yet released but will be pretty soon

❀️ 1
πŸ™Œ 1
vc 2025-05-28T08:30:39.534659Z

"In full honesty, I am looking at bitemporal DBs because I see a raising interest in them. I am considering providing plugins or guides to change the database to https://www.datomic.com/ or https://xtdb.com/. This is not my main focus at the moment but it is in the backlog." πŸ™Œ I was myself thinking of such a thing but there you are.

2025-05-21T11:26:34.364709Z

does datomic cloud count?

raspasov 2025-05-22T05:02:43.794849Z

None that I am aware of

raspasov 2025-05-22T05:03:27.284389Z

> does datomic cloud count? I assume not, since that’s more like do-it-yourself IaaS (infrastructure as a service)

raspasov 2025-05-22T05:04:53.909579Z

I have tried it and it was quite straightforward to setup, with an AWS account – it requires a basic level of AWS knowledge and tinkering.

cormacc 2025-05-27T20:49:43.875449Z

I'm not aware of any, but @ovidiu.stoica1094's shipclojure offering is a deployment template covering similar ground. The live version is uix2 / postgres, but gather from a conversation at reclojure yesterday that he's working on a datomic/datascript/replicant variant. You'd still have to own your deployment but sounds like he's done a lot of the heavy lifting

πŸ†’ 1
arohner 2025-05-21T16:21:34.271409Z

Like ten years ago, I seem to recall a demo of datomic where you could pass raw CLJ vectors to d/q and query it. Am I hallucinating or is that supported? Is it documented?

Ivar Refsdal 2025-05-23T20:14:13.926429Z

Is this what you saw (2013)? https://www.augustl.com/blog/2013/find_by_id_in_datomic/ Written by @augustl

arohner 2025-05-23T20:18:25.459969Z

I think it was at one of the first official Clojure conferences where datomic was being shown off

2025-05-23T20:19:54.115419Z

ohai πŸ‘‹ I got that from Stuart Halloway iirc, he demonstrated joining between Datomic and an Excel spreadsheet by parsing the sheet and converting it to vectors of facts πŸ™‚

πŸ”₯ 1
favila 2025-05-21T16:26:30.459239Z

Cloud/client api needs a db as its first datasource because it needs a machine on which to run the query.

favila 2025-05-21T16:27:05.556479Z

Peer does not have this limitation because the query runs on the peer itself.

favila 2025-05-21T16:27:34.489409Z

In either case you can supply non-datomic datasources.

cjohansen 2025-05-21T16:27:36.038719Z

(datomic.api/q
   '[:find ?e
     :where
     [?e :really/awesome? true]]
   '([1 :really/awesome? true]
     [2 :really/awesome? false]))
Right, this works!

favila 2025-05-21T16:28:00.097149Z

https://favila.github.io/2024-06-20/datomic-data-sorcery/

πŸ‘Œ 2
favila 2025-05-21T16:28:39.312779Z

with cloud, just supply additional datasources

favila 2025-05-21T16:28:50.031719Z

include the first one just as the place to run the query

favila 2025-05-21T16:29:28.527789Z

e.g. (d/q '[:find ... :in $client $ :where [...])`

favila 2025-05-21T16:30:21.707969Z

You can also use multiple:

:in $a $b :where [$a ?foo][$b ?foo] ...

favila 2025-05-21T16:30:55.719249Z

Rules can use a specific datasource, but unfortunately not multiple

favila 2025-05-21T16:31:23.193929Z

($my-ds my-rule-name ?rule-arg ...)

favila 2025-05-21T16:32:43.507659Z

"rules" includes or-join/or/not-join/not, which are rules under the hood

arohner 2025-05-21T16:35:34.443329Z

Thanks!

arohner 2025-05-21T16:21:54.206639Z

and related, can you d/q the results of d/q, for filtering etc?

ghadi 2025-05-21T16:24:53.726819Z

you can call d/q in a where clause

ghadi 2025-05-21T16:26:27.812959Z

:where [[?pro :profile/id ?profile-id]
        [(q '[:find [?contact ...]
              :in $ ?pro
              :where
              [?contact :contact/of-profile ?pro]]
          $ ?pro) ?cs]
         [(set ?cs) ?cset]
         .... more clauses