From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Janneke Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: Re: A Guile debugger workgroup? Date: Fri, 03 Mar 2023 11:28:27 +0100 Organization: AvatarAcademy.nl Message-ID: <87wn3y1644.fsf@gnu.org> References: <87edtlptgv.fsf@laura> <878rgf4qx4.fsf@gnu.org> <87fsana8m9.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40367"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Olivier Dion , guile-devel@gnu.org To: "Dr. Arne Babenhauserheide" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Mar 03 11:28:54 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pY2ej-000AG9-Qg for guile-devel@m.gmane-mx.org; Fri, 03 Mar 2023 11:28:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY2eR-0008QY-Iu; Fri, 03 Mar 2023 05:28:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY2eP-0008JE-KF for guile-devel@gnu.org; Fri, 03 Mar 2023 05:28:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY2eO-00053E-91; Fri, 03 Mar 2023 05:28:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=k+kiLla8hHc3Wu2sQ0U1fslw0Au0YeWF0qyQEV3VxmA=; b=cm/my3dKi1BRfmCWm+aI cxp3wpyuAHMcW7Hxy4EOQyWg3qB3zh0A+BtBbPdqoqrTTvvCyFJ5d2W6cLSvvW7z5i2EZh/E+qcKd sERd9S47BYS8dOlOcFazRMWZKj21QwiD0feje14F0syLHExdDkSW7fIB4NaAqh894mp/QmH/xhomh W/01OsD4mUjw0FntAS1QRPBQR/JyB9jNGcYaWzcCAKYsqHZpfbxPkaVIMKGHEAyvb5D0vlnxns/YC c1RqlrbEVIKaH4qkXvxGoK2clNG9U9oSAiEjuMEM/8RhM9KPnZRkXZ7xgXyCRDFrLd1weodcQZgUv fqHY6+JafPF+iQ==; Original-Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY2eN-0003t8-Ee; Fri, 03 Mar 2023 05:28:31 -0500 X-Url: http://AvatarAcademy.nl In-Reply-To: <87fsana8m9.fsf@web.de> (Arne Babenhauserheide's message of "Thu, 02 Mar 2023 08:54:23 +0100") X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21767 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dr. Arne Babenhauserheide writes: Hi Arne, > Jannneke Nieuwenhuizen writes: >> In 2014, I wrote patches for Guile to use a debug prompt that GUD can >> work with. The Guile debug patches didn't make it into Guile, but the >> Emacs GUD integration is part of Emacs. >> >> https://lists.gnu.org/archive/html/guile-devel/2014-08/msg00004.html > > What were the reasons these didn=E2=80=99t make it? No idea, there was no comment or interest in the patch. I believe the consensus was (is?) to use pk for debugging. FWIW, I'm using my own "pke", because many of my programs are (pseudo-)filters, writing their output to stdout, which makes "pk" not so handy. See attached. > I now have push-access, so if these get acked by someone who knows that > part well enough, I can take up the integration. That's nice, but it probably needs to be updated and it certainly needs some discussion. Greetings, Janneke --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-peek-error-pke.patch >From 98264afe030eef3b5bbabc03b76808253ce10d14 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Fri, 3 Mar 2023 11:26:34 +0100 Subject: [PATCH] Add peek-error, pke. Debuging using `pk' is popular in Guile, but not really usable if your program is as (pseudo-)filter, i.e., writing its output to stdout. * module/ice-9/boot-9.scm (peek-error, pke): New procedures. --- module/ice-9/boot-9.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index dc3537063..639aaaa79 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -183,6 +183,16 @@ This is handy for tracing function calls, e.g.: (define pk peek) +(define (peek-error . stuff) + "Like peek (peok), writing to (CURRENT-ERROR-PORT)." + (newline (current-error-port)) + (display ";;; " (current-error-port)) + (write stuff (current-error-port)) + (newline (current-error-port)) + (car (last-pair stuff))) + +(define pke peek-error) + (define (warn . stuff) (newline (current-warning-port)) (display ";;; WARNING " (current-warning-port)) -- 2.39.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=--