From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: fadr Date: Tue, 23 Jun 2009 11:14:51 +0200 Message-ID: <877hz371mc.fsf@ambire.localdomain> References: <87zlc0s3np.fsf@stupidchicken.com> <873a9sz1my.fsf@ambire.localdomain> <873a9sghzo.fsf@sphinx.net.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1245748981 12532 80.91.229.12 (23 Jun 2009 09:23:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jun 2009 09:23:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Dzhus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 23 11:22:58 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MJ2DQ-0008CE-Mb for ged-emacs-devel@m.gmane.org; Tue, 23 Jun 2009 11:22:57 +0200 Original-Received: from localhost ([127.0.0.1]:40484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ2DQ-0005GE-3B for ged-emacs-devel@m.gmane.org; Tue, 23 Jun 2009 05:22:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ2DJ-0005ET-6s for emacs-devel@gnu.org; Tue, 23 Jun 2009 05:22:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ2DF-0005Ap-OX for emacs-devel@gnu.org; Tue, 23 Jun 2009 05:22:48 -0400 Original-Received: from [199.232.76.173] (port=41874 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ2DF-0005Ad-Ji for emacs-devel@gnu.org; Tue, 23 Jun 2009 05:22:45 -0400 Original-Received: from smtp-out113.alice.it ([85.37.17.113]:3787) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ2DF-00047K-2z for emacs-devel@gnu.org; Tue, 23 Jun 2009 05:22:45 -0400 Original-Received: from FBCMMO03.fbc.local ([192.168.68.197]) by smtp-out113.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Jun 2009 11:20:31 +0200 Original-Received: from FBCMCL01B06.fbc.local ([192.168.69.87]) by FBCMMO03.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 23 Jun 2009 11:20:30 +0200 Original-Received: from ambire.localdomain ([79.21.69.87]) by FBCMCL01B06.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Jun 2009 11:20:30 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1MJ25b-0002kU-DM; Tue, 23 Jun 2009 11:14:51 +0200 In-Reply-To: <873a9sghzo.fsf@sphinx.net.ru> (Dmitry Dzhus's message of "Mon, 22 Jun 2009 23:56:27 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-OriginalArrivalTime: 23 Jun 2009 09:20:31.0198 (UTC) FILETIME=[DADF8FE0:01C9F3E3] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111657 Archived-At: () Dmitry Dzhus () 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 =C2=ABstark=C2=BB strings non-lispy (apart from hav= ing 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) =3D> "Thread 1 has name LWP18334" A more realistic example from my code: (fadr-format "~.id (~.target-id) ~.state in ~.frame.func " thread) =3D> "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) =3D> multiple values (or what have you); either: all leaves or: branch, plus all leaves Would you like to add it? thi