GNU bug report logs - #11215
[feature request] better backtraces

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Severity: wishlist; Reported by: Ian Price <ianprice90@HIDDEN>; dated Tue, 10 Apr 2012 23:14:02 UTC; Maintainer for guile is bug-guile@HIDDEN.

Message received at 11215 <at> debbugs.gnu.org:


Received: (at 11215) by debbugs.gnu.org; 4 Jul 2012 19:51:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 04 15:51:19 2012
Received: from localhost ([127.0.0.1]:48472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SmVbb-0004WL-1k
	for submit <at> debbugs.gnu.org; Wed, 04 Jul 2012 15:51:19 -0400
Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:36671
	helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <wingo@HIDDEN>) id 1SmVbY-0004WE-Tc
	for 11215 <at> debbugs.gnu.org; Wed, 04 Jul 2012 15:51:17 -0400
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
	by b-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 6C0FFC9ED;
	Wed,  4 Jul 2012 15:46:28 -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=Dx+Z15+T2R2bb5thgNVmRiniv4I=; b=ZzvaQi
	4XwRu3YIsrg9deGMn2pZ6aWZY5+h+QrJJCULhQlzkKDurt9l9jkVqhBQrEEv8+gM
	jB+xHADsGvzYiggvEBnQPc2b0tQh33iP+CXc5GUKl5Pk+bNRDB0u6i/Rss9AI98n
	J87bvOqfX2B0Ub028qBvTXmN9DO5lRJpEXC1Q=
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=xzU3vkaoB5EtZIzFIvcnAnsJqXfWab+y
	mk7+V5K3F+kTYBlKod3cmFLFGfmYJSbo9Ulgf9LuBCHCK50uF0Cxia1W1XvbNqDF
	xzFbCfI2HGIVFaRzjaUXW/t9gM2Eyc+aPnHrDY2fTwVo34sLR/ABaqmU2uqn1c7k
	Ud4o397k7gQ=
Received: from b-pb-sasl-sd. (unknown [127.0.0.1])
	by b-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 646C4C9EC;
	Wed,  4 Jul 2012 15:46:28 -0400 (EDT)
Received: from badger (unknown [89.131.176.233]) (using TLSv1 with cipher
	DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by
	b-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id CDCE1C9EB;
	Wed,  4 Jul 2012 15:46:27 -0400 (EDT)
From: Andy Wingo <wingo@HIDDEN>
To: Ian Price <ianprice90@HIDDEN>
Subject: Re: bug#11215: [feature request] better backtraces
References: <87r4vv18t8.fsf@HIDDEN>
Date: Wed, 04 Jul 2012 21:46:20 +0200
In-Reply-To: <87r4vv18t8.fsf@HIDDEN> (Ian Price's message of "Wed, 11
	Apr 2012 00:11:31 +0100")
Message-ID: <8739578g37.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Pobox-Relay-ID: F20333B8-C610-11E1-80ED-FA6787E41631-02397024!b-pb-sasl-sd.pobox.com
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 11215
Cc: 11215 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

On Wed 11 Apr 2012 01:11, Ian Price <ianprice90@HIDDEN> writes:

> Tail calls, we all love them, but sometimes they conflict with error
> handling, and is often used as the scapegoat for why $language doesn't
> support them.

I agree, fwiw, and probably
http://funcall.blogspot.com/2009/05/you-knew-id-say-something-part-iv.html
is the answer.

Andy
-- 
http://wingolog.org/




Information forwarded to bug-guile@HIDDEN:
bug#11215; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Apr 2012 23:13:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 10 19:13:19 2012
Received: from localhost ([127.0.0.1]:49508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SHkFR-0004A1-Fw
	for submit <at> debbugs.gnu.org; Tue, 10 Apr 2012 19:13:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37413)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkFN-00049r-K5
	for submit <at> debbugs.gnu.org; Tue, 10 Apr 2012 19:13:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkEK-0000u2-47
	for submit <at> debbugs.gnu.org; Tue, 10 Apr 2012 19:12:09 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:43845)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkEK-0000ty-0r
	for submit <at> debbugs.gnu.org; Tue, 10 Apr 2012 19:12:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41988)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkEI-0001pE-5I
	for bug-guile@HIDDEN; Tue, 10 Apr 2012 19:12:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkEG-0000tY-4n
	for bug-guile@HIDDEN; Tue, 10 Apr 2012 19:12:05 -0400
Received: from plane.gmane.org ([80.91.229.3]:54735)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkEF-0000tS-Tq
	for bug-guile@HIDDEN; Tue, 10 Apr 2012 19:12:04 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <guile-bugs@HIDDEN>) id 1SHkE6-0005a9-W4
	for bug-guile@HIDDEN; Wed, 11 Apr 2012 01:11:55 +0200
Received: from host86-151-72-82.range86-151.btcentralplus.com ([86.151.72.82])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-guile@HIDDEN>; Wed, 11 Apr 2012 01:11:54 +0200
Received: from ianprice90 by host86-151-72-82.range86-151.btcentralplus.com
	with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <bug-guile@HIDDEN>; Wed, 11 Apr 2012 01:11:54 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-guile@HIDDEN
From: Ian Price <ianprice90@HIDDEN>
Subject: [feature request] better backtraces
Date: Wed, 11 Apr 2012 00:11:31 +0100
Lines: 56
Message-ID: <87r4vv18t8.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: host86-151-72-82.range86-151.btcentralplus.com
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Cancel-Lock: sha1:F/w2bDuek7aLgJQJ/GC5LA8uPE8=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)


This is more of a feature request/reminder, than a bug report, but we
don't have a wish list so,....


Tail calls, we all love them, but sometimes they conflict with error
handling, and is often used as the scapegoat for why $language doesn't
support them.

shizzy0 posted the following example and output to the #guile IRC channel

(define (g)
  (error "This is broken because ~a" 1))
(g)

;; $ guile -q --debug test-error.scm 
;; Backtrace:
;; In ice-9/boot-9.scm:
;;  149: 10 [catch #t #<catch-closure 101303d80> ...]
;;  157: 9 [#<procedure 10129e190 ()>]
;; In unknown file:
;;    ?: 8 [catch-closure]
;; In ice-9/boot-9.scm:
;;   63: 7 [call-with-prompt prompt0 ...]
;; In ice-9/eval.scm:
;;  407: 6 [eval # #]
;; In ice-9/boot-9.scm:
;; 2111: 5 [save-module-excursion #<procedure 1012a2100 at ice-9/boot-9.scm:3646:3 ()>]
;; 3653: 4 [#<procedure 1012a2100 at ice-9/boot-9.scm:3646:3 ()>]
;; 1380: 3 [%start-stack load-stack ...]
;; 1385: 2 [#<procedure 10133cc90 ()>]
;; In unknown file:
;;    ?: 1 [primitive-load "/Users/shane/School/uvm/CSYS-395-evolutionary-robotics/bullet-2.79/Demos/GuileDemo/test-error.scm"]
;;    ?: 0 [scm-error misc-error #f "~A ~S" ("This is broken because ~a" 1) #f]
;;
;; ERROR: In procedure scm-error:
;; ERROR: This is broken because ~a 1

One issue was that he wasn't auto compiling guile code, but there are
two tail calls here. One is the obvious one, in g. And the other, which
surprised me, was with respect to the main program itself. Thus we get
the limited backtrace in an unknown file.

It is possible to provide full backtraces, and source location for error
messages with tail calls, though it's usually more work and requires
overhead, but it's something to think about for the --debug engine at
least.

It would also be nice as a specific counterexample of an implementation
in practice for all the tail call naysayers. :)

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"





Acknowledgement sent to Ian Price <ianprice90@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#11215; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.