Scala concurrency: performance and scheduling of common workloads with Future One of the most relevant Scala primitives for concurrency is the Future. It represents a value which is either complete or failed, and is scheduled to run outside the program main flow, in
Imposing invariants in Scala Imagine a opera house allows reservations to a show. For each reservation two people can come: the buyer of the reservation himself and his guest. As in any show-house, there are many types
Constraining data types for code reuse and readability The case for statically typed languages is so that we can prove our programs are right at compile time. Although our languages are not powerful enough to achieve this all the time, we
Disambiguating 'this' in Scala, or what does 'self =>' mean? This is a quick Scala tip on a somehow unknown feature of the Scala language, what I call self aliasing or unconstrained self type annotations. One sees that in some libraries or even
Play Framework in Scala - Action Composition I write this post as a way to consolidate my knowledge on Actions. Most of what I write is explained on the Play Framework docs, although I believe you can benefit from my
From Manual to Automatic In recent years the interest on test automation has increased significantly. Some of the reasons behind this growth include a greater need for faster software delivery processes, increased productivity and cost/effort reduction associated
Monads for the rest of us There are a lot of articles around explaining functional programing and some of the theory and reasoning behind it. Most monad explanations are good if you understand the theory behind it. However, if
Book Review: Functional and Reactive Domain Modelling The Book Functional and Reactive Domain Modeling (Debasish Ghosh) is one of the most interesting books I have read lately, in the realm of Scala. This is not another beginner Scala book, neither
Building Web applications with Scala.js and React - Part 1 As a Scala programmer developing Web applications, it is usually uncomfortable to move from a tidy, functional, and type-safe Scala back-end to an often subpar JavaScript front-end. Luckily for us, there are already
Bits of Shapeless part 2: Generic Derivation This is the second installment in a series of articles about Shapeless. The first post explained heterogeneous lists (HLists) and how to use them to do type-level recursion. Building on this ground, we
Lx scala LX Scala 2016 On April 9, Scala developers from Portugal, Spain and the UK gathered in Lisbon for LX Scala to discuss Scala’s present and future trends. These are my notes from the talks…
Hands on function composition with monad transformers When using functional programming languages like Scala, developers spend a lot of their time composing functions and effects. One of the most common ways to express composability is to use monads. However, composing
Bits of Shapeless part 1: HLists Shapeless is a well known library for generic programming in scala. It is the basis for many widely used libraries and recent interesting projects in the Scala ecosystem, such as spray, Circe, Scodec
Building a lexer and parser with Scala's Parser Combinators As part of an ongoing project at e.near, one of our Scala teams was recently tasked with a requirement to build an interpreter for executing workflows which are modelled with a textual DSL.