Practice meeting, 9/23/19

Skip to first unread message

Lyle Kopnicky

Sep 17, 2019, 8:07:11 PM9/17/19
to pdxfunc
When: Monday, Sept 23rd, 6:30-8:30pm

Where: Collective Agency Downtown, Suite 1108, 511 SW 10th Ave, Portland, OR (opposite side of the floor from the elevators)

We'll discuss Chapter 11, "Higher-Level Concurrency Abstractions", of Parallel and Concurrent Programming in Haskell. Please read it beforehand. You may wish to try running the code examples from the book. At the meeting anyone will be able to present and contribute to the discussion.

Meetup link to RSVP:

Hope to see you then!

Lyle Kopnicky

Sep 24, 2019, 10:14:07 PM9/24/19
to pdxfunc
Good meeting! Chapter 10 was pretty short, and we went through it quickly. We did stop to get a better understanding of some bits, making references back to previous chapters. The waitBoth function constructed in terms of STM, was rather tricky. The trick was noticing that there’s a semicolon (sugar for a >>) between waitSTM a2 and retry, not an orElse. So the retry happens exactly when the waitSTM succeeds. It’s a bit counterintuitive, but it works.

We also convinced ourselves of the differences between the implementation of timeout using ‘race’ and the original one using ‘handleJust’ and ‘bracket’. Not sure which I’d prefer - probably the original one. It depends on whether you care about receiving a special Timeout exception.

I also showed an example of how one can use a bounded channel to feed streaming data from a database query into a Conduit pipeline.

We looked at the library documentation for the async library, to get an idea of what was new that wasn’t talked about in the book. The ‘link’ function that links two arbitrary threads together, so that if one gets killed by an exception, the other one does too, was interesting.

Finally, we moved forward into Chapter 12 on concurrent network servers. We only got through the first section, but it ended with some interesting questions. TJ brought up that the code from the book won’t run in the current version of the library - he had to install an older version. It seems that for some reason the newer versions of the library got rid of the listenOn function, replacing it with several more complex bits of setup.

We’ll continue with Chapter 12 next time. It looks to be pretty fun.

- Lyle

You received this message because you are subscribed to the Google Groups "pdxfunc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages