A free, once-weekly Scala news flash. Easy to unsubscribe. Goes out every Thursday.
June 27th, 2024, ISSUE 538

READING

Make Impossible States Unrepresentable: Network Edition!

Soundness provides appropriate types for working with all kinds of data. Network entities (email addresses, URLs, ports, IP addresses, MAC addresses, etc) are important in areas of software development, and it would be entirely inappropriate to represent these as strings and integers. So Nettlesome provides representations for all of these types.
Jon Pretty (@propensive)
Ten things I like about Scala 3

Enums (and GADTs), opaque types, inlines, macros, "then", polymorphic function, improved tuples, extension methods, Scala 2.13 interop, and optional braces syntax.
Eugene Yokota (@eed3si9n)
Compiling Bad Code

A compiler plugin which lets you compile bad code! You can write unit tests for every fragment of code you want the compiler to reject. You can test that your inline or macro code emits the right message at compiletime.
Jon Pretty (@propensive)
The ZIO 2 “mental model”

My initial notes on ZIO 2 mental model and best practices. Please note that I assume that you already have some exposure to ZIO, so I don’t take much time to review concepts like the ZIO R, E, and A parameters.
Alvin Alexander (@alvinalexander)
JetBrains course: Functional Programming in Scala

A course inside your IDE!
JetBrains (@jetbrains)

EVENTS

Lambda World. Oct 2nd - 4th, Cadiz, Spain

Don't miss he largest Functional programming event in South Europe!
Lambda World (@lambda_world)

VIDEOS

Tapir Tutorial - part 4: Error Handling

How to handle expected and unexpected errors, write proper server logic, and generate OpenAPI specification that correctly reflects your error model.
Adam Warski (@adamwarski)
Turbocharging web socket integration for Tapir

We love to use Tapir for the rapid development of Web APIs. Recently, we noticed it considerably impacted the performance of a web socket server (increased latency, lower throughput, heightened CPU usage). We managed to alleviate the slowdown almost entirely (reducing the overhead to a minimum - much less latency and CPU usage, greater throughput - performance rivalling a plain cats-effect/http4s/fs2 stack).
Kamil Kloch (@kamil_k)
Diamond Architecture: Lessons Learned

We will discuss the importance of using the Tagless Final pattern in the Diamond Architecture to improve code modularity and flexibility. The Diamond Architecture prioritises maximum cohesion principles. This is crucial for crafting code that is both comprehensible and adaptable to complex systems. We will now examine how the architecture and SBT plug-ins and tools collaborate to assist developers in streamlining their workflows, simplifying code reviews, and maintaining codebase consistency.
David Amancio
Mirrors for operations, not data

Can we derive endpoints from just a trait definition? One of Scala's strengths is domain modelling, and from a data definition, we can derive generic information in a Mirror, e.g. to generate type classes. For operations (such as endpoints) there is less support from metaprogramming, so we often create DSLs to describe them. I propose that we can extend Mirrors to operations, and use the most natural DSL of all - plain trait definitions.
Jamie Thompson (@bishabosha)
Discover SiriusXM new streaming platform

Julien Truffaut chats with Luka Jakubowicz and Damian Mazurkiewicz from SiriusXM, a leading audio entertainment company in North America. They discuss SiriusXM's use of Scala 3, Smithy for API development, and building a new streaming platform.
Luka Jacobowitz and Damian Mazurkiewicz (@dmazurio)
What Scala does better than Haskell and vice versa

This video is part of the Haskell & Scala series.
Yevhenii Zelenskyi (@impurepics)

RELEASES

bleep 0.0.4

Bleep uses coursier to enable you to write essentially portable Bloop json files without the boilerplate. This release bring bleep up to date with newest bloop, newest graalvm native-image, and a few bugfixes.
Bleep contributors
IntelliJ Scala Plugin 2024.1.24

Binary literals supported in Scala 3.5 and 2.13.13, improved braceless syntax support, fixed the Scala 3 issue where renaming parameters broke wildcard types. Additionally, the debugger now handles many lambdas in the same line.
JetBrains (@jetbrains)
ops-mirrors

Scala 3 makes it even easier to write expressive code that feels like it belongs in a dynamic language, but stays aggressively type-safe, improving your productivity. Towards this style, I'm introducing ops-mirror, a micro-library for reflection of method signatures, for example to generate schemas for HTTP endpoints from trait definitions.
Jamie Thompson (@bishabosha)
FastScala

The FastScala web framework allows you to do fast web application development in Scala.
David Miguel Antunes
setup-sbt GitHub Action

MacOS 13 and 14 runner images runner images on GitHub Actions are missing sbt runner script. - uses: sbt/setup-sbt@v1 provides a one-liner workaround to this incovenience.
Eugene Yokota (@eed3si9n)





  1. Scala Times Issue #541

    Tapir documentation improvements. Checked exceptions: fixed!. Use cases for Scala. ScalaWAW #33 - beach party! Jul 25th. Lambda World. Oct 2nd - 4th, Cadiz, Spain.


  2. Scala Times Issue #540

    PureConfig with Scala 3 - Tutorial. Developer Experience in Open Source Software. "Learn Functional Programming The Fast Way!" PDF is free. ScalaBridge London @ SiriusXM!, Jul 18th. ScalaWAW #33 - beach party! Jul 25th.


  3. Scala Times Issue #539

    YAML as a valid Scala 3 code. ExecutionContext.parasitic and Friends. ScalaBridge London @ SiriusXM!, Jul 18th. Lambda World. Oct 2nd - 4th, Cadiz, Spain. Faster and less mysterious sbt builds with Develocity.


  4. Scala Times Issue #538

    Make Impossible States Unrepresentable: Network Edition!. Ten things I like about Scala 3. Compiling Bad Code. The ZIO 2 “mental model”. JetBrains course: Functional Programming in Scala.


  5. Scala Times Issue #537

    A Logic Circuit Simulator with Cats-Actors. Magda Stożek - My Scala Story. Lambda World. Oct 2nd - 4th, Cadiz, Spain. ScalaBridge London Jun 20th, 2024. Armored type safety with Iron.


  6. Scala Times Issue #536

    Scala 3 improvements in Metals (and hopefully, IntelliJ IDEA). Purify Your Tests III: Lean, Mean Testing Machine. 12 years of the com.lihaoyi Scala Platform. Scala Is Not Going Anywhere. OpenTelemetry With Scala Futures.


  7. Scala Times Issue #535

    GraphQL in Scala: Role-Based Access Control. WebSocket chat using structured concurrency, Ox & Tapir. Tapir tutorials, part 1. Scala 2.13 LTS planning. A Sighting of filterA in Typelevel Rite of Passage.


  8. Scala Times Issue #534

    Lagom is approaching end of life: possible migration paths. WebSockets in Scala, Part 2: Integrating Redis and PostgreSQL. Scala service combined with PostgreSQL, Flyway, Doobie, Ciris, IO(Cats Effects), Http4s…. Akka 24.05: More Security. More Performance. More Efficiency.. Forking and Interruption in ZIO.


  9. Scala Times Issue #533

    Apache Pekko becomes a Top-Level Project. Scala Meetup at Evolution. Purify Your Tests: 2 Parametric, 2 Declarative. Introducing TARP Stack – Tapir, React and PostgreSQL. IO effect tracking using Ox.


  10. Scala Times Issue #532

    Duchess at Scala.io. Purify Your Tests. Tuning ZIO for high performance. JetBrains Joins the Scala Center Advisory Board!. Introducing com-lihaoyi Issue Bounties.


  11. Scala Times Issue #531

    Que es un Higher-Kinded Type de Scala?. ScalaMatsuri, June 7th-9th, Tokyo, Japan. Custom-compile errors with a venegance. Data Engineering at Netflix using Apache Spark and Flink.


  12. Scala Times Issue #530

    Direct-style Effects Explained. How to build AI apps with Scala 3 & Besom. Spec-first and code-first, hand in hand. ScalaMatsuri, June 7th-9th, Tokyo, Japan. Direct Style Scala Stack - An Experiment.


  13. Scala Times Issue #529

    Jacek Kunicki - My Scala Story. Kalix tutorial: Building invoice application. Safe direct-style Scala: Ox 0.1.0 released. LambdaConf, May 4th-10th, Estes Park, Colorado. LambdaConf - The Grand Hackathon Finale, May 10th.


  14. Scala Times Issue #528

    Lean Scala: Reddit discussion. Learn Functional Programming The Fast Way!. Caliban on Tailcalls's GraphQL benchmarks. LambdaConf, May 4th-10th, Estes Park, Colorado. LambdaConf - The Grand Hackathon Finale, May 10th.


  15. Scala Times Issue #527

    How implicits are useful . ScalaWAW #32, Apr 18th, Warsaw. LambdaConf, May 4th-10th, Estes Park, Colorado. LambdaConf - The Grand Hackathon Finale, May 10th. ScalaMatsuri, June 7th-9th, Tokyo, Japan.


  16. Scala Times Issue #526

    Announcing the Scala Ambassadors initiative. Supporting high-performance response streaming in Shardcake. IntelliJ Scala Plugin 2024.1 Is Out!. LambdaConf, May 4th-10th, Estes Park, Colorado. ScalaMatsuri, June 7th-9th, Tokyo, Japan.


  17. Scala Times Issue #525

    Scams in the Scala Community update. Why we bet on Scala at SwissBorg. Capture Checking in Scala 3.4. Why Effects libs? . Benchmarking Tapir: Part 3 (Loom).


  18. Scala Times Issue #524

    Tapir dropping Scala 2.12 support. Scala 3 Roadmap for 2024. Leveraging sbt remote caching on a big modular monolith. Krzysztof Ciesielski - My Scala Story. The Montréal Effect: Why Programming Languages Need a Style Czar.


  19. Scala Times Issue #523

    Zainab Ali - My Scala Story. Handling errors in direct-style Scala. Scala 3.3.2 post-mortem analysis. Distributed Context Propagation with otel4s. Pre-SIP: Improve Syntax for Context Bounds and Givens.


  20. Scala Times Issue #522

    The Functional Programming in Scala Course Is Out!. Shipping your code to cloud with Scala, Besom and Pulumi. Flavors of shared state in Cats Effect. Pekko Akka Compatibility. Benchmarking Tapir: Part 2.


  21. Scala Times Issue #521

    What to do with your End Of Life Akka?. Introducing Playwright-jsEnv for unit testing in scala-js environments. The holy graal of GitHub Actions. Gabriel Volpe - My Scala Story. Game development in Scala.js with David Smith.


  22. Scala Times Issue #520

    My team built and productionized a custom rate limiter in Scala. Benchmarking Tapir: Part 1. WebSockets in Http4s. Improving my Distributed System with Scala 3 (Part 2). Tomas Mikula - My Scala Story.


  23. Scala Times Issue #519

    Debugging session #1: zio-logging & quill. Scala Developer Advocate open hours - AMA . Better Shell Scripting with Scala-CLI. C-style for loops in Scala 3. Paweł Marks - My Scala Story.


  24. Scala Times Issue #518

    Scala Center Roadmap for 2024. Maciej Gorywoda - My Scala Story. Vladyslav Pekker - My Scala Story. Nicolas Rinaudo - My Scala Story. Adam Warski - My Scala Story.


  25. Scala Times Issue #517

    #1BRC in Scala & Scala-Native. Errors happen. Can we get rid of them using ZIO Test?. Scala IO, Feb 15th-16th, Nantes, France. Functional stream processing workshop before Scalar, Mar 20th, Warsaw, Poland. Scalar, March 21st - 22nd, Warsaw, Poland.


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 by SoftwareMill.
We are hiring.
And taking on projects.