[Glass] What is this chunk of memory prefixing my bytearray?

Martin McClure martin.mcclure at gemtalksystems.com
Wed Nov 20 00:06:32 PST 2013


On 11/19/2013 06:44 PM, Mariano Martinez Peck wrote:
> Hi guys,
>
> I found something weird today. If you inspect this:
>
>   ( ServerFileDirectory on: '/dev/random') directoryEntry readStreamDo:
> [ :s |
> s binary.
> (s next: 20) asByteArray ]
> You get something like:
>
>   Ý5öyoÓT¾àiwð¯p…óž“è( 221, 53, 246, 121, 111, 211, 84, 190, 224, 105,
> 119, 240, 175, 112, 133, 17, 243, 158, 147, 232)
>
> If you inspect it, the ByteArray is correctly size 20, and each element
> seems correct. But what are those weird characters I see in the
> inspector/print?

Well, they look like they're the byte array printed as a string of 
characters. Certainly the second byte, 53, is the codepoint of $5.

Regards,

-Martin



More information about the Glass mailing list