Version française
Home     About     Download     Resources     Contact us    
Browse thread
stl?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] stl?
On Wed, Mar 04, 2009 at 06:15:20PM -0800, Pal-Kristian Engstad wrote:
> Have you ever tried to conform to a specific memory layout? We are often 
> talking directly to hardware, and in those cases it is a prerequisite to 
> be able to produce data that is in the exact format prescribed. Often 
> these things are, put an 17-bit ID followed by a 3-bit CODE followed by 
> a 12-bit LENGTH field, after which follows LENGTH items each of size 
> that is some-function-of CODE.

This is the sort of thing that OCaml-bitstring might be adapted to do.
Now I'm not going to claim that bitstring does this already, because
there is no way it's currently as fast as C/C++ (it involves a copy
for a start).  But a similar language extension might make it
possible.

  http://code.google.com/p/bitstring/

Rich.

-- 
Richard Jones
Red Hat