From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Dmitry Dzhus <dima@sphinx.net.ru>
Cc: emacs-devel@gnu.org
Subject: Re: fadr
Date: Tue, 23 Jun 2009 11:14:51 +0200 [thread overview]
Message-ID: <877hz371mc.fsf@ambire.localdomain> (raw)
In-Reply-To: <873a9sghzo.fsf@sphinx.net.ru> (Dmitry Dzhus's message of "Mon, 22 Jun 2009 23:56:27 +0400")
() Dmitry Dzhus <dima@sphinx.net.ru>
() Mon, 22 Jun 2009 23:56:27 +0400
[...] I'm pleasantly surprised to see that `bindat-get-field` works
with such tree (and others I have) like charm.
Cool.
Moreover, it looks like I don't even need to tweak anything, as
`bindat-get-field` is exactly what I was meant to write instead of
`fadr-member`. Its docstring mentions the same C-style dotted
notation I had in mind while writing fadr.
As we walk from root to leaf, ...
The difference between these two is [...]
So `fadr-member` is just a reinvented wheel at all.
I'm going to drop it.
... may our steps synch regardless of shoe size.
> Insert Perlis quote re strings, here....
So what really makes «stark» strings non-lispy (apart from having a
font-lock color which differs from that of symbols and parenthesis)?
I believe Perlis was saying all strings are stark. In some cases i would
disagree, but maybe because i'm weird.
Sometimes I need to access several different leaves of my tree in the
same line, so I wrote `fadr-expand` which works as follows:
(fadr-expand "Thread ~.threads[0].id has name ~.threads[0].target-id" threads)
=>
"Thread 1 has name LWP18334"
A more realistic example from my code:
(fadr-format "~.id (~.target-id) ~.state in ~.frame.func " thread)
=>
"1 (LWP18334) stopped in mult_matrices_mt "
I coded this function to save some typing. Now I'm in doubts about
whether it follows the spirit of Lisp.
When you want to collect several leaves, collect first their common branch,
then proceed from there. This is a missing feature from bindat.el:
(bindat-get-fields STRUCT BRANCH-SPEC LEAF-SPECS)
=> multiple values (or what have you);
either: all leaves
or: branch, plus all leaves
Would you like to add it?
thi
next prev parent reply other threads:[~2009-06-23 9:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 15:12 fadr Chong Yidong
2009-06-22 16:14 ` fadr Thien-Thi Nguyen
2009-06-22 19:56 ` fadr Dmitry Dzhus
2009-06-23 9:14 ` Thien-Thi Nguyen [this message]
2009-06-22 16:27 ` fadr Dmitry Dzhus
2009-06-22 16:39 ` fadr Chong Yidong
2009-06-22 18:24 ` fadr Glenn Morris
2009-06-22 21:57 ` fadr Dmitry Dzhus
2009-06-24 21:33 ` fadr Stefan Monnier
2009-06-23 5:54 ` fadr Nick Roberts
2009-06-22 21:38 ` fadr Dmitry Dzhus
2009-06-23 5:47 ` fadr Nick Roberts
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=877hz371mc.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=dima@sphinx.net.ru \
--cc=emacs-devel@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.