Welcome

This is the landing page for all my nerdery. I hope you enjoy.

object ScalaInDepth extends Book {
  def url = "http://www.manning.com/suereth"
}

object Scalawags extends Podcast {
  def url = "http://scalawags.tv"
  def cohosts = Seq("Daniel Spiewak", "Dick Wall")
}

object BigNerd extends Career {
  def company = "http://typesafe.com"
}

Latest - Functional Programming Patterns for the Asynchronous Web

NEScala happened this year, and it was amazing! Not only was I able to give a talk, we were also able to record a scalawags podcast.

For those who missed the talk, it was about how to script together a bunch of asynchronous APIs into a new asynchronous APIs. SO, generically, we have:

trait AsynchSubService { def getData: Future[Data] } trait AsynchSubService2 { def getData: Future[Data2] } 

What you want to do is create a new service that can call both asynchronously and non-blocking so that we don't suck up too many threads waiting for IO (or network response).

trait UberAsynchService { def getData: Future[(Data, Data2)] } 

SO, how do I accomplish this across a variety of goals? The example application is one that checks github statistics to see which projects are more likely to accept pull requests from non-committers.

Here's the example application. It implements the same github statistics service in two ways:

You'll notice that the code to implement the Future-only version is almost exactly the same as the "generic" version. There's a bit of difference in supporting code, but most of that is just an implementation of scalaz.

What is different is the...

Read More »