From: ludo@gnu.org (Ludovic Courtès)
To: Doug Evans <xdje42@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
"gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 02/36] Guile extension language: doc additions
Date: Tue, 21 Jan 2014 21:11:00 -0000 [thread overview]
Message-ID: <87ha8xujk2.fsf@gnu.org> (raw)
In-Reply-To: <CAP9bCMT30NDxOQc7FBY22vAN0qnjJr1W7A5fHExQk32rLeam2A@mail.gmail.com> (Doug Evans's message of "Tue, 21 Jan 2014 09:54:52 -0800")
Doug Evans <xdje42@gmail.com> skribis:
> On Mon, Jan 20, 2014 at 7:37 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>>> Date: Mon, 20 Jan 2014 14:00:03 -0800
>>> From: Doug Evans <xdje42@gmail.com>
>>> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
>>>
>>> On Mon, Jan 20, 2014 at 1:52 PM, Doug Evans <xdje42@gmail.com> wrote:
>>> > This patch has the doc additions.
>>> > There's still some to be written, but I think it's in good enough shape
>>> > to get feedback on.
>>> >
>>> > Changes from v1:
>>> > - NEWS file added
>>> > - guile.texi updated based on feedback
>>> > - new section on gdb smobs
>>> > - add more text to "Iterators In Guile" node
>>> >
>>> > 2014-01-20 Doug Evans <xdje42@gmail.com>
>>> >
>>> > * NEWS: Mention Guile scripting.
>>> >
>>> > doc/
>>> > * Makefile.in (GDB_DOC_FILES): Add guile.texi.
>>> > * gdb.texinfo
>>> > * guile.texi: New file.
Overall looks good to me.
> ++The implementation uses Guile's @dfn{smob} (small object)
> ++data type for all @value{GDBN} objects
> ++(@pxref{Defining New Types (Smobs),,, guile, GNU Guile Reference Manual}).
> ++This allows gluing Guile into @value{GDBN} very easily.
SMOBs are a mechanism to define new Scheme data types, rather than a
data type in itself.
More importantly, I’m not sure whether it’s worth mentioning it here.
What about replacing these two sentence with something like
“@value{GDBN} defines several Scheme data types.”?
> ++@node GDB Smobs
> ++@subsubsection GDB Smobs
> ++@cindex gdb smobs
And definitely, the heading should be “GDB Scheme Data Types” or
similar, IMO.
> ++@value{GDBN} uses Guile's @dfn{smob} (small object)
> ++data type for all @value{GDBN} objects
> ++(@pxref{Defining New Types (Smobs),,, guile, GNU Guile Reference Manual}).
> ++The smobs that @value{GDBN} provides are called @dfn{gmobs}.
That one is OK since it helps introduce “gmob”. ;-)
> ++Every @code{gsmob} provides a common set of functions for extending
> ++them in simple ways. Each @code{gsmob} has a list of properties,
> ++initially empty. These properties are akin to Guile's object properties,
> ++but are stored with the @code{gsmob}
Perhaps add “for improved efficiency” (I assume that’s the reason,
right?).
> +(define iter (make-iterator my-list my-list
> + (lambda (iter)
The indentation is wrong here (put “(make-iterator” on the next line.)
> +@smallexample
> -+(use-modules (gdb experimental))
> ++(use-modules (gdb iterator))
> +(define this-sal (find-pc-line (frame-pc (selected-frame))))
> +(define this-symtab (sal-symtab this-sal))
> +(define this-global-block (symtab-global-block this-symtab))
> +(define syms-iter (make-block-symbols-iterator this-global-block))
> -+(define functions (iterator-filter symbol-function? syms-iter #f))
> ++(define functions (iterator-filter symbol-function? syms-iter))
(The obvious ‘iterator->list’ procedure would be nice.)
> ++@deffn {Scheme Procedure} iterator-map proc iterator
> ++Return a list of @var{proc} applied to each element of @var{iterator}.
What about:
Return the list of objects obtained by applying @var{proc} to the object
pointed to by @var{iterator} and to each subsequent object.
> ++@deffn {Scheme Procedure} iterator-filter pred iterator
> ++Return as a list the elements of @var{iterator} that satisfy @var{pred}.
Return the list of elements pointed to by @var{iterator} that satisfy
@var{pred}.
Thanks!
Ludo’.
next prev parent reply other threads:[~2014-01-21 21:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 21:52 Doug Evans
2014-01-20 22:00 ` Doug Evans
2014-01-21 3:36 ` Eli Zaretskii
2014-01-21 17:55 ` Doug Evans
2014-01-21 18:36 ` Eli Zaretskii
2014-01-21 21:11 ` Ludovic Courtès [this message]
2014-01-26 18:34 ` Doug Evans
2014-02-10 5:38 ` Doug Evans
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ha8xujk2.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@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