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.bugs Subject: bug#71684: [PATCH v3] doc: Document the peek and pk procedures. Date: Mon, 14 Oct 2024 09:57:43 +0200 Organization: AvatarAcademy.nl Message-ID: <87ttdfce14.fsf@gnu.org> References: <20240913200453.2965-1-juli@incana.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11458"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: juli@incana.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com To: 71684@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Oct 14 10:19:27 2024 Return-path: Envelope-to: guile-bugs@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 1t0GIY-0002pl-80 for guile-bugs@m.gmane-mx.org; Mon, 14 Oct 2024 10:19:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0GHx-0006vw-QW; Mon, 14 Oct 2024 04:18:49 -0400 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 1t0GHu-0006vV-0A for bug-guile@gnu.org; Mon, 14 Oct 2024 04:18:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t0GHt-0004z7-Ne for bug-guile@gnu.org; Mon, 14 Oct 2024 04:18:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=hjwYPZSLblMlksP052iQRJeIRQ1VR+t4SKfi6WlH3Ho=; b=GdGc0p0cfT6oPkBQHiVRcYQrvXo2uKqb/yXvXsJRQARaA2SxyP0LbxCoKYS28oNbpMjoN/XjX3ICPuAqPSat3ha7QCpTyVxQz7FtYDVZr6D8LXlnbErLbOgqAsaQ+bzRhdFR90cwPqhX2lXoCJ+vmZ3aqvgmtx2rBn7q/a+xK96rPV79BTIrrabm9IDSYleiCkGJT5t/4+48lxPmsc6YqepUjAzZClGK4uQpbqJrgqozMIYA0VL8TxuW8ipPIiG4VNvqM2qKMDUpQLnbA5m0t21eztg18C07XRI3IB/PRdkkBqGOFHOKYkovkp7mc+tyQD9oEo6fe+jMMczx5OvWPg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t0GIA-0002fk-5b for bug-guile@gnu.org; Mon, 14 Oct 2024 04:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 14 Oct 2024 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71684 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Juliana Sims via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" X-Debbugs-Original-Cc: 71684@debbugs.gnu.org, Juliana Sims , maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com Original-Received: via spool by 71684-submit@debbugs.gnu.org id=B71684.172889392610247 (code B ref 71684); Mon, 14 Oct 2024 08:19:02 +0000 Original-Received: (at 71684) by debbugs.gnu.org; 14 Oct 2024 08:18:46 +0000 Original-Received: from localhost ([127.0.0.1]:35250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0GHt-0002fC-NW for submit@debbugs.gnu.org; Mon, 14 Oct 2024 04:18:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0GHo-0002em-5S for 71684@debbugs.gnu.org; Mon, 14 Oct 2024 04:18:44 -0400 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 1t0Fxb-000255-KZ; Mon, 14 Oct 2024 03:57:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=hjwYPZSLblMlksP052iQRJeIRQ1VR+t4SKfi6WlH3Ho=; b=NRjRzuAx683LcB5kCdL/ DoJjOYRzglWqzPBWLuGUD/+dp/5cxad2UsjCvzLiJxOQe1g72icD8gLCBntFDxIuXqiDzQ+hBW4dE eW02iDQCt4QAruIt13OQ7M2wkyi2DD0X+oHubZ9/6s3194lMF6MZeANap72dmjQqWTXEMzNEIwlMN 5h4AWJ/kXIwGcq/j3tASvPhAVVrm4yXU6Bfz/JoDHPauutHPIjzGf9wyago3C2Jv+dPcGT9/IlFJe EYHZU7UGzgKttzjEnJkOcYAOXbCCeL85OcVYCBSKOsG4xkjEYloaezUyfaYz14VKW9ZxfP0Yfetka G7PG/0DhmZxwlA==; In-Reply-To: <20240913200453.2965-1-juli@incana.org> (Juliana Sims via's message of "Fri, 13 Sep 2024 16:03:52 -0400") X-Url: http://AvatarAcademy.nl X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org 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-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11036 Archived-At: Juliana Sims via Bug reports for GUILE, GNU's Ubiquitous Extension Language= writes: > * doc/ref/api-debug.texi: Document the peek and pk procedures. > --- > > Hey y'all, > > Thanks for the feedback! I've incorporated both suggestions in this new = patch. [..] > +@lisp > +(define fire 'burns) > + > +(pk fire) > +@result{} > + > +;;; (burns) > +burns > +@end These should read @end lisp --8<---------------cut here---------------start------------->8--- diff --git a/doc/ref/api-debug.texi b/doc/ref/api-debug.texi index df109d390..ca5175b35 100644 --- a/doc/ref/api-debug.texi +++ b/doc/ref/api-debug.texi @@ -58,7 +58,7 @@ Here is a basic example: =20 ;;; (burns) burns -@end +@end lisp =20 Here is an example of inspecting a value in the midst of code flow: =20 @@ -74,7 +74,7 @@ Here is an example of inspecting a value in the midst of = code flow: =20 ;;; ("4") ("1" "2" "3" "4") -@end +@end lisp =20 A common technique when using @code{pk} is to label values with symbols to keep track of where they're coming from. There's no reason these @@ -90,7 +90,7 @@ slightly more complex example demonstrating that pattern: =20 ;;; (arg-to-identity 42) 42 -@end +@end lisp =20 @code{pk} has one small quirk of note. Currently, it only returns the first value returned from any multi-value returns. So for example: @@ -101,7 +101,7 @@ first value returned from any multi-value returns. So = for example: =20 ;;; (vals 1) 1 -@end +@end lisp =20 The way to get around this limitation is to bind such multi-value returns then inspect the results. Still, @code{pk} can only return a @@ -117,7 +117,7 @@ single value: =20 ;;; (vals 1 2 3) 3 -@end +@end lisp =20 =20 @node Evaluation Model --8<---------------cut here---------------end--------------->8--- Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com