mΓ₯nmΓ₯n!
π
Hola!
Morning and welcome @david.corthorn
@dharrigan you could use MQTT for that π
Sure.
we use gnatsd @dharrigan
But I think there was someone who was hyping (in a good way!) a library they wrote
Thanks @mccraigmccraig π I'll have a looksee
(via our own lib, which could do with some dependency updates, but still works fine: https://github.com/yapsterapp/clj-nats-async )
yup, just looking at that right now π
and if you do k8s, https://github.com/nats-io/nats-operator makes cluster setup trivial
:thumbsup:
morning
Morning
An advantage of WFH is I don't disrupt other people by hacking up a lung. Still, covid test came back negative
Morning
Morn'
So, exploring datalog
Morn
If you have a fact that contains a vector, i.e., [{:foo ["a" "b" "c"]} {:foo ["a" "b"]}]
, how would you find only the foo
that contains the c
?
so far, I can get back all the foo
's, but filtering?
anyone with more expierence of datalog?
are keys always :foo
?
yes
What about something like (filter (fn [item] (contains? (set item) "c")) coll)
?
so, you would have to supply a filter function, nothing directly in datalog. I see I see.
Sorry, I havenβt used datalog yet.
i used a datalog on mapreduce thing a while ago (cascalog) - it was great, and a refreshing change from SQL, but i really can't remember how to put queries together
"i really can't remember how to <whatever i was doing more than 3 mths ago>" is like, my spirit animal
just kind of have to hope that your subconscious is filing it all away somewhere right?
def feel like my conscious brain is not very smart (or getting smarter), but things seem to generally work and get better over time, so i sense a hidden hand at play
You need to either pass it in directly or do it as a query from what I remember @dharrigan
thank you all, will review
Got it to work thank you
I had to "flatten" it a bit, by providing a schema (playing around with datalevin)
(def foo (edn/read-string (slurp "/home/david/tmp/foo/foo.edn"))) ;; #'da/foo
;; [{:name "wibble", :foo ["a" "b" "c"]} {:name "wobble", :foo ["a" "b"]}]
(d/q '[:find ?name
:in $ ?alias
:where
[?e :foo ?alias]
[?e :name ?name]]
@conn
"c") ;; #{["wibble"]}