Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Tkachman alextkachman

View GitHub Profile
@alextkachman
alextkachman / gist:701688
Created Nov 16, 2010
How 100% statically typed grails controller looks like
View gist:701688
def chatService
index: {
def id = request.session.id
[
sessionId: id,
userName: request.session.userName ?: (request.session.userName = chatService.newUserName())
]
}
View Akka with Groovy++
@Typed package org.mbte.akkatest
import se.scalablesolutions.akka.actor.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.CountDownLatch
import se.scalablesolutions.akka.config.JavaConfig.AllForOne
import se.scalablesolutions.akka.config.JavaConfig.RestartStrategy
import scala.collection.immutable.List as ScalaList
import scala.collection.JavaConversions
import se.scalablesolutions.akka.config.ScalaConfig.Supervise
View Akka used by Groovy++
@Typed package org.mbte.akkatest
import se.scalablesolutions.akka.actor.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.CountDownLatch
import se.scalablesolutions.akka.config.JavaConfig.AllForOne
import se.scalablesolutions.akka.config.JavaConfig.RestartStrategy
import se.scalablesolutions.akka.config.ScalaConfig.Server
class Akka {