It's more an academic exercise more than anything. I tried writing a JSON serializer in J and failed miserably, and MessagePack is actually much easier to write.
> Date: Fri, 30 Jan 2015 15:55:00 +0100 > From: [email protected] > To: [email protected] > Subject: Re: [Jprogramming] Byte Arrays vs Integer Arrays > > Character arrays are smaller than standard ones: > > A tiny test: > > #foo =: 3!:1 a.{~i.256 NB. all bytes > 304 > #bar =: 3!:1 i. 256 NB. same, but in number format > 2088 > > Taking a look at the output of 3!:3 tells you why. > > So I guess if you are implementing MessagePack because of it's short > representation, this is a good way to store 0 - 255 (aka all bytes). > > > 2015-01-30 15:28 GMT+01:00 Jon Hough <[email protected]>: > > > 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
