From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Tournier Newsgroups: gmane.lisp.guile.bugs Subject: bug#71684: [PATCH v2] doc: Document the peek and pk procedures. Date: Wed, 10 Jul 2024 20:21:10 +0200 Message-ID: <878qy9glbd.fsf@gmail.com> References: <87jzi45tyn.fsf@gmail.com> <20240702164418.11886-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="35716"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 71684@debbugs.gnu.org, maxim.cournoyer@gmail.com To: Juliana Sims Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Jul 10 20:43:16 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 1sRcHb-00095X-VF for guile-bugs@m.gmane-mx.org; Wed, 10 Jul 2024 20:43:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRcHN-0003eh-TX; Wed, 10 Jul 2024 14:43:02 -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 1sRcHJ-0003Ni-4K for bug-guile@gnu.org; Wed, 10 Jul 2024 14:42:57 -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 1sRcHI-0002JF-RH for bug-guile@gnu.org; Wed, 10 Jul 2024 14:42:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRcHP-0005g5-0o for bug-guile@gnu.org; Wed, 10 Jul 2024 14:43:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 10 Jul 2024 18:43: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 Original-Received: via spool by 71684-submit@debbugs.gnu.org id=B71684.172063692621737 (code B ref 71684); Wed, 10 Jul 2024 18:43:02 +0000 Original-Received: (at 71684) by debbugs.gnu.org; 10 Jul 2024 18:42:06 +0000 Original-Received: from localhost ([127.0.0.1]:57158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRcGU-0005eW-1x for submit@debbugs.gnu.org; Wed, 10 Jul 2024 14:42:06 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:40732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRcGS-0005d9-04 for 71684@debbugs.gnu.org; Wed, 10 Jul 2024 14:42:04 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4266ea4e4bdso98725e9.3 for <71684@debbugs.gnu.org>; Wed, 10 Jul 2024 11:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720636852; x=1721241652; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g7ggMLZ7zOnunYvhCUsYkf+cpHCbcl2m+JXCm3Rd2wY=; b=Qp9KSOUpw2MKYoiQdpm0yCyLS39Q+KUtZDUswRHVGaliAr7UjoXPeR/9utsYNb6ZfN 2uX1MU5uHAfiFMDUzyEut3j8z4TW4NDUWahVNEXB1G781LNbi6BbhVN9BMozlCKWB+pP C6ep/aLxj+v2e1OLQ76RzMh4XxQFkrz4rUbZQxLJJ3SokPbSq91y9tJiChdZwW6qJvGC kAW2AvGnLQIpGkcZdb1zS+OzSmB0wKkW2dHIX5wv5k3zEwEx6ACKpO/Ullsp1oww6Zwi 8uMeQ4H5Q70W2mytOy/OShMI3Idbn8phk908US3uzlqnV4mw/uo/wStYvHAuL8JxpCdM L49w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720636852; x=1721241652; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=g7ggMLZ7zOnunYvhCUsYkf+cpHCbcl2m+JXCm3Rd2wY=; b=SahKEqrtub8+INuUFZTVpjqZcyXWrkcxjZXwDeBArkNzJ/gVJxdCp4A0w7tlQZA2Uy JW67BWJ7nLVlxTLdegD1X9Ro1oJHYgATcO8GSOKfk+Lp9AmHPIXYhW+dsjqDnmtJRZZs 6Ne9C0ieM2dmUW3KM+gX+dgVBuoxtE76de2iKba2LDPLqwD8M9pFguDaIA+HdOiMiL2b GArXlISkQ7+mlStvz/1yz6zO20BndNB8s+ryMfoXU9waDwRjv2caO5HH47rAJ4uvLGnl yhkVVOi/i4a/UAK0sZJswcKsQ1ZmO8Vm5SK81FFPWNgitkfePiU2bgicOv8soBMS89Vf B4pg== X-Forwarded-Encrypted: i=1; AJvYcCWx3FWTte0kVrvuLAMLoKbyMD71EZ4E7tB96bUQFPje0wdNm9a3zry8zm05bthrN2skImIO3pBm9B8KZGnvMmICmVUwFiU= X-Gm-Message-State: AOJu0YwSEM84BUgr1+v/V+4+E0NIYdFAfsHPGrdu9E06fu+M0/ydhPGg wjNoiZWuDME9yeQ5Mt3HAYkj4QQwqdzavs7YaSclKyUqO9YgRuqws1IVHw== X-Google-Smtp-Source: AGHT+IHtS96LSzip/JvUmtpitDEGCPfhywXIiWoqHefQUCP5T4xswINUda7pCwCYKneCax5+KinCng== X-Received: by 2002:a5d:6c63:0:b0:367:95e3:e4d5 with SMTP id ffacd0b85a97d-367f058775dmr270807f8f.2.1720636851706; Wed, 10 Jul 2024 11:40:51 -0700 (PDT) Original-Received: from lili (roam-nat-fw-prg-194-254-61-41.net.univ-paris-diderot.fr. [194.254.61.41]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-367cdfab748sm5913669f8f.111.2024.07.10.11.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 11:40:51 -0700 (PDT) In-Reply-To: <20240702164418.11886-1-juli@incana.org> (Juliana Sims's message of "Tue, 2 Jul 2024 12:28:17 -0400") 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:10889 Archived-At: Hi, On Tue, 02 Jul 2024 at 12:28, Juliana Sims wrote: > * doc/ref/api-debug.texi: Document the peek and pk procedures. Cool! Thanks. > Thanks for the quick review! I thought I'd made sure to double-space after > periods, but I guess my Emacs fill settings overwrote that when I made su= re > everything flowed properly. The contemporary consensus on double spaces in > English is to not use them, and I write a lot so I have my text-mode sett= ings > geared to that purpose. I used manual filling this time so hopefully that= issue > has been resolved. Yeah, that=E2=80=99s because double-space after period fixes ambiguous case= s as this example: =E2=80=9CThe author J. R. R. Tolkien wrote The Hobbit. George R. R. Martin wrote many fantasy books.=E2=80=9D The brain is able to deter= mine it=E2=80=99s only two sentences, but it becomes more difficult otherwise; it could count 7 sentences. https://en.wikipedia.org/wiki/Sentence_spacing#Computer_era Anyway. :-) > +@lisp > +(map (lambda (v) > + (if (number? v) > + (number->string v) > + (pk v))) > + '(1 "2" "3" 4)) > +@result{} > + > +;;; ("2") > + > +;;; ("3") > +("1" "2" "3" "4") > +@end For what it is worth, I would suggest something as: --8<---------------cut here---------------start------------->8--- (map (lambda (v) (if (number? v) (number->string v) (begin (pk 'else v) (pk (string-append "-" v "0"))))) '(1 "2" "3" 4)) --8<---------------cut here---------------end--------------->8--- For two reasons: 1. =E2=80=99begin=E2=80=99 helps to mark a sequence of expressions; IMHO, = that=E2=80=99s a good habit when playing with =E2=80=99pk=E2=80=99 for debugging purpose. 2. it exposes that =E2=80=99stuff=E2=80=99 above can be anything. Well, my suggestion could be two other examples in addition to the current one instead of the complexification. My 2 cents. :-) Cheers, simon