I hereby claim:
- I am corruptmemory on github.
- I am corruptmemory (https://keybase.io/corruptmemory) on keybase.
- I have a public key ASADP44V3RkEhpkaizyW9Xn2Cn0PCK-bUcydzBbhJSUjHQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package com.corruptmemory.blueeyes_pong | |
import akka.dispatch.{Future,Promise} | |
import akka.util.Timeout | |
import blueeyes.{BlueEyesServer,BlueEyesServiceBuilder} | |
import blueeyes.core.data.FileSource._ | |
import blueeyes.core.data.{FileSource, ByteChunk, BijectionsChunkJson, BijectionsChunkString, BijectionsChunkFutureJson} | |
import blueeyes.core.http.HttpStatusCodes._ | |
import blueeyes.core.http.MimeTypes._ | |
import blueeyes.core.http.combinators.HttpRequestCombinators |
{-# LANGUAGE OverloadedStrings, QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-} | |
import Yesod.Dispatch | |
import Yesod.Core | |
import Yesod.Content | |
import Data.ByteString (ByteString) | |
import Network.Wai.Handler.Warp (run) | |
data Pong = Pong | |
mkYesod "Pong" [$parseRoutes| | |
/ PongR GET |
{-# LANGUAGE OverloadedStrings #-} | |
import Network.Wai | |
import Network.Wai.Handler.Warp | |
import Blaze.ByteString.Builder (fromByteString) | |
import Network.HTTP.Types (status200) | |
main = run 3000 $ const $ return $ ResponseBuilder | |
status200 | |
[("Content-Type", "text/plain"), ("Content-Length", "4")] | |
$ fromByteString "PONG" |
package com.patch.unfiltered_pong | |
import unfiltered.request._ | |
import unfiltered.response._ | |
import unfiltered.netty.async._ | |
import org.jboss.netty.channel.ChannelHandlerContext | |
import unfiltered.netty.ServerErrorResponse | |
trait ApiPlan extends Plan with ServerErrorResponse { |
#lang typed/racket | |
(define-type A (U String Integer)) | |
(define-type B (U Integer)) | |
(define-type D (U String Real Integer)) | |
(: foo (A -> Integer)) | |
(define (foo a) | |
(cond [(string? a) (string-length a)] | |
[(integer? a) a])) |
case class Point(x:Double,y:Double) | |
case class Rectangle(p1:Point,p2:Point) { | |
def overlaps(that:Rectangle):Boolean = | |
// Rectangle overlap test | |
} | |
trait Overlapable { | |
def boundingRectangle:Rectangle | |
def convexHulls:Seq[Seq[Point]] | |
def overlaps(that:Seq[Seq[Point]]):Boolean |
Originally: | |
https://gist.github.com/7565976a89d5da1511ce | |
Hi Donald (and Martin), | |
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
appreciate the tone. This is a Yegge-long response, but given that you and | |
Martin are the two people best-situated to do anything about this, I'd rather | |
err on the side of giving you too much to think about. I realize I'm being very | |
critical of something in which you've invested a great deal (both financially |
/** | |
* A silly example using Kleisli composition of DB operations | |
* Based on an idea from Runar Bjarnason found here: | |
* https://groups.google.com/d/msg/scala-debate/xYlUlQAnkmE/FteqYKgo2zUJ | |
* | |
* Uses Scalaz7 | |
* | |
* @author <a href="mailto:[email protected]">Jim Powers</a> | |
*/ | |
object Monadic { |