[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Benchmarks of guile-www against HB's Guile module.
From: |
Alejandro Forero Cuervo |
Subject: |
Re: Benchmarks of guile-www against HB's Guile module. |
Date: |
Wed, 13 Feb 2002 20:55:41 -0500 |
User-agent: |
Mutt/1.2.5i |
Hey.
my comment was directed at variable names only. the thinking is that
"globals are bad" (or at least mostly undesirable for their property of
changing local behavior from a distance), so it's good to make them
visually distinct as a warning. lispish programs conventionally use
*VAR*.
Ahh! :)
Thank you for the clarification.
I agree that globals are bad and in this particular situation I would
rather not register the *hb-file* object and make it visible to the
Guile programmer. I'm still looking for a way to associate a pointer
with a procedure and have it passed automatically by Guile.
if this appeals to you, you might consider restructuring the (guile)
interface so that programmers can write something like:
(use-module (hb registrar) (ice-9 common-list))
(define (my-proc-1 whatever args) ...)
(define (my-proc-2 whatever args) ...)
...
(hb-register-procs my-proc-1 my-proc-2)
Hmm.
It shouldn't be overly complicated to create this sort of functionality.
One only needs to add an interface to HB so it can be controled from
within Guile. :)
Perhaps something like:
(use-module (hb server))
; The following register the site's pages:
(hb-register main proc0)
(hb-register foo proc1)
(hb-register bar proc2)
; The following makes the server wait for requests and execute
; them until the process receives SIGTERM.
(hb-exec)
; Now you add clean-up functions.
When hb-exec is called, HB's control loop is executed. Some parameters
might be accepted here (such as, for instance, a proc that is evaluated
once after every request to decide whether the loop must go on or stop).
Or perhaps the primitives for HB's control loop can be made available to
Guile so one can implement the control loop based on primitives such as
(hb-wait-for-request timeout) or (hb-exec-request req).
I'm not sure all this would be worth it. At the very least, it is an
interesting idea to make HB entirely controlable from within Guile code.
making configuration thus evaluative (as opposed to declarative) can
be a pain to support, but has benefits for the programmer (in this
example, they can use whatever (ice-9 common-list) provides, in
their procs).
I don't know what ice-9 common-list provides. Why can't they use that
from within HB's Guile module as it currently stands?
Thanks. :)
Alejo.
http://bachue.com/alejo
--
The mere formulation of a problem is far more essential than its solution.
-- Albert Einstein.
$0='!/sfldbi!yjoV0msfQ!sfiupob!utvK'x44;print map{("\e[7m \e[0m",chr ord
(chop$0)-1)[$_].("\n")[++$i%77]}split//,unpack'B*',pack'H*',($F='F'x19).
"F0F3E0607879CC1E0F0F339F3FF399C666733333CCF87F99E6133999999E67CFFCCF3".
"219CC1CCC033E7E660198CCE4E66798303873CCE60F3387$F"#Don't you love Perl?
pgp0_xsBXZkNq.pgp
Description: PGP signature
- Benchmarks of guile-www against HB's Guile module., Alejandro Forero Cuervo, 2002/02/11
- Re: Benchmarks of guile-www against HB's Guile module., Neil Jerram, 2002/02/12
- Re: Benchmarks of guile-www against HB's Guile module., Alejandro Forero Cuervo, 2002/02/13
- Re: Benchmarks of guile-www against HB's Guile module., Neil Jerram, 2002/02/13
- Re: Benchmarks of guile-www against HB's Guile module., Alejandro Forero Cuervo, 2002/02/13
- Re: Benchmarks of guile-www against HB's Guile module., Neil Jerram, 2002/02/15