r_scala
89 subscribers
64 photos
3 videos
2.28K links
Latest submissions from r/scala
More reddit channels: @reddit2telegram
@r_channels
Download Telegram
My pasta sauce looks familiar
https://redd.it/1x2chkc
@r_scala
😁2
dapr4s: POC for using Safe Scala to build cloud apps

Hello everybody,
I'd like to let you know about a recent experiment/POC I've been working on recently:

Safe Scala is a recent experimental feature. In short, it is a subset of Scala which doesn't allow for any sideffects. Any sideeffecting tools, especially Java standard library are just not aceesible -- a program using those won't compile. Thus the only way to peform side effects is via explicitly passed in Capabilities. That may sound like a pure academic excercise.

But there is a project called Dapr which is aiming to abstract cloud applications from the hassle of I/O (queues, sync messaging, distributed locks, state, durable workflows, etc.). Thus allowing apps to focus on business logic and use dapr as a framework (running out of the app process). What if we could represent these capabilities of Dapr as Scala Capabilities?

That's exactly what dapr4s does. It uses Dapr's Java SDK behing the scenes but exposes a pure Capability-style Scala facade. It is still just an experimental project, nothing ready for production (at least just yet). But it's a POC -- a proof that Safe Scala can be practical to build (maybe even line of business boring) cloud apps.

Here's the link to the project:

https://github.com/sideeffffect/dapr4s

Repository with examples and a slides with more info:

https://github.com/sideeffffect/dapr4s-examples
https://github.com/sideeffffect/dapr4s-examples/blob/master/SLIDES.md

I hope you'll find this project inspiring and would be happy to discuss details at Scala Days 2026 in Berlin.

(Disclosure: the project has been developed with the help of LLMs.)

https://redd.it/1x3np6g
@r_scala
Current adoption of Scala 3

I am considering learning Scala due to its very advanced functional programming features and the large Java ecosystem it can use. I have many years of programming experience in various languages. Scala has some FP style constructs that will challenge me a lot, but that would be part of the fun. In case it matters, I write my programs by hand.

The question I want to ask is, how many and if any at all new green field projects have been started with Scala 3 during the last 1-2 years. I.e. does Scala remain a popular and widely adopted language or it is more in decline?

Thanks a lot in advance

https://redd.it/1x4wwud
@r_scala
Open-sourced my Scala expense tracker app

I've been building a personal expense tracker by directing AI agents instead of writing the code myself.

Stack: Play + PostgreSQL on the backend and Scala.js on the frontend. Receipt OCR and bank statement extraction use AWS Textract/Bedrock.

Fair warning: the code is messy and my AI workflow is far from ideal. That's part of why it's public.

Curious how others are using AI agents on Scala codebases, and where it works or falls apart for you.

Repo: https://github.com/AlexITC/expense-tracker

Write-up: https://alexitc.com/blog/2026-10-16-opensourcing-my-expense-tracker/

https://redd.it/1x7kmmq
@r_scala
etl4s 2.x - Whiteboard style pipelines (now Effect Polymorphic as Free Arrows)

Hello all! Released etl4s 2.0 + new doc (no AI). Thank you for the discerning eyes and feedback over these months 🙇‍♂️

The lib is now effect polymorphic, and models nodes/pipelines are Free Arrows.

Would say it is pretty much "done" for its intended production use cases now (mainly to guide OLAP programmers in big shops to write their programs as values)

The internals have been completely rewritten, but the public API hasn't changed at all. (To be fair, the API was very simple).

Chiefly, there is better pipeline introspection now, and nodes automatically capture val names and fully qualified class names.

https://redd.it/1xashht
@r_scala
Scivolo - a Scala Interpreter

Happy to release a first version of Scivolo, a Scala Interpreter written in Rust. Unfortunately nothing was working at Scala Days, so it comes a week later.

Right now it interprets \~1140 of \~1710 of dotty's tests/run programs and passes 99% of Scala Native's precompiled NIR tests.

Performance is fine:

$ cat HelloWorld.scala
object HelloWorld {
def hello(): Int = {
42
}
}

@main
def main(): Unit = {
println(s"Hello World ${HelloWorld.hello()}")
}

$ time ./target/release/scivolo HelloWorld.scala
Hello World 42
0,01s user 0,02s system 34% cpu 0,095 total
$ time ./target/release/scivolo HelloWorld.scala
Hello World 42
0,01s user 0,00s system 91% cpu 0,011 total

It also has an experimental AOT-Compilation path using Cranelift:

$ time ./target/release/scivolo-aot HelloWorld.scala -o HelloWorld
1,20s user 0,16s system 163% cpu 0,828 total
$ time ./HelloWorld # Slower, because OSX checks new binaries
Hello World 42
0,00s user 0,01s system 3% cpu 0,245 total
$ time ./HelloWorld
Hello World 42
0,00s user 0,00s system 74% cpu 0,010 total
$ ls -lsah ./HelloWorld
9120 -rwxr-xr-x 1 nos staff 4,4M 20 Okt 19:48 ./HelloWorld

The interpreter is using the NIR-Format (Version 0.5.x) of Scala-Native, because it is JVM independent and has an established, small C-Runtime. The AOT-Compiler compiles the NIR-Format using Cranelift into native executables. It is also reusing Scala Native's Standard library and calling coursier for dependency downloading.

There are no OS-Threads yet (only some green threads), and also some advanced features do not work yet. I got only one Macro to run (Circe's Object-Codec derivation). Only small snippets are exercised. The GC is the same as Scala Native (Immix).

Performance wise, there are some neat tricks: The whole Standard-library is mmaped into Memory, already search optimized. So there is basically no initialization overhead.

Disclaimer: The code is mostly unreviewed AI port of the Scala sources. It strives to generate Byte-Exact NIR-Code like the existing Scala Native Compiler. Use it for amusement.

Why? It all started with a small AI dialogue about why I can't have have fast (deployment) scripts in a typesafe language. Now I have.

https://redd.it/1xazsgf
@r_scala
Scala language binding for Godot game engine

Here is the docs for my Godot Scala native binding https://optical002.github.io/godot-scala-native

I have been building for some time with my Scala language and I've reached a state where I don't need to add anything for building my games and features are already sufficient. Already made a steam deployment for steam, for windows/mac/linux and it seems to work all good, haven't found problems so far.

I'm sharing this if anyone wants to build games with Scala.

https://redd.it/1xb1k2z
@r_scala
Interviewing Failures

Once I got rejected from a Scala gig at Shazam in London HQ

It was like 2018 or something

I got max scores on all tech interviews, and a handshake from the tech lead saying “see you in a month”

Then I failed the HR screening

After a couple of months Shazam got bought by Apple

It still haunts me to this day

https://redd.it/1xb5rdb
@r_scala