Skip to content

Instantly share code, notes, and snippets.

@joune
joune / typeclassesABC.scala
Created February 21, 2017 06:35
super simple memo on typeclasses with generics
trait Json[T] {
def toJson(t:T):String
}
implicit object jsonStr extends Json[String] {
def toJson(s:String) = s""""$s""""
}
implicit object jsonInt extends Json[Int] {
def toJson(s:Int) = s"$s"
@joune
joune / H.java
Created December 22, 2015 16:51
scala/java interop AbstractMethodError
interface H<C> {
String h(C c, String... args);
}
[2015-07-16 15:31:25,707][INFO ][node ] [Scream] version[1.6.0], pid[1], build[cdd3ac4/2015-06-09T13:36:34Z]
[2015-07-16 15:31:25,708][INFO ][node ] [Scream] initializing ...
[2015-07-16 15:31:25,714][INFO ][plugins ] [Scream] loaded [], sites []
[2015-07-16 15:31:25,749][INFO ][env ] [Scream] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/mapper/fedora_fr--ws--152-root)]], net usable_space [1.5gb], net total_space [49gb], types [ext4]
[2015-07-16 15:31:28,139][INFO ][node ] [Scream] initialized
[2015-07-16 15:31:28,140][INFO ][node ] [Scream] starting ...
[2015-07-16 15:31:28,401][INFO ][transport ] [Scream] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/172.17.0.51:9300]}
[2015-07-16 15:31:28,419][INFO ][discovery ] [Scream] elasticsearch/5_NiA8akT5Gj2Zpe_G4J9w
[2015-07-16 15:31:31,457][INFO ][cluster.service ] [