datalog 2020-03-25

@stuartrexking has joined the channel

In this example from the http://learndatalogtoday.org website

[:find ?name-1 ?name-2
 :where
 [?p1 :person/name ?name-1]
 [?p2 :person/name ?name-2]
 [?p1 :person/born ?born-1]
 [?p2 :person/born ?born-2]
 [(.getMonth ?born-1) ?m] ;assigned here
 [(.getMonth ?born-2) ?m] ;re-assigned here? filtered? What's going on?
 [(.getDate ?born-1) ?d]
 [(.getDate ?born-2) ?d]
 [(< ?name-1 ?name-2)]]
How does the assignment to ?m and ?d for the .getMonth and .getData functions work?

Try not to think of it as assignment. Instead think of it as a set of constraints: (.getMonth ?born-1) and (.getMonth born-2) must return the same value for every pair of people in the result set.

@zane Thank you!

@zane has joined the channel