Scala Digest. Issue 16

Scala Times, blog Petr Zapletal And channel Scala Nishtyaki, adding additional news and our own comments. We derive our motivation from the desire to develop and share the knowledge we have gained. We welcome any feedback! (づ◕‿◕)づ

Releases

We have collected the latest updates of popular and useful libraries over a couple of months:

  • IntelliJ Scala Plugin 2024.1 Is Out! — we brought in a whole bunch of useful changes for working with Scala 3 and its syntax. If your project uses the third version of the language and IDE for development – IntelliJ IDEA, then we strongly recommend updating the version of the plugin you are using and going to read the changes;

  • IntelliJ IDEA 2024.1 Is Out! — in this version of the IDE, owners of the Ultimate version will find many tasty features for themselves, and most of the gifts were brought to Javaists and Kotlinists. We cannot help but note the noticeable emphasis on AI Assistant and code completion. JetBrains even released a separate video for this release: What's New in IntelliJ IDEA 2024.1:

  • sbt 1.10.0-RC2 — work continues on implementation in RC2 SIP-51. In order not to suddenly discover this surprise in sbt 1.10.0, it is worth familiarizing yourself with at least the current changelog;

Articles

This section contains recent articles, repositories and studies that we found interesting. Resources where authors use Scala 3 have been placed in a separate block. Enjoy:

  • Scala 3 Data Transformation Library: ducktape 0.2.0. — ducktape 0.2.0 was recently released, an analogue of chimney, but only for Scala 3. In this blog post, the library developer talks about the internals of the project and how, with the advent of 0.2.0, new features of the library allow you to use it with pleasure. In general, take a look, everything is like in a chimney!

  • SIP-61 – Unroll Default Arguments for Binary Compatibility — an interesting SIP from Li Haoyi, with a heated discussion of naming from Odersky. The proposal itself looks tasty for lib: in the current reality, when a parameter that has a default value is added to a class or function, the new version of lib is semantically compatible for the user, but binary incompatible with the previous version. It is proposed to create a special annotation, mark such fields with it, and ultimately obtain binary compatibility.

  • Alexandru Nedelcu's comment — Alexandru Nedelcu very cool guy cool, clear and explained in detail the implicits to a newcomer on Reddit, despite the fact that there are a million such questions on the Internet, and even more documentation.

  • Mocking Libraries can be your doom — a short article about what mocking is in tests and how to mock correctly. Let's note the piquancy that the tags of the article include “Scala”, and the entire code of the article is in python (¬‿¬)

  • Folding Cheat Sheet #4 — Philip Schwarz slides as a separate form of art. They are generally to the point, but sometimes so funny.

    And your article could be here 🙂 Send news that you want to see in the digest, and we will thank you in the next issue!

  • Benchmarking Tapir: Part 3 (Loom) — “We are going to compare the following backends: http4s-vanilla, pekko-vanilla, vertx-vanilla, tapir-http4s, tapir-pekko, tapir-vertx (Future-based Vert.X server), tapir-vertx-ce ( Tapir Vert.X backend using Cats Effect), and finally, our fresh contenders: tapir-nima and tapir-netty-loom.”

Softwaremill employees with their tapir backends are as follows:

Softwaremill employees with their tapir backends are as follows:

Three parts of the most powerful introduction to type theory from @Underskyer1 have been released on Habr. Unlike classic textbooks and manuals on type theory, everything here is written in human language and with real examples of modern Scala code using similar techniques. Our recommendation.

And here we hid a couple more interesting articles:

Videos and reports

We have collected links to already known and popular ones, as well as to no-name channels and videos about Scala:

  • flatmappers 018. Formatters for Sql – discussed everything and nothing, and one of the topics caught our attention – the consequences of the One Billion Row Challenge in the form articles by Marko Topolnik how …

  • Simple Scala with Li Haoyi — interview with Li Haoyi himself. According to him, he works on his open-source libraries exclusively during non-working hours. It looks like the Tardis was stolen from the time lords; we don’t see any other explanation for how Li Haoyi managed to do everything. However, during the hour of interview we managed to cover a fairly wide range of issues, including discussing SIP and the evolution of Scala. Like it if you also constantly catch awkward moments on calls like 59:10 ≖‿≖

  • Algebraic Effects from Scratch by Kit Langton – nothing less than the find of the month. Bend your fingers: learning to write from scratch (!) system of algebraic effects in the image and likeness of kyo (!!). A very stylish “interactive” presentation (!!!), in which the story is narrated by Kit Langton (!!!!), who, for a moment, together with Adam Fraser led Zymposium and recorded a wonderful guide in six parts on how to assemble your toy zio.

  • The Death of Monads? Direct Style Algebraic Effects — and if you have slept through the entire movement with algebraic effects, then in this 17-minute video an attempt is made to outline their essence and compare it with functional effects and effectless code.

  • Why Effect is more important than ZIO by John A. De Goes — John A. De Goes at the Typescript conference. Talks about how Effect framework associated with ZIO. No matter what anyone says, you can’t deny De Goes’ ability to perform brilliantly.

  • Developer Productivity With IntelliJ IDEA — a tutorial on the capabilities of Intelij IDEA. There are no secrets presented that would not be in the official documentation. Great for beginners.

  • 10 flavors of Scala's future — Scalar 2024 recap — a nice cut of a mini-interview about the future of Scala with participants of the Scalar conference.

And here we hid some more interesting things:

Tooling

A piece of the digest where we talk about the emergence of new and improvement of existing development tools:

  • sbt 2.x remote cache with Bazel compatibility — notes by Eugene Yokota about your implementation of remote cache in sbt 2.x. It turns out that Bazel has its own Remote Execution API. The article is about how he is trying to integrate with this interface and use some of the endpoints to solve his problem, as well as how he is trying other options.

  • sbt-buildinfo 0.12.0 — a tiny plugin for generating an object describing the current sbt build of the project has acquired support for Scala 3. A fair question: “What does Scala 3 support in an sbt plugin mean?” The answer is that the generated object contains methods that can be called from the main project code. And these methods and object code will be generated taking into account the specifics of Scala 3.

  • Iris — an interactive theme configurator for Linux, written in Scala 3. Click in the terminal java -jar iris-java.jar and a TUI menu appears before you with a choice of theme.

Highlights

This block contains resources that are not always fresh, but that catch our eye under the banner of “crazy hands.” The authors create something interesting, unusual, but not necessarily useful:

  • raise4s – a small library for working with errors. Among the interesting things: a laconic syntax that allows the use of infix type application, which allows you to specify in the function signature which logical errors can be thrown.

  • Scalatags is another little gem from Li Haoyi. Allows you to quickly and conveniently sketch out a web page, coding in your favorite language (^_^). And now with support for Scala-Native 0.5.0.

Community movement

A section of funny and interesting events in the world of scala society, and we would like to see it voluminous and lively. If we missed something or you have suggestions, we are waiting for you in the comments:

  • The Montreal Effect: Why Programming Languages ​​Need a Style Czar. Good day, my little holivar lovers. This translated article collected many detailed comments under the post. The message of the article is that in each language it is required to release a guideline along with the release: what the stylistically correct code should now look like and what is the only library that should be used for parsing jsons. An example of stylistic chaos is given working code in Scalawritten in three styles at once.

Nastya

The piece of code is cool and looks super fun. Be sure to go check it out, but here is the following thought: someone, apparently, worked chilled, relaxed, in companies without strict rules for code uniformity and is now praying in their hotbed of democracy for a bit of authoritarianism. It’s so good that we have interns and juniors for reviews beat with sticks teach team rules of good code style

Karina

But I didn't like it

  • Lean Scala – the second entry in Mr. Odersky’s blog begins innocently and pleasantly: that a programming language is also about people, and not just about the execution of commands by machines, that all languages ​​are so different, each with its own characteristics… ♡\( ̄▽  ̄)/♡ And it all continues and ends with the thought that we should independently abandon macros, the effects of their ecosystems, and write everything simply and uniformly, according to the same rules (╮°-°)╮┳━━┳ ( ╯°□°)╯ ┻━━┻

    As a basis and as an example of such a guideline, the following is given: eight-year-old manifesto from Li Haoyi, which he tries to follow when writing his libraries. In addition, Mr. Odersky suggested on reddit under the post discuss your ideas, and at the time of writing the digest there were already more than 100 comments, often lengthy, several paragraphs long. Spears break, bullets whistle. There you can hear the opinions of different sides, there is an opportunity to let off steam, find like-minded people, and it is a surprisingly fascinating read.

  • Announcing the Scala Ambassadors initiative — officially recognized ambassadors appear in the Scala community, who take part in or organize any socially beneficial movement and to whom you can come with various questions. Unfortunately, you won’t see anyone from Russia among them, despite the entire scale of our regional community. The current list of ambassadors can be found look at scala-lang.org.

  • Scams in the Scala Community update. Fraudsters have reached a new level: now they need to understand at least a little Scala in order to be able to conduct an interview and offer an offer. And then they will say that a mandatory requirement for getting a job is a course certificate on the scam site scala-lang. They give it. During this time, they would have managed to get a job as rock climbers themselves and earn 300k per nanosecond.

  • Why we bet on Scala at SwissBorg – a post full of positivity. A company, faced with a crisis in its business, having experienced a move from akka to pekko, a migration from Scala 2 to Scala 3 (and this, for a minute… well, you get the idea), still has a huge amount of credibility in the language.

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

Previous releases:

@Melkaya_150cm, @Ivoya, @tcarina worked on the digest. We are happy to welcome your ideas, suggestions, and feedback in the comments! <( ̄︶ ̄)>

Similar Posts

Leave a Reply

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