unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Bruce Korb <bkorb@veritas.com>
Cc: guile-devel@gnu.org
Subject: Re: How do I really do this?
Date: Sat, 06 Mar 2004 09:43:44 -0800	[thread overview]
Message-ID: <404A0DD0.C024CC4@veritas.com> (raw)
In-Reply-To: 85hdx2rwyr.fsf@ossau.uklinux.net

Neil Jerram wrote:
> 
> Bruce Korb <bkorb@veritas.com> writes:
> 
> > I would like to be able to associate a value with a string.

> > hash functions look perfect, except I can't use them unless
> > I have a hash table and there isn't any clear way I've found
> > to create hash table entries without having a hash table
> 
> You what?  What does it mean to create a hash table entry without a
> hash table?

How do I get a hash table started?  I've grepped throught he
ice-9 code and I'm sure something's in there.  But looking at
code around 'hash-create' and 'hashq-create' or even just "hash"
didn't yield anything that worked.  I guess I just need something
really explicit, like:

   (define my-hash-table (hash-table-create))

except that doesn't work.  What does?

> > I've tried:
> >
> >   (define (string->symbol (function-returning-string))
> >           (value-function))
> 
> This is bizarre and makes no sense.  The syntax is wrong, and I can't
> guess what you mean.

OK.  This works:

   (define sym-name (value-function))

So, why doesn't this:

   (define (string->symbol "sym-name") (val-func))

If the "sym-name" in the first expression is a symbol, then
why isn't the string->symbol function yielding a symbol?

> > I thought that to be really obvious, but I was wrong.
> > If either of these mecanisms are documented somewhere,
> > I'd gladly read it.  Meanwhile, can someone send me a hint?
> > Thank you. - Bruce
> 
> No, although I'd like to!  Please ask again with more clarity.

:-)  Thank you, Neil.

Regards, Bruce


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2004-03-06 17:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03 23:52 How do I really do this? Bruce Korb
2004-03-06 12:17 ` Neil Jerram
2004-03-06 17:43   ` Bruce Korb [this message]
2004-03-06 18:00     ` Neil Jerram
2004-03-10 21:07       ` Andreas Rottmann
2004-03-10 22:21       ` Carl Witty
2004-03-12 17:18         ` Bruce Korb
2004-03-11 14:54       ` Paul Jarc
2004-03-06 20:50 ` Mikael Djurfeldt
2004-03-07  1:33   ` Bruce Korb
2004-03-10 23:44   ` Marius Vollmer
2004-03-14  2:54     ` Bruce Korb
2004-03-08  2:27 ` Paul Jarc

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=404A0DD0.C024CC4@veritas.com \
    --to=bkorb@veritas.com \
    --cc=guile-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.
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).