admin-announcements

Announcements from the Clojurians Admin Team (@U11BV7MTK @U077BEWNQ @U050TNB9F @U0ETXRFEW @U04V70XH6 @U8MJBRSR5 and others)
abhayarawal 2015-09-23T15:52:46.000377Z

i need to create a breadth first search wrapper using zippers. any ideas?

2015-09-23T16:02:55.000378Z

here's one without a zipper (returns first match of pred)

(defn breadth-first [pred coll] (when (seq coll) (or (first (filter pred coll)) (breadth-first pred (apply concat (filter coll? coll))))))

2015-09-23T16:04:12.000379Z

or - I don't know what a "wrapper" is, so maybe that's totally irrellevant

2015-09-23T16:22:22.000380Z

@abhayarawal: did a quick google-ing and didn’t find anything, should be pretty nice exercise writing it :simple_smile:

abhayarawal 2015-09-23T16:22:55.000381Z

here’s my actual problem. http://stackoverflow.com/questions/32729795/shortest-path-using-breadth-first-search-in-clojure

2015-09-23T16:25:44.000383Z

@abhayarawal: do you always start searching from the root?

abhayarawal 2015-09-23T16:25:52.000384Z

yes

2015-09-23T16:32:09.000385Z

hm, will try to look into it using zippers, just need to bootstrap a simple test file

abhayarawal 2015-09-23T16:33:16.000386Z

thanks!

2015-09-23T17:29:38.000388Z

@abhayarawal: got it working here: https://gist.github.com/darwin/6fbc796aa6a8a17e71b3

2015-09-23T17:30:51.000390Z

the iteration needs to carry some state around, see the bfs-visits example it was more difficult than anticipated :simple_smile:

2015-09-23T17:30:58.000391Z

tested under cljs

abhayarawal 2015-09-23T17:31:14.000392Z

thanks darwin. i’ll check it out

nberger 2015-09-23T18:54:05.000393Z

Any pointers on how our clojurebot /clj is implemented? I want to take it with me to other room :simple_smile:

nberger 2015-09-23T20:50:12.000395Z

Ok, I had to google it. It's verma/clj-slackbot in github :simple_smile:

2015-09-23T22:41:55.000398Z

Hi

2015-09-23T22:43:32.000399Z

component library is using a lot of syntax like (map->Something) - I can’t find any macro "map->” and it is not part of clojure core. What this is ? :simple_smile:

2015-09-23T22:44:09.000400Z

And uncle google doesn’t show any sensible results

2015-09-23T22:45:26.000401Z

Is this is just (map -> …)?

bostonaholic 2015-09-23T22:46:26.000402Z

@mr-spock: it's a convention

jcsims 2015-09-23T22:46:27.000403Z

mr-spock: it’s from defrecord: http://clojure.org/datatypes

2015-09-23T22:47:35.000404Z

Ha - Now I see :simple_smile:

2015-09-23T22:47:39.000405Z

@jcsims: thnx

👍 1
2015-09-23T22:48:28.000406Z

(find-doc) (doc) did not gave any results