Yet another event streams library (signals3, v1.2.0)
▲ 23 r/scala

Yet another event streams library (signals3, v1.2.0)

Hey,

I've just published an update to an event streaming library I'm working on. It's called signals3 and its main purpose is to be a lightweight solution for distributing and processing data in Android apps and video games.

Which is exactly what Scala is not used for, I know ;) But once upon a time it was. signals3 is a rewrite + plus lots of additional functionality added to a codebase taken from Wire Android - an end-to-end encrypted messenger. The old version of its Android client was written in Scala 2.11 and published as open source. I worked on it 2017-2022 and later decided to rewrite a part of its functionality in Scala 3. So it might be claimed that signals3 is already battle-tested :)

Repo: https://github.com/makingthematrix/signals3

sbt: libraryDependencies += "io.github.makingthematrix" %% "signals3" % "1.2.0"

Anyway. The main idea here is that you can get events from different sources - be it the end user clicking and typing, the server, or the operating system, and you can easily create a chain of transformations that results in updates to the GUI, the database, or a request being sent back to the server. Streams and signals (i.e. streams with a cache for the last event) can be used pretty intuitively because their API is inspired by Scala standard collections library and comes with similarly working (and named) methods, as well as the support for the for/yield syntax. You can think of them as collections that are possibly infinite and accessing the next element is asynchronous and you might need to wait, but otherwise it's (almost) like standard collections.

v1.2.0 comes with the support for virtual threads, fallback strategy (i.e. what to do when a transformation throws an exception), support for Java's try-with-resources, should you ever need it, and stream "chaining" and decomposition with the `::` operator.

On top of that, there are lots of tests and documentation, so if you want to learn about event streams, you can clone the repo and experiment with it. It might actually make sense to treat v1.2.0 this way, as it's a non-LTS version (I use Scala 3.8.4). The next LTS version will be 1.3.0, but I want to wait till Scala 3.9 comes out. That also should give me enough time to add lightweight actors to the library :)

u/makingthematrix — 12 days ago
▲ 54 r/scala

IntelliJ Scala Plugin 2026.2 Is Out!

IntelliJ Scala Plugin 2026.2 is out!

What's New:

  • Support for BSP projects in WSL and Docker
  • Command completion
  • Support for interleaving parameter clauses
  • Support for dependent parameter types in the same clause
  • Better support for match types

What's Fixed:

  • sbt imports now work for whitespace-separated params in .jvmopts
  • sbt shell sync no longer fails while waiting for user input
  • WSL: fixed bugs in sbt imports and rerunning of tests
  • ScalaDoc: better handling of throws and links
  • Improved handling of nullable variables
blog.jetbrains.com
u/makingthematrix — 1 month ago
▲ 198 r/functionalprogramming+4 crossposts

Scala Was an Experiment That Changed Programming - Martin Odersky | The Marco Show

Martin Odersky - creator of Scala and contributor to Java generics - joins Marco Behler to talk about Java, JVM languages, AI-generated code, and why “you can’t trust your agents.” Watch now: youtu.be/Xn_YpUtXWT4

youtu.be
u/makingthematrix — 2 months ago
▲ 16 r/scala

Code style is not just for style – it impacts the physical world!

Learn about highlighting complexity and how to make your code highlighting-friendly for faster, more efficient highlighting.

u/makingthematrix — 3 months ago