unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Server-side scripting
@ 2003-08-31 21:14 Marius Vollmer
  2003-08-31 21:44 ` closing string output ports? Nic
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Vollmer @ 2003-08-31 21:14 UTC (permalink / raw)


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

Maybe someone is interested in this.


[-- Attachment #2: Type: message/rfc822, Size: 3016 bytes --]

From: Dashamir Hoxha <dashohoxha@yahoo.com>
To: mvo@zagadka.de
Subject: Server-side scripting
Date: Wed, 27 Aug 2003 10:56:25 -0400
Message-ID: <E19s1ij-0006WF-LQ@subversions.gnu.org>

Hi,

I have seen in the homepage of Guile some ides that you
have about adding server-side scripting suport to Guile,
something like PHP.

I have developed a web application framework, called
phpWebApp, that uses PHP as its implementation language
and its scripting language. You can see it at:
http://phpwebapp.sourceforge.net/
(I have also applied for hosting it on savannah as well)

I think that phpWebApp can be implemented in other languages
as well, besides PHP, like Python, Perl, Ruby, etc.
Maybe it can be implemented in Guile as well. If you know
somebody who knows Guile well and has experience with
web applications, you can suggest him to have a look at
phpWebApp as well. In case that somebody will be interested
in rewriting phpWebApp in Guile, I would be willing to
discuss it with him and to help him.

Regards,
Dashamir Hoxha


_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




[-- Attachment #3: Type: text/plain, Size: 73 bytes --]



-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

[-- Attachment #4: Type: text/plain, Size: 139 bytes --]

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

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

* closing string output ports?
  2003-08-31 21:14 Server-side scripting Marius Vollmer
@ 2003-08-31 21:44 ` Nic
  2003-09-05 23:09   ` Kevin Ryde
  0 siblings, 1 reply; 9+ messages in thread
From: Nic @ 2003-08-31 21:44 UTC (permalink / raw)


Using 1.6.4 I've been implementing a soft port that simply wraps a
closured port adding chunked transport encoding (an HTTP feature) to
the stream.

I presumed that my close-port proc would have to call close-port on
the real port. But when I test that with a string port I get a
segementation fault:


(call-with-output-string
   (lambda (prt)
     (display "pah!" prt)
     (close-port prt)))

Should my soft port close-port impl call close-port on the underlying
port?

Is there a bug in guile 1.6.4?

If that's not right: what should I do instead?


-- 
Nic Ferrier
http://www.tapsellferrier.co.uk



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


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

* Re: closing string output ports?
  2003-08-31 21:44 ` closing string output ports? Nic
@ 2003-09-05 23:09   ` Kevin Ryde
  2003-09-07 19:14     ` Nic Ferrier
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kevin Ryde @ 2003-09-05 23:09 UTC (permalink / raw)


Nic <nferrier@tapsellferrier.co.uk> writes:
>
> (call-with-output-string
>    (lambda (prt)
>      (display "pah!" prt)
>      (close-port prt)))

Looks like a gremlin in call-with-output-string, it doesn't seem to
guard against its port having been closed.

Dunno what it ought to do in that case, maybe throw an error, maybe
return #f or unspecified.

> Should my soft port close-port impl call close-port on the underlying
> port?

It looks like one isn't meant to close a string port before getting
the result.  The manual doesn't seem to say anything about that
though.


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


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

* Re: closing string output ports?
  2003-09-05 23:09   ` Kevin Ryde
@ 2003-09-07 19:14     ` Nic Ferrier
  2003-09-07 19:16     ` Nic Ferrier
  2003-10-07 14:53     ` Marius Vollmer
  2 siblings, 0 replies; 9+ messages in thread
From: Nic Ferrier @ 2003-09-07 19:14 UTC (permalink / raw)
  Cc: guile-user




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


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

* Re: closing string output ports?
  2003-09-05 23:09   ` Kevin Ryde
  2003-09-07 19:14     ` Nic Ferrier
@ 2003-09-07 19:16     ` Nic Ferrier
  2003-10-07 14:53     ` Marius Vollmer
  2 siblings, 0 replies; 9+ messages in thread
From: Nic Ferrier @ 2003-09-07 19:16 UTC (permalink / raw)
  Cc: guile-user

Kevin Ryde <user42@zip.com.au> writes:

> > Should my soft port close-port impl call close-port on the underlying 
> > port? 
>  
> It looks like one isn't meant to close a string port before getting 
> the result.  The manual doesn't seem to say anything about that 
> though. 

Hmm... how does the port utilization code know that the port it has
been passed is a string port?

Is this a bug with string ports? are virtual ports _supposed_ to
close their underlying streams?



Nic



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


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

* Re: closing string output ports?
  2003-09-05 23:09   ` Kevin Ryde
  2003-09-07 19:14     ` Nic Ferrier
  2003-09-07 19:16     ` Nic Ferrier
@ 2003-10-07 14:53     ` Marius Vollmer
  2003-10-07 19:54       ` Nic Ferrier
  2003-10-08 21:19       ` Kevin Ryde
  2 siblings, 2 replies; 9+ messages in thread
From: Marius Vollmer @ 2003-10-07 14:53 UTC (permalink / raw)
  Cc: guile-user, Nic

Kevin Ryde <user42@zip.com.au> writes:

> It looks like one isn't meant to close a string port before getting
> the result.  The manual doesn't seem to say anything about that
> though.

I think it would be useful to be able to get the output string even
after the port has been closed.  No?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


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

* Re: closing string output ports?
  2003-10-07 14:53     ` Marius Vollmer
@ 2003-10-07 19:54       ` Nic Ferrier
  2003-10-08 13:30         ` Marius Vollmer
  2003-10-08 21:19       ` Kevin Ryde
  1 sibling, 1 reply; 9+ messages in thread
From: Nic Ferrier @ 2003-10-07 19:54 UTC (permalink / raw)
  Cc: guile-user, Kevin Ryde

Marius Vollmer <mvo@zagadka.de> writes:

> Kevin Ryde <user42@zip.com.au> writes:
> 
> > It looks like one isn't meant to close a string port before getting
> > the result.  The manual doesn't seem to say anything about that
> > though.
> 
> I think it would be useful to be able to get the output string even
> after the port has been closed.  No?


I don't really care about any of that, I just want to know what the
correct procedure should be for a virtual port. Should the virtual
port (close) the underlying port?

This is not documented.

Right now, if the underlying port is closed by the virtual port I get
an exception. 

This seems wrong, it seems like virtual ports should close the
underlying ports... but what do I know?


Nic



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


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

* Re: closing string output ports?
  2003-10-07 19:54       ` Nic Ferrier
@ 2003-10-08 13:30         ` Marius Vollmer
  0 siblings, 0 replies; 9+ messages in thread
From: Marius Vollmer @ 2003-10-08 13:30 UTC (permalink / raw)
  Cc: guile-user

Nic Ferrier <nferrier@tapsellferrier.co.uk> writes:

> I don't really care about any of that, I just want to know what the
> correct procedure should be for a virtual port. Should the virtual
> port (close) the underlying port?

There is no simple answer.  Guile itself does not dictate a specific
behavior.  I'd say a good rule would be that the virtual port should
close its underlying port when it has openend it itself.  That is,
when the function that creates a new instance of your virtual port
type opens an underlying port specifically for this new instance, then
the close function of the virtual port should close the underlying
port.

> Right now, if the underlying port is closed by the virtual port I get
> an exception. 
>
> This seems wrong, it seems like virtual ports should close the
> underlying ports... but what do I know?

What kind of exception is that?  (I guess the one about a cloed
stringport, right?)  Can you show a complete example?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


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

* Re: closing string output ports?
  2003-10-07 14:53     ` Marius Vollmer
  2003-10-07 19:54       ` Nic Ferrier
@ 2003-10-08 21:19       ` Kevin Ryde
  1 sibling, 0 replies; 9+ messages in thread
From: Kevin Ryde @ 2003-10-08 21:19 UTC (permalink / raw)


Marius Vollmer <mvo@zagadka.de> writes:
>
> I think it would be useful to be able to get the output string even
> after the port has been closed.  No?

Yep.


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


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

end of thread, other threads:[~2003-10-08 21:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-31 21:14 Server-side scripting Marius Vollmer
2003-08-31 21:44 ` closing string output ports? Nic
2003-09-05 23:09   ` Kevin Ryde
2003-09-07 19:14     ` Nic Ferrier
2003-09-07 19:16     ` Nic Ferrier
2003-10-07 14:53     ` Marius Vollmer
2003-10-07 19:54       ` Nic Ferrier
2003-10-08 13:30         ` Marius Vollmer
2003-10-08 21:19       ` Kevin Ryde

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