unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Juliana Sims <juli@incana.org>
Cc: 71684@debbugs.gnu.org, maxim.cournoyer@gmail.com
Subject: bug#71684: [PATCH v2] doc: Document the peek and pk procedures.
Date: Wed, 10 Jul 2024 20:21:10 +0200	[thread overview]
Message-ID: <878qy9glbd.fsf@gmail.com> (raw)
In-Reply-To: <20240702164418.11886-1-juli@incana.org> (Juliana Sims's message of "Tue, 2 Jul 2024 12:28:17 -0400")

Hi,

On Tue, 02 Jul 2024 at 12:28, Juliana Sims <juli@incana.org> 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 sure
> 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 settings
> geared to that purpose. I used manual filling this time so hopefully that issue
> has been resolved.

Yeah, that’s because double-space after period fixes ambiguous cases as
this example: “The author J. R. R. Tolkien wrote The Hobbit. George
R. R. Martin wrote many fantasy books.”  The brain is able to determine
it’s 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. ’begin’ helps to mark a sequence of expressions; IMHO, that’s a good
     habit when playing with ’pk’ for debugging purpose.

 2. it exposes that ’stuff’ 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





  parent reply	other threads:[~2024-07-10 18:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 18:54 bug#71684: [PATCH] doc: Document the peek and pk procedures Juliana Sims via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-07-02  3:54 ` Maxim Cournoyer
2024-07-02 16:28   ` bug#71684: [PATCH v2] " Juliana Sims via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-07-09  2:56     ` Maxim Cournoyer
2024-09-13 15:47       ` Maxim Cournoyer
2024-07-10 18:21     ` Simon Tournier [this message]
2024-07-10 19:48       ` Maxim Cournoyer
2024-07-11  8:59         ` Simon Tournier
2024-07-16  2:46           ` Juliana Sims via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-07-23 15:24             ` bug#71684: [PATCH] " jgart via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-09-13 15:42             ` bug#71684: [PATCH v2] " Maxim Cournoyer
2024-09-13 16:03               ` Simon Tournier
2024-09-13 20:03                 ` bug#71684: [PATCH v3] " Juliana Sims via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-10-14  7:57                   ` Janneke Nieuwenhuizen
2024-10-14 12:53                     ` bug#71684: [PATCH v4] " Juliana Sims via Bug reports for GUILE, GNU's Ubiquitous Extension Language

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878qy9glbd.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=71684@debbugs.gnu.org \
    --cc=juli@incana.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).