Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 159
  1. Effect Runtime

    Defining an EffectRuntime that is used to build IO effects.

  2. When My World Vanishes

    It’s me, facing a hard to solve problem.

  3. Scala Snippet: Unlawful Effects

    Unlawful/independent version of cats.effect.Effect from Cats Effect v2.

  4. Running integration tests, with Scala + sbt

    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…

  5. Scala Snippet: Flow/Processor to Effect

    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…

  6. Privilege

    My son ❤️ Today it's my 38ᵗʰ birthday.

  7. Scala Snippet: Safe Passwords

    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…

  8. Sample Error Hierarchy in Scala

    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 {…

  9. Snippet: turn on JVM debugging in sbt

    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.

  10. TypeScript Sample: Flow Sensitive Typing

    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…

  11. Retry Failing Tasks with Cats and Scala

    In the face of errors, we could interrupt what we are doing and log the incident for debugging purposes.

  12. Cats-Effect’s Resource can’t be converted directly into a Reactive Streams Publisher.

  13. ExecutionContext Must Be Stack-safe

    // 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…

  14. Fatal Warnings and Linting in Scala

    The best practices are those enforced by the build tools, as part of the build process.

  15. This is a simple, but very effective implementation of a Semaphore, used for easily parallelizing work in JavaScript/TypeScript.

  16. Blog Updates

    Video link (open on YouTube.com) I love writing.

  17. Python Snippet: Send Email via SMTP

    #!

  18. Shell Snippet: Encrypt Files with AES256

    #!

  19. Haskell Snippet: Sierpinski Triangle

    #!

  20. Article explains how to have fine grained control over replacements when using String.replaceAll or similar in Java or Scala.

  21. Async Queue in TypeScript

    type Callback = (a: A) => void; /** * Delays stuff for ensuring fairness. */ export function yieldRunLoop(): Promise { const fn: (cb: (() => void)) => void = typeof setImmediate !

  22. Scala Snippet: Blocking Task

    Monix Task implementation for wrapping (suspending) blocking I/O such that it can be canceled. s Imported from gist.github.com.

  23. Scala's isInstanceOf is an Anti-Pattern

    When you use isInstanceOf[Class] checks, that’s an anti-pattern, as Scala has a much better way of discriminating between types.

  24. The Bifunctor IO data type is a hot topic in the Scala community.

  25. In Defense of OOFP

    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.

  26. Minitest: Zero Crap Scala Testing Library

    Minitest is my minimal testing library that I’ve been using for developing Monix.

  27. What is Functional Programming?

    Functional Programming (FP) is programming with functions.

  28. Scala Days 2017 — Monix Task

    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.

  29. Introduction

    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…

  30. Builds and deployments of new versions and snapshots is a pain.

  31. My presentation from the Bucharest FP meetup.

  32. Asynchronous Programming and Scala

    Asynchrony is everywhere and it subsumes concurrency.

  33. Fixing scala.collection.Iterator

    The venerable Iterator interface we all love and hate could use some improvements.

  34. Why Scala's Traversable Is Bad Design

    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.

  35. Add to NewsBlur Bookmarklet

    I’m using NewsBlur.com for consuming RSS feeds.

  36. The Monix Task was heavily inspired by scalaz.concurrent.Task and by scala.concurrent.Future.

  37. Akka & Monix - Typelevel Summit, Oslo 2016

    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…

  38. Monix Task - flatMap(Oslo) 2016

    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…

  39. 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

  40. Monifu vs Akka Streams

    Back in June I attended Scala Days in Amsterdam and participated at a talk by Mathias Doenitz on The Reactive Streams Implementation Landscape.

  41. Scala Best Practices

    This is a collection of best practices for Scala, something to get you started.

  42. Resources for Learning Scala

    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.

  43. Towards a Better AtomicReference

    The AtomicReference is like a container for a volatile reference.

  44. Multithreading is a pain to deal with.

  45. Notes On JavaScript Client-side Development

    Client-side JavaScript development can be quite overwhelming, even for senior developers.

  46. I’ve been following the excellent Coursera course on Functional Programming Principles in Scala led by Martin Odersky.

  47. How To Build a Naive Bayes Classifier

    In machine learning a classifier is able to predict, given an input, a probability distribution over a set of categories.

  48. How to find related items?

  49. Blogging Platform for Hackers

    Host your own static website using free services.

  50. Crawling the Android Marketplace

    I had a very specific need for fetching the details for some apps in the Android marketplace, in an automated manner.