core-logic

2015-08-24T00:13:27.000138Z

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

2015-08-24T00:13:36.000139Z

very annoying

nblumoe 2015-08-24T10:39:58.000141Z

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

nblumoe 2015-08-24T10:41:48.000142Z

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

(def talents
  [{:email "<mailto:foo@bar.com|foo@bar.com>"
     :candidates [{:applications [{:status :active}
                                  {:status :rejected}]}]}
   {:email "<mailto:bar@foo.com|bar@foo.com>"
    :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)
;=&gt; ({:email "<mailto:foo@bar.com|foo@bar.com>", :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?

nblumoe 2015-08-24T10:47:28.000143Z

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}))))

2015-08-24T10:47:35.000144Z

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

2015-08-24T10:47:55.000145Z

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

nblumoe 2015-08-24T10:48:30.000146Z

@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.

2015-08-24T10:52:02.000147Z

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 😛

2015-08-24T10:52:32.000148Z

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

nblumoe 2015-08-24T10:54:46.000149Z

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:

2015-08-24T10:58:28.000150Z

Haha. sorry.

2015-08-24T10:58:42.000151Z

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

2015-08-24T10:58:55.000152Z

You might have more luck in #C03S1KBA2 channel.

2015-08-24T10:59:04.000153Z

Also the Clojure IRC channel is VERY active

2015-08-24T10:59:25.000154Z

moreso than the slack channel

2015-08-24T10:59:55.000155Z

There have only been very few messages in this channel

2015-08-24T11:01:29.000157Z

Yours was like only the second one this month