Bonjour à tou•te•s

Après un mois de juillet sans PSUG, on revient frais et motivés comme jamais de nos vacances bien méritées.

Ce mois-ci, Vincent Spiewak nous apprendra à gagner au Blackjack avec Scala et Akka et Wiem Zine vous fera découvrir Scalaz-IOQueue, une librairie basée sur la nouvelle ZIO.

Beat the dealer: Gagner au BlackJack avec Scala / Akka

Tu ne comprend rien à la programmation fonctionnelle, le modèle Acteur, ou les endofoncteurs ? Ca tombe bien, moi aussi ^^ Ensemble, nous allons voir comment implémenter une partie de BlackJack avec Scala et Akka. Au menu: sealed trait, pattern matching, options, futures, for/yield, map, flatmap, foldLeft, implicits et bien d’autres

Scalaz-zio: IOQueue

In April, John De Goes talked about several problems with concurrency and demonstrated how Scalaz 8 can solve those problems simply, with purely functional code, and how is possible to model actors using Scalaz 8.

Months later, the effect system of Scalaz 8 has become a new independent, zero-dependency library called «scalaz-zio».

They are a new, interesting, type-safe abstractions that provide a variety of features for building asynchronous and concurrent applications. In this presentation, I will talk about IOQueue, which is a type-safe queue that uses the purely-functional IORef.

I was honoured to contribute with John De Goes on the first version of IOQueue, which helped me to understand IORef and how to work with the IO bifunctor design. I will introduce these features and demonstrate some examples to put them in practice solving real world problems.