Category Archives: Code Samples

Gradle, Lift, and Google App Engine

I’m getting back into the game a little bit, and I decided to take a look at Lift for web development. After an initially promising experience, I became totally unhappy with Eclipse (it began forgetting I had Google App Engine libraries on the classpath after every clean). So I moved back to the command line. [...]

Also posted in Gradle, Scala | Tagged , , , , , , | Leave a comment

“Statically Typed Groovy”? Bwuh? I’m confused.

Hamlet d’Arcy just posted on Groovy getting a static mode, apparently called “Grumpy”. I’m really confused about why Groovy is bothering. First of all, we have to be clear that a statically typed Groovy is going to have to do away with a lot of functionality. After all, this is totally legitimate and well-defined Groovy [...]

Also posted in Groovy, Programming Language Punditry | 2 Comments

My Experience Installing F# on OS-X

I’ve been working in .NET for a while now, but the time finally came when I no longer had to be working on a Microsoft workstation via VPN. This meant that I was free to start developing .NET on my Mac, and that meant starting with installing F#. I presumed I was going to have [...]

Also posted in OCaml, Open Source, Programming Language Punditry | Leave a comment

Script: Write out ASM Code to Generate Java Class (Mark II)

Here’s an update to the Java class file to ASM script based on suggestions from Headius and Guillaume Laforge.   #!/usr/bin/env groovy   import org.objectweb.asm.util.ASMifierClassVisitor as V   @GrabResolver(name=’ow2.org’, root=’http://maven.ow2.org/maven2/’) @Grab(group=’asm’, module=’asm-all’, version=’[3.3,)’) private class JustHereForGrab {}   V.main(this.args) No need to muck with your grapeConfig.xml file with this script.

Also posted in Groovy | Leave a comment

Script: Write out ASM Code to generate Java class

Edit: Updated version of the script here. Here’s a nifty little Groovy script to write out the ASM code to generate a given Java class. #!/usr/bin/env groovy   import org.objectweb.asm.util.ASMifierClassVisitor as V import org.objectweb.asm.ClassReader as R   @Grab(group=’asm’, module=’asm-all’, version=’[3.3,)') private class JustHereForGrab {}   new R(new File(this.args[0]).newInputStream()).accept(new V(new PrintWriter(System.out)), 0) You will have to [...]

Also posted in Ashlar/Cornerstone, Groovy | 2 Comments
  • Categories