Over on Code To Joy there is a nice discussion of JFugue, the Java API for Music Programming and Groovy.
The comment was made:
… I wonder what a stack trace sounds like ;-)
I wondered too!
The answer was…boring!
A bit of munging made it just a bit less boring:
import org.jfugue.*
def munge(s) {
(s.findAll { it ==~ /[A-Ga-g]/ } as Set).join(' ')
}
Exception.metaClass.play = { new Player().play(new Pattern(munge(delegate.toString()))) }
new IllegalArgumentException(/Don't give me that!/).play()
new ArrayIndexOutOfBoundsException(/Don't give me that!/).play()
There’s also Ode to Build Scripts!
As my dear departed mother always said: little things please little minds…
