Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?

2010-09-01 Thread Keith Wright
> From: Andy Wingo > > It's ugly, but a quick solution: Actually, I would not even take it as a solution at all. The quesion was how to do it in legal Scheme. The problem is not the position of the define, but that no Scheme report has any procedure called |defined?|. Scheme is intended to be

Guile base64

2010-09-01 Thread Romel Sandoval
Hi What happened to base64 library on Guile recent versions? I have see that was on Guile 1.4 (ice-9 base64) [1]. Even the code appears to be available [2]. Also I found an old guile project (codesystem base64) [3] Anybody knows if it's going to be reincorporated into Guile libraries or not? [

How to enter gds debugging mode in Emacs?

2010-09-01 Thread Shenli Zhu
Hi, What's the easiest way to enter Guile(1.9.11) gds debugging mode in Emacs(23.2)? I have tried several ways but all failed: 1. follow Guile document "4.4.8 An Example GDS Session", Emacs didn't pop up a stack buffer, but just print the result 24. 2. set break point by "C-x SPC"(from gds-tutori

Re: A question on a piece of code written using call/cc

2010-09-01 Thread Andy Wingo
Hi Yi, On Tue 31 Aug 2010 21:10, Yi DAI writes: > (let ((n 0)  >       (c (call/cc (lambda (k) k >   (display n) >   (newline) >   (set! n (+ n 1)) >   (c c)) > > What I wanna do is try to print out the sequence of natural numbers > using call/cc. On Guile, it works well. But other implement

Re: guile-1.9.11 install: lt-guile compile freeze

2010-09-01 Thread Andy Wingo
On Wed 01 Sep 2010 01:26, Shenli Zhu writes: > Hi all, I tried to install guile-1.9.11, and it seems freeze, see > below. I wait for 5 mins and it still compiling and compiling. Any > suggestion? Unfortunately, the answer is to wait: this part of compilation takes a long time. We hope to speed i

Re: letrec

2010-09-01 Thread Andy Wingo
On Wed 01 Sep 2010 07:35, "Eric J. Van der Velden" writes: > Can something like this be done with letrec ? Only via something like the Y combinator. http://www.dreamsongs.com/NewFiles/WhyOfY.pdf Andy -- http://wingolog.org/

Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?

2010-09-01 Thread Andy Wingo
Hi, It's ugly, but a quick solution: On Wed 01 Sep 2010 00:12, Cedric Cellier writes: > I'm doing this : > > (if (not defined? 'foo) (define foo bar)) > > without realizing it's not legal scheme. > What would be the idiomatic way to write this ? (define foo (if (defined? 'foo) foo

letrec

2010-09-01 Thread Eric J. Van der Velden
Hello, I understand that let can be made with a lambda, for example (let((r 5)) (display r) ) ((lambda(r) (display r) )5) Can something like this be done with letrec ? Thanks, Eric J.

Re: guile-1.9.11 install: lt-guile compile freeze

2010-09-01 Thread Ludovic Courtès
Hi, Shenli Zhu writes: > I tried to install guile-1.9.11, and it seems freeze, see below. I wait for > 5 mins and it still compiling and compiling. Any suggestion? > > --- make -- > GUILE_AUTO_COMPILE=0\ > ../meta/uninstalled-env\ >

guile-1.9.11 install: lt-guile compile freeze

2010-09-01 Thread Shenli Zhu
Hi all, I tried to install guile-1.9.11, and it seems freeze, see below. I wait for 5 mins and it still compiling and compiling. Any suggestion? --- make -- GUILE_AUTO_COMPILE=0\ ../meta/uninstalled-env\ guile-tools compile -Wunbound-

Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?

2010-09-01 Thread Cedric Cellier
-[ Fri, Aug 27, 2010 at 04:04:25PM +0200, Andreas Rottmann ] > > guile> (use-syntax (ice-9 syncase)) > > guile> (if #t (define foo "bar")) > > ERROR: invalid context for definition of foo > > (...) > > > I think it's establishing stricter rules for `define' placement. Note > that your code is