The reason that chimps are always winning is also related to the mentioned issue. Chimps buy randomally (buy_count = int(max_buy * random.random())), it never buys everything possible. So it never gets bankrupt by the controller bug (unless a random output of 1 and controller bug happen at same moment which will be very rare).
As far as I can tell, as long as the controller is never passed a #e# value it should work. The problem is that once it is given an e value it starts working with floats instead of integers
This should be fixable if you coerce values to int in the controller
This happens because the long integer type has infinite precision while float can round either up or down.
I'm trying to take a string that's in EBCDIC and transcode it to ASCII
The problem is that since my JS instance uses UTF-8 strings, when I do "message.charCodeAt(i)", I don't get the true binary value. I just want the literal binary representation of the string
I suppose it would be a better idea to put it in something like an UInt8Array, but you'e have to have it in there in the first place already, because going via a UTF-8 encoded string is potentially a lossy process
So this is all happening in an Atom plugin I'm trying to make to save myself time. I have an instance of the current editor widow and retrieve my text via a .getText() call. The idea is that I have files I want to read that are encoded in EBCDIC, so I want to open them then run the plugin so that it converts it to viewable ASCII text
I think it has something to do with the fact that, for my test case, my first two characters are being interpreted as a unicode character instead of just single byte characters