#CatsEffect or #ZIO - is there a library that beats another in this duel? Learn the differences, similarities, philosophy behind them both, and core features of those #Scala libraries and choose your favourite tool: https://softwaremill.com/cats-effect-vs-zio/
Currently testing non trivial concurrent control flow implemented with #catseffect and #fs2, and loving the power of the `TestControl`!
Happy Pride month, Scala! #scala #functionalprogramming #catseffect #pride #pridemonth #lgbtq
#scala #functionalprogramming #catseffect #pride #pridemonth #lgbtq
J'écris un service HTTP avec #catseffect, #fs2 et #http4s compilé en natif avec #ScalaNative, c'est assez exceptionnel les performances et l'empreinte mémoire obtenues, tout en gardant un super langage haut niveau avec du beau fonctionnel safe.
Pour le fun j'ai créé un petit client redis natif avec pool de connexions en quelques lignes, avec toute la safety pour éviter les leaks etc. C'est tellement beau 🤩
#catseffect #fs2 #http4s #scalanative
Having a blast coding using #scala :scala: , #typelevel #catseffect and #decline on a side project on this fine hot Saturday in the #BayArea :scala:
#scala #typelevel #catseffect #decline #bayarea
“ Kotlin Coroutines to Cats-Effect”
Small executable #Snippet, #Scala, #Kotlin, #CatsEffect
https://alexn.org/blog/2023/04/24/kotlin-suspended-functions-to-cats-effect-io/
#snippet #scala #kotlin #catseffect
An interesting fact about #Kotlin's coroutines is that `Dispatcher.IO` is limited. This, compared to the general advice in #Scala land, to use a limited thread-pool for blocking I/O. E.g., #CatsEffect's thread-pool for blocking I/O is unlimited.
https://github.com/Kotlin/kotlinx.coroutines/issues/2943
The reasoning they give is that too many threads can make the app really slow. Which is true, but then again, having a limit can lead to thread starvation & deadlocks, e.g…
https://gist.github.com/alexandru/e8ea5e728d77afde4f662b1f7a15ae78
My deep dive into #Kotlin's coroutines continues 😊
Here I learned that we can have a function similar to `IO.uncancelable` from #CatsEffect:
https://gist.github.com/alexandru/7527f83da03a32dbb46c281e95429ed6
The implementation for it is surprisingly short because, as it turns out, Kotlin uses `CoroutineContext` like some sort of mask that's compatible with the design of `IO.cancelable`:
I'm unsure if there are any gotchas, apart from the one I discovered about `withContext`.
#Kotlin's coroutines are cool, but when compared with #Scala's offering, an underappreciated feature of #CatsEffect 3 is the very thoughtful and consistent treatment of cancellation and resource handling.
Kotlin's coroutines are error-prone for the same reason they are great … you can't visually discern “suspended” function calls from blocking calls, the problem being that correctness relies on needing to make suspended calls non-cancellable for acquisition and release…
Concurrency is hard... Check an introductory level tutorial of concurrency features provided by Cats Effect
#catseffect #concurrency #fiber
Integrating #Akka and #CatsEffect 3 isn't without challenges, but the awesomeness of managing resources via Cats-Effect makes it all worth it, being #Scala's secret weapon.
I wrote a blog post describing some integration solutions we use for building payment processors. #FP #programming to the max 💪
Please share 🙏🥺
https://alexn.org/blog/2023/04/17/integrating-akka-with-cats-effect-3/
#akka #catseffect #scala #fp #programming
Catapult is Typelevel's newest project. It provides a Cats-Effect wrapper around the LaunchDarkly SDK for feature flag management.
#scala #typelevel #catseffect #launchdarkly
Welcome Kamil Kloch as the next #Scalarconf speaker! 🚀
Cats Effect - Dispatcher, Supervisor, IOLocal
Grab your ticket 👉https://sml.io/tickets
#scala #functionalprogramming #conference2023 #itconference #catseffect
#scalarconf #scala #functionalprogramming #conference2023 #itconference #catseffect
First public release of otel4s, an OpenTelemetry implementation for Cats Effect. otel4s aims to be a full and faithful impemenation of the OpenTelemetry Specification, built for the idioms of the Typelevel ecosystem.
#otel4s #typelevel #scala #opentelemetry #catseffect
Hey folks, I'm writing an article on the topic related to best practices for using Scala functional libraries: cats, cats-effect. Does anyone want to team up? You folks are all experienced here, and we could write something beneficial for the community together that ChatGPT won't.
#scala #fp #cats #catseffect #functionalprogramming
#scala #fp #cats #catseffect #functionalprogramming
#Netty client side code makes me sad.
https://github.com/http4s/http4s-netty/pull/393
Why the hell does the low-level test sometimes fail?
Of course the netty example code is not useful, it just prints.
#netty #http4s #fs2 #scala #catseffect
Cats Effect 3.4.5 is released, with a fix to a memory leak introduced in recent patches.
https://github.com/typelevel/cats-effect/releases/tag/v3.4.5
Cats-Effect-3.4.4 is out with a fix to a memory leak in `Deferred`:
https://github.com/typelevel/cats-effect/releases/tag/v3.4.4
How do folks debug #CatsEffect code in #Scala? The breakpoints don't work (they are triggered when the operation is defined, not executed) and the stack traces don't seem to make much sense. It's quite hard to understand what's going on in complex code without being able to step through an execution.