From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Brian S McQueen Newsgroups: gmane.lisp.guile.user Subject: Re: argz SMOB Date: Mon, 12 Jan 2004 08:08:03 -0800 (PST) Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1073933368 22930 80.91.224.253 (12 Jan 2004 18:49:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2004 18:49:28 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jan 12 19:49:24 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ag77s-0007dY-00 for ; Mon, 12 Jan 2004 19:49:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ag5c7-0007Jk-H6 for guile-user@m.gmane.org; Mon, 12 Jan 2004 12:12:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Ag5aJ-0006oj-Nq for guile-user@gnu.org; Mon, 12 Jan 2004 12:10:39 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Ag5Zl-0006ZQ-Fy for guile-user@gnu.org; Mon, 12 Jan 2004 12:10:36 -0500 Original-Received: from [129.99.113.17] (helo=marcy.nas.nasa.gov) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ag5Zk-0006VH-Qs for guile-user@gnu.org; Mon, 12 Jan 2004 12:10:04 -0500 Original-Received: from localhost (bqueen@localhost) by marcy.nas.nasa.gov (8.11.7p1+Sun/8.11.7/NAS-6n) with ESMTP id i0CG83o10048; Mon, 12 Jan 2004 08:08:09 -0800 (PST) Original-To: Daniel Skarda <0rfelyus@ucw.cz> In-Reply-To: X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2579 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2579 The db libraries are a fact I must live with here. But I made the SMOB interface, and started fiddling with it and noticed that, since NULL is allowed in a scheme string, that the entire argz thing can be viewed as a single string, and the guile string interface can be used. I will try it today. BTW - GNU C's argz and envz are quite simple to use. You can do bust up a query string into a hash like structure with near perl like ease. There is no memory allocation. Another very cool feature of GNU C is the obstack. I will post again when I test out the SCM string to C argz. Brian On Fri, 9 Jan 2004, Daniel Skarda wrote: > > > I have several libraries in use here which make database queries, > > returning all the results in an argz (actually as an envz). I wanted to > > be able to tweak anything via guile. So I added guile to the project, > > giving me the ability to tweak from a script file without recompiling. > > Before I sent you my message, I read argz/envz description in libc reference > manual and wondered why anybody would like to use such strange data structure. > (which I still do not understand :) > > IMHO it would be better to convert output from your database queries to lists > of strings and symbols (or alists in case of envz). They are more "natural" and > "convenient" way for data representation in Scheme/Lisp and for processing > results you can use tools already present in Guile (for-each, map, fold, ...) > instead of reinventing your own for argz/envz SMOBS. > > 0. > _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user