r/scala

Someone here is working on MCP servers / clients?
▲ 10 r/scala

Someone here is working on MCP servers / clients?

Are you working with MCP from a developer standpoint? Do you have some pain points, experiences?

Asking since some time ago I picked up chimp https://github.com/softwaremill/chimp a PoC of an MCP toolkit for Scala 3. It is gradually turning into a complete MCP SDK, supporting both server & client, both http & stdio, with integrations for Pekko, ZIO and ox in place. Main focus now is on conformance to the latest MCP protocol version.

u/kubinio123 — 17 hours ago
▲ 42 r/scala

Why Kit Langton left Scala?

I was watching a really nice video related to effects from him, but then I saw a few comments on Reddit with mentions that he left the language. His GitHub is mostly Typescript now 🤔

reddit.com
u/Ecstatic-Panic3728 — 4 days ago
▲ 26 r/scala

Why do you prefer IO over Future?

Everyone is always saying future is terrible. But the number of times I have had a future-related bug in 5 years of using it: 0.

as far as I know there's no practical difference between the two except Future is eager, and IO may or may not be eager. And you can reuse IOs.

The number of times I have wanted to explicitly reuse an IO: 0.

Number of times I have had a bug because some IO was eager instead of lazy: 1.

Relying on future as a first class citizen also means you're relying on the scala devs rather than cats-effect devs to dictate your run time which sounds better to me?

Monads etc all still work fine with Future even if they're not strictly lawful.

For context I just do standard web-dev. Considering pekko or http4s for the next project.

What am I missing exactly? Convince me one way or the other!

reddit.com
u/Inevitable-Plan-7604 — 6 days ago
▲ 22 r/scala+1 crossposts

Scala & Enola - Looking for feedback

I asked moderators about whether I can post this. They said yes, but if you feel different let us know.

---

We just added Scala support to Enola (open-source). A tool to maintain codebase quality for any Scala project

Most architectural problems start with a PR. The mistakes may not be obvious at the time, but without knowing, it carries architectural debt.

By the time the codebase feels wrong, it usually already is. That's what my co-founder and I saw. So we tackled it.. As best as we could 😄 The problem has only exacerbated with agentic development.

Enola is an open-source architectural quality gate that checks developers or agents changes as they happen. What do we measure?

Example of an output:

Architecture
  Pattern:             go-standard (95% confidence)
  cyclic dependencies         0
  layer violations            0

Impact analysis (hotspots)
  coupled modules            36
    high criticality         20
    medium criticality       16
  Top hotspots (by coupling):
    module                            fan-in  fan-out crit     blast radius
    internal/facts                       152        0 high     68
    pkg/bootstrap                          8       49 high     4
    pkg/command                            1       42 high     1
    internal/engine                        7       27 high     7

Code health
  deep dependency chains      8
    cmd/enola                                    depth 10
    pkg/command                                  depth 9
  complexity outliers        15
    internal/server.Server.registerTools         complexity 177

Now we are looking for feedback and contributors to improve Scala performance. If you work with Scala, run it against something real. I’d like to know what it misses and is it useful. The more messy the better.

https://github.com/enola-labs/enola (Fully local, Apache 2.0, installation takes 2 minutes).

u/yellow-llama1 — 5 days ago
▲ 315 r/scala+3 crossposts

Apache Fory™ JSON: 10x Faster JSON Serialization Framework for Java

Apache Fory JSON is a high-performance JSON serialization framework for Java. It maps Java objects to and from standard JSON text and UTF-8 bytes.

In the published benchmarks, it reaches up to 10.91× Jackson’s throughput and 10.89× Gson’s in java-json-benchmark, and up to 5.55× and 10.00× respectively in the jvm-serializers MediaContent benchmark.

It supports JDK 8+, Android, and GraalVM Native Image. JDK17+ Record is also supported.

fory.apache.org
u/Shawn-Yang25 — 8 days ago
▲ 0 r/scala

My mistake

To Jdegoes and the ziverge team I want to personally apologise for I have said on the group about how reacted, it was my mistake and I acknowledge it, I should have not said that, and I'm terribly sorry for my words. I'm also a college student who did wrong I acknowledge my mistake, someone tell Jdegoes I'm sorry for what I said I acknowledge my mistake, I'm a dumb college student 😭 please forgive me, to Jdegoes I'm really sorry

reddit.com
u/Purple-Tangelo8083 — 7 days ago
▲ 89 r/scala

Databricks open-sourcing Metals V2 for large (millions LOC) Scala codebases

Curious to hear VirtusLab & Databricks folks talking about this. It should be a huge improvement, and can solve a great chunk of the "Scala tooling" story we've been debating over the last few years.

A Scala Days talk, maybe?

databricks.com
u/danielciocirlan — 8 days ago
▲ 12 r/scala

Vecxt - Numerical Library

Quafadas/vecxt is, I think now interesting enough to talk about (if you are interested in such things)...

Here are it's headlines;

Useability

  • Pythonic sytnax - readable by default
  • No given / implicit resolution, easy / fast compilation story.
  • "simple" design choices. The vector concept is extension methods on Array- no type heirachy etc. Jump to definition takes you to the code you want to read, not an abstraction.
  • Cross platform, most of the API is tested against a single cross platform test suite for JVM, JS, Native

Performance

Is where most the effort is invested, trying to get this right inside the constraints above...

  • delegate to platform BLAS implementations where they exist. On macOS on the JVM, matmul JNI's into Accelerate... on Native, CBLAS.
  • SIMD fast paths, wherever we can hit them (JVM only)
  • layout abstraction inlines an indexing strategy that traverses the storage array monotonically in shortest possible hops (i.e. straight down the cache lines, and you don't have to think about it)
  • It benchmarked well vs breeze on what I believe to be reasonably representative workloads (it is not a crushing victory maybe 20% faster, but at least comparable)

Memory

The core Matrix representation is a strided view over a single contiguous Array. That choice permeates the design:

  • transpose is zero-copy
  • submatrices/views are zero-copy
  • striding/layout is explicit which is what enables the cache friendly algorithms

Many operations have in-place variants which mean you can opt out of nice syntax, and into allocation/control complexity where profiling says it matters.

Bytecode

This was the "silent killer" that made me nearly give up the project. I didn't appreciate it's significance for a long time, I only knew "something wasn't working". Eventually I realised that Intrinsification and JIT optimisation happen under surprisingly narrow conditions, and "just inline everything" can actually make things worse by producing methods that exceed a series of JIT limits / gates.

So vecxt now has CI checks around the bytecode it generates.

Among other things:

  • method size is checked
  • array operations are checked for bytecode patterns that can interfere with JVM specialisation / intrinsification

And yes, AI wrote the code

In recent months, 100% of the code has been written by AI.

My curiosity was in understanding the design concepts and constraints, I read the tests and investigated the generated bytecode/benchmark results.

The surface area of a numerical library like this is frankly too large for one person to maintain, and obviously so. Can it done with one person and an AI? Maybe... better would be more people and an AI :-). The process of using AI to explore and implement the ideas is a part of the journey - writing the code wasn't the goal for me.

I'm interested in criticism / discussion particularly from people interested in numerical computing and this domain. If someone does take the time to try it, don't be shy... whether the experience was good or bad...

u/quafadas — 6 days ago
▲ 20 r/scala

zio-temporal v1.0.0-RC2 — Jackson is gone, compile-time codec safety, automatic registration

zio-temporal — a fork of vitaliihonta/zio-temporal (a ZIO wrapper around Temporal's Java SDK) that's been diverging for a while now — just cut v1.0.0-RC2, and it's a big one.

Jackson is gone. The serialization layer is now built on zio-json instead of Jackson + reflection. That's the headline change, but the real point isn't "we swapped libraries" — it's what it buys you:

Compile-time codec safety. Under the old Jackson integration, a workflow/activity type without a registered Jackson module compiled fine and only failed at runtime — often as a workflow silently hanging on its first execute(). Every type crossing a workflow/activity/signal/query boundary now needs a ZTemporalCodec[T] (usually just derives JsonCodec on the case class), or your build doesn't compile. No more "forgot to register a Scala module" surprises.

Automatic codec registration. The first cut of the migration required manually chaining .addInterface[Workflow] calls into a CodecRegistry. That's gone too — as of RC2, calling ZWorker.addWorkflow[I], ZWorker.addActivityImplementation(...), or client.newWorkflowStub[I](...) (the calls you're already making) auto-registers that interface's codecs. For most workers/clients, derives JsonCodec on your domain types is now the entire migration — no CodecRegistry wiring at all.

A few other things worth knowing:

  • Streaming encode: payloads are written directly into Protobuf's ByteString buffer via zio-json's Write bridge, skipping the intermediate String allocation the old reflection-based path required.
  • Workflow history replay: histories already recorded under Jackson replay transparently for primitives and case classes. Sum types are the one exception — the JSON shape changed ({"type":"X",...}{"X":{...}}), so any sealed trait reachable by an in-flight workflow needs @jsonDiscriminator("type") before you upgrade, or replay fails on the old payload. This is covered with a worked example (and the actual failure you'd see) in the migration guide, not just asserted.
  • Scala 3 only.

Full migration guide, with every breaking change and worked examples: https://guizmaii-opensource.github.io/zio-temporal/docs/migration-1.0

It's still an RC — feedback, bug reports, and rough edges are exactly what we're looking for before the 1.0.0 final. Repo: https://github.com/guizmaii-opensource/zio-temporal

u/guizmaii — 8 days ago
▲ 16 r/scala

Scala vs Kotlin in the Age of AI-Generated Code

I’ve always hoped Scala would find its place in the AI era.
I thought Scala had a lot of qualities that would make it particularly good for AI-generated code: strong type safety, functional programming, expressive types, and the ability to catch many mistakes at compile time.
But somehow, I hadn’t really thought about Kotlin.
A lot of companies already use Kotlin in production, and it has many of the same practical advantages: type safety, null safety, concise syntax, some functional programming features, and of course the huge Java ecosystem behind it.
That made me wonder if Kotlin might actually be better positioned than Scala for the AI era.
If AI writes more and more of our code, maybe languages with stronger type systems will have an advantage because the compiler can act as another layer of verification for AI-generated code. But if that’s true, ecosystem and adoption matter too — and Kotlin obviously has a big advantage there.
I still think Scala has some unique strengths, especially its type system and FP capabilities. But now I’m wondering whether I’ve been overlooking Kotlin.
What do you think? Does Scala have any particular advantage over Kotlin when it comes to AI-generated code?

reddit.com
u/jake_nanohuman — 10 days ago
▲ 31 r/scala

[HIRING] Senior Data Engineer – Scala / Apache Spark | Remote

We’re looking for a Senior Data Engineer with strong Scala and Apache Spark experience to join an international project working with large-scale distributed data systems.

🌎 Location: Argentina
🏠 Modality: 100% Remote
🗣️ English: Upper-Intermediate / B2+
💻 Seniority: Senior

What we’re looking for:

  • Strong professional experience with Scala
  • Hands-on experience with Apache Spark
  • Experience building and maintaining large-scale data pipelines
  • Strong SQL skills
  • Experience with distributed data processing
  • Knowledge of ETL / ELT workflows
  • Experience with Apache Kafka is a strong plus
  • Comfortable communicating and collaborating in English

We’re especially interested in engineers who enjoy working hands-on with data-intensive systems, distributed architectures, performance optimization, and large datasets.

💬 Interested? Send me a DM with your CV/LinkedIn profile.

And if you know someone with a strong Scala + Spark background, referrals are very welcome! 🙌

reddit.com
u/EmiAquilante5 — 10 days ago
▲ 125 r/scala

Shocking news

>I am sharing a brief, factual account of my recent experience as an international contractor for Ziverge Inc. to bring transparency to the community and caution fellow developers. Three months ago, I successfully completed and delivered all contracted engineering milestones for a Ziverge/ZIO project. The deliverables were formally acknowledged, but my invoices remain entirely unpaid. Despite continuous professional follow-ups over the last 90 days, communication has broken down, and John De Goes / Ziverge has failed to settle the debt. If you are considering freelance or contract work within this ecosystem, I highly recommend protecting yourself by demanding upfront retainers or strict escrow milestones.

reddit.com
u/Purple-Tangelo8083 — 12 days ago
▲ 10 r/scala

[Hiring] Engineering Manager — Scala / Payments | Remote Europe | 50% Hands-on

Hi everyone! We’re looking for an experienced Engineering Manager to join a fintech company building institutional payment infrastructure on top of the Canton Network.

It is a fully remote team of around 25 people. The engineering team currently has 10 senior engineers and is expected to grow to approximately 15. This will be the company’s first dedicated Engineering Manager role.

What you’ll do

  • Manage and develop a team of 10–15 engineers
  • Run 1:1s, performance reviews, hiring, promotions, and career development
  • Improve delivery and introduce scalable engineering processes
  • Remain hands-on with Scala for approximately 50% of your time
  • Contribute to architecture, system design, and technical decisions
  • Build reliable, high-load payment infrastructure

What we’re looking for

  • 5+ years of Engineering Management experience
  • Experience managing 7–15 direct reports
  • Strong commercial Scala background
  • Current hands-on coding and architecture experience
  • Distributed systems, microservices, Kafka, AWS, and Kubernetes
  • Practical experience with core payments: authorisation, acquiring, settlement, reconciliation, ledger, idempotency, or payment orchestration
  • Strong coaching-oriented leadership style without micromanagement

What we offer

  • A high-impact role as the company’s first Engineering Manager
  • Direct collaboration with the CTO and influence over team structure, delivery processes, and engineering culture
  • A 50/50 balance between people management and hands-on Scala engineering
  • Ownership of complex architecture and institutional payment infrastructure
  • A senior engineering team with challenging technical problems
  • A fully remote and flexible working environment without micromanagement
  • Competitive compensation discussed individually
  • Flexible contract options depending on your location
  • Equipment and the necessary budget to set up your workspace

Location: Remote, Europe
Working hours: At least four hours of overlap within GMT0 to GMT+5
Contract: B2B preferred; other arrangements may be discussed
Compensation: Flexible and discussed individually. USDT is the preferred payment format, but alternatives may be considered depending on location.

If this sounds relevant, please send me a DM with your LinkedIn profile or CV, along with a short description of your experience in Scala, Engineering Management, and payments.

reddit.com
u/Difficult-Slice-1370 — 9 days ago
▲ 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
▲ 29 r/scala

sbt 1.12.15 and 2.0.6 are released with a CVE fix

📢 Released sbt 1.12.15 and 2.0.6, featuring vulnerability fix for remote code execution via server when serverConnectionType is set to Tcp. We recommend removing the serverConnectionType setting, or upgrading to a patched version or later.

eed3si9n.com
u/eed3si9n — 13 days ago
▲ 4 r/scala

sbt-assembly keys not available in project, even though assembly command works

Hello, I've been getting these errors while trying to make a fat jar with my scalafx project:

Deduplicate found different file contents in the following:
[error]   Jar name = javafx-base-16.jar, jar org = org.openjfx, entry target = module-info.class
[error]   Jar name = javafx-controls-16.jar, jar org = org.openjfx, entry target = module-info.class
[...]

Inside project/plugins.sbt, I have:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1")addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1")

Scala version is 3.8.4, sbt version is 1.12.13.

This is the build.sbt content:

val scala3Version = "3.8.4"

lazy val app = (project in 
file
("."))
  .settings(
    
name 
:= "PPS-25-diceforge",
    
version 
:= "0.1.0-SNAPSHOT",

    
scalaVersion 
:= scala3Version,

    ThisBuild / 
mainClass 
:= Some("MainApp"),

    
libraryDependencies
++= {
      // Determine OS version of JavaFX binaries
      lazy val osName = System.
getProperty
("os.name") match {
        case n if n.startsWith("Linux") => "linux"
        case n if n.startsWith("Mac") => "mac"
        case n if n.startsWith("Windows") => "win"
        case _ => throw new Exception("Unknown platform!")
      }
      Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
        .map(m => "org.openjfx" % s"javafx-
$
m" % "16" classifier osName intransitive())
    },

    
libraryDependencies 
++={
      Seq(
        "org.scalatest" %% "scalatest" % "3.2.19" % 
Test
,
        "org.scalatestplus" %% "mockito-5-23" % "3.2.20.0" % "test",
        "org.scalafx" %% "scalafx" % "16.0.0-R24" intransitive()
      )
    },

    
scalacOptions 
++= Seq(
      "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s",
      "-unchecked", "-deprecation",
    ),

    
resolvers 
+= 
Resolver
.sonatypeCentralSnapshots,
    
fork 
:= true
  )

I'm trying to set a merge strategy, but it does not let me access the assemblyMergeStrategy key, it says it does not exist. What did I do wrong? I tried looking up if it's a compatibility issue but the official scala website isn't working properly and won't let me click any of the entries.

Help please :,)

reddit.com
u/Saphira2002 — 13 days ago