[Haskell-cafe] Re: what is *hack*?

Michael Snoyman michael at snoyman.com
Wed Jan 13 15:56:55 EST 2010


I've had no problems with hack. The only things to keep in mind are outside
the scope of hack such as:

* Persistence. Clearly you need to optimize your application different for
CGI run (load up only what you need right now) versus long-running processes
like FastCGI (load data only once).
* URL schemes. A lot of people assume that your web app with be served from
the root of the domain. When using my simpleserver testing, that *is* the
case. However, I deploy apps in subdirectories of my domain (
http://www.snoyman.com/photos/, http://www.snoyman.com/wordify/, etc), so I
need to keep this in mind.

My only two quips about hack itself is:

* Versioning scheme. I wish (and have requested) that Hack would follow the
Package Versioning Policy so that I could easily check for breaking changes.
As is, I simply have to declare the exact version number of Hack I want to
work with to guarantee my apps aren't broken in the future.
* More serious issue is that it returns the response as a lazy bytestring.
It's not really fair to call this a quip, since I fully supported this
approach; nonetheless, using an enumerator for this would probably be more
efficient for certain use cases.

I just a few hours ago sent off an e-mail about bringing into fruition the
Web Application Interface for Haskell, which I would envision as Hack with
these two quips addressed. Theoretically, it would also allow easy
collaboration with Hack.


On Wed, Jan 13, 2010 at 10:33 PM, Pasqualino "Titto" Assini <
tittoassini at gmail.com> wrote:

> Hi Michael,
> what is your experience with hack? Do you have any problem moving your
> apps from one server/env to another?
> Regards,
>     titto
> 2010/1/13 Günther Schmidt <gue.schmidt at web.de>:
> > Hi Michael,
> >
> > on first impression this seems like a good idea then.
> >
> > Günther
> >
> >
> >
> > Am 13.01.10 15:48, schrieb Michael Snoyman:
> >>
> >> Günther,
> >>
> >> Hack is a layer between a web application and a web server. It allows
> >> you to write a web application once and have it communicate with the
> >> server in different ways simply by swapping the handler. For example, I
> >> have applications that I test on my local system using
> >> hack-handler-simpleserver and then deploy onto an Apache server using
> >> either hack-handler-cgi or hack-handler-fastcgi.
> >>
> >> Michael
> >>
> >
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> --
> Pasqualino "Titto" Assini, Ph.D.
> http://quicquid.org/
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100113/3ceaa02a/attachment.html

More information about the Haskell-Cafe mailing list