unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pascal Bourguignon <pjb@informatimago.com>
Subject: Re: Package for data serialization?
Date: Tue, 13 Jun 2006 13:13:53 +0200	[thread overview]
Message-ID: <87irn5z4su.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: 1150195170.157848.7260@f6g2000cwb.googlegroups.com

spamfilteraccount@gmail.com writes:

> Is there a package for de/serializing an arbitrary elisp data
> structure, so that it can be read/written in binary format from/to
> disk?
>
> I know about prin1 and co., but they create a printed representation
> and I want binary for speed and size.


There is no emacs lisp function to get the binary representation of a
cons cell, or a number or a string or anything, AFAIK.

So you won't be able to write in emacs lisp any function converting
values to binary any faster than prin1.


You may want to try it in C, adding primitive functions.  You will
still have to do a lot of work, like converting pointers into OID,
etc.


IIRC, there is a mean to save an emacs lisp image, so you could save
the whole data structure, along with the whole emacs in a new emacs
image, and then you'd run this image instead of a virgin emacs.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NEW GRAND UNIFIED THEORY DISCLAIMER: The manufacturer may
technically be entitled to claim that this product is
ten-dimensional. However, the consumer is reminded that this
confers no legal rights above and beyond those applicable to
three-dimensional objects, since the seven new dimensions are
"rolled up" into such a small "area" that they cannot be
detected.

  reply	other threads:[~2006-06-13 11:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 10:39 Package for data serialization? spamfilteraccount
2006-06-13 11:13 ` Pascal Bourguignon [this message]
2006-06-13 13:04 ` Ted Zlatanov
2006-06-13 13:37   ` Pascal Bourguignon
2006-06-13 16:02 ` Phillip Lord
2006-06-13 17:57 ` Eli Zaretskii
     [not found] ` <mailman.2851.1150221485.9609.help-gnu-emacs@gnu.org>
2006-06-13 18:38   ` spamfilteraccount
2006-06-13 18:48     ` Eli Zaretskii
     [not found]     ` <mailman.2854.1150224536.9609.help-gnu-emacs@gnu.org>
2006-06-14 10:27       ` Phillip Lord

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/emacs/

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

  git send-email \
    --in-reply-to=87irn5z4su.fsf@thalassa.informatimago.com \
    --to=pjb@informatimago.com \
    /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).