Re: Unbound variable: quote

2010-09-24 Thread Andy Wingo
On Thu 23 Sep 2010 18:19, Joel James Adamson  writes:

> Why would `quote' be redefined?  What's going on here and how can I fix it?

Perhaps the module that you are calling use-modules in has no binding
for `quote'.

This problem is fixed in 1.9, FWIW.

Andy
-- 
http://wingolog.org/



Re: Unbound variable: quote

2010-09-24 Thread Joel James Adamson
Andy Wingo  writes:

> On Thu 23 Sep 2010 18:19, Joel James Adamson  writes:
>
>> Why would `quote' be redefined?  What's going on here and how can I fix it?
>
> Perhaps the module that you are calling use-modules in has no binding
> for `quote'.

Is there anything I can do about that?  Would I have to redefine quote
in my top-level script?

> This problem is fixed in 1.9, FWIW.

Thanks for letting me know: unfortunately despite its reputation Fedora
is not quite "bleeding edge" enough for me ;)

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj


pgpwgLqUCL7Vc.pgp
Description: PGP signature


Re: pipe buffering

2010-09-24 Thread Neil Jerram
Aidan Gauland  writes:

> Maybe it would be better to post my original program that would just
> hang.  I was only using expect to print debugging messages; my
> original program used expect-strings.
>
> --Aidan
>
> #! /usr/bin/guile -s
> !#
>
> (use-modules (ice-9 expect))
> (use-modules (ice-9 popen))
>
> (define ie-io (open-pipe* OPEN_BOTH
>   "/usr/bin/telnet"
>   "ienabler.canterbury.ac.nz" "259"))
> (let ((expect-port ie-io))
>   (expect-strings
>("^User:" (begin (display "[snip]\n" ie-io) (display "gave user")))
>("^passwd:" (begin (display "[snip]\n" ie-io) (display "gave passwd")

Ah, thanks.

I'm afraid I think you're stuck.  The problem sounds like this one:
http://stackoverflow.com/questions/1000674/turn-off-buffering-in-pipe.
In which case, the only fix is to set up the "pipe" as a pseudo-terminal
instead, and I don't believe Guile can do that.

If you wanted to work on a patch, a possible starting point would be to
look at how Emacs implements

  (let ((process-connection-type t))
(open-network-stream ...))

Regards,
Neil