Tuesday, August 31, 2010

More on Scala

Get Started on Debian/Ubuntu


Install scala, this would install version 2.7.7 though, 2.8.0 has just been out recently

apt-get install scala

Run the scala shell

scala

(optional) Quick upgrade to scala 2.8.0, install scala as per above and just copy the newer jars
Download scala from http://www.scala-lang.org/downloads and extract the tarball

tar xzf scala-2.8.0.final.tgz
cd scala-2.8.0.final/lib
cp scala-compiler.jar scala-library.jar scala-dbc.jar /usr/share/java


Get Started on Eclipse


Get the eclipse scala plugin http://www.scala-ide.org/ this would include the scala jar, compiler, console, etc.
When you have the plugin the following options are available

  • create a new scala project

  • right click on existing java project and add scala nature and you can now start coding both java and scala together

  • run the scala console inside eclipse



Reference and Links


Below are some useful reference

Scala Tutorial - useful w/ Java Background

Scala by Example - a little long, more like a scala cookbook

Programming Scala

First Steps to Scala - a bit old but still useful

Scala Idioms, Step 1, Lists and Maps - a bit old but quick way to learn about lists. Tuples are using old syntax of {x, y} which is now changed to (x, y)

Who is using Scala




Frameworks and OSS Projects


Wednesday, August 18, 2010

Looking at Scala again

I have been look at scala and lift (web framework built on scala), on and off about a year now. I have revisited it again for the past few weeks. Scala as a language seems to be promising. For me it adds something new to the main stream languages today, like pattern matching (not regexp), functional programming, actors library. There are some languages that have these properties but I think scala has got some transitional properties giving some balance. Using scala you get to access java libraries natively, despite its terse syntax it is still a static language, this would mean tool developers will have an easier.

Scala
Lift

I have also been re-using emacs again. Some interesting scala emacs some stuff.

Scala emacs tools