ScalaIO 2017 Recap

Some feedback following the fourth edition of an exceptional conference.

~Full disclosure, Teads was sponsoring the event~

ScalaIO is a French conference that has been going on since 2013 and has become over the years an important event for the functional programming community.

This year’s edition was a great success:

  • 350+ attendees from all over Europe,
  • 50 well-known speakers from international communities: John A. De Goes, Daniel Spiewak, Bartosz Milewski …

We were impressed by the overall organization. Despite the vast amount of speakers everything went smoothly.

Two days jam-packed with great talks

ScalaIO 2017 featured many presentations in French and English within 4 different tracks. It was diverse enough to be interesting for both old Scala troopers and newcomers.

If you are wondering how you could approach Scala as a new language you should definitely check: Débuter en Scala: entre incompréhension et for-compréhension (FR) by Mélanie Lavabre. Mélanie managed to cover:

Talks that inspired us

Here is our shortlist, this edition’s trending topics were in particular: Category theory, Free Monads, IO Monad and Shapeless.

Let the compiler help you (EN) by Markus Hauck

In short “Work with the compiler, not against it”:

  1. Make the compiler chattier by enabling some compile flags, -Ywarn-unused, …
  2. Be honest in your type signatures, if your method could return an exception, encode it in the type system with an Either / Try /…, don’t use null to indicate the absence of something but use Option type.
  3. Don’t allow construction of invalid class instances through smart constructor.
  4. Push validation to the boundary of your system by taking only precise types into method arguments, for instance if you have to take an email as an input do not take a String argument but an Email type which enforces the email validity.
  5. Restrict valid operations by encoding state machines in the type system using phantom types. In most cases this last step isn’t worth it but is still an interesting technique to be aware of.

The design of the Scalaz 8 Effect System (EN) by John A. De Goes

Within this captivating talk, John presented his implementation of the IO monad inside Scalaz library, where he showed the complete API and corresponding usages step-by-step. He then explained why we should use this monad instead of the Future type due to its solid performances.

This presentation helped get a clearer understanding of threads usage. It also inspired us to try something new, which may show significant benefits in production.

Scalaz 8 is not available yet but you can have a look at this IO monad in this pull request.

A Crash Course in Category Theory (EN) by Bartosz Milewski

Bartosz is a mathematician who is very well-known in the community for making Category Theory accessible to programmers. He published a captivating series of Youtube videos and a book to do just that. We were quite excited to hear what he had to say on the topic.

Bartosz’s presentation was an introduction to Category Theory. He started by defining what categories are: basically objects (types in programming) and arrows, i.e. links between them (functions in programming). Then, he explained some concepts (functor, etc.) to ensure everyone was on the same page.

With the audience’s approval, he persisted through the break, which got him a well-deserved round of applause at the end of his presentation.

Next generation Scala builds with CBT (EN) by Jan Christopher Vogt and Ilya Kirillov

Jan Christopher Vogt is known for his contribution on the Slick library. This time he presented a new build tool called CBT.

The concepts are relatively the same, but SBT is aiming to be as simple as possible.

There is no custom DSL so you only need to understand Scala’s syntax to be able to write your own plugin and use it.

Ilya Kirillov presented the integration of CBT in IntelliJ, showing that it is ready for use on real projects.

We liked this talk as SBT is still a challenge to master, and CBT could be a great alternative. The only remaining limit is that SBT plugins needs to be re-implemented, but it seems fairly easy to do.

Déduction automatique d’instance de type classes avec Shapeless (FR) by Etienne Couritas

An introduction to Shapeless, focused on automatic type class derivation. Shapeless offers a great way to scrap your boilerplate using generic programming.

The presentation was mainly inspired by the book The Type Astronaut’s Guide to Shapeless but the speaker was exceptional at explaining the building blocks of it in a clear way, as well as, some non obvious quirks, for instance why we need the Aux pattern or a summoner method.

Teads on stage

For those who couldn’t attend the live coding session on Kleisli by Xavier Bucchiotty and Tristan Sallé, a video recording is available (in French).

The two of them presented a solid case for the use of the Kleisli datatype at Teads. The talk covered the different functional programming concepts introduced and step by step instructions on how to use them in production.

Tristan (left) and Xavier (right) on stage

You can check the coding examples here and the slides below.

ScalaIO 2017 was a top notch conference, and we would like to thank the organizers and other sponsors for supporting it.

Scala is a heavily used language at Teads, both for our Real Time Bidding platform and Machine Learning applications so we take great pride in learning the best ways to use it.

If you are looking for opportunities in this language feel free to contact us and have a look here.

Teads ScalaIO’s team: Xavier Bucchiotty, Baptiste Haudegand, Bastien Lemale, Yann Moisan, Tristan Sallé.