Tuesday, December 16, 2008  Growing a language  Today I needed
to do some load testing on a web site. All I wanted to do was
hammer it with requests and observe how well it held up. I
wasn't familiar with any tools that did this, and had no desire
to learn them, so I sat down wrote my own mini-framework in less
than a hundred lines of Scala. It's nothing special, but I want
to share bits of it to show how you can grow Scala to fit your
needs.   At the heart of any web testing is HTTP. Scala runs on
the JVM, so I browsed through some Java libraries for fetching
HTTP content, but the existing Java approaches were too verbose
for my taste. Java is a systems language and it shows,
especially in the library design decisions. For this particular
application, I don't want to deal with the nitty-gritty of
InputStreams or RetryHandlers. I just want to GET. So I borrowed
a page from a Ruby library and wrote the following:  object Http
{ def get(url: String): Array[Byte] = ...  Thanks Ruby, that's
much cleaner. (Scala's