Host introspection: Difference between revisions

Content added Content deleted
(→‎{{header|Julia}}: A new entry for Julia)
Line 442: Line 442:
Note that this mechanism is testing the interpreter, and not the OS or Hardware. (Though, of course, you cannot run a 64 bit interpreter on a machine that does not support it.)
Note that this mechanism is testing the interpreter, and not the OS or Hardware. (Though, of course, you cannot run a 64 bit interpreter on a machine that does not support it.)


That said, this does not deal with endianness. For the most part, J programs do not need to know their own endianness. When converting to and from binary format you can specify "native", "little endian" and "big endian", and it's rare that you have an interface with conflicting needs. That said:
That said, this does not deal with endianness. For the most part, J programs do not need to know their own endianness. When converting to and from binary format you can specify "native", "little endian" and "big endian", and it's rare that you have an interface which would need anything else. That said, you can inspect the binary representation of a simple constant:


<lang j> ":&> (|: 32 64 ;"0 big`little) {"_1~ 2 2 #: 16b_e0 + a. i. 0 { 3!:1 ''
<lang j> ":&> (|: 32 64 ;"0 big`little) {"_1~ 2 2 #: 16b_e0 + a. i. 0 { 3!:1 ''