Typeclases in Scala & Haskell
Typeclass is a concept in Scala and Haskell (and in some other strongly-typed languages). The best way to think about a typeclass is that it is an interface, which defines functions. Great. Typically,...
View ArticleRandomness
In my strongly-typed FP workshop, I show examples of the collection API in Scala by generating random Person instance. I use List.fill(100000) { Person(randomString, randomString, randomInt) }, where...
View ArticleMonad transformers
Let’s expand our random Person generator to include keep track of the count of people generated and to write out some values during the generating process. For motivation, let’s say we want to see not...
View ArticleThis year in Scala (2013)
In place of the traditional This week in Scala, I give you This year in Scala. It is my take on what has happened in the Scala and the wider JVM world, and I will even throw in some of … Read more →
View ArticleHaskell, WebSockets and D3.js
This is the first in the series of posts where I will explore a simple application that allows you to analyse and present data in interesting ways. I will be writing a nice AngularJS client, with the...
View ArticleHaskell, WebSockets and D3.js II
In this post, I will add the support for generating expressions to the Haskell, WebSockets and D3.js codebase. The users will submit expressions such as evendistr 20 [0..100] 100 times every 500ms; our...
View ArticleThis week in #Scala (03/02/2014)
Welcome to another edition of #ThisWeekInScala! Lets catch-up on the latest Scala happenings … New Stuff Scala 2.11.0-M8, the final milestone release of Scala 2.11.0 is now available Akka 2.3.0-RC2...
View ArticleCMSampleBufferRef from CGImageRef
Taking a detour from the usual Scala / FP code, I want to post a quick solution to a problem I was facing in an iOS codebase. The task was to convert CGImageRef to CMSampleBufferRef. I needed this code...
View ArticleEngineering diversity
Yesterday was Cake Solutions’ team dinner & drinks. The company, food & good drinks were great. But what made me very happy was the real diversity. The engineers at Cake do not fit any...
View ArticlePhilly ETE
Hello, world We start with the HelloWorld app and the HelloWorldService, which show the low-level Spray API. We begin with class HelloWorldService extends Actor { def receive: Receive = { case r:...
View Article