From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter TB Brett Newsgroups: gmane.lisp.guile.user Subject: Re: Help needed debugging segfault with Guile 1.8.7 Date: Tue, 30 Nov 2010 19:56:30 +0000 Message-ID: References: <871v6sqbny.fsf@ambire.localdomain> <8739ql38pe.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1291191820 21341 80.91.229.12 (1 Dec 2010 08:23:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 08:23:40 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Dec 01 09:23:36 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PNhyS-0008SH-0q for guile-user@m.gmane.org; Wed, 01 Dec 2010 09:23:36 +0100 Original-Received: from localhost ([127.0.0.1]:34866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNhyQ-0003VR-SK for guile-user@m.gmane.org; Wed, 01 Dec 2010 03:23:35 -0500 Original-Received: from [140.186.70.92] (port=46181 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNdkl-0007nz-KP for guile-user@gnu.org; Tue, 30 Nov 2010 22:53:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNWJ8-0007E2-Os for guile-user@gnu.org; Tue, 30 Nov 2010 14:56:11 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:52834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNWJ8-00076j-9P for guile-user@gnu.org; Tue, 30 Nov 2010 14:56:10 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PNWJ5-00058s-L9 for guile-user@gnu.org; Tue, 30 Nov 2010 20:56:07 +0100 Original-Received: from 109.170.137.199 ([109.170.137.199]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Nov 2010 20:56:07 +0100 Original-Received: from peter by 109.170.137.199 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Nov 2010 20:56:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 109.170.137.199 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:7piUN/LSZQoq6acVG8bKjsWOmxc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8252 Archived-At: --=-=-= Content-Transfer-Encoding: quoted-printable Linas Vepstas writes: > Basically, if you are going to let users enter arbitrary scheme into > your app, they *will* enter malformed, broken expressions, and you > have to deal with these. Among other things, you have to give them > a clue as to what the error was -- some sort of trace, error reporting. > > For me, this was implementing a REPL loop look-alike in my app. > I can't say "work-alike", I think mine *almost* works-alike, but not sure. > > It took me a *long* time to figure out I needed the pre-unwind version > of things, and even then, it took me a fair amount of effort to figure > out what to put in there. > > Having a section showing how to implement a repl-work-alike loop > in one's app, with reasonable debugging/stack-printing output, > would be nice to have. Figuring out how to do this one one's > own requires a lot of tenacity. Guile 2.x would be hugely more attractive as an extension language if there were some higher-level interfaces for application developers. In gEDA, we have to use a ridiculous amount of C code just to set things up so that user-provided Scheme expressions can't leave the user staring at a command prompt wondering where the last hour's work disappeared to (and even that's not as reliable as we'd like). Ideally, there should be: - An easily re-usable/embeddable and well-documented REPL, to aid developers in implementing a "Scheme Interaction Window" or similar in their apps. - An high-level API for passing strings for evaluation, that reports back the results or error information in a way that's easy to deal with from C. In a perfect world, these would be part of the same API. ;-) I believe that these would actually be applicable to the majority of use-cases of libguile. Cheers, Peter =2D-=20 Peter Brett Remote Sensing Research Group Surrey Space Centre --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAkz1Vu4ACgkQZ7Gbq7g7vprKaACfYWOP33lA4Q3J0p+EWAmczLRc vWcAnioEEEnii1zD0QZJRZ/gz5Wux6f8 =kTff -----END PGP SIGNATURE----- --=-=-=--