Use this if you want your enums to persist to a byte reliably.
Coming soonesque: narya streaming support for ByteEnum.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5859 542714f4-19e9-0310-aa3c-eee0fc999fb1
Not available in Java, and generally a bad idea.
Pretend ordinal() doesn't exist, unless you're writing EnumSet, or something.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5858 542714f4-19e9-0310-aa3c-eee0fc999fb1
authenticators and chained session factories. We can share a lot more code this
way and the implicit requirement that the default authenticator/factory had to
be configured before anyone else configured a chanied author/factory is gone.
The other big change is that Credentials doesn't require a username
(UsernamePasswordCreds inherits that username so most derived classes don't
notice any difference). Instead we require that a canonical authentication
username be determined and configured in AuthingConnection during the
authentication process. This canonical username is then used to resolve the
client session and map everything in the client manager.
This is pretty much exactly what was going on before except that we were doing
it all in an ad hoc way by jamming a new name into Credentials during the
authentication process and also doing jiggery pokery in
PresentsSession.assignStartingUsername. That all goes away and/or becomes
cleaner and more explicit.
This is going to impact some Yohoho jiggery pokery, which I will shortly commit
a patch for, but we're going to need to test it. Omelets, eggs, etc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5828 542714f4-19e9-0310-aa3c-eee0fc999fb1
I did not add true() and false(), because WTF, YAGNI.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5810 542714f4-19e9-0310-aa3c-eee0fc999fb1
It's the closest thing to a shutdown.
I've got half a mind to write a LinkedHashMap, and then
an ExpiringHashMap on top of that, and then have
ExpiringHashSet just utilize that in its internals.
But, YAGNI, for now... for now...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5784 542714f4-19e9-0310-aa3c-eee0fc999fb1
- We shouldn't need to run checkTimer() on add(), generally.
If adding the sole element, we can just schedule the expiration
directly.
- Simplified and functionalized some other bits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5778 542714f4-19e9-0310-aa3c-eee0fc999fb1
using the new varargs fanciness, including a stack trace from the error.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5762 542714f4-19e9-0310-aa3c-eee0fc999fb1
I could also make this just implement each interface, but I like
being able to assign the functions to their proper names.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5761 542714f4-19e9-0310-aa3c-eee0fc999fb1
Now it is more useful for this to hash identically as in Java.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5753 542714f4-19e9-0310-aa3c-eee0fc999fb1
Jeez, this whole thing could *almost* go away if we moved to flash 10
and used Vector, but of course, there's no way to get the type of
Vector. Maybe there is, with describeType(). Can't experiment now.
I'd fall out of my chair if there were.
We need to know in case sending an empty array to the server,
it's still gotta be the right type (with non-empty we could
try examining the first element).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5742 542714f4-19e9-0310-aa3c-eee0fc999fb1
reviewing some of the first code written in it might be a good idea.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5741 542714f4-19e9-0310-aa3c-eee0fc999fb1
I'm not sure how much actual utility is here, and how much I just like the
gee-whiz factor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5731 542714f4-19e9-0310-aa3c-eee0fc999fb1
I sorta want to make a new FunctionUtil so that I can use it
with impunity everwhere without having to include the other crap in here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5730 542714f4-19e9-0310-aa3c-eee0fc999fb1
Tip from the pros: when you change a class, you might want to check
the subclasses for possible problems with that change.
:P
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5729 542714f4-19e9-0310-aa3c-eee0fc999fb1
Let's try it and see if it works. Let us know Nathan.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5728 542714f4-19e9-0310-aa3c-eee0fc999fb1
I hate your checkin comments, but I love your product!
The real reason I cleaned up HashMap: I override
forEach(), and now I don't need to do anything to make values() and keys()
work properly for weak values. Less code is better code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5726 542714f4-19e9-0310-aa3c-eee0fc999fb1
- Implement keys() and values() using forEach().
- Less code is better code.
- But, it's less efficient:
- values() now looks up simple-key values by hashing
- values() now unwraps non-simple keys, even though unneeded
- keys() looks up simple-key values, even though unneeded
Say it with me like a 14-year-old girl: whatEVER!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5724 542714f4-19e9-0310-aa3c-eee0fc999fb1
We could trash it and change our toStringBuf() methods
to just return a String. I guess. Then the caller would
have to assign the string somewhere. I guess this has some value.
So anyway: Occam's razor, and fixes a small bug: appending undefined
would print as "null" since it was being forced to an Object first.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5722 542714f4-19e9-0310-aa3c-eee0fc999fb1
though annoyingly now I can't reproduce it. Call Heisenberg!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5712 542714f4-19e9-0310-aa3c-eee0fc999fb1
Have the FrameReader stop listening on the socket when we're done with it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5707 542714f4-19e9-0310-aa3c-eee0fc999fb1