From: rm@fabula.de
Cc: rm@fabula.de, Marius Vollmer <marius.vollmer@uni-dortmund.de>,
guile-devel@gnu.org
Subject: Re: scm_* API extension? [was] scm_* API question
Date: Thu, 1 Aug 2002 12:10:15 +0200 [thread overview]
Message-ID: <20020801101015.GD7425@www> (raw)
In-Reply-To: <87ado7a794.fsf@raven.i.defaultvalue.org>
On Wed, Jul 31, 2002 at 04:59:35PM -0500, Rob Browning wrote:
[ nice samples removed ]
>
> etc. There's also a module-ref function and a module-use! function...
I konw these, but this is all done from the scheme side. I just want
to be able to do the same cool things from C (other than scm_call_*ing
the functions from (ice-9 safe) etc.).
> > 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.
>
> Well that may or may not be the right thing to do if you're *just*
> using the module system for the caching. In that case, you may be
> better off to implement the caching yourself (via a hash table or
> whatever) and leave the module system to more static modules.
No, cacheing is just a (very) nice side effect. My main rationale is
the namespace encapsulation. In general i think these modules should
be considered static -- during the lifetime of a server the code for
a handler shouldn't change. I put things like 'GuileBind ... ' into
the handler's module since i haven't understood how to do the same
with environments so far.
> For example, depending on what you're wanting to do, you might want to
> allow different requests to be handled inside separate namespaces,
> though they're all using a common set of code. OTTOMH, I think you
> could do this by putting the common functionality into a module, say
> foo.scm, then doing something like this for *each* request:
>
> (use-modules (foo))
> (define foo-module (resolve-module '(foo)))
>
> ;; For each request...
> (define next-request-envt (make-safe-module))
^ ^
| |
*----------------*
|
Does this mean: module <=> environment in guile?
> (module-use! next-request-envt (module-public-interface foo-module))
> (define request-form (list handler-sym current-url-string))
> (eval request-form next-request-envt)
>
> Marius, etc. Please correct any inaccuracies above -- I'm just going
> from what I've gathered while poking around. I suspect we need more
> thorough documentation of the acceptable usage of the anonymous module
> stuff.
Would be highly welcome ;-)
Ralf
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-08-01 10:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-30 12:14 scm_* API question rm
2002-07-31 1:09 ` Christopher Cramer
2002-07-31 10:03 ` scm_* API extension? [was] " rm
2002-07-31 10:10 ` Marius Vollmer
2002-07-31 18:21 ` rm
2002-07-31 21:59 ` Rob Browning
2002-08-01 10:10 ` rm [this message]
2002-08-01 16:51 ` Rob Browning
2002-08-05 15:08 ` Marius Vollmer
2002-08-05 16:06 ` rm
2002-08-05 16:49 ` Marius Vollmer
2002-07-31 20:06 ` Christopher Cramer
2002-07-31 22:14 ` Rob Browning
2002-08-01 9:41 ` rm
2002-08-05 17:51 ` Marius Vollmer
2002-08-05 18:12 ` Han-Wen Nienhuys
2002-08-05 18:45 ` Rob Browning
2002-08-05 18:31 ` Rob Browning
2002-08-05 18:33 ` rm
2002-08-05 15:12 ` Marius Vollmer
2002-07-31 10:11 ` Marius Vollmer
2002-07-31 10:30 ` rm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020801101015.GD7425@www \
--to=rm@fabula.de \
--cc=guile-devel@gnu.org \
--cc=marius.vollmer@uni-dortmund.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).