From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: Re: shift and reset, plus "while" Date: Wed, 13 Apr 2011 11:47:45 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1302697036 11062 80.91.229.12 (13 Apr 2011 12:17:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2011 12:17:16 +0000 (UTC) Cc: bug-guile@gnu.org, guile-devel To: Wolfgang J Moeller Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Apr 13 14:17:07 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9z0M-00009z-Vf for guile-bugs@m.gmane.org; Wed, 13 Apr 2011 14:17:07 +0200 Original-Received: from localhost ([::1]:60424 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9z0M-0003sw-9A for guile-bugs@m.gmane.org; Wed, 13 Apr 2011 08:17:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9z0D-0003s1-C7 for bug-guile@gnu.org; Wed, 13 Apr 2011 08:17:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9z04-0007oF-Gq for bug-guile@gnu.org; Wed, 13 Apr 2011 08:16:57 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:32961 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9z04-0007o5-F2; Wed, 13 Apr 2011 08:16:48 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 733F841BA; Wed, 13 Apr 2011 08:18:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=LxAeHVoru9e4ZuVSMpkMKCywpSo=; b=Afgmrk q6cujRDYfeNge78O+KmP5HA28vr6QtmG5ky+huwKjj9vO0W9eEx4xjCQyar023eN vERokZIhYEW9BCKF67nTJC6vdzvdhz01D08vtaojJzOe6blEkXaf4sTLKVq03YTA iOa9fUHZ28dA+yv6qbXoB4dfrwdvMUpjPabvg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=kry8V0jcsodr4NT+oEaOoWsx6tWFV1+q 3n8HPqytrkHUiwCnGkHtdER7+lNyhBQxLWh055jGxjX7ppmWE7bVRfDnYaIIieSv 1LjBxcwmOCULaORTFaT289zs8E5UR+xiTy35L8oR9T94oTxqru+L4MzWZpJlGMkZ jkwbGUTNt/U= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 5061341B6; Wed, 13 Apr 2011 08:18:43 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 5740841B0; Wed, 13 Apr 2011 08:18:40 -0400 (EDT) In-Reply-To: (Wolfgang J. Moeller's message of "Mon, 4 Apr 2011 15:05:20 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 2C4FA808-65C8-11E0-9365-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5467 gmane.lisp.guile.devel:12230 Archived-At: Hi Wolfgang, Another in a series of asynchronous replies :) Copying guile-devel for comments on the extensions to `while'. On Mon 04 Apr 2011 15:05, Wolfgang J Moeller writes: > | GNU Guile 2.0.0 > | scheme@(guile-user)> (display (while #f 1)) > | :0:0: In procedure #:1:0 ()>: > | :0:0: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'. This is the same compiler bug as before, which is fixed in stable-2.0. We'll push out a release Real Soon Now (TM). > I'd like to "improve" (while) as currently provided by ice-9/boot.scm > > (a) to always have a well-defined result This is a good idea; it allows `while' to be an expression, not just a statement. > (b) to allow for (break arg ...) Also a good idea. Tricky, though; your comments indicate that you would want (break) to return #t, instead of zero values. > (c) to only take a single (call-with-prompt) Why? It's true that the optimizer doesn't live up to its name yet, but it should be trivial to elide one or the other if the prompt tag is only referenced by the form. > (d) to correct a buglet that currently transforms the non-operator `continue' > into a function of arbitrarily many (as opposed to zero) > arguments. I have not seen this bug. Do you have code that can reproduce it with stable-2.0 ? > Just a hint: (GPLed) CLISP's compiler is written in LISP and in my > experience perfectly succeeds at removing all redundant > branches. Maybe something to look at? No doubt, it would be instructive! Andy -- http://wingolog.org/