Fork me on GitHub
#core-logic
<
2015-08-24
>
dmich00:08:27

@nblumoe: It is VERY bad etiquette to use (AT)channel. Everyone in channel gets notified!

dmich00:08:36

very annoying

nblumoe10:08:58

yes you are right @dmich, sorry. it's just annoying that we run into the 10k message limit so quickly. so if no one reads it on time, it's lost. also I think who does not want to be pinged would disable it. but to be sure: I fully understand, won't ping the channel anymore

nblumoe10:08:48

I do have another question though. how can I simplify the following small logic program?

(def talents
  [{:email ""
     :candidates [{:applications [{:status :active}
                                  {:status :rejected}]}]}
   {:email ""
    :candidates [{:applications [{:status :hired}
                                 {:status :rejected}]}]}])
(defn active-talents
  [talents]
  (l/run* [q]
    (l/fresh [candidate application]
      (l/membero q talents)
      (l/project [q] (l/membero candidate (:candidates q)))
      (l/project [candidate] (l/membero application (:applications candidate)))
      (l/featurec application {:status :active}))))

(active-talents talents)
;=> ({:email "", :candidates [{:applications [{:status :active} {:status :rejected}]}]})
The logic seems to be right, I want to get all talents, that have at least one application with status :active. But the usage of project is quite verbose. Is there a way to make this whole thing more concise?

nblumoe10:08:28

Okay, I got this now. Already a bit better:

(defn active-talents
  [talents]
  (l/run* [q]
    (l/fresh [candidate candidates application applications]
      (l/membero q talents)
      (l/featurec q {:candidates candidates})
      (l/membero candidate candidates)
      (l/featurec candidate {:applications applications})
      (l/membero application applications)
      (l/featurec application {:status :active}))))

dmich10:08:35

@nblumoe: There are actually logs for this entire Slack team. See http://clojurians-log.mantike.pro/

dmich10:08:55

(Though I don't know how many people bother to read the back logs)

nblumoe10:08:30

@dmich, true. But I would assume no one goes to the logs to check if there were any missed questions, but only if one already knows that there is something on the logs one would like to pick up.

dmich10:08:02

Also, some people (not me), are set up to have a text message sent to their phone when notified in a Slack channel. And on more popular channels you can really see the hate that is invoked when someone abuses the here command let alone the channel command 😛

dmich10:08:32

So best practice is, if you don't eventually get an answer, ask again.

nblumoe10:08:46

yeah, yeah. I know. It's an recurring issue with the notifications. I am good in ignoring selectively, but I understand others like to use this differently. I think flowdock's (at)team mentions are a good idea. As I would never expect anything urgent to happen on the Clojurians slack channels (like "WTF, were did production go?") I don't see a need for this here though. But anyways, sorry again and back to topic. Maybe you have an idea about my too verbose code above? simple_smile

dmich10:08:28

Haha. sorry.

dmich10:08:42

I am in this channel just to see what core-logic is all about.

dmich10:08:55

You might have more luck in #C03S1KBA2 channel.

dmich10:08:04

Also the Clojure IRC channel is VERY active

dmich10:08:25

moreso than the slack channel

dmich10:08:55

There have only been very few messages in this channel

dmich11:08:29

Yours was like only the second one this month