missionary

lsenjov 2025-01-08T07:04:21.159809Z

I'm having difficulty with calling new on a m/latest. Context: https://github.com/milelo/electric-multi-client-app/blob/main/src/lib/xtdb.clj#L9 is what I have Then when pulling out a db from there, doing it via

((xtdb.db/latest-db> @xtdb.db/!xtdb) (constantly nil) (constantly nil))
works and pulls out a Latest$Process that can be deref'd. But the demos are all pointing to using
(new (xtdb.db/latest-db> @xtdb.db/!xtdb))
which should be returning something reactive, but it's just... not. It's returning a java.lang.Object. Reflect is giving me nothing but the basic Object members. So it looks like it's not being cast correctly when returning, but I've no idea what it should be doing/what I'm doing incorrectly here. I couldn't find anything in the missionary docs referring to new usage, but I'm possibly blind

leonoel 2025-01-08T07:31:07.654199Z

new is electric, it doesn't mean anything in missionary

leonoel 2025-01-08T07:33:54.322609Z

I'm surprised it even compiles when it's called on something that is not a constructor

lsenjov 2025-01-08T07:40:36.856959Z

Oh fair enough then. I thought it was something missionary did. I'll go re-ask it in #hyperfiddle Thank you!