This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mod_guile design problems


Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE> writes:

> Hi,
> 
> a few stupid questions come to my mind:
> 
> How (from where) do you start the guile interpreter?  
> 
> Do you want to create an application server listening on a socket
> or do you start guile whenever apache forks a new process?

I link guile into apache, like you would assume if you extend
apache with guile, which is basically a library.

> What's the difference between a "content handler" and a apache module?

Apache has alot of handlers (17 i think), of which 10 are run
each time a request is handled. One of those 10 is the "content
handler", which provides the content for the requested object.

> > I actually implemented a cache-load function which loads a file
> > into a (lambda () ...) so the eval'd version will just give a
> > function that, when eval'd, will result in the same actions as
> > loading the file would (cache-load handles this transparently,
> > even reloading if the mtime changes).
> > The only problem i see here is that multiple defines in the
> > beginning of the file won't work as expected (the differences of
> > multiple defines in a function to multiple defines in the top
> > level are one of the very, very few warts in Scheme)
> 
> In other words your lambda function translates a module's definitions
> into an environment with set of top-level bindings?  
> The module system does this.  You call a init function and pass it
> an environment and you get back a set of top-level bindings within
> this environment.

I translate a file into a function which duplicates the actions
that would be taken by (load "file.scm"). This is different from
modules, or i have misunderstood modules.

> > This approach allows us to do e.g. "GuileSetReader .tcl read-tcl"
> > or something like this, and have faster Tcl CGI's (of course they
> 
> What do you mean with "GuileSetReader .tcl read-tcl"?  Should 
> the reader translate tcl into guile statements?  

Apache config command i plan to add. Will add a reader for .tcl
files, e.g. Guile's Tcl reader, and have it handle .tcl files
cached like above.
	-forcer

-- 
((email . "forcer@mindless.com")       (www . "http://forcix.cx/")
 (irc   . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]