Scala eXchange London 2018: A topic-based approach to conferences
👍 For news and articles from Skills Matter, subscribe to our newsletter here.
I just came back from London where I had the opportunity to attend Scala eXchange 2018 and I noticed one really interesting thing: its topic-based approach. Many conferences usually declare some kind of leitmotif, such as “in the light of upcoming Scala 3…”, but Scala eXchange really had a concrete set of topics as a recurring theme throughout the whole programme. Is this a good thing or a bad thing? Let’s see.
To topic or not to topic
For example, earlier this year I said that ScalaDays in Berlin contained a little bit for everyone. Which is awesome in its own right. In a wide variety of topics, you are almost guaranteed to find something that really sparks your interest. From talks about concrete tools and frameworks such as SBT, Dotty, Finagle, Spire, Akka/Kafka/Monix Streams, Spark, Akka Cluster, Akka Typed, sttp, Lagom, Bloop, Scala Native, Scala JS etc., to talks involving concepts such as literal types, variance, traversables, execution contexts, kind-polymorphism, and more general things such as graph databases, deep learning, category theory, microservices, event driven programming, domain-driven design, protocol buffers etc. (still told from a Scala perspective, of course). There was something for everyone.
However, Scala eXchange is slightly different. It had an announced set of topics for this year: “Apache Kafka and Spark, types, Cats, and Tagless Final”. I don’t have too much interest in talks about Spark and Kafka (no hard feelings anyone), so I can’t say anything in that regard, but the “types, Cats and Tagless Final” part really delivered on its promise.
So, which is better, a-little-bit-for-everyone or a topic-based approach? It’s hard to tell. A diverse set of topics is kinda “playing it safe” and it can’t go wrong, but I really like the road that Scala eXchange took as well. Free, tagless final, recursive schemes, MTL, it all revolves around a similar theme, which I’m exploring myself at the moment, so for me it was very rewarding.
And the machinery behind it was narrowed down to Cats only, which I also find convenient. I’m using Scalaz more than I’m using Cats, but that’s not a problem; I’d rather have the whole conference Cats-only, which makes the talks more cohesive (concepts are similar anyway), than constantly have them flipping between the two, which might get a bit confusing (not to mention Scalaz vs Cats flame wars).
In order to illustrate my point better, here’s the quick digest of the talks I attended:
Fistful of Functors by Itamar Ravid (link):
- using Cats typeclasses for covariant, contravariant and invariant functors, bifunctors and profunctors
- detailed explanation of functor composition and its usage via Nested/Binested typeclass
Cats Effect, Tagless Final & beyond by Gabriel Volpe (link):
- using cats-effect library for handling synchronous and asynchronous computations, error handling, safe resource management, concurrency, parallelism and cancellation (via IO and typeclasses such as Sync, Bracket, Concurrent, Timer, Par)
- decoupling logic from interpretation by refactoring IO code into tagless final
Factor Recursion Out of Your Codebase by Tamer AbdulRadi (link):
- explanation of recursion schemes (based on this paper from 1991)
- available via libraries like matryoshka and turtles, but this talk relies on Cats for manual implementation via type parameters, functors and fixed-point combinator
Functional Composition and the Kleisli by Alexander Worton (link):
- composing functions, composing monads (monad transformers)
- aligning the types, achieving more readability and improving testability by lifting into Kleisli (Cats)
Cobind and Chill by Danielle Ashley (link):
- explanation of usefulness of comonad structure (available as a Cats typeclass) in signal processing
- implementation and demonstration of decoding of a sampled analogue TV signal
Why the Web is a Monad by Luke Tebbs (link):
- user interaction as an abstract program
- presents and showcases a WIP library, uniform-scala, which allows us to define the user journey in a functional way via a DSL and let interpreters build everything for us (Web interface, GUI, CLE, static page…)
MTL in 15 minutes by Pere Villega (link):
- explanation of monad stacks implemented via tagless final
- using library cats-mtl for implementing monad transformer stacks via typeclasses instead of manual MTL stacking
Liquid Haskell: Theorem Proving for All by Niki Vazou (link):
- Liquid Haskell refines Haskell’s types with logical predicates that let us enforce critical properties at compile time
- it’s a Haskell talk, but it explains the general concept of refined types which is also applicable in Scala (e.g. via refined library); this can also be connected to dependent types, which is something I had a really nice chat with Miles Sabin about
Unfolding Programs With Interpreters by Regis Kuckaertz (link):
- free monad and tagless final both have the concept of algebra + interpreters; this talk shows how comonads can be used to build interpreters
- contains some interesting parallels, from function application being the equivalent of modus ponens in logic, to React’s store/state being a monad/comonad pair
Type-Driven Development in Practice: Cats and Akka HTTP by Matt Roberts (link):
- type-driven development as a programming style
- using Cats Free, IO, Writer and Reader for implementing a web service in Akka HTTP
Functional Interpreters and You by Dave Gurnell (link):
- explanation of algebra + interpreters concept from two viewpoints — reification and Church encoding, which correspond to free monad and tagless final respectively
- example-driven showcase which takes us through the process of designing and implementing each of them, yielding a detailed comparison between the two
Pushing Types and Gazing at the Stars by Rob Norris (link):
- exploration of a problem (modelling a domain class for angles) and design of a solution in purely functional programming style
- using Cats for various typeclasses (Semigroup, Monoid, Group, etc.)
To be honest, the phrase “types, Cats and Tagless Final” could be improved a bit. “Types” is just too broad and “tagless final” is too specific (we’ve seen a fair share of its main rival, Free, as well some alternatives to both). Something like “type-driven programming, interpreters and monad stacks in Cats” would probably have been more precise. But I’m nitpicking; point is, whoever is even remotely interested in this particular subset of the vast Scala space, definitely (would have) had a great time at this year’s Scala eXchange.
Oh, and don’t forget that this is just one half of the whole theme; the other half is the data engineering Kafka/Spark side. Since there were four different talks to choose from in each given slot (apart from keynotes which were standalone), one could have taken such a path as well. Talk titles such as “Introduction to Kafka Streaming”, “Adaptive Recommender Systems with Apache Spark”, “Introduction to Functional Reactive Programming in Scala”, “Akka Cluster — Up and Running”, “Concurrency and Asynchrony in Scala” and “Validating Big Data Jobs — Stopping Failures before Production (w/ Spark, BEAM, & friends!)” speak for themselves.
Breaking the monotony
Of course, not *everything* needs to fit under the announced thematic umbrella. For example, the Haskell talk listed earlier obviously has nothing to do with the declared topics (well, it does with the “types” part, but as I said that’s just too broad). However, talks like that are awesome at breaking the possible monotony and are usually very interesting in their own right.
Same goes for talks such as:
- “Program Description Based Programming“ by Luc Duponcheel (link)
- “Formally Verifying Complex Systems Using TLA+” by Ruben Berenguel (link)
- “Deep Learning: Programming with a Difference“ by Noel Welsh (link)
- “Reinforcement Learning in Scala” by Chris Birchall (link)
- “Fire and Fury” by Jon Pretty (link)
One of the biggest divergences, not only from the main theme, but from Scala in general, was the keynote by Dr Eugenia Cheng: Conveying the Power of Abstraction (link). A very refreshing talk by one of the best speakers at the whole conference, highly recommended.
Another thing that Scala eXchange did in order to keep things fresh is the so-called “fireside chat”, where Martin Odersky and Simon Peyton Jones, people who don’t need any introduction in the worlds of Scala and Haskell, sat side-by-side (hosted by Miles Sabin and Zainab Ali) and discussed various FP-related topics (link). Being more casual in its tone than the talks themselves, it was cleverly placed as the first thing after lunch and served as a perfect introduction into the afternoon part of day 2.
Last but not least, the so-called “lightning talks” also felt very appropriate. Being placed at the end of the first day’s schedule, they take into account the tiredness and information saturation which appears at that point, so they were each only 15 mins in length. Having three 15-mins talks works much better in those circumstances than a single demanding 45-mins talk, at least in my opinion.
As far as I’m concerned, Scala eXchange got the right balance. Even though there was still a colourful variety of different topics, a central theme was present, and I find that to be a very interesting approach. It put an accent on a particular subject, but it never allowed for things to get boring and for anyone to be forced to go, “Omg not another tagless-final talk” without being able to shake things up a bit.
Maybe I would be speaking differently if it were about something I didn’t find that interesting, e.g. project setup and dependency management with SBT. :) But this way, I really enjoyed it.
I already provided direct links for most of the talks I mentioned, but you can find all of them at https://skillsmatter.com/skillscasts.