Unless I have to roll this back because the like compiler in CS3
shits its pants trying to understand it (external references for
default parameter values seem to sometimes fail).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5969 542714f4-19e9-0310-aa3c-eee0fc999fb1
Note that we're using ints instead of units for offset/length.
Does anyone really need a byte array larger than 2^31?
And if so, wouldn't you then also be within sight of busting 2^32?
Why not make it a Number and support up to 2^53?
Number is no guarantee of a desire for a floating-point value in
the flash libraries, see Graphics.lineStyle()'s first parameter.
Actionscript, you fail for not having long.
And... I said I wasn't going to bitch at Adobe/Macromedia any more
but this is a total FAIL.
0 is a valid length. Everyone knows this.
Can you imagine if they picked a different constant?
length: the number of bytes to read, unless it's 9, in which case
it reads *all* the bytes. Your code should check to see if you're
about to read 9 bytes, and instead read 8 in one go and then
a follow-on byte.
uint.MAX_VALUE would have made tons more sense.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5968 542714f4-19e9-0310-aa3c-eee0fc999fb1
the Array length is 0, so let's make sure we don't cause any
streaming errors here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5966 542714f4-19e9-0310-aa3c-eee0fc999fb1
getting that adds the default value to the map. I opted for fetch() which at
least means something close to get() and can be documented as also inserting
the default value. I also considered obtain() and acquire() but those both felt
like they had something to do with locks. apply() seemed too functional.
wangle() seemed like a strong contender for a while.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5965 542714f4-19e9-0310-aa3c-eee0fc999fb1
streaming to our java server, so let's just make them streamable directly.
Does away with the need for custom Streamers.
Also made them Hashable, in case we read a StreamableHashMap containing
Integers as keys, for example.
Less code is better code.
(Why was BooleanStreamer added the other day? langBoolean was already Streamable
and was already in Translations)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5960 542714f4-19e9-0310-aa3c-eee0fc999fb1
Use String concatination in others (it's faster in actionscript than in Java)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5959 542714f4-19e9-0310-aa3c-eee0fc999fb1
inspection and approval and Matt's eventual use.
Note that we can't put this in samskivert as it depends on Google
Collections. Perhaps we should create an ooo-utils library for things like this
(and possibly move Narya's Serialization replacement therein since it is pretty
general purpose; Nate is using it for Riposte, for example).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5952 542714f4-19e9-0310-aa3c-eee0fc999fb1
overflow in our recursive checking. Try to catch it and cope.
I have a bad feeling this won't actually work in some envs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5950 542714f4-19e9-0310-aa3c-eee0fc999fb1
logs that it's listening on its configured ports, when start() is called. It
does so on a separate thread, but I don't believe the subtle ordering
possibilities there are something that's actually causing/likely to cause
problems and/or needs to be called out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5947 542714f4-19e9-0310-aa3c-eee0fc999fb1
I'm pretty sure it's the BaseGameConfig.
Typically, clients don't add directly to a StreamableHashMap received
from the server, why would they? So let's just treat it as a String-key map
and shut it up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5937 542714f4-19e9-0310-aa3c-eee0fc999fb1
Not generally useful to your everyday flash coder.
MessageBundle and MessageManager are built on top of Flex Resources,
and were already being excluded from our asdocs, and TimeUtil uses MessageBundle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5932 542714f4-19e9-0310-aa3c-eee0fc999fb1
Let's guess the type based on the first key unserialized, and guess if it
was empty.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5928 542714f4-19e9-0310-aa3c-eee0fc999fb1
The old HashMap class was a frankenstein one-size-fits-all mess of:
- storing simple objects
- storing Hashables
- having the capability to provide external functions to hash and check
equality of any other type of key.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5927 542714f4-19e9-0310-aa3c-eee0fc999fb1
support streaming them as bytes.
It's better than writing a modified UTF String, but
it'd be even nicer if we could avoid the short to read the class name
(Enums are final), but I suppose we still have to know whether one is null
or not. Hm.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5920 542714f4-19e9-0310-aa3c-eee0fc999fb1
The other happens now in normal circumstances in msoy, and I'd rather
not surround the call to super with an if to avoid this warning, and
potentially kablooie in the future if other functionality is added
to leftLocation in this base class...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5918 542714f4-19e9-0310-aa3c-eee0fc999fb1