From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA06855 for caml-redistribution; Tue, 4 Aug 1998 22:19:47 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA05035 for ; Tue, 4 Aug 1998 20:38:58 +0200 (MET DST) Received: from fritz.traverse.net (oliverhome.cablezone.com [207.140.231.102]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA13961 for ; Tue, 4 Aug 1998 20:38:55 +0200 (MET DST) Received: from oliver by fritz.traverse.net with local (Exim 1.90 #1) for caml-list@inria.fr id 0z3lz5-00008u-00; Tue, 4 Aug 1998 14:38:56 -0400 Subject: Marshalling of floats To: caml-list@inria.fr Date: Tue, 4 Aug 1998 14:38:55 -0400 (EDT) From: "Christopher Oliver" X-Mailer: ELM [version 2.4 PL25 PGP3 *ALPHA*] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: Sender: weis 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);;