clara

Joel 2023-11-17T04:58:28.217419Z

It looks like there might be some knowledge of Clara EAV here, although I know @claudius.nicolae would be the ideal responder… I’m wondering why I can’t create an EAV with a nil value. In it’s spec it has

(s/def ::v some?)
where v is the value. So this doesn’t work:
(clara-eav.eav/->EAV -1 :some-keyword nil)
Since I can’t insert (“upsert”) this then I can’t write a rule about it AFAICT. So I’m trying to figure out how to work with this the way it is as it appears intentional.

apbleonard 2023-11-22T08:31:25.368279Z

I don't know much about clara eav, but I do think I know that, in clojure/datomic/rdf circles, setting any attribute of any entity to nil is commonly seen as semantically equivalent to not setting it at all. A nil attribute is to be interpreted as "I know nothing (new) about this attribute". This feels like a loss of expression but is actually very useful in practical terms when flowing values through functions that use nil punning. If you want to "unset" an attribute to have no value after it was previously set, you have to perhaps think about it as "retracting" a previously known fact, and find a way of doing that in your context.

Joel 2023-11-23T04:16:46.165769Z

I decided it must be a bug (upserting a map with nil values works), I filed one, but I get the impression @claudius.nicolae no longer maintains the repo. https://github.com/clyfe/clara-eav/issues/6

clyfe 2023-12-12T16:25:53.549689Z

fixed in snapshot

💯 1
Joel 2023-12-12T16:26:13.562779Z

Saw that, thanks!