From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kjetil S. Matheussen" Newsgroups: gmane.lisp.guile.devel Subject: Re: [CM] funny scheme code (fwd) Date: Mon, 20 Jul 2009 21:09:40 +0200 (CEST) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1248117002 18121 80.91.229.12 (20 Jul 2009 19:10:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jul 2009 19:10:02 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jul 20 21:09:55 2009 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 1MSyFG-00041a-Ay for guile-devel@m.gmane.org; Mon, 20 Jul 2009 21:09:54 +0200 Original-Received: from localhost ([127.0.0.1]:49763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSyFF-0001jO-PE for guile-devel@m.gmane.org; Mon, 20 Jul 2009 15:09:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSyFC-0001jI-QO for guile-devel@gnu.org; Mon, 20 Jul 2009 15:09:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSyF7-0001in-KO for guile-devel@gnu.org; Mon, 20 Jul 2009 15:09:49 -0400 Original-Received: from [199.232.76.173] (port=42818 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSyF7-0001ik-Ce for guile-devel@gnu.org; Mon, 20 Jul 2009 15:09:45 -0400 Original-Received: from mail-forward1.uio.no ([129.240.10.70]:44756) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MSyF6-00061l-Rd for guile-devel@gnu.org; Mon, 20 Jul 2009 15:09:45 -0400 Original-Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.69) (envelope-from ) id 1MSyF2-0000TH-PW for guile-devel@gnu.org; Mon, 20 Jul 2009 21:09:40 +0200 Original-Received: from mail-mx3.uio.no ([129.240.10.44]) by mail-out1.uio.no with esmtp (Exim 4.69) (envelope-from ) id 1MSyF2-0000TE-OS for guile-devel@gnu.org; Mon, 20 Jul 2009 21:09:40 +0200 Original-Received: from ben.ifi.uio.no ([129.240.64.202]) by mail-mx3.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MSyF2-00030I-Ds for guile-devel@gnu.org; Mon, 20 Jul 2009 21:09:40 +0200 X-X-Sender: ksvalast@ben.ifi.uio.no X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: C326F557B8B0E519EDF92F4B47B8C59C4845150C X-UiO-SPAM-Test: remote_host: 129.240.64.202 spam_score: -49 maxlevel 80 minaction 2 bait 0 mail/h: 2 total 12116 max/h 935 blacklist 0 greylist 0 ratelimit 0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:8899 Archived-At: ---------- Forwarded message ---------- Date: Mon, 20 Jul 2009 21:02:38 +0200 (CEST) From: Kjetil S. Matheussen To: Bill Schottstaedt Cc: cmdist@ccrma.Stanford.EDU, guile-devel-request@gnu.org Subject: Re: [CM] funny scheme code On Mon, 20 Jul 2009, Bill Schottstaedt wrote: > For some reason, this code strikes me as funny: > > (let ((j (lambda () 0)) > (k 0)) > (do ((i (j) (j)) > (j (lambda () 1) (lambda () (+ i 1)))) > ((= i 3) k) > (set! k (+ k i)))) > > would you believe 6? Maybe I need a vacation. > A slight modifications makes Guile (the one included with fedora 11) crash: [kjetil@ttleon bin]$ guile guile> (let ((j (lambda () 0)) ... (k 0)) ... (do ((i (j) ... (j)) ... (l (lambda () ... 1) ... (lambda () ... (+ i 1)))) ... ((= i 3) k) ... (set! k (+ k i)))) Segmentation fault [kjetil@ttleon bin]$ [kjetil@ttleon bin]$ [kjetil@ttleon bin]$ guile --version Guile 1.8.6 Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation Guile may be distributed under the terms of the GNU General Public Licence; certain other uses are permitted as well. For details, see the file `COPYING', which is included in the Guile distribution. There is no warranty, to the extent permitted by law. [kjetil@ttleon bin]$ _______________________________________________ Cmdist mailing list Cmdist@ccrma.stanford.edu http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist