Jack - the trick is not so much reverse engineering the mapped files format
as the J data-representation format.  The good news is that I have already
done this.  If you have ACM access, you could take a look at my paper "J and
Dyalog APL sharing resources: can't we all just get along?" in which I use
memory-mapped files to pass data between J and Dyalog APL ( see
http://portal.acm.org/citation.cfm?doid=602231.602247).

The trick was to write some APL code to parse the J array internal format,
then read and write J arrays from and to the file.  I was able to do this.
 You could figure out the J internal format yourself
as I did, using the "3!:" family of foreign conjunctions, or wait
until I can get home and post a copy of a paper I wrote detailing how
I did this (this is briefly shown in the paper).  I also have the APL code
somewhere, if that would help - only some of it is in the paper.

Let me know if you want me to dig up the APL code.  Or maybe someone has
already written C code to parse J arrays?

Devon


On 1/18/08, Jack Andrews <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> is it worth my while reverse engineering
> the jmf format?  it feels like i should...
> for example, if i've got a large number of
> integers -- can't i just write them out and
> have j map the file straight into a noun?
>
> for(i=0;i<N;i++)
>   fwrite(a+i;sizeof(long),1,f);
>
> what's the overhead in parsing such a file
> (compared to J <-> J jmf)?
>
> ta, jack
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to