unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Brian S McQueen <bqueen@nas.nasa.gov>
Cc: guile-user@gnu.org
Subject: Re: argz SMOB
Date: Mon, 12 Jan 2004 08:08:03 -0800 (PST)	[thread overview]
Message-ID: <Pine.GSO.4.58.0401120802560.19556@marcy.nas.nasa.gov> (raw)
In-Reply-To: <m0k741qkoj.fsf@hobitin.ucw.cz>

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


  reply	other threads:[~2004-01-12 16:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 17:40 argz SMOB Brian S McQueen
2004-01-06 19:54 ` Daniel Skarda
2004-01-08 16:44   ` Brian S McQueen
2004-01-09 14:08     ` Daniel Skarda
2004-01-12 16:08       ` Brian S McQueen [this message]
2004-01-15 18:43   ` Brian S McQueen
2004-01-16  0:21     ` Paul Jarc
2004-01-16  9:10       ` null terminated strings (was: argz SMOB) Andreas Voegele
     [not found]         ` <1074245327.6733.9.camel@localhost>
2004-01-16 10:17           ` null terminated strings Andreas Voegele
2004-01-16 11:02             ` Roland Orre
2004-01-16 12:24               ` Andreas Voegele
2004-01-16 18:20                 ` Brian S McQueen
2004-01-16 20:36                   ` Paul Jarc
2004-01-16 21:06                     ` Tom Lord
2004-01-16 21:02                       ` Paul Jarc
2004-01-16 21:27                         ` Roland Orre
2004-01-19 17:28                       ` Ken Anderson
2004-01-19 18:46                         ` Per Bothner
2004-01-19 19:16                           ` Ken Anderson

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.58.0401120802560.19556@marcy.nas.nasa.gov \
    --to=bqueen@nas.nasa.gov \
    --cc=guile-user@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).