Pure Functional Stream processing in Scala: Cats and Akka – Part 2

In the last post, we saw how to combine pure functions running in IO and Akka streams using .mapAsync and .unsafeToFuture In order to make it easier to work with IO in Akka Streams, we can write some helpers to add a method on Streams that automatically run the IO inside the flow. This will… Continue reading Pure Functional Stream processing in Scala: Cats and Akka – Part 2

Pure Functional Stream processing in Scala: Cats and Akka – Part 1

In Scala you can write pure functional code, similar to Haskell or other pure functional languages, but you’re not obligated to. Wikipedia categories Scala as an impure Functional language. FP purists view this as a weakness of Scala, but others view the option of “cheating” pureness as an acceptable choice sometimes. Even if you can… Continue reading Pure Functional Stream processing in Scala: Cats and Akka – Part 1

Sleep better with Raspberry Pi automated white noise

Theory Having complete silence while you sleep 😴 may seem nice, but in fact can lead to trouble if the outside environment is not also completely quiet. A cat may meow🐱, a car may honk πŸš—, your upstairs neighbour can wake up for a late-night snack 🍟… All these sounds will seem louder if your… Continue reading Sleep better with Raspberry Pi automated white noise