I should have known. All this time my app was behaving strangely, and it turns out Java, my beloved Java, was corrupting the data. I'm sure I've seen this before, but since I never stick to the same language for very long I forget all the strange shit they do until it bites me in the ass again.

I finally solved it, once I realized what was going on, by using a DataInputStream and reading it in directly as ints. That meant that I had to change the python routine that created it to write it out in network order rather than Intel order, but that of course is trivial. Bah. Humbug. Feh. Trust Java only with text. It is not reliable with byte data, unless you mean it reliably fucks it up. Like Microsoft, or the U.S. government, it thinks it knows better what you want than you do.

Back to blog or home page

last updated 2013-01-10 20:33:04. served from tektonic