Skip to content

Instantly share code, notes, and snippets.

View alextkachman's full-sized avatar

Alex Tkachman alextkachman

View GitHub Profile
@alextkachman
alextkachman / gist:1006250
Created June 3, 2011 12:17
Type inference in Groovy++ sample
@Typed class GridGainTest {
public static void main(String[] args) {
def local = GridFactory.start("spring-cache.xml").localNode
local.remoteListenAsync(local) { nid, String msg ->
// we infer of course that this is GridListenActor
grid ()
// we infer nid instanceof UUID
println nid.leastSignificantBits
println msg
@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 {
@alextkachman
alextkachman / gist:9764892
Created March 25, 2014 15:56
Statically typed Angular with Kotlin
package angular.demo
import angular.*
object HelloWorldModule : Module("HelloWorld") {
val hello = constant("hello", "Hello")
val world: String by factory("world") {"World"}
}