From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_* API extension? [was] scm_* API question Date: Wed, 31 Jul 2002 20:21:24 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20020731182124.GD6561@www> References: <20020730121436.GA4465@www> <20020730200929.A18106@kiwi.pyrotechnics.com> <20020731100300.GC5661@www> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1028139037 6151 127.0.0.1 (31 Jul 2002 18:10:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2002 18:10:37 +0000 (UTC) Cc: rm@fabula.de, guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Zxvf-0001av-00 for ; Wed, 31 Jul 2002 20:10:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Zxw8-000754-00; Wed, 31 Jul 2002 14:11:04 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17ZxvG-00073n-00 for ; Wed, 31 Jul 2002 14:10:10 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 0AF461049A2; Wed, 31 Jul 2002 20:21:24 +0200 (CEST) Original-To: Marius Vollmer Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.24i Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:902 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:902 On Wed, Jul 31, 2002 at 12:10:19PM +0200, Marius Vollmer wrote: > rm@fabula.de writes: > > > Would it be usefull to provide a scm_* function for it? > > Yes. I will add this to CVS. > > However, I'd say it is better to code all module system manipulations > in Scheme and try to keep the C code 'module system ignorant' if that > is possible. > > Why do you want to perform module system operations from C? Maybe > there is a more elegant way. Ok this is for my current (frankensteinish) hacking with Dave's mod_guile: i'm working on implementing a mod_guile mode in which URLs get mapped to so-called 'handlers' in modules - meaning i (ab?)use the hierarchical module space a namespace enclosures. Hmm, i guess this sounds rather confusing, so here is a small example. I the server configureation on can do the following: SetHandler guile-handler GuileContentHandler (web linkdatabase cool) SetHandler guile-handler GuileContentHandler (web apps biblio) Whenever a request for http://localhost/biblio comes in the webserver invokes the 'handler' method from the module (web apps biblio). Ah, in case one wants a different name, 'GuileContentHandler' will also accept a pair of the form '(module-spec . handler)' that allows us to specifiy the name of the function that gets invoked (and hence we can define more than one handler within one module). I'll also plan to add something like GuileBind a-symbol '(arbitrary (guile data) structure) i.e. i want guile to 'read' from the configuration file and bind 'a-symbol' to whatever was read. As a side note: as a quick hack i put the symbol into the module but i'd rather like to use something like an environment i can set up myself (i hope setting up an environment isn't to expensive performance wise), but i have way too little understanding about how to do this right now. But it would make a _way_ cool web environment -- full control over the env. means secure execution as well as probably some nice passing on of context. BTW, one reasons i do use the module system is the impicit cacheing i get: a module gets loaded only once, and that does make a difference in response time compared to the initial 'eval a file per request' aproach of mod_guile. Ralf Mattes > _______________________________________________ > Guile-devel mailing list > Guile-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/guile-devel _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel