4 ms·
Well, that took me only 5 minutes, a refreshing experience after getting a webstack up on OSX consisting of memcache, oursql, CherryPy and MySQL for the first t
by Luyt 16y ago
Well, that took me only 5 minutes, a refreshing experience after getting a webstack up on OSX consisting of memcache, oursql, CherryPy and MySQL for the first time ever ;-)
$ cd /usr/ports/lang/scala
$ sudo make install clean
$ rehash
[fire up an editor and paste the code into test.scala]
$ scalac test.scala
$ scala ApplyTo
scala-dev@gushhq.com
$ cat test.scala
object ApplyTo extends Application {
val k = "gWU`UAXYjT[ig\\\\eBWca"
println(k map {c => (c - k.size).toChar toLower})
}
Hmmm, do I get the job? ;-) Oh wait, I see I maybe should have saved the source code in ApplyTo.scala instead of test.scala.
I really should look into Scala some day Real Soon Now, interesting that it runs on the JVM, I was messing around a bit with Clojure, which also runs on the JVM. I haven't worked with Java recently, but I used it some years ago and I remember the interesting FileStreamBufferedReader class hierarchy which you needed to read a simple file. My personal blog is mentioned in my profile.