bug#17296: Uh, wrong?

2014-06-03 Thread David Kastrup
I see that a patch has been committed. It is conflicting with another patch of mine and it does not follow from the srfi-1 specification. To wit: http://srfi.schemers.org/srfi-1/srfi-1.html#ImproperLists> Most procedures are defined only on proper lists -- that is, finite, nil-terminat

bug#17657: pretty-print #:width values above 49 don't work?

2014-06-03 Thread Mark Polesky
Mark H Weaver wrote: > A couple of years ago I added an undocumented > #:max-expr-width keyword argument to pretty-print, in > order to improve the formatting of psyntax-pp.scm. You > could use that. Nice, but why leave it undocumented? That's useful! Anyway, I can't use it yet: my project stil

bug#17485: [PATCH 2/3] Rewrite take-right, drop-right, drop-right!

2014-06-03 Thread David Kastrup
* module/srfi/srfi-1.scm (take-right, drop-right, drop-right!): The definitions tended to be overly complicate and/or rely on pushing material on the VM stack, detrimental to scalability for Guile 2.0 and also worse for performance. The changed definitions lead to different, more accurate

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-03 Thread David Kastrup
* libguile/srfi-1.c (scm_srfi1_length_plus): Previously, length+ returned #f for dotted lists. This leaves the user with no efficient means for determining the length of dotted lists. While the Scheme standard does not prescribe a behavior here, the reference implementation at http://sr

bug#17485: [PATCH 3/3] Reimplement reduce-right in srfi-1

2014-06-03 Thread David Kastrup
* module/srfi/srfi-1.scm (reduce-right): Avoid use of drop-right in connection with last as a single upfront reverse is more efficient and simpler to understand. Signed-off-by: David Kastrup --- module/srfi/srfi-1.scm | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mo

bug#17418: #:select gives access to private variables

2014-06-03 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> Perhaps we should consider making #:select issue a warning when it >> imports private bindings, > > Yes, sounds like a good idea. Sounds good. Specifically, I guess we should deprecate this way of using #:select. If you do th

bug#17418: #:select gives access to private variables

2014-06-03 Thread Mark H Weaver
Mark H Weaver writes: > Sounds good. Specifically, I guess we should deprecate this way of > using #:select. > > If you do this, can you adjust system/repl/coop-server.scm to avoid it? > It imports the following private bindings: > > start-repl* run-server* add-open-socket! close-socket! Also:

bug#17296: Uh, wrong?

2014-06-03 Thread Mark H Weaver
David Kastrup writes: > So the behavior for length+ on a dotted list is strictly unspecified. > It is not even stated "it is an error". Actually, it is. At the end of the section that defines the "types" such a "clist" and "flist", it states: It is an error to pass a circular or dotted list t

bug#17485: [PATCH 2/3] Rewrite take-right, drop-right, drop-right!

2014-06-03 Thread Mark H Weaver
I like this patch, but I think your extended 'length+' procedure should be given a different name. Mark

bug#17485: [PATCH 3/3] Reimplement reduce-right in srfi-1

2014-06-03 Thread Mark H Weaver
David Kastrup writes: > * module/srfi/srfi-1.scm (reduce-right): Avoid use of drop-right in > connection with last as a single upfront reverse is more efficient and > simpler to understand. > > Signed-off-by: David Kastrup > --- > module/srfi/srfi-1.scm | 5 + > 1 file changed, 1 insert

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-03 Thread Mark H Weaver
Hi David, David Kastrup writes: > * libguile/srfi-1.c (scm_srfi1_length_plus): Previously, length+ > returned #f for dotted lists. This leaves the user with no efficient > means for determining the length of dotted lists. While the Scheme > standard does not prescribe a behavior here, th

bug#17485: [PATCH 2/3] Rewrite take-right, drop-right, drop-right!

2014-06-03 Thread Mark H Weaver
David Kastrup writes: > * module/srfi/srfi-1.scm (take-right, drop-right, drop-right!): The > definitions tended to be overly complicate and/or rely on pushing > material on the VM stack, detrimental to scalability for Guile 2.0 and > also worse for performance. > > The changed definition

bug#17296: Uh, wrong?

2014-06-03 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: >> So the behavior for length+ on a dotted list is strictly unspecified. >> It is not even stated "it is an error". > > Actually, it is. At the end of the section that defines the "types" > such a "clist" and "flist", it states: > > It is an error

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-03 Thread David Kastrup
Mark H Weaver writes: > Hi David, > > David Kastrup writes: > >> * libguile/srfi-1.c (scm_srfi1_length_plus): Previously, length+ >> returned #f for dotted lists. This leaves the user with no efficient >> means for determining the length of dotted lists. While the Scheme >> standard does