From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: segfault in SRFI-1 partition on non-list input Date: Wed, 30 Apr 2008 09:28:11 +0200 Message-ID: <87fxt3x0ms.fsf@gnu.org> References: <2bc5f8210804272137he4b80e0v314cefc34eb327d1@mail.gmail.com> <87bq3ul6yd.fsf@gnu.org> <2bc5f8210804280641r1c51a266x52883da55d882a3b@mail.gmail.com> <87od7u0zip.fsf@gnu.org> <2bc5f8210804292040t4d0ad1dfvf3b6346335301ba5@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209540525 23152 80.91.229.12 (30 Apr 2008 07:28:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2008 07:28:45 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 30 09:29:21 2008 connect(): Connection refused Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jr6ke-0001oq-Pl for guile-devel@m.gmane.org; Wed, 30 Apr 2008 09:29:17 +0200 Original-Received: from localhost ([127.0.0.1]:54236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr6jx-0003hA-Vk for guile-devel@m.gmane.org; Wed, 30 Apr 2008 03:28:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jr6jr-0003gZ-RQ for guile-devel@gnu.org; Wed, 30 Apr 2008 03:28:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jr6jr-0003gG-1c for guile-devel@gnu.org; Wed, 30 Apr 2008 03:28:27 -0400 Original-Received: from [199.232.76.173] (port=40810 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr6jq-0003gD-Ou for guile-devel@gnu.org; Wed, 30 Apr 2008 03:28:26 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jr6jq-0006NO-Dl for guile-devel@gnu.org; Wed, 30 Apr 2008 03:28:26 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jr6jo-0001uO-0e for guile-devel@gnu.org; Wed, 30 Apr 2008 03:28:24 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jr6jk-0000UX-1I for guile-devel@gnu.org; Wed, 30 Apr 2008 07:28:20 +0000 Original-Received: from 193.50.110.83 ([193.50.110.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Apr 2008 07:28:20 +0000 Original-Received: from ludo by 193.50.110.83 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Apr 2008 07:28:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.50.110.83 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 =?iso-8859-1?Q?Flor=E9al?= an 216 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:AVAqwWWJ4zqsaftSlaUEnQ5KG9I= X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7197 Archived-At: Hi Julian, "Julian Graham" writes: > Great links -- I had no idea this was such a contentious topic! Actually, R5RS `list?' itself must be used with care since it's O(N). > Actually, though, what Olin Shivers says in the introduction to SRFI-1 > is that specific parts of SRFI-1 should work (and are documented to > work) on dotted and / or circular lists in addition to proper lists. Well, SRFI-1, under "Improper Lists", reads this: Most procedures are defined only on proper lists -- that is, finite, nil-terminated lists. The procedures that will also handle circular or dotted lists are specifically marked. > Coincidentally, I noticed last night that Guile's implementation of > some of these parts is a bit buggy in this regard -- `take', > `take-right', `drop', and `drop-right' don't work on dotted lists. Indeed, the examples of SRFI-1 for `take' and `drop' with dotted lists work fine, but those of `take-right' and `drop-right' don't. Something we should fix. The reason is that these two procedures use `scm_list_tail ()', which is apparently not supposed to work with dotted list. I've just opened a bug: https://savannah.gnu.org/bugs/index.php?23112 . Anyone is welcome to fix it! ;-) Thanks, Ludovic.