guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mod_lisp for guile


From: Neil Jerram
Subject: Re: mod_lisp for guile
Date: Thu, 15 Dec 2005 23:21:19 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Alan Grover <address@hidden> writes:

> Actually, your comments are interesting, since you assumed I meant a
> lazy-list at the per-header level.

Yes.

> Hmmm. Weird. Even intriguing: why read the rest of the request if
> you get to a header that you tells you to give up?

That's not a mainline case, though, so not very compelling.

> But, to address the question. Yes, there's a slight misunderstanding.
>
> I meant for the granularity to be at the "request" level. So, it is a
> (lazy) list of requests. I had conceived of the implementation
> reading/parsing the entire request.

Yes, I see that now.

> The lazy-ness is really in taking advantage of patterns for list
> processing. Perhaps I didn't give an example like:
>       (define list-of-http-transactions (mod_lisp some-port-listener))
>       (for-each handle-request list-of-http-transactions)

That's kind of neat, but doesn't actually feel very natural to me.
When I have socket input to deal with, I typically want (or rather
need) to select on the socket along with other stuff, and then
dispatch the next request when select indicates data available.  I
don't see how that could naturally be rewritten in terms of list
operations, or that it would be helpful to do so.

> As I looked at doing a lazy-list implementation, I was blocked by the
> fact that I can't do the example I just gave. The standard (and library)
> functions aren't generic for delay'd values. Thus, if I created a
> lazy-list, I couldn't use it with libraries (even the basic for-each/map
> functions) and neither could client code. By providing a lazy-list, I
> would force client-code to use a separate library of lazy-list functions.

Yes, indeed.  Guile does come with a lazy list library, though - have
you seen (ice-9 streams)?

Regards,
        Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]