Scala Digest. Release 6

Scala Times, Petr Zapletal’s blog And Channel Scala Nishtyaki, we add other interesting news and our own comments. We draw our motivation from the desire to develop and share the knowledge gained. We welcome any feedback! (づ ◕‿◕ )づ

Releases

We have collected the latest updates of popular and useful libraries:

Articles

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

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.

Highlights

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

Tooling

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.

  • tree-sitter-scala 0.20.1 – our colleague Vasily Morkovkin, became the new maintainer. Congratulations!

  • Writing a GitHub Action with Scala.js – a story about how the guys wanted to write custom Githib Actions, but faced a dilemma: they could use either Docker Container Actions or Javascript Action. However, the cunning developer mind remembered the existence of Scala.js and how easy it becomes to develop scripts with scala-cli.

Community movement

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:

See you in a month! ♡\( ̄▽ ̄)/♡

The digest was created by @Melkaya_150cm, @Ivoya, @tcarina. Your ideas, suggestions, feedback are welcome in the comments! <( ̄︶ ̄)>

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *