[Top][All Lists]

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

Re: [bug-myserver] Configuration?

From: Giuseppe Scrivano
Subject: Re: [bug-myserver] Configuration?
Date: Tue, 08 Mar 2011 12:12:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Ludovic,

address@hidden (Ludovic Courtès) writes:

> By “empty”, you mean that it contains at least this:
>   <?xml version="1.0"?>
> Right?
> I would find even more convenient to not create a file.

Yes, I mean that at least it is a valid XML file.

Thanks for your suggestion, I think we can assume that if the file
doesn't exist then it has the same meaning of an empty valid XML file.

> OK.  Could it create a default virtual host automatically when
> ‘virtualhosts.xml’ isn’t provided?

Yes, it could, but how to choose the port number for example?  A random

> I’d recommend using disjoint types as much as possible, instead of lists
> everywhere.  For instance, I’d write the example along the lines of:
>   (define vhosts
>     (list (make-virtual-host "example" 'web #:port 8080)))
> where ‘make-virtual-host’ is a procedure that returns a ‘virtual-host’
> object, with a distinct type.  That makes it less error-prone and allows
> for better error reporting than when using lists and strings for
> everything (anyone who’s used Gnus will understand what this means ;-)).
> Disjoint types can be created with SRFI-9, for instance (info "(guile)
> SRFI-9").

Thanks for the suggestion! :-)

> Another thing that could be interesting is to provide a ‘server-impl’
> for Guile’s new web framework (info "(guile) Web Server").
> Sorry, I didn’t mean to bother you with these Guile things.  ;-)

Guile and Scheme are always welcome here :-)  Maybe "guile-ify MyServer
(and the way back)" can be a good GSOC task.


reply via email to

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