So, in J, if I am given a "byte array", e.g.
let n =: a.{~ 101 14 29 76 100 NB. just some random values
is it possibly to distinguish this from a literal?
Doing
datatype n
gives
'literal'
Also is a.{~ essentially casting an int to a char (in C)?
> From: [email protected]
> Date: Fri, 30 Jan 2015 09:49:42 -0500
> To: [email protected]
> Subject: Re: [Jprogramming] Byte Arrays vs Integer Arrays
>
> In J, a byte array is a literal array whose members are elements of
> the a. constant.
>
> That said, the semantics of J are about giving us abstractions which
> hold across some different storage formats.
>
> Meanwhile: if you ask different people "what are the essential
> features of a type" you will get different (and yet vigorously
> asserted) answers. [This depends on what language(s) they have been
> working with, the kinds of problems they have been solving, the nature
> of what they expect from other people, and the primary obstacles they
> face.]
>
> Thanks,
>
> --
> Raul
>
> On Fri, Jan 30, 2015 at 9:28 AM, Jon Hough <[email protected]> wrote:
> > As I said in an earlier thread, I am attempting to write a MessagePack
> > implementation in J.
> > Spec: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-bin
> > Home: http://msgpack.org/
> >
> > In the spec there must be a way to serialize/deserialize byte arrays.
> > However, in J what is a byte array? And how would you differentiate it from
> > an integer array (0 ~ 255)?
> > I may be absolutely mistaken, but there seems to be a little ambiguity
> > between these types in J (well there is no byte type).
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm