## Statistical Mechanics has failed the market test or Noah Smith misses the point

If statistical mechanics models work, why don't people use them to get rich?

When I studied physics in grad school, I was told something along these lines:

"Statistical mechanics models are useful because they pass the Atomic Critique (the belief that because the universe is made out of atoms, all …

## Learning spire - Scala is Slow, cfor helps

Another cool feature offered by Spire is the `cfor` macro. `cfor` is basically just a C-style for loop:

``````cfor(0)(i => i < maxSize, i => i + 1)( i => {
result = result + i*i
})
``````

The purpose of `cfor` is not to do anything you can't do with ordinary Scala iterator primitives. The sole …

## Spray error "could not find implicit value for evidence parameter of type spray.httpx.marshalling.Marshaller[scala.concurrent.Future[_]]"

For various projects I've been using the spray routing library to provide the web frontend of the recommendation engine. One rather annoying error I've run into several times is the following. Given some type `Foo`, for which a `JsonSerializer` exists, I have cote which looks like the following:

``respondWithMediaType(`application …``

## Learning Spire - Vector Spaces!

I've been working through some of Spire, which is a math library for Scala. I originally discovered Spire when I was looking for a `VectorSpace` typeclass for Scala, so it's probably worthwhile to discuss that here. We all learned abot vector spaces in Linear Algebra, and probably thought they were …

## Learning Spire - Boolean Algebras are pretty cool

For a long time I've been a fan of the Scalaz library for Scala. Scalaz puts a Haskell into your Scala so you can Haskell while you Scala. More precisely, it provides a lot of useful features for expressing pure computations such as `Applicative` functors, `Monads`, `Monoids`, `NonEmptyLists` and the …

## Don't use Actors for concurrency

Don't use actors for concurrency. Instead, use actors for state and use futures for concurrency.

A common practice I've seen in scala code is to use actors for concurrency. This is encouraged by Akka and a lot of writing about Scala, the documentation of which is highly actor-centric. I assert …