RE: https://witter.cz/@matejcerny/116777155771993798
to reduce the extra 2MB that Scaladoc adds, I've created an sbt plugin sbt-salad-days
https://eed3si9n.com/reducing-scaladoc-file-size-with-sbt-salad-days/ #Scala
RE: https://witter.cz/@matejcerny/116777155771993798
to reduce the extra 2MB that Scaladoc adds, I've created an sbt plugin sbt-salad-days
https://eed3si9n.com/reducing-scaladoc-file-size-with-sbt-salad-days/ #Scala
There was no e-mail, and I learned it by accident, but I feel all #Scala OSS devs should learn ASAP: Maven is introducing publishing limits. We most likely will have to apply for exemption:
- https://www.sonatype.com/blog/open-publishing-commercial-scale
- https://central.sonatype.org/publish/maven-central-publishing-limits
🛠️ sbt 2.0.0 is released
sbt 2.0 is a new major series of sbt, based on Scala 3 constructs and Bazel-compatible cache system. many thanks to Scala Center, Anatolii Kmetiuk (new maintainer), Adrien Piquerez (alumni), and other volunteers like Kenji Yoshida
https://eed3si9n.com/sbt-2.0.0 #Scala
I have written up a more detailed post about linear regression with #probula using grid approximation. The post focuses on:
probula (which is an internal DSL embedded in Scala 3)probulaEnjoy!
https://wasowski.dukla.ch/posts/2606-grid-approximation-with-probula/
#ProbabilisticProgramming #Bayesian #Inference #DataAnalysis #Scala #Scala3 #keep
Let me share an update on probula, my small purely-functional Bayesian inference library written in Scala 3. The primary goal for this write-up is to force myself (and you) to think about testing of probabilistic models, of inference algorithms, and the languages or APIs in which they are formulated. Arguably, this is a very modest start. But more is on the way! I would like to start with the first inference scheme you encounter, when reading McElreath’s Statistical Rethinking. Grid approximation (as this is the scheme we speak about) is by far the least efficient of the methods discussed in the book, but it remains useful as a testing baseline. Its simplicity and determinism let it serve as ground truth and oracle for other, more complex inference methods.
It is always a thrill to see an issue one reports being fixed! And thanks to scala-cli it so very easy to test. I was unsure which nightly to test. So went through latest nightly builds of 3.8, 3.9 and 3.10!!! `Scala 3.10.0-RC1-bin-20260603-466fa59-NIGHTLY` is perhaps not new enough to contain the fix. https://github.com/scala/scala3/issues/25234

Compiler version Scala CLI version: 1.12.2 Scala version (default): 3.8.1 Minimized code //> using scala 3.8.1 //> using options -deprecation -feature -Wunused:all -Werror import language.experimen...
A few thoughts:
There are several definitions of "direct-style". Ox calls itself direct-style, but doesn't have a separation between description and action. This means it isn't compositional in a useful sense (alternatively, you have to be more careful than you should to make it compositional). Taking the first example from the home page, you cannot refactor
```scala
def computation1: Int = { sleep(2.seconds); 1 }
def computation2: String = { sleep(1.second); "2" }
val result1: (Int, String) = par(computation1, computation2)
```
to
```scala
def computation1: Int = { sleep(2.seconds); 1 }
def computation2: String = { sleep(1.second); "2" }
val c1 = computation1
val c2 = computation2
val result1: (Int, String) = par(c1, c2)
```
and have it work as you'd expect under RT. I think this loss of local reasoning is actually very important. It's really fricking hard to ensure you don't run `Futures` (or Ox computations; they have the same model of executing immediately) at the wrong time in a large code base.
The corollary of this is that I think you undervalue the ability to compose `IO`. When you write code to, say, handle errors or run stuff in parallel or race multiple fibers, you can be sure it will actually happen the way you write it, not that some bullshit like "oh this already ran before we got here" will change the semantics.
OTOH, there are other formulations of direct-style where the unit of composition changes from `A => F[B]` (i.e. monadic) to `F[A] => B` (direct-style, where `F` is required "capabilities"). Now that effects have an explicit representation in the type system you can still leverage types to help you (cf Ox where a computation has no types AFAIK) and it's still composable because nothing runs until you provide the capabilities.
Hey, we finally managed to switch to #scala3 at @rudderio 🎉
It's done, and it was done without any disurption to our complicated product dev & maintenance workflow, so I'm proud of it :)
The story is here:
https://techblog.rudder.io/blog/scala-3/
I hope it could help others know it can be done, and how.
#scala
otel4s 1.0.0 has finally arrived 🎉