[Haskell-cafe] ANN: Cute Hack - Hyena handler + Bamboo Blog Engine :)

Sebastiaan Visser sfvisser at cs.uu.nl
Sat Apr 25 07:00:21 EDT 2009


What kind of port is this? Direct translation from ruby source?

I see that you are using the (.) for OO-style reversed function  
application. Which feels a bit weird at first sight.

Snippet from your Hack.Handler.Kibro:

 >handle app = do
 >  env <- get_env
 >  response <- app env .liftIO
 >
 >  -- set response
 >  response.headers.mapM_ (splash setHeader)
 >  response.status.show.setHeader "Status"
 >  response.body.output

On Apr 25, 2009, at 7:58 AM, Jinjing Wang wrote:
> Hia,
>
> A few interesting progress on Hack:
>
> * many middleware ported from Rack, including a lambda! ( just like a
> pony for wsgi, and a lobster for rack )
> * 2 handlers, one for Kibro on fcgi / lighttpd, one for Hyena web  
> server
> * apps are portable, Bamboo is a port of Panda that runs on Hack,
> works fine with both handlers
> * Hyena handler is still experimental
>
> A lambda app looks like this
>
> -- Main.hs source
>
> module Main where
>
> import Hack
> import Hack.Utils
>
> import Hack.Handler.Hyena
> import Hack.Contrib.Lambda
>
> main = run $ lambda dummy_app
>
> -- compile
>
> ghc --make -O2 Main.hs
>
> -- run
> ./Main
>
>
> now go to http://localhost:3000/lambda
>
> Cheers,
>
> Links:
>
> * [Hack] (http://github.com/nfjinjing/hack/tree/master)
> * [Bamboo] (http://github.com/nfjinjing/bamboo/tree/master)



More information about the Haskell-Cafe mailing list