Ah, my favorite rant topic - <rant>
wrong/right endian, eh? I suppose that means you prefer little endian
hardware ( see https://en.wikipedia.org/wiki/Endianness ) - but note
that it is a hardware architecture issue, not an OS issue, although Unix
is given credit in that article as having dealt with various hardware
architectures in constructive ways. I think efforts are made in j to
shield the user from these ancient choices where I might choose wrong
and right to be the opposite of what you are saying...
The reason there has recently been a bunch of stuff in j forums about
Apple Snow Leopard, is that it was the last OS Apple released that had
Rosetta in it - see https://en.wikipedia.org/wiki/Rosetta_(software) and
some folks want the ability to use code from the past.
In my experience, programs at the bit fiddling level have to be aware of
where data came from and was stored, as well as how it may have been
"encoded" to travel through the net. Many standards make a point of
declaring that right in the data stream, one of my favorites concerns
fax.tiff formatted graphic data where (from
http://tools.ietf.org/html/rfc3949 ) -
"A TIFF file begins with an 8-byte image file header. The first two
bytes describe the byte order used within the file. Legal values are
"II" (0x4949) when bytes are ordered from least to most significant
(little-endian), and "MM" (0x4D4D), when bytes are ordered from most to
least significant (big-endian) within a 16- or 32-bit integer. Either
byte order can be used, except in the case of the minimal
black-and-white profile, which SHALL use value "II". The next two bytes
contain the value 42, which identifies the file as a TIFF file and is
ordered according to the value in the first two bytes of the header.
The last four bytes give the offset that points to the first image file
directory (IFD). This and all other offsets in a TIFF file are with
respect to the beginning of the TIFF file. An IFD can be at any
location in the file after the header but must begin on a word boundary."
This stuck with me because in the original description the statement was
made that files (viewed as ASCII which is an OS assumption) started with
MM or II (I got that stood for Motorola vs Intel) followed by
("arbitrary but carefully chosen character *") When I did a.i.'*'
and observed that it was 42, I assumed it was homage to Douglas Adams
and have smiled about it ever since.
My "problem" with those ancient decisions made at DEC is that IMO all of
us agree that decimal 42 is binary 1 0 1 0 1 0 (perhaps with some
leading - not trailing - 0s depending on whether the hardware uses 8
binary digits in a "byte") - but what about, say
#: 1633837924 NB. giving
0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0
or, would you say that was "wrong" and "right" would be
0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0
My point is that if one looks at data as a stream of 1s and 0s some
accommodations might have to be made for the way hardware accesses
"words" of memory - but why would one be right and the other wrong??
(and which is which??)
</rant>
On 2015/08/25 07:54 , 'Pascal Jasmin' via Programming wrote:
Thank you everyone. I was asking due to my assumption that OSX used wrong
endian format, but maybe OSX on intel uses right endian? Are there any current
J platforms that use wrong endian, and would create a different result for ic?
----- Original Message -----
From: J. Patrick Harrington <j...@astro.umd.edu>
To: 'Pascal Jasmin' via Programming <programm...@jsoftware.com>
Cc:
Sent: Tuesday, August 25, 2015 10:46 AM
Subject: Re: [Jprogramming] ic/ 3!:4 on osX
Same result on OS 10.10.5
2&ic 1633837924 101
dcbae
JVERSION
Engine: j803/2014-10-19-11:11:11
Library: 8.04.11
Qt IDE: 1.4.5/5.4.2
Platform: Darwin 64
Installer: J804 install
InstallPath: /users/jph/j64-804
On Tue, 25 Aug 2015, 'Pascal Jasmin' via Programming wrote:
Does this result also occur on mac? (or is it reversed?)
2&ic 1633837924 101
dcbae
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm