unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* guile as extension language
@ 2002-04-06 23:33 Matthew R Wette
  2002-04-08 19:11 ` bug with call-with/cc and lambda? Alejandro Forero Cuervo
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew R Wette @ 2002-04-06 23:33 UTC (permalink / raw)



How is Guile intended to be used as an extension language?

Some extension languages like Perl can be fed commands from the main
application.  I believe the Apache Perl module works this way.

Other extension languages can not be run this way and need to execute
in a separate process, typically communicating via a socket
connection.  I believe the Apache Java servlet modules work this way.

I just read through the Guile 1.5.6 code and it seems that Guile
cannot be fed commands from a parent application like the first case
above.  If you want to use Guile as an *extension* language you need
to run it in a separate process and talk via sockets.  For example, if
I wanted to generate a Guile Apache module it seems I would need to do
it this way.  Is this correct?  

Matt



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug with call-with/cc and lambda?
  2002-04-06 23:33 guile as extension language Matthew R Wette
@ 2002-04-08 19:11 ` Alejandro Forero Cuervo
  2002-04-23 23:57   ` Thien-Thi Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Forero Cuervo @ 2002-04-08 19:11 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]


Hey.

I've  been playing  with a  few Scheme  interpreters and  I noticed  the
following issue in Guile.

When I do

    (define (f x) (call-with-current-continuation f))
    (call-with-current-continuation f)

I get the  expexted behaviour: Guile just hangs (starts to  use a lot of
processor power).

However, when I do the  following very similar construction, Guile hangs
but also  starts to  consume a lot  of memory, giving  me the  idea that
something that could be tail-recursive somewhere isn't:

    (define (f x) (call-with-current-continuation (lambda (x) (f x))))
    (call-with-current-continuation f)

Shouldn't this use constant memory?

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?

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug with call-with/cc and lambda?
  2002-04-08 19:11 ` bug with call-with/cc and lambda? Alejandro Forero Cuervo
@ 2002-04-23 23:57   ` Thien-Thi Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Thien-Thi Nguyen @ 2002-04-23 23:57 UTC (permalink / raw)
  Cc: guile-user

   From: Alejandro Forero Cuervo <bachue@bachue.com>
   Date: Mon, 8 Apr 2002 14:11:16 -0500

   However, when I do the following very similar construction, Guile
   hangs but also starts to consume a lot of memory, giving me the idea
   that something that could be tail-recursive somewhere isn't:

       (define (f x) (call-with-current-continuation (lambda (x) (f x))))
       (call-with-current-continuation f)

   Shouldn't this use constant memory?

does it in other scheme implementations?

thi

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-23 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-06 23:33 guile as extension language Matthew R Wette
2002-04-08 19:11 ` bug with call-with/cc and lambda? Alejandro Forero Cuervo
2002-04-23 23:57   ` Thien-Thi Nguyen

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).