Fork me on GitHub
#beginners
<
2016-02-22
>
doodlebug05:02:39

Hey guys, may be slightly off-topic. I've heard about core.async and want to get into it. But before that I want to get a fundamental idea of sync/async, coroutines, actors, event-based, pub-sub, concurrency (and other related buzzwords) and where they all fit in. Can someone suggest a good place to start?

jonahbenton06:02:25

hey @doodlebug it's a big topic! you might start by poking around at "introduction to concurrency" links. this set of lecture notes is not bad- http://cs.lmu.edu/~ray/notes/introconcurrency/.

doodlebug07:02:08

@jonahbenton: the introduction looks promising! Thanks

adamkowalski08:02:14

Hey if I have something like this ((comp (partial map inc) (partial filter even?)) [1 2 3 4 5 6]) does that mean it will loop over the list two times? the first time it will filter the even numbers and then the second time it will map increment over the remaining numbers?

adamkowalski08:02:35

or does it somehow merge the two functions so that it only needs to loop over one time?

rauh08:02:43

If you don't want that you can use transducers.

rauh08:02:08

(into [] (comp (filter even?) (map inc)) [1 2 3 4 5 6])

adamkowalski08:02:38

How do transducers work? Like not in the sense of how to use them, but what is going on behind the scenes conceptually that they are able to “combine” functions to only perform one loop and still do all of the work

rauh08:02:03

@adamkowalski: I doubt I'll be able to explain that well here. There are great resources out there about them though.

jonahbenton12:02:37

hey @adamkowalski: this is a good overview for getting an intuition: http://ignaciothayer.com/post/Transducers-Are-Fundamental/ timothy baldridge, staff dev at cognitect, has an excellent video series (at $1/video) that goes in depth: https://tbaldridge.pivotshare.com/media/transducers-episode-1/13404.

alexmiller16:02:58

It's just combining transformations into a single function

alexmiller16:02:06

There's no real magic involved