A lot of exciting things have happened on the JVM in the last couple of years. We've seen several interesting languages and frameworks come to life that wants to keep moving the great JVM environment forward. One type of framework where we've seen this activity, has been the web application…
Earlier, I've looked at the basics of Akka actors by creating a simple chatroom. Today I'm going to continue by looking at how we could change an actor's behavior using context.become by introducing the concept of a closed and open chatroom. Let's start by introducing a simplified version of…
A few posts ago I looked at Erlang and how it solves concurrency using the actor model. I truly enjoyed playing with this strategy and found the concept intriguing. That's why i decided to look into how concurrency using actors is solved in other languages as well. In this post…
In the final post of this series, we're going to continue to look at the variety of operations in the Scala Collection API. Let’s start with a few operations that builds on ideas we've already looked at. TakeWhile def takeWhile(p: (A) ⇒ Boolean): Traversable[A] Takes the longest prefix…
In the first part of this series, I went through the Scala Collections hierarchy and how it's put together. In following posts, I'll go through a lot of the operations you can use on collections. I will not cover all of them, so for a full overview, please take a…
One of the first things that impressed me with Scala was the Scala Collections. It's flexible and has a wide range of operations that makes it easy to work with different types of data. So to get more familiar with Scala Collections API, I've started this mini series. Here I'll…
After writing my last post about Pattern matching in Scala, I was curious about how pattern matching was solved in other languages. So in this post, I'll use the examples from the last blog post to compare how this would be solved in Scala, Haskell, ML and OCaml. List example…
Pattern matching is a feature that is not unfamiliar in a lot of functional languages and Scala is no exception. It matches a value against several patterns. Each pattern points to an expression. The expression that is associated with the the first matching pattern, will be executed. The syntax of…