[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: print hash table to disk and reread in hash table
From: |
Ted Zlatanov |
Subject: |
Re: print hash table to disk and reread in hash table |
Date: |
Thu, 28 Aug 2008 09:03:53 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Wed, 27 Aug 2008 22:27:47 -0700 (PDT) Xah <xahlee@gmail.com> wrote:
X> but is there a function or lib to save hashtable to disk? i.e.
X> sometimes called serializing?
No. It's easy to convert a hashtable to a list, and Emacs makes it easy
to serialize a list, so that's what people do. I have code in
gnus-registry.el (copied in part from the way Gnus saves its newsrc
file) to do this. The combination of two easy things is not,
unfortunately, simple anymore.
I like the (puthash ...) approach suggested by Thierry Volpiatto but
it's a lot of function calls for a large hashtable (which the Gnus
registry creates). So I'm not sure it's the right approach either.
BBDB has a similar problem; it saves vectors instead of lists.
If there's no library for serialization, it should definitely be
written. Emacs Lisp has only a few basic data types, and not all of
them have to be supported anyhow.
Ted
- print hash table to disk and reread in hash table, Xah, 2008/08/27
- Re: print hash table to disk and reread in hash table, Thierry Volpiatto, 2008/08/28
- Message not available
- Re: print hash table to disk and reread in hash table, Xah, 2008/08/28
- Re: print hash table to disk and reread in hash table, Thierry Volpiatto, 2008/08/28
- Re: print hash table to disk and reread in hash table,
Ted Zlatanov <=
- Re: print hash table to disk and reread in hash table, Eli Zaretskii, 2008/08/28
- Message not available
- Re: print hash table to disk and reread in hash table, Ted Zlatanov, 2008/08/29
- Re: print hash table to disk and reread in hash table, Eli Zaretskii, 2008/08/29
- Message not available
- Re: print hash table to disk and reread in hash table, Ted Zlatanov, 2008/08/29
Re: print hash table to disk and reread in hash table, Niels Giesen, 2008/08/28