We have collected the latest updates of popular and useful libraries:
This section contains recent articles, repositories and research that we found interesting. Resources where the authors use Scala 3 are moved to a separate block. Enjoy:
com.lihaoyi Scala: Executable Pseudocode that’s Easy, Boring, and Fast – an overview of the com.lihaoyi ecosystem from the author himself. A fundamental article designed to show what ideology is behind the whole set of tools. Fun fact: coursier and scala-cli are also going to mill.
Java Volatiles – A few notes about volatile variables in Java by Alexandru Nedelcu. Here’s the implementation of the single-producer-single-consumer message queue.
If you can understand why this sample is correct, you understand volatile variables
Two types of futures — capacious and short article from Adam Warski. It will dispel the fog of uncertainty in understanding the concepts of Future, namely promise-future and thread-future and their implementations in different languages and libraries.
Oh no! Timeout… – “Oh no! Another article about timeouts and network problems!” – but it was not there! Suddenly about asynchronous, 202 Accepted and inbox-pattern.
How to serialize case class to Json in Scala 3 & Scala 2 using Circe — Adam Rybicki continues the series about object serialization to JSON in Scala 2 and Scala 3. This time, the focus is on the golden classic — circe. Non-trivial issues are touched upon, including working with optional values in the model.
Getting started with ZIO, part 1 – getting acquainted with ZIO using the example of building a streaming service with all the related best-practices. This article is only the first of three promised. Written in an understandable language, we can recommend for the first introduction!
Why we used Quill in RealWorld project? — acquaintance with the world of FRM on the example of Quill.
5 Scala Libraries That Will Make Your Life Easier – five libraries that make life easier for a developer, which are extremely useful to know and pleasant to use in your project.
Iron updates: turning opaque types into value objects — Anton Kovalevsky told about how he will get prettier in the upcoming release iron — library for value validation at runtime/compile-time.
Mastering ScalaTest – Exploring Tagging, Retry, Runner and More – advanced features of scalatest. The entire editorial staff learned something new for themselves.
Large Language Models: How to use open source alternatives to ChatGPT for Scala documentation – after all yet another json lib, the question “how to translate a case class into JSON” began to be asked to neural networks. We compared several models, guess who won? ┐(‘～` )┌ ChatGPT-4 turned out to be so much better than everyone else that in the end it was used to further train the rest.
Reducing our Scala CI workflow runtime in half without changing any code – several ways to optimize the execution time of CI pipelines in Github Actions.
Publish a Scala Library using Github Actions in No Time – five detailed steps on how to publish artifacts of your library through Github Actions.
Five Books For Expert Scala Programmers – although it is written that the books are for experts, it is recommended to read it for every self-respecting Scala developer.
Faster and Smoother Rolling Updates for Akka Clusters in Kubernetes – released a fix for Akka Clusters after Kubernetes changed from v1.22 release default policy.
Adaptive Stream Parallelization for Fun and Throughput – Akka Streams has a new method on streams: mapAsyncPartitioned, this is an improved version of the previously known (no) mapAsync. The method is able to squeeze the maximum out of parallelism. Benchmarks and code snippets are included.
The Easy Button for Durable State Queries lightbend continue to improve Akka Persistence support.
Scala 3 Articles
Building a functional, effective Distributed System from scratch in Scala 3, just to avoid Leetcode (Part 1) – a powerful, or rather, POWERFUL article on creating a distributed word count service in a file. Scheduled from the stages of requirements formation and diagramming to the stages of choosing a technical stack and implementing interfaces. It is very pleasant to read: the narrative is not technical and dry, but filled with reflection and subjective opinion regarding the world of software development. Separately, plus in karma for references to the Stormlight Archive by Brandon Sanderson ٩꒰｡•◡•｡꒱۶
Scala 3 Significant Indentation Woes: Sample — Alexandru Nedelcu scolds Scala 3.3.0. Indentation instead of brackets is becoming the norm, and not everyone likes it.
Scala 3 Enums — Alexandru Nedelcu praises Scala 3.3.0. Work with enums correctly! |ʘ‿ʘ)╯
Videos and reports
We have collected links to already known and popular, as well as no-name channels and videos about Scala:
Ziverge – a number of reports from ZIO World 2023 are being replenished. And also new interesting things from Zymposium: ZIO HTTP 1.0, a feature for replacing services in the R-parameter of ZIO at runtime, and much more.
Learning Smithy/Smithy4s – YouTube series — a series of smithy4s tutorials: from project setup and smithy specification development to server and client connection. Recall that smithy4s – a library that allows you to describe API specifications in the format of your own IDL and generate client and server code based on them.
SBT will never be the same!!! – DevInsideYou about sbt 2.0, and more specifically about new caching. In short: perhaps a new approach will get rid of sbt-shell altogether! Perhaps there will no longer be a need for the Intellij IDEA “sbt shell” tab, and this will lead to the death of some of the sbt plugins and more native integration with unix-like commands.
Rock the JVM
Shock! 42 authorization methods, step by step tutorial. Do this every night and…Implementing various types of HTTP authentication and authorization in http4s.
In this block, resources under the flag of “crazy hands” are not always fresh, but caught our eye. The authors create something interesting, unusual, but not necessarily useful:
matrix-practice – is it possible to parameterize a vector by its size and index it without exceptions, Option or Either? Yes! Scala 3, compiletime and tuple constructors in a small fan project (ᵔ◡ᵔ)
Magnum: A new Scala 3 Database Client – a newly minted client to databases on Scala 3.3.0. Support for most databases is declared, for which there are JDBC drivers, a loom-ready API, and many other features.
Like in Zoolander (the movie), Magnum represents a ‘new look’ for Database access in Scala
Fx Calculator: A calculator for Android written in Scala 3.3 (and JavaFX) – the guys tried their hand at Scala 3 + JavaFX as part of creating a calculator on Android.
zio-maelstrom – if you have never heard about a set of exercises in the development of distributed systems Gossip Glomers, then it’s time to follow the link. But what does zio have to do with it? And despite the fact that the platform for testing solutions is built on top of Maelstromwhose client is zio-maestrom.
scala-sbt-codespaces-template — template for Github Codespaces. Out of the box contains Scala 3, sbt, Metals, Scala Syntax.
new lib: fs2-kafka-mock – a small lib for mocking consumer and producer from fs2-kafka.
A piece of the digest where we talk about the emergence of new and improvement of existing development tools:
bleep — brand new build tool. Of the promises – a lightning-fast start of work due to the fact that bleep is compiled into a native image. Based on bloop files And courier. yaml is chosen as the model for describing builds, as opposed to build as a DSL in sbt and build as a Scala code in mill. To support custom tasks like Task in sbt, a special scripts section is used, which specifies classes with a run method. There is an interesting feature of automatic porting of build files from sbt and a convenient migration of sbt plugins to Scala code in the form of a special structure that can be launched via the bleep scripts section.
The Scala Toolkit — the first release of the Scala Toolkit! The set includes upickle and os-lib from com-lihaoyi, sttp and munit. A series of mini-tutorials on how to use the tools is included.
tree-sitter-scala 0.20.0 — a small roundup of news about tree-sitter-scala. From the interesting: we added smoke testing and told a couple of stories about how to learn from your mistakes.
A section of curious and curious events in the world of the scala society, and we would like to see it voluminous and alive. If you missed something or you have suggestions – we are waiting for you in the comments:
A New GraalVM Release and New Free License! – The JVM community is making progress in finding its Grail! G1GC, profile-based compilation and other cool features were added to the free license ＼(⁀▽⁀ )／
SCALAR Conference 2023 summary — a brief excerpt of each report from the conference. Perhaps even up to the level of our comments in the last two issues (｡•̀ᴗ-)✧
Two More Old Cents on Scala 3 Migration – how many programmers do you need to move to Scala 3. A rather personal story about what the R&D orientation of the language and its development can lead to without regard to the requirements of the industry. An interesting example of cooperation with VirtusLab: ambassadors, including Wojciech Mazur, evaluated the migration and made an auxiliary pull request.
The Scala 3 compatibility story — VirtusLab reassures the trembling community that they are not going to make Scala 4 and break compatibility in Scala 3 yet.
flatmappers – Released the fourth issue, divided into two parts. Enjoy! ૮˶ᵔᵕᵔ˶ა
Is language “instability” really a reason for the lack of Scala adoption in the industry? – a thread with comments about why Scala never took over the entire IT business.
JetBrains Developer Ecosystem Survey 2023 — come in and fill out a survey about the experience of using products. The guys know how to intrigue from the first question.
See you in a month! ♡＼(￣▽￣)／♡
The digest was created by @Melkaya_150cm, @Ivoya, @tcarina. Your ideas, suggestions, feedback are welcome in the comments! <(￣︶￣)>