Re: when and unless

2011-12-06 Thread Chris K. Jester-Young
On Tue, Dec 06, 2011 at 11:08:08PM +0100, David Kastrup wrote: > > Have you considered using `(values)' as your way of saying, "I'm not > > returning any values"? > > Testing for that is not all that much fun. It is also rather useless > since pretty much all of the call-for-effect functions of G

Re: when and unless

2011-12-06 Thread David Kastrup
Andy Wingo writes: > which is strictly unspecified, as it is returning an unexpected number > of values to a continuation. > > Guile 1.8: > > guile> (eqv? (values) (values)) > #f > > Guile 2.0: > > scheme@(guile-user)> (eqv? (values) (values)) > ERROR: In procedure values: > E

Re: Anything better for delayed lexical evaluation than (lambda () ...)?

2011-12-06 Thread Marco Maggi
David Kastrup wrote: > Hi, if I have something read that is evaluated later, the > lack of procedure-environment in Guilev2 implies that I > have to wrap the stuff in (lambda () ...) in order to > capture the lexical environment for evaluation. Sorry to step in without an answer. What a

SRFI 41 for Guile

2011-12-06 Thread Chris K. Jester-Young
Hi all, Just writing to say that after many months of being busy with other stuff, I finally got around to finishing my Guile port of SRFI 41: https://github.com/cky/guile2-modules Basically, both the code and the tests are based on the reference implementation, albeit with somewhat significant

Re: when and unless

2011-12-06 Thread Andy Wingo
On Tue 06 Dec 2011 20:05, "Chris K. Jester-Young" writes: > On Tue, Dec 06, 2011 at 08:48:01AM +0100, Marijn wrote: >> Couldn't help but wonder why they don't return the value of the last >> body form, so I looked around a bit and both CLHS[1] and my racket >> REPL seem to agree that they should:

Re: Change to write-request-line

2011-12-06 Thread Andy Wingo
On Thu 29 Sep 2011 21:45, Ian Price writes: > Two patches for the web stuff in guile. The first removes the second > definition of 'write-uri' from module/web/http.scm. No point having two > of them after all :-). Probably better to remove the first one. The second one allocates less, catches s

Re: when and unless

2011-12-06 Thread Chris K. Jester-Young
On Tue, Dec 06, 2011 at 08:48:01AM +0100, Marijn wrote: > Couldn't help but wonder why they don't return the value of the last > body form, so I looked around a bit and both CLHS[1] and my racket > REPL seem to agree that they should: [...] > Is there some other source that suggests that the return

Re: when and unless

2011-12-06 Thread Andy Wingo
On Tue 06 Dec 2011 17:42, David Kastrup writes: > Andy Wingo writes: > >> On Tue 06 Dec 2011 12:17, David Kastrup writes: >> >>> I've actually wondered if it would not make sense to return >>> *unspecified* in the case of the plain else-less if even if the >>> condition is true, namely when you

Re: when and unless

2011-12-06 Thread David Kastrup
Andy Wingo writes: > On Tue 06 Dec 2011 12:17, David Kastrup writes: > >> I've actually wondered if it would not make sense to return >> *unspecified* in the case of the plain else-less if even if the >> condition is true, namely when you write (if #t #t). > > I have wondered this too. > >> Ther

Re: when and unless

2011-12-06 Thread Andy Wingo
On Tue 06 Dec 2011 12:17, David Kastrup writes: > I've actually wondered if it would not make sense to return > *unspecified* in the case of the plain else-less if even if the > condition is true, namely when you write (if #t #t). I have wondered this too. > There is probably code relying on th

Re: (define-module (foo) #:import (...)), a la r6rs

2011-12-06 Thread Andy Wingo
Hello :) On Thu 10 Nov 2011 00:50, l...@gnu.org (Ludovic Courtès) writes: > Andy Wingo skribis: > >> On Thu 28 Jul 2011 23:23, l...@gnu.org (Ludovic Courtès) writes: >> >>> Andy Wingo skribis: >>> (define-module (foo) #:import ((bar) (only (baz) qux foo)

Re: new module: (web client)

2011-12-06 Thread Andy Wingo
On Tue 19 Jul 2011 09:51, Peter Brett writes: > l...@gnu.org (Ludovic Courtès) writes: > >> What if URI is file://foo? > > Per RFC 1630 & RFC 1738, a file URL takes the form: > > file://host/path > > For local files, the HOST part is elided: > > file:///path > > So IMHO the posted code isn't

Re: guildhall update complain connection timeout

2011-12-06 Thread Andy Wingo
Hello Nala :) On Tue 16 Aug 2011 10:16, Andy Wingo writes: > On Tue 16 Aug 2011 06:15, Nala Ginrut writes: > >> well, I think the network module of Guile uses iso-8859-1 to handle data >> for some reasons. And my problem is Ubuntu chinese version doesn't have >> iso-8859-1 installed. And I add

Re: language environments

2011-12-06 Thread Andy Wingo
BT! Clearly I am a terrible person. Or perhaps I am very close to the event horizon of a black hole. In any case, sorry for the late reply. On Tue 12 Jul 2011 04:53, BT Templeton writes: > Andy Wingo writes: > >> On Sat 09 Jul 2011 22:30, BT Templeton writes: >> >>> How are language environ

Re: new module: (web client)

2011-12-06 Thread Andy Wingo
On Mon 18 Jul 2011 14:59, l...@gnu.org (Ludovic Courtès) writes: > Andy Wingo skribis: > >> (define (open-socket-for-uri uri) >> (let* ((ai (car (getaddrinfo (uri-host uri) > > What if URI is file://foo? It will look up the addrinfo for the "file" service of "foo". scheme@(guile-user)> (g

Re: Kanren and guile-log

2011-12-06 Thread Andy Wingo
On Fri 12 Aug 2011 19:56, Stefan Israelsson Tampe writes: > I have read the source code for kanren and want to put the system in > relation to the work I have been doing which I will > call guile-log. Thanks, this was an interesting read. Andy -- http://wingolog.org/

Re: [PATCH] Add "scandir" procedure

2011-12-06 Thread Andy Wingo
On Tue 30 Aug 2011 18:06, l...@gnu.org (Ludovic Courtès) writes: > I was actually planning to push ‘file-system-fold’, a functional > alternative to ‘ftw’, which would be along the lines of this (from > ): > > (define (file

Re: lighter prompts?

2011-12-06 Thread Andy Wingo
Hi Stefan, On Mon 18 Jul 2011 23:08, Stefan Israelsson Tampe writes: > I noted that prompts in guile-2.0 is quite heavy e.g. using vanilla > setjmp facilities. Indeed. > So if I'm not miss-taken a prompt will save several machine > registers. Is this really needed? It is needed if you are ju

Re: Anything better for delayed lexical evaluation than (lambda () ...)?

2011-12-06 Thread David Kastrup
Thien-Thi Nguyen writes: > () David Kastrup > () Sat, 03 Dec 2011 16:45:06 +0100 > >The lack of procedure-environment in Guilev2 implies that I >have to wrap the stuff in (lambda () ...) in order to capture >the lexical environment for evaluation. > >Is it possible to have a shor

Re: Anything better for delayed lexical evaluation than (lambda () ...)?

2011-12-06 Thread Thien-Thi Nguyen
() David Kastrup () Sat, 03 Dec 2011 16:45:06 +0100 The lack of procedure-environment in Guilev2 implies that I have to wrap the stuff in (lambda () ...) in order to capture the lexical environment for evaluation. Is it possible to have a shortcut (make-closure ...) or so for that

Re: when and unless

2011-12-06 Thread Ludovic Courtès
Hi, Andy Wingo skribis: > On Thu 30 Jun 2011 12:44, Andy Wingo writes: > >> I think we should add `when' and `unless' to the default environment. >> >> They go like this: >> >> (define-syntax when >> (syntax-rules () >> ((_ test then then* ...) >>(if test (begin then then* .

Re: when and unless

2011-12-06 Thread David Kastrup
Alex Shinn writes: > On Tue, Dec 6, 2011 at 4:48 PM, Marijn wrote: >> >> Couldn't help but wonder why they don't return the value of the last >> body form, so I looked around a bit and both CLHS[1] and my racket >> REPL seem to agree that they should: >> >> $ racket >> Welcome to Racket v5.2.0.4

Re: Update and Questions

2011-12-06 Thread David Kastrup
Noah Lavine writes: > And finally, a fun thing. The current best Scheme compiler (that I > know of) is called Stalin. Therefore, I suggest that our compiler be > called "Stallman", after our fearless leader (whose name also starts > with "s"). :-) I think that -pedantic should stay optional. --

Re: when and unless

2011-12-06 Thread Alex Shinn
On Tue, Dec 6, 2011 at 4:48 PM, Marijn wrote: > > Couldn't help but wonder why they don't return the value of the last > body form, so I looked around a bit and both CLHS[1] and my racket > REPL seem to agree that they should: > > $ racket > Welcome to Racket v5.2.0.4. >> (when #t 'hello) > 'hello