Skip to content
Archive of posts filed under the Library features category.

Scala 2.9 parallel collections for MandelActors

Scala 2.9 is out, and one of the new features in this release are parallel collections. These make it almost trivial to do for example a foreach over a collection in parallel. I added a ParallelCollectionsRenderer to MandelActors which looks very simple: object ParallelCollectionsRenderer extends Renderer { override def render(sampler: Sampler, compute: Sample => Color, [...]

Specializing for primitive types

One interesting feature that was added to Scala in version 2.8 is specialization, using the @specialized annotation. First, a little background information. Generics in Java and the JVM, and consequently also in Scala, are implemented by using type erasure. That means that if you have an instance of a generic class, for example List[String], then [...]

MandelActors

I recently bought the pre-print edition of the book Actors in Scala. At the moment the books is not yet complete; the last three chapters are missing and I found a number of minor mistakes, but it looks like this is going to be a useful book on actors. To experiment with actors, I created [...]