Skip to content

Instantly share code, notes, and snippets.

package wolv.parserlibproblem
import util.parsing.ast.AbstractSyntax
import util.parsing.combinator.syntactical.TokenParsers
import util.parsing.combinator.lexical.Lexical
import util.parsing.combinator.token.Tokens
trait SimpleTokens extends Tokens {
case class Foo extends Token
case class Bar extends Token
@jrudolph
jrudolph / gist:1097283
Created July 21, 2011 14:18
Show the non-Existential Of God
abstract class Action
case object Eat extends Action
case object Speak extends Action
case object Move extends Action
abstract class Creature (val action: Action)
case class Fish (a: Action, val size: String) extends Creature (a)
case class Dog (a: Action, val sound: String) extends Creature (a)
@jrudolph
jrudolph / .gitignore
Created October 19, 2012 07:50
Regression bug in Scala 2.10.0-RC1
/.idea/
target/
lib_managed/
src_managed/
test-output/
*.iml
package spray.examples
import scala.concurrent.duration.Duration
import scala.concurrent.duration._
import akka.actor._
import akka.pattern.ask
import spray.util._
import spray.io._
import akka.event.LoggingAdapter
import akka.util.Timeout
package ru.metahouse.metabus
import akka.actor._
import akka.io.IO
import spray.can.Http
import spray.routing.HttpServiceActor
import spray.http._
import spray.http.MediaTypes._
import scala.concurrent.ExecutionContext.Implicits.global
import spray.http.ChunkedResponseStart
object Tcp {
trait ConnectionDescriptor {
def remoteAddress: InetSocketAddress
def localAddress: InetSocketAddress
}
sealed trait ConnectionFlow extends Flow[ByteString, ByteString] {
def remoteAddress(mMap: MaterializedMap): InetSocketAddress
def localAddress(mMap: MaterializedMap): InetSocketAddress