Is it normal that this:
(or (values 'a 'b) 'c)
returns two values ('a and 'b) while this:
(or (values 'a (lambda (port) #f)) 'c)
returns only one ('a)?
Isn't it a bug?
Hi Mike!
Mike Gran skribis:
> Over the USA holiday I started looking at the last C version of
> Zile, which has its own toy Lisp interpreter. (Zile also
> comes in a new Lua version!) I looks like it would be simple to
> strip out that Zile Lisp and replace it with Guile Scheme.
> But I don't
Hi Andrew,
Andrew Horton skribis:
> Recently I needed to be able to recognize multiple use of an option
> when using getopt-long.
This would be an incompatible change, so I’d rather not do it.
However, I’d recommend using SRFI-37: it supports multiple occurrences
of an option, and has a nicer
Hi!
Mike Gran skribis:
> I'm pretty sure that, for 2.0.x at least, if you don't
> specify an encoding, it presumes iso-8859-1 as the default.
No, UTF-8 is the default (info "(guile) Compilation").
Thanks,
Ludo’.
Hi Cédric,
ri...@happyleptic.org skribis:
> Is it normal that this:
>
> (or (values 'a 'b) 'c)
>
> returns two values ('a and 'b)
This one gets optimized by peval:
scheme@(guile-user)> ,optimize (or (values 1 2) 'b)
$6 = (values 1 2)
That the second value isn’t truncated is a bug (see belo
() Andrew Horton
() Thu, 01 Dec 2011 11:40:40 +
recognize multiple use of an option when using getopt-long.
Guile 1.4.x extended (ice-9 getopt-long) to handle multiple occurances.
Here is an excerpt from (info "(guile) getopt-long Reference"):
`(merge-multiple? BOOL)'
If BOOL i
That would do the trick. I've also thought that a (help "...") for
each option would also be useful, which could append the string for
each arg to the "--help" option text automatically (somehow).
On 5 December 2011 18:35, Thien-Thi Nguyen wrote:
> () Andrew Horton
> () Thu, 01 Dec 2011 11:40:40
On Mon 05 Dec 2011 18:14, l...@gnu.org (Ludovic Courtès) writes:
> However, I’d recommend using SRFI-37: it supports multiple occurrences
> of an option, and has a nicer interface IMO.
I like it too, but I use both, and if we can make getopt-long more
useful, there doesn't seem to be any harm in
On Mon 05 Dec 2011 19:35, Thien-Thi Nguyen writes:
> Guile 1.4.x extended (ice-9 getopt-long) to handle multiple occurances.
> Here is an excerpt from (info "(guile) getopt-long Reference"):
>
> `(merge-multiple? BOOL)'
> If BOOL is `#t' and the `value' property is not `#f', all
>
On Mon 05 Dec 2011 18:40, l...@gnu.org (Ludovic Courtès) writes:
> scheme@(guile-user)> ,optimize (or (values 1 2) 'b)
> $6 = (values 1 2)
>
> That the second value isn’t truncated is a bug (see below.)
Indeed.
>(let* ((vars (map (compose truncate lookup-var) gensyms))
> ...)
>
On Mon 05 Dec 2011 21:57, Andy Wingo writes:
>>(let* ((vars (map (compose truncate lookup-var) gensyms))
>> ...)
>> ...)
>
> Better to truncate when adding variables to all expand-time
> environments, I would think, in the form of `(cut make-primcall #f
> 'values <>)'.
Rather,
Hi,
Andy Wingo skribis:
> On Mon 05 Dec 2011 19:35, Thien-Thi Nguyen writes:
>
>> Guile 1.4.x extended (ice-9 getopt-long) to handle multiple occurances.
>> Here is an excerpt from (info "(guile) getopt-long Reference"):
>>
>> `(merge-multiple? BOOL)'
>> If BOOL is `#t' and the `value
Thank you to both of you for the explanations and for looking
for a solution so quickly.
Anyway, I changed my code to not use this evil multiple value feature and I
think I will keep away from this. Returning a list seams so much natural.
Do you need me actualy fill a bugreport?
13 matches
Mail list logo