search term:

sff4s: simple future facade for Scala

I wish there was a common super trait for various future implementations in the standard library, so I can express the concept without tying the code to a specific platform stack. I am not sure if there are others who feel the same, but I think it would be useful for library authors. That’s my motivation of writing sff4s.

what is future?

You’ve probably come across the notion before but let’s go over it quickly. A future value (also known as promise) represents an incomplete calculation.

Twilight for IntelliJ IDEA

I’ve tried other IDEs for Scala, but always ended up going back to TextMate. As I am getting on the IntelliJ IDEA wagon, I’ve made a Twilight theme to make the ride smoother.

screenshot

typeclass-based XML data binding

Ultimately, the users of scalaxb are interested the real problems that the entity objects express, not how they persist into XML. That’s why I knew I eventually had to vacate the singleton/companion object of the case class to implement the data binding. Until recently it has been generating the data binding implementation as follows:

object Address extends rt.ElemNameParser[Address] {
  val targetNamespace = "http://www.example.com/IPO"
 
  def parser(node: scala.xml.Node): Parser[Address] =
    ...
 
  def toXML(__obj: Address, __namespace: String, __elementLabel: String, __scope: scala.xml.NamespaceBinding): scala.xml.NodeSeq =
    ...
}

    Read More…
  

Scala and OSGi using NetBeans

For some reason, I can’t keep OSGi in my head. Everything I read about it slips away in a few weeks, and I have re-read the guides and tutorials.

Here’s a memo of setting up OSGi bundle written in Scala using NetBeans, following Neil Barlett’s OSGi in Practice, except the book uses Eclipse.

Installing Scala on Mac

Skip this section if you use non-Mac. Install MacPorts. Run the following from Terminal:

Scala and Evaluation Strategy

Once you use any technology to a significant extent, you understand its strength and shortcomings. I’ve probably written tens of thousands of lines of code in Delphi or C++, Java and C# too to some extent. I’ve depended on those languages, but gripe about them too. The new language obviously has the advantage of just being new. Since I haven’t written anything significant in Scala besides Tetris, I haven’t hit the shortcomings yet.