guile-devel
[Top][All Lists]
Advanced

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

Re: scm_* API extension? [was] scm_* API question


From: rm
Subject: Re: scm_* API extension? [was] scm_* API question
Date: Thu, 1 Aug 2002 11:41:21 +0200
User-agent: Mutt/1.3.24i

On Wed, Jul 31, 2002 at 03:06:02PM -0500, Christopher Cramer wrote:
> I have no idea why you think it would better, but with certain types of
> applications, it's impossible.
> 
> For sake of argument, let's say there are two different ways to use Guile.
> One way is to extend Guile through C, by using load-extension. This works
> fine if the C code is ignorant of the module system (writing a wrapper
> module in Scheme handles everything). The other way is to extend C through
> Guile, which cannot stay module system ignorant, because you typically
> want to load multiple Scheme scripts without worrying about clashing
> symbols from the different scripts -- this is currently impossible
> without getting deep into the details of the module system.

Yes, this is exactly the situation i just encountered. I know that
everyone and their grandmother tells me to write everything in the
scripting language but i just don't feel like rewriting Apache in guile --
besides: that might p**s of a lot of perl hackers ;-)

As a user of _embedded_ guile there a a few specific things i'd expect
from my ideal scripting language:

 - clear encapsulation of namespaces and scope (something i missed in
   TCL for example) - for this is currently use guile's module system,
   but i need to have access to the module mechanics from my C side.

 - save execution/evaluation of script code. I need to ensure that i
   can reliably dissable certain things: a user script should not be
   allowed to call (exit 0) and bring down the whole webserver ;-)
 
 - An (opaque) representation of an 'interpreter'. One thing i found 
   rather elegant in TCL (perl to, if i recall correctly) was the
   possiblility to run several interpreters in parallel. Guile seems
   to completly lack this (i think i understand why, but i still miss
   it).

 - Thread support. I'm personally not a big friend of threaded apps,
   but it seems that more and more code assumes thread awareness. 
   For example i'd love to port mod_guile to Apache2, but unfortunately
   Apache2 _can_ be configured at runtime to work in multithread mode
   (or even a mixture of prefork and multithread). For my personal use
   i don't care since i can just _not_ enable multithreaded operation
   but a mod_guile that doesn't work in certain operation modes will
   just not make it into any distribution.
   

> I can provide examples of what I had to do with Recluse; roughly 300 lines
> of C code are devoted to dealing with the module system.

(define Ralf idiot)

I should've just looked at your code instead of bugging the list ;-)

  Ralf




reply via email to

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