From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: grouping Date: Mon, 06 May 2002 14:23:15 -0700 Sender: guile-devel-admin@gnu.org Message-ID: Reply-To: ttn@glug.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1020734162 32281 127.0.0.1 (7 May 2002 01:16:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 7 May 2002 01:16:02 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 174taD-0008O7-00 for ; Tue, 07 May 2002 03:16:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 174srV-0000QZ-00; Mon, 06 May 2002 20:29:49 -0400 Original-Received: from ca-crlsbd-u5-c4a-a-172.crlsca.adelphia.net ([24.48.214.172] helo=giblet) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 174q0r-0001ea-00; Mon, 06 May 2002 17:27:17 -0400 Original-Received: from ttn by giblet with local (Exim 3.35 #1 (Debian)) id 174pwx-00064e-00; Mon, 06 May 2002 14:23:15 -0700 Original-To: guile-user@gnu.org, guile-devel@gnu.org Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:582 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:582 folks, API scanning is the first step in knowing yourself (if you are a package like guile). next is developing some discernment on how these interface elements are grouped, for this is the basis for a more fine-grained and robust philosophical development (this is applicable to humans, too). to do this we use a mechanism that allows us to separate the expression of group membership predicates from the mundane record-keeping task of recording these in a reliable way (see new script annotate-api-groupings for that (in cvs HEAD)). please see below for a preliminary (experimental) set of definitions that everyone is invited to augment and refine -- this will eventually be checked into doc/groupings.alist and maintained there. to play, grab annotate-api-groupings and some guile-api.alist file, and invoke like so: annotate-api-groupings guile-api.alist groupings.alist see commentary in annotate-api-groupings for more info. thi __________________________________________________ ;; groupings.alist ;; -*-scheme-*- ;; This file describes groupings of available bindings (both Scheme and C). ;; The overall structure is an alist. Each entry has the form: ;; ;; (NAME (description "DESCRIPTION") (members SYM...)) ;; ;; All of these should be proper subsets of guile-api.alist. ;; Because of this property, it is an SMOP to annotate that alist, ;; and so the Scheme/C distinction need not be maintained here. ;; ;; In addition to `description' and `members' forms, the entry may ;; optionally include: ;; ;; (grok USE-MODULES (lambda (x) CODE)) ;; ;; where CODE implements a group-membership predicate applied to `x', which is ;; an API element object (this will be encapsulated into a closure before ;; release). If this "grok procedure" produces the same set as the `members' ;; form, you can omit the `members' form entirely. [When evaluated, CODE can ;; assume (use-modules MODULE) has been executed where MODULE is an element of ;; USE-MODULES, a list. [NOT YET IMPLEMENTED!]] ;; ;; Currently, there are two convenience predicates that operate on `x': ;; (in-group? x GROUP) ;; (name-prefix? x PREFIX) ;; ;;+ When `x' is converted into a closure, the names of these predicates ;;+ will be maintained as first arg keys, e.g., "(in-group? x GROUP)" will ;;+ be expressed as "(x 'in-group? GROUP)". ;; ;; TODO: Move this text to annotate-api-groupings commentary; point there. ( (C+scheme ;; This group should have no members! (description "in both groups `scheme' and `C'") (grok () (lambda (x) (and (in-group? x 'scheme) (in-group? x 'C))))) (libguile-internal (description "begins with scm_i_") (grok () (lambda (x) (name-prefix? x "scm_i_")))) (math (description "math functions") (members $abs $acos $acosh $asin $asinh $atan $atan2 $atanh $cos $cosh $exp $expt $log $sin $sinh $sqrt $tan $tanh)) (favorite (description "my favorite procs") (grok () (lambda (x) (and (in-group? x 'math) (in-group? x 'scheme))))) ;; Add new grouping descriptions here. ) ;; groupings.alist ends here _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel