fp-effects NixOs scripts in scala: comparison in effect systems
I got tired of my NixOs scripts from being bash, so I asked Claude Opus 5.5 to rewrite it to Scala.
Which it did just fine. And I always wanted to see how the same thing would look like with different effect systems. So I asked Opus to port it.
Here's the comparison between cats-effect EitherT / cats-effect + cats-mtl / zio / zio + cats / kyo: https://github.com/arturaz/nixos-conf-scala-scripts-comparison
At the end, I kind of am still unhappy :)) Typelevel seems to have the best ecosystem, but both EitherT (boilerplate) and MTL (silent failure cases) are annoying.
Anyone has other approaches to suggest?
19
Upvotes
1
u/TryDue5776 16d ago
interesting, thanks for the write-up. i also run nixos with a pile of bash scripts, so i’ll probably port most of mine the same way. i’m leaning towards kyo for this kind of glue code, already used in some small projects, but i still want to see how it plays with the cats/typelevel ecosystem once you need fs2, http4s or doobie