A free, once-weekly Scala news flash. Easy to unsubscribe. Goes out every Thursday.
February 6th, 2020, ISSUE 313


Happy eyeballs algorithm using ZIO

Living in the Scala world, a natural question arises: what would this look like in Scala? After all, Scala is the language to tame concurrency problems!
Adam Warski (@adamwarski)
How (not) to use shapeless for cross-layer conversions in Scala

Jsonifying class field names? Let’s try to accomplish the task using shapeless.
Mikołaj Koziarkiewicz (@mikolak_net)
So you want to compose some functions

There are monoids for functions, and you can use these to get some nice compositions.
Lars Hupel (@larsr_h)
RESTful error handling with Akka HTTP and the library “endpoints”

Implementing RESTful services comes with challenges, this article addresses two of them: keeping a uniform representation of technical and business errors, and reducing the cost of maintaining the documentation.
Julien Richard Foy (@julienrf)
MUnit is a new Scala testing library · MUnit

You may be thinking "Why create Yet Another Scala testing library?". It's a good question and this post is my attempt to explain the motivations for creating MUnit.
Ólafur Páll Geirsson (@olafurpg)
Identify Side Effects And Refactor Fearlessly

In this article we will solely focus on the aspect of side effects and strictly speaking on how to identify them.
Leif Battermann (@leifbattermann)
5 (more) pitfalls to avoid when starting to work with ZIO

Second part of the series.
Natan Silnitsky (@NSilnitsky)
GraphQL in Scala with Caliban - Part 2 - Query optimization

It is very common to have deeply nested schemas where each inner field might require gathering data from a database. Ideally, we’d like to keep these calls to a minimum.
Pierre Ricadat (@ghostdogpr)
Announcing Dotty 0.22.0-RC1 - syntactic enhancements, type-level arithmetic and more

The version brings syntactic enhancements for extension methods and context parameters, as well as the kind projector syntax.
Anatolii Kmetiuk (@AKmetyuk)
Hack: How to Use Scala Futures with Cats IO

The article demonstrates a common trap you might fall into during the integration process.
Tamas Polgar (@TamasPolgar)
Dependency Injection using Self Types in Scala (Cake Pattern)

Self-types in action? Piece of cake!
Sayan Chakraborty
K-Means clustering with Apache Spark and Zeppelin notebook on Docker

Running ML model with IntelliJ IDEA on local spark environment.
λ.eranga (@itseranga)
Beating Textbook Algorithms in String Search

Performance of string search algorithms in Scala.
Linas Medžiūnas (@LinasMedziunas)
Vectos - Tracing with cats-tagless and ZIO

A nice tool to do root cause analysis and find bottlenecks.
Mark de Jong (@mark_dj)
Checklist for learning Scala

Based on this experience and the idea of lean learning: the right setting for everyone who wants to start a journey with Scala.
Horia Constantin (@ConstantinHoria)
Scala for Python developers

How to switch to Scala?
Antoine Doeraene (@doe_antoine)
Pure Function vs Referential Transparency

A manual of the problem solver.
Edward Huang
Part 1: Application of literal and dependent object types in Scala 2.13

How parametrization of a function with unconstrained String literals lures engineers to write not reliable software and how type-unsafe functions can become safe with an alternative design, which combines literal types, dependent-object types, and type class instances.
Yevgen Nerush (@nerush)


Data Juggling - Part 3 - Optics Explained (Monocle - Part 2)

In this video we will take a look at Isos, Prisms, Optionals and of course Lenses. We will also briefly touch upon Folds and Traversals.
DevInsideYou (@DevInsideYou)
Basic streams and combinators in fs2

In this video, you'll learn about basic streams and operators from the fs2 library. You'll also learn some of what makes fs2 Stream different than the typical collection.
Jakub Kozłowski (@kubukoz)


Scalar, March 19th-21st 2020, Warsaw, Poland

Get ready for the workshop-driven FP event in Poland!
SoftwareMill (@scalarconf)
ZIO Hackathon, March 22nd-23rd 2020, Warsaw, Poland

Over the course of two days, we will share and learn about ZIO and related projects; chat about functional programming, functional Scala, and much more; work on fun projects; and get to know one another.
Ziverge (@zivergetech)
ScalaUA, April 3th-4th 2020, Kyiv, Ukraine

Wholesale 10+ tickets are available till 2020.04.02.
ScalaUA (@ScalaUA_Conf)
flatMap(Oslo), May 14th-15th 2020, Oslo, Norway

The call for papers are open til until 1st of March. Also, user our link for a special discount for Scala Times readers!
flatMap(Oslo) (@flatmaposlo)


cats-effect 2.1.0

New SyncEffect typeclass, Concurrent#background function, Resource is now covariant in both its F[_] and A, There is now a Parallel instance for Resource, Scala.js 1.0 support and many more updates!
cats-effect contributors

Simple, idiomatic logging for ZIO apps, with tracing and pluggable backends out of the box.
zio-logging contributors
sbt 1.3.8

Fix for Coursier resolvers so the project resolvers come first, also a fix for Zinc causing intermittent NullPointerException.
sbt contributors


Scala Times banners?

Want one? Click here
Scala Times stickers?

Want one? Let us know or tweet @scalatimes.
Scala experts?

Need some? SoftwareMill is here, ready to talk and dive deep into your code.

  1. Scala Times Issue #333

    Using akka and react to organize your single page scala.js application. Tagless Final - Part 2 - Introduction to the Expression Problem. Functional, Type-safe, Testable Microservices with ZIO gRPC, July 16th, Online Webinar. Configuration management in Scala using zio-config, July 23rd, Online Webinar. Functional Scala Fundamentals, September 1st-3rd, Online Course.

  2. Scala Times Issue #332

    Mastering modularity in ZIO with ZLayers. Scala/Mill: Step 1, Creating a new Mill project. Cats Concurrency basics with Ref and Deferred. Tagless Final - Part 1 - What is Tagless Final?. Getting started with ZIO.

  3. Scala Times Issue #331

    Managing dependencies using ZIO. Scala Programming - The State of Developer Ecosystem in 2020 Infographic. Announcing the Moving from Scala 2 to Scala 3 course. Streaming all the way with ZIO, Doobie, Quill, http4s and fs2. Playing With Scala - Slick.

  4. Scala Times Issue #330

    A Beginner's Guide to Scala 3.0. Opening the fridge with ZIO. Writing functional DSLs for business domains. What Functional Programming Is, What it Isn't, and Why it Matters. Dependent Types in Scala 3.

  5. Scala Times Issue #329

    Addendum to Alex N's blog post on Scala warnings. Scalar 2020 whiteboard voting. Stream Processing with Scala by Itamar Ravid, June 15th, Online Workshop. Essential Effects, June 15-16th, Online Course. Microsphere, June 16th, Online Event.

  6. Scala Times Issue #328

    Akka Cluster split brain failures -  are you ready for it?. Defining the server logic for an endpoint: three approaches. Implement Event bus using Akka. Zalando case study: why they chose Scala? . A bloop tour for metals users.

  7. Scala Times Issue #327

    Time traveling in tests with Cats Effect. Lightbend To Contribute Commercial Features To Akka Open Source. Functional error handling with monads, monad transformers and Cats MTL. Akka Stream Coexistence With Akka Typed. Orchestrating startup and shutdown in Scala.

  8. Scala Times Issue #326

    A story about streaming unique batches in Monix. GraalVM Native Image Tips & Tricks. Mu-Scala 0.22: Distributed tracing. Using a remote server to build your Scala projects. Circe - Part 2 - JSON Codecs.

  9. Scala Times Issue #325

    Scala Start Page. Starting with Scala 3 macros: a short tutorial. Implementing Authentication on Play Framework. Lunatech and our commitment to the Scala Center. Scala Native Next Steps.

  10. Scala Times Issue #324

    A simple trick to improve type safety of your Scala code. The Power of Akka Streams. Akka Persistence JDBC 4.0.0 release candidate. Scala Book: Free PDF, Mobi, and ePub versions. Testing Embedded H2 DB with Scala and Scalatest.

  11. Scala Times Issue #323

    ZIO + Http4s: a simple API client. FP for Mortals for Cats!. An Introduction to ZIO Kafka. Akka Typed Fundamentals (PL), Online Workshop, April 27th. Scalar Online, May 15th (Extended CFP).

  12. Scala Times Issue #322

    The Death of Hype: What's Next for Scala. IntelliJ Scala Plugin 2020.1. Data processing with Akka Actors: Part II. Akka-http graceful shutdown. A Brief History of ZIO.

  13. Scala Times Issue #321

    Tapir codecs get an update. Data processing with Akka Actors: Part I. A functional comparer. Data Juggling - Part 11 - Getting Started with Squants. Scalar Online, May 15th (CFP).

  14. Scala Times Issue #320

    New feature: Search!. Bake your bread tagless-final style. User-land compiler warnings in Scala. Zio ZLayer with playframework. Testing background process with ZIO.

  15. Scala Times Issue #319

    From idea to product with ZLayer. Edge to Cloud: Building the Tesla Virtual Power Plant . What's the Point of Applicative?. Using ScalaCheck with MUnit. Monitoring and tracing for Akka applications under kubernetes (k8s).

  16. Scala Times Issue #318

    Akka Cluster application design. Spring to ZIO 101. NE Scala in the Time of Social Distancing. Scala 3 support in IntelliJ Scala plugin. Separate Docker Layers for Dependencies and App JARs.

  17. Scala Times Issue #317

    Using Google Datastore with akka-persistence. Functional Program (Re)Design. Writing native CLI applications in Scala with GraalVM. Data Juggling - Part 8 - Getting Started with refined. Fundamentals of Scala, March 14th-15th, Lagos, Nigeria.

  18. Scala Times Issue #316

    How to publish a Scala library in GitHub. Announcing Cats STM 0.7.0. Baking Peixinhos da Horta with ING’s Baker Library. Fundamentals of Scala, March 14th-15th, Lagos, Nigeria. Stairway to Scala Workshop, March 16th-20th, San Damiano, CA, USA.

  19. Scala Times Issue #315

    ZIO for IntelliJ. Scala 2 community build reaches goals. Cats Effect Ref. Using Dotty Union types with Akka Typed – Part II. Caliban Client: a type-safe GraphQL Client for Scala and Scala.js.

  20. Scala Times Issue #314

    Using Dotty Union types with Akka Typed. My FP Journey. Creating a dead simple CountDownLatch with ZIO. ZIO STM: CountDownLatch in two lines. 2019 Scala Developer Survey.

  21. Scala Times Issue #313

    Building Serverless Scala Services with GraalVM. Alpakka Kafka 2.0 Released | @lightbend. Haskell for impatient Scala developer: Getting into speed. Building useful Scalacheck Generators. Easily create New Sync Types with ZIO STM.

  22. Scala Times Issue #312

    Happy eyeballs algorithm using ZIO. How (not) to use shapeless for cross-layer conversions in Scala. So you want to compose some functions. RESTful error handling with Akka HTTP and the library “endpoints”. MUnit is a new Scala testing library · MUnit.

  23. Scala Times Issue #311

    Introducing error reporting in optics. GraphQL in Scala with Caliban - Part 1. Tidying up your SBT file with Scala. Dependency injection with Reader Monad in Scala. Etcd watch API integration with scala and cats-effect.

  24. Scala Times Top Links of 2019

    January: Scala Best Practices. February: Is your Scala object always a singleton?. April: Did Functional Programming get it wrong?. May: The little gems of Scala standard library. June: The Evolution of a Scala Programmer.

  25. Scala Times Issue #310

    Git hooks in Scala projects  - the easy way!. Testing Doobie programs. Implementing typeclasses in Scala I. Effective testing with ZIO Test. Akka Streams: error handling in event processing pipelines.

Organizing an event?
Promote it with
Scala Times.
The Scala Times reader?
Get a banner!
Got a tip?Send it in!
Follow us onTwitter.
Curated bySoftwareMill.
We arehiring.
Andtaking on projects.