Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
Defining an EffectRuntime that is used to build IO effects.
-
It’s me, facing a hard to solve problem.
-
Unlawful/independent version of cats.effect.Effect from Cats Effect v2.
-
For separating integration tests, from unit tests, in build.sbt: // sbt command-line shortcut addCommandAlias("ci-integration", "Integration/testOnly -- -n integrationTest") lazy val IntegrationTest = config("integration").extend(Test) //... lazy val ro…
-
Converts an Akka Streams Flow into an In => IO[Out] method, thus wrapping Flow into Cats-Effect’s IO. import akka.actor.ActorSystem import akka.stream.Materializer import akka.stream.scaladsl.Flow import cats.effect.{ ContextShift, IO, Resource } import c…
-
My son ❤️ Today it's my 38ᵗʰ birthday.
-
See: Securely Store Sensitive Data in RAM import cats.effect.{ Resource, Sync } import java.util.ConcurrentModificationException import java.util.concurrent.atomic.AtomicBoolean final case class PasswordValue(value: String) { override def toString = "P…
-
sealed abstract class KnownException(message: String, cause: Throwable) extends RuntimeException(message, cause) sealed abstract class InputException(message: String, cause: Throwable) extends KnownException(message, cause) object InputException {…
-
Remote debugging can be used to debug externally executed programs, useful to activate in sbt in order to keep using it while debugging with your favorite IDE.
-
Demonstrating Typescript’s untagged union types: type Left = { either: "left" value: L } type Right = { either: "right", value: R } type Either = Left | Right function left(value: L): Either { return { either: "left", value } } function right(va…
-
In the face of errors, we could interrupt what we are doing and log the incident for debugging purposes.
-
Cats-Effect’s Resource can’t be converted directly into a Reactive Streams Publisher.
-
// Demonstrating that directly executing runnables in your // ExecutionContext is a really bad idea def trigger(cycles: Int): Future[Int] = { implicit val directEC = new ExecutionContext { def execute(r: Runnable) = r.run() def reportF…
-
The best practices are those enforced by the build tools, as part of the build process.
-
This is a simple, but very effective implementation of a Semaphore, used for easily parallelizing work in JavaScript/TypeScript.
-
Video link (open on YouTube.com) I love writing.
-
#!
-
#!
-
#!
-
Article explains how to have fine grained control over replacements when using String.replaceAll or similar in Java or Scala.
-
type Callback = (a: A) => void; /** * Delays stuff for ensuring fairness. */ export function yieldRunLoop(): Promise { const fn: (cb: (() => void)) => void = typeof setImmediate !
-
Monix Task implementation for wrapping (suspending) blocking I/O such that it can be canceled. s Imported from gist.github.com.
-
When you use isInstanceOf[Class] checks, that’s an anti-pattern, as Scala has a much better way of discriminating between types.
-
The Bifunctor IO data type is a hot topic in the Scala community.
-
This article is about OOP hierarchies, in comparisson with type classes, using as example Scala’s standard collections, which are involved in a recent debate around their redesign. 1.
-
Minitest is my minimal testing library that I’ve been using for developing Monix.
-
Functional Programming (FP) is programming with functions.
-
Video link (open on YouTube.com) Presentation from Scala Days, held in Chicago and Copenhagen: Slides (PDF file) Video (YouTube) Video link (open on YouTube.com) Abstract Scala’s Future from the standard library is great, but sometimes we need more.
-
This piece of code will leak memory and eventually crash your Node.js process or browser: // Tested on Node.js 7.10, Firefox 57 and Chrome 61 // // Usage of `setImmediate` is to prove that we have // async boundaries, can be removed for browsers // not su…
-
Builds and deployments of new versions and snapshots is a pain.
-
My presentation from the Bucharest FP meetup.
-
Asynchrony is everywhere and it subsumes concurrency.
-
The venerable Iterator interface we all love and hate could use some improvements.
-
Given there’s a Scala collection redesign discussion going on, it’s a good time to talk about one of my personal pet peeves: the existence of Traversable in the standard library, along with its variants like TraversableLike and TraversableOnce.
-
I’m using NewsBlur.com for consuming RSS feeds.
-
The Monix Task was heavily inspired by scalaz.concurrent.Task and by scala.concurrent.Future.
-
Video link (open on YouTube.com) Video link (open on YouTube.com) Akka & Monix: Controlling Power Plants - my presentation from the Typelevel Summit, Oslo, 2016: Slides (PDF file) Video (YouTube) Also see: Monix Task, flatMap(Oslo), 2016 the Monix project…
-
Video link (open on YouTube.com) Video link (open on YouTube.com) Monix Task: Lazy, Async & Awesome - my presentation from flatMap(Oslo) 2016: Slides (PDF file) Video (YouTube) Also see: Akka & Monix, Typelevel Summit, Oslo, 2016 Monix project Abstract Sc…
-
I’m a man of strong opinions and I truly believe that when we are doing mocking, stubbing, dependency injection and integration testing, such practices represent clear signals for code smell, meaning code that sucks as a symptom of a bigger problem, one of
-
Back in June I attended Scala Days in Amsterdam and participated at a talk by Mathias Doenitz on The Reactive Streams Implementation Landscape.
-
This is a collection of best practices for Scala, something to get you started.
-
Getting started with a new programming language shouldn't be hard, however navigating the web for resources on getting started with Scala can be a doubting experience, as many such resources are either out of date, or wrong, or both.
-
The AtomicReference is like a container for a volatile reference.
-
Multithreading is a pain to deal with.
-
Client-side JavaScript development can be quite overwhelming, even for senior developers.
-
I’ve been following the excellent Coursera course on Functional Programming Principles in Scala led by Martin Odersky.
-
In machine learning a classifier is able to predict, given an input, a probability distribution over a set of categories.
-
How to find related items?
-
Host your own static website using free services.
-
I had a very specific need for fetching the details for some apps in the Android marketplace, in an automated manner.