Getting Started with Spring Data – MongoDB in Scala

Amir Moulavi

I used MongoDB for a project in 2010 and I had great experience with it. Unfortunately I didn’t get the chance to work with this agile and scalable document-oriented database again until now. But my current assignment has brought the opportunity to use it in production In this post I want to show you a [...]

Tags: , , ,

Scala LiftOff London 2011

Björn Antonsson

Last week I attended Scala LiftOff London 2011 at the Skills Matters Exchange, and being very new to the community aspect of Scala i didn’t know what to expect. One thing is for sure, I could never have imagined the kind of  sharing and positive atmosphere that I got from the people there. There where lots of interesting talks [...]

Tags:

Experimenting with Scala Parallel Collections (contd.)

Amir Moulavi

In the previous post we went through Scala parallel collections and you saw how you can convert a sequential collection into a parallel one by using method par on that collection. In this post I want to show you how you can write your own parallel collection in Scala. The example I use for this [...]

Tags: , ,

Injectors and Extractors in Scala

Amir Moulavi

If you have used case classes in Scala, you can not neglect the power they bring to your applications. They provide a recursive decomposition mechanism via pattern matching. In this post I go through injectors and mostly extractors. You will see that how extractors can be employed for pattern matching. Consider that we need to [...]

Tags: , , ,

Scala Type Variances – Part three

Amir Moulavi

So far we have seen how to define covariant and contravariant subtypes in Scala. In this post we will study lower bounds and upper bounds and see how they can be of great help when designing your application. Lower bounds Consider the class I defined in the first post: Company is covariant in type T [...]

Tags: , , , , ,

Scala Type Variances – Part two

Amir Moulavi

In the previous post, I went through what covariant subtyping is. In this post we will study contravariant subtyping with a small example. Contravariant Subtyping Do you remember the definition of covariant? Contravariant is the other way around. I will clarify this by the following example (example is adopted from [1]). Consider we have a [...]

Tags: , , , ,

Scala Type Variances – Part one

Amir Moulavi

I remember when I started to learn Scala, I usually come up with brackets in the Scala API doc that have plus and minus characters inside. Honestly that scared me a little bit! But after I learned a bit about Scala type system, I know the purpose of theses type declarations and I appreciate their [...]

Tags: , , , ,

Experimenting with Scala Parallel Collections

Amir Moulavi

In this short post, I want to show you how you can avail from Scala parallel collections in your application and under which conditions it makes sense to use it. Parallel Collections were introduced in Scala 2.9 release which are built on the same abstractions and provide the same interfaces as existing collection implementation. It [...]

Tags: , ,

Intercepting Scala trait constructors

Michael Kober

Today I was writing an AspectJ aspect for a Scala trait and was wondering why my constructor pointcut definition didn’t work. Having a closer look at the Scala byte code together with my colleague Johan solved the puzzle. Here is what I did (using AspectJ 1.6.8 and Scala 2.8.Beta1): To start with here’s a simplified [...]

Tags: ,

Extending the JDT

Michael Kober

A couple of weeks ago I had a look at the Motodevstudio for Android developers and I think it has some quite nice features like code snippets or wizards for Android activities, services and more. Actually it’s is quite easy to extend the eclipse JDT and provide such useful plugins. This blog post is about [...]

Tags: , , , ,

Building OSGi Bundles with Scala and Gradle

Michael Kober

There already some good blog posts about how to build OSGi bundles in Scala, among others “An OSGi Bundle… built in Scala” of Neil Bartlett and “OSGi, Maven and Scala” of Gavin Bong using pax-construct. Here is another alternative using Gradle. Gradle is an open-source build system providing the expressiveness of a Groovy based DSL [...]

Tags: , ,

Getting around static typing in Scala

Jan Kronquist

I really like static typing, but sometimes it can get in your way. For instance if you have a collection of objects and you want to perform an operation on the objects of a certain subclass you can run into problems.

Tags: , ,

The Golden Ratio

Ulrik Sandberg

Also known as the “Divine Quotient”, the Golden Ratio was given an almost magical meaning during the renaissance, but it’s actually much older than that. Leonardo DaVinci used it. Euclid used it. It was supposedly discovered by Pythagoras. So, what is it? It’s very simple. Take a length and divide it into two parts: a [...]

Tags: , , , ,

Scala IDE support

Michael Kober

Today we wanted to test the scala java interoperabilty in different IDEs. We used the Scala plugin for Eclipse, Netbeans and IntelliJ. The intellij plugin worked out of the box. We managed to get the eclipse plugin working after some trouble as well. Although the netbeans plugin seems promising the interoperability between java and scala [...]

Tags: , ,

Azul

Jan Kronquist

We have got the privilege to borrow an Azul Vega 1 which is the smallest of Azul‘s monster machines. This evening a bunch of us Jaywayers gathered to try it out. Installing the Azul JVM was painless and all of us were up and running very quickly. Read more…

Tags: , , ,