enjoying salad since 1978.

Tuesday, September 04, 2007

Putting my money where my mouth is

I've been going on and on about Scala and lift these past few months to pretty much anybody who would listen. Lift, an alpha web framework for the object-functional language Scala, takes advantage of Scala's numerous features to provide a surprisingly powerful web framework in less than 10k lines of code. Take a look at the lift site to get an idea of what it can do. (Hint: David wrote a wiki in 45 lines of code)

I can see it doing for Scala was Rails did for Ruby.

So when David asked me if I wanted to be a committer, I jumped at the opportunity. I have a couple of patches going in my local SVN working copy mostly related to proper serving of MIME types and caching that I hope to get in soon.

Labels: ,

Tuesday, August 14, 2007

Weighted Slope One in Scala

Here's a basic procedural version of Weighted Slope One in Scala. It's pretty much a direct port of the Python version. It's about 15 lines longer due to curly braces and Map syntax in Scala not having a few niceties that Python dictionaries have.

Next I'm going to convert it to take advantage of Scala's powerful functional abilities. I'm going to take a stab to see if it lends itself to being a map and reduce. If that fails, I will fall back to good 'ol fold. The goal will be for those for-comprehensions to vanish and reveal an algorithm that's more parallelizable and then to run it on multiple cpus.

Labels: