View Andy Lo-A-Foe's profile on LinkedIn

Scala scripting continued

It took a day or two of blog reading and scala console try outs but I managed to create my first usable Scala script.

import scala.xml._

/**
Sequence number fix script. See http://fugamusic.com/docs/ingestion/ingestion.xsd
**/

object FixSequence {
var seq: List[Pair[Int,Int]] = List()
var working_vol = 0

def main(args: Array[String]) {
val pp = new PrettyPrinter(80, 2)
val fuga = XML.loadFile(args(0))(0)
loadSeq(fuga)
println(pp.format(fixSeq(fuga)))
}

def loadSeq(xml: Node) {
for [...]

First stab at Scala scripting.. filters do not work like my Ruby brain thinks they do

So I decided to pick up the Scala language. Having done Ruby for a couple of years now Scala is one of the few, if not the only language that’s gotten me excited. Being a first class citizen on the JVM has many advantages and I’m really liking LiftWeb.

I also suspect I’ll be doing a [...]