caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Christopher Oliver" <oliver@fritz.traverse.com>
To: caml-list@inria.fr
Subject: Marshalling of floats
Date: Tue, 4 Aug 1998 14:38:55 -0400 (EDT)	[thread overview]
Message-ID: <E0z3lz5-00008u-00@fritz.traverse.net> (raw)

In writing some signal processing software, I ran across a few
problems with Marshall.  I'd like ideas about how OCAML might
address these.

First, floats are simply written in increasing byte order OCAML
makes no attempt to rearrange based on endianness.  I think byte
order is discovered on configuration when building the system.
Should OCAML swap byte orders on some hardware to try to compen-
sate, or should we make no attempt to record floating point
portably between the major architectures?  The change in byterun/
intern.c and byterun/extern.c to handle byte swapping is fairly
trivial provided we include the config.h

Harder, does anyone have any good ideas besides conversion to
and from lists for marshalling floating arrays between bytecode
and native OCAML programs?  Without this sort of thing, one must
walk structures by hand if there are variant types with floating
arrays.

The reason for all this noise is that marshalling is ostensibly
to provide an external representation for non-code structured
data, but to be thorough, must we not try to be portable?

Ideas?

-- 
Christopher Oliver                     Traverse Internet
Systems Coordinator                    223 Grandview Pkwy, Suite 108
oliver@traverse.net                    Traverse City, Michigan, 49684
let magic f = fun x -> x and more_magic n f = fun x -> f ((n f) x);;





             reply	other threads:[~1998-08-04 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-04 18:38 Christopher Oliver [this message]
1998-08-05  8:00 ` Xavier Leroy
1998-08-05  8:13   ` Christopher Oliver

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

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

  git send-email \
    --in-reply-to=E0z3lz5-00008u-00@fritz.traverse.net \
    --to=oliver@fritz.traverse.com \
    --cc=caml-list@inria.fr \
    /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 NNTP newsgroup(s).