[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I'm starting using chicken4 (Re: [Chicken-users] 4.6.1 performance b
Re: I'm starting using chicken4 (Re: [Chicken-users] 4.6.1 performance boost
Tue, 28 Sep 2010 19:36:32 +0200
On Wed, Sep 29, 2010 at 12:25:52AM +0900, Daishi Kato wrote:
> I've been using chicken-3..0 for years, but
> Mario's email encouraged me to move my project to chicken4.
Yes, Chicken 4 is the way to go!
> I was heavily using the http egg in chicken3, which is
> incompatible with chicken4.
Unfortunately, it is. I like to think it's an improvement though :)
> In chicken3/http-server, I did something like:
> (http:request-method-handler 'GET (lambda (req) ...
> This is converted like the following in chicken4/spiffy.
> (define (my-request-handler)
> (let* ([req (current-request)]
> [method (request-method req)])
> (case method
> ((GET) (lambda (req) ...)
> ((POST) (lambda (req) ...)
> (vhost-map `((".*" .
> ,(lambda (continue)
Yes, this is uglier. There are several different request handling
eggs now though! They make it easier to handle incoming requests.
Porting the old-style request handling stuff shouldn't be too hard,
but I left it out because the way the old code worked is incompatible
with vhost support. The new Spiffy has vhost support built in from
day 1. Felix isn't happy about this change either, so you would
probably make him very happy by making an egg that emulates the old
> I found one problem and filed ticket #401.
I'll reply there.
> Porting my code from chicken3/http-client to chicken4/http-client
> was fairly easy, except that I have to give up the proxy support.
> So, Peter, my huge request is the proxy support.
I'll see what I can do :)
> There were many tiny things for porting my code, such as dealing
> with the fancy uri-common egg and string-match -> string-search.
Are you using "fancy" in a good way or in a bad way? I'm really eager
to hear how these new http libraries are being used and how people like
them, so I can improve where things are not as smooth as they should be.
> Anyway it's nice to have it working, and
> I would like thank everyone contributing to chicken4!
And I would like to thank you for switching and giving feedback!
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth