Commit Graph

6192 Commits

Author SHA1 Message Date
Charlie Groves 4e8fdf66f4 Whoops, 1.6ism
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6265 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-13 22:36:55 +00:00
Charlie Groves 1f010f0a4e Add a C++ client for presents.
It provides code generators for streamables, services and receivers, but not DObject.  It uses
Apple's CFNetwork for its sockets and builds with XCode, so it's limited to OS X and iOS. It should
be straightforward to replace both to make it cross-platform.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-13 21:58:45 +00:00
Michael Bayne f0970bc5bc [maven-release-plugin] prepare for next development iteration
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6263 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 19:32:01 +00:00
Michael Bayne 2f98439fbc [maven-release-plugin] prepare release narya-1.1
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6261 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 19:31:52 +00:00
Michael Bayne 821f3549b2 Pants, these should be 1.5.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6260 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 19:29:08 +00:00
Tom Conkling 27188edf68 Fix eclipse project
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6259 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 19:14:49 +00:00
Michael Bayne 2714587a3a [maven-release-plugin] prepare for next development iteration
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6258 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:48:07 +00:00
Michael Bayne 66e590adc0 [maven-release-plugin] prepare release narya-1.0
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6256 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:47:57 +00:00
Michael Bayne 1fa94658e4 Line wrappy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6255 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:46:56 +00:00
Michael Bayne 3b6fd298d9 Correct SVN URL.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6254 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:46:38 +00:00
Michael Bayne 978da38930 Undo release prep. The SVN URL was incorrect.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6253 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:46:08 +00:00
Michael Bayne 4d4babbb8e [maven-release-plugin] prepare release narya-1.0
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6252 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:43:33 +00:00
Michael Bayne 7df0de5389 Keep our resources in src/main/resources per the standard project layout.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-08 17:31:33 +00:00
Charlie Groves 07706ec61e handleAcceptedSocket can't be called by code outside of ConnectionManager as it
touches the _handlers Map which should only be modified on the
ConnectionManager thread.  Add transferAcceptedSocket for outside socket
acceptors to call.  It sticks new sockets into a queue, which are then passed
to handleAcceptedSocket as part of ConnectionManager's iterate.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6250 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-05 23:07:19 +00:00
Andrzej Kapolka 07b6a3a102 We should probably reset the dropped count each time the connection is
cleared.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-11-05 03:08:12 +00:00
Andrzej Kapolka a9fdaee8d5 Addressing a longstanding issue with the chat command aliases/translations.
The help message for /help <command> was using the translated/aliased string,
which meant that you had to have a usage translation for each command alias.
This became unmaintainable in Project X, where we had artists adding emotes
with lots of aliases, and I'm guessing it was booched in the Y!PP translations,
since they seem to lack translations for things like m.usage_escuchar.  Let's
instead use a usage message based on the untranslated command, then compose
the actual command used into that (for aliases).  This should be mostly
backwards-compatible, but I will be updating Yohoho and Bang in addition to
Project X: this involves replacing the command name in the usage translations
with {0} and returning getUsage(command) instead of "m.usage_blabla".


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6248 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-30 00:52:53 +00:00
Charlie Groves 2d79055f11 Remove dependencies picked up from other projects, export our own stuff
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6247 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-28 20:09:47 +00:00
Mike Thomas 3697b289b6 Since samskivert no longer exports jars, we need to add some includes in various other projects' configs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6246 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-28 17:51:06 +00:00
Mike Thomas 1a71ec58f7 Let's update this to match the pom Ray changed - r07 for guava.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6245 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-27 23:51:52 +00:00
Charlie Groves 7fd5aee306 Missing @Overrides
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6244 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-27 23:44:31 +00:00
Ray Greenwell e00884ac54 Use the latest/greatest guava. For now.
This doesn't feel like a step forward.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6243 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-27 20:03:46 +00:00
Mike Thomas ff817dbca9 Make the AsString editor notice that things are the same when their string values match. Otherwise when we have a comma-separated array, when we lose focus, even if things match, we believe we don't match because an array's equals just compares pointers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6242 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-26 20:10:02 +00:00
Dave Hoover 0bb3713fe8 We're already using T for other things.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6241 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-25 23:10:08 +00:00
Dave Hoover 4f5f00e3ca Don't need that in there.
Looks like eclipse merrily reformatted various lines in my last commit
and added this. Yay.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6240 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-25 23:10:07 +00:00
Mike Thomas 162bf3e300 Realisitically, anyone who depends on narya is going to need samskivert and depot and guice and guava. And even if they don't need those things, not exporting them here doesn't make those projects any less standalone...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6239 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-25 20:40:42 +00:00
Dave Hoover ed169b3e25 Tell eclipse we need gwt-utils 1.1 also.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6238 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-25 17:53:27 +00:00
Michael Bayne 8f71416555 We're not going to build narya-tools-full.jar as a part of Narya.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6237 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-24 02:07:58 +00:00
Michael Bayne 8533703525 Guava is a non-optional dependency.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6236 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-24 01:46:15 +00:00
Michael Bayne 5d0789df59 Stop building our individual jar files, and work around annoying problem with
<java clonevm="true" dir="foo"> not doing the right thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6235 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-24 01:31:59 +00:00
Michael Bayne 0cfa876a81 Added a test-tools target which runs the gen tasks using narya-tools-full.jar
on the DObject and invocation services in src/tests/java and checks that
nothing changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6234 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 19:48:55 +00:00
Michael Bayne 0f8fd31f83 Regenerated the test bits with the gen tasks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6233 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 19:38:17 +00:00
Michael Bayne e0dfddb46b Handle parameterized types in invocation services and receivers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6232 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 19:37:51 +00:00
Michael Bayne a5c9acf288 Is it really useful to have these:
100K dist/narya-base.jar
676K dist/narya-distrib.jar
 68K dist/narya-tests.jar
 88K dist/narya-tools.jar

rather than this:

860K dist/narya.jar

Anyone who uses Narya uses narya-base and narya-distrib, and beyond that we're
looking at another 160k which is silly to split out.

To avoid disruption, I'm keeping the other jar files around, so that everything
will continue to work as before while I convert things over.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6231 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 17:49:17 +00:00
Michael Bayne 7d12fe98c5 Annoyingly, the version of JarJar in Maven Central is old and buggy. The latest
version has helpfully not been uploaded to Maven Central, but to the JBoss
Maven repository. Anyway, this should fix problems with narya-tools-full.jar.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6230 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 17:36:09 +00:00
Michael Bayne 0e134f41b3 Added a jsr250-api dependency to provide @Generated for non-Java-1.6 users. I'm
not especially fond of the @Generated annotation anyway, so I'd kind of rather
use this an excuse to remove it, but I'll just live and let live.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6229 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 16:05:34 +00:00
Andrzej Kapolka 93aa0b5bf6 Apparently this boolean needs to be set explicitly; also, whitespace fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6228 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-23 04:06:47 +00:00
Michael Bayne 8a70b9c5bd Require gwt-utils 1.1 which is built with a JDK 1.5 target so that Yohoho's 1.5
JDK users can continue function and persist in being a pain in our collective
asses (and persist in paying the salaries of most of the people whose assses it
pains).

You guys do know about Getdown's automatic JDK upgrade feature, don't you? You
should use it and then have the server record statistics about the JVM versions
of all of the clients. If nothing goes wrong (and I'm pretty sure we used it on
Bang and it worked well enough), then your 1.5 user base will disappear.

Oh wait, maybe you've already done that, or don't want to do it so that you can
continue to support the Mac OS users who run on some version for which Apple
will never provide Java 1.6. Well, Apple has abandoned Java completely, so
future Mac users probably won't be able to run Puzzle Pirates anyway. Joy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6227 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 22:57:50 +00:00
Michael Bayne 9255354314 Unsatisfactory partial compromise: place both project and jar dependencies in
the .classpath. I'm leaving optional="true" on the project entries in mute
protest of its non-workingness.

When project dependencies are met (since they come first in the list), Eclipse
will use those to find the code they export and everything will be groovy.

When they're not met, if you switch Window -> Preferences -> Java -> Compiler
-> Building -> "Incomplete build path" from Error to Warning, it will build and
just leave you with three annoying warnings in the Problems list about
unsatisfied project dependencies.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6226 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 22:53:44 +00:00
Michael Bayne 3b54853878 This old native code for dispatching signals needs to die die die. It's long
since been replaced by using the secret undocumented JDK APIs for doing the
same thing. AFAIK that works on all of our servers and we're not shipping
libsignal.so with anything.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6225 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 21:59:18 +00:00
Michael Bayne 26bdfaba19 Regenerated with mvn eclipse:eclipse (and then switched target to dist so as to
not crap undesired directories onto Eclipse users' filesystems).

I first tried installing m2eclipse and then recoiled in horror as it started
doing crazy shit and didn't even work in the end. Then it took me 10 minutes to
figure out how to uninstall plugins from Eclipse. Who writes this software?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6224 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 21:47:24 +00:00
Michael Bayne 30c8fb162d Updated the POM and modified the Ant build to obtain dependencies from the POM.
That's now the canonical place to list the dependencies, which will make
eventual publishing of Narya to Maven Central easier, and will make using
things like m2eclipse smoother.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6223 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 21:23:20 +00:00
Michael Bayne 9d2ca42eac Convert Narya (most of the way) over to a Maven Ant task based build. The
ActionScript bits remain belligerent, but the Java stuff is mostly shipshape.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6222 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 21:12:29 +00:00
Dave Hoover 555b865bbf Teach eclipse about jmustache down in our M2_REPO
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6221 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 20:48:55 +00:00
Dave Hoover 0e18ec920e Unused import
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6220 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 20:48:54 +00:00
Michael Bayne fbfcd9db90 One baby step toward making Narya obtain its depenendies from Maven.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6219 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 16:23:15 +00:00
Michael Bayne 4b443fe148 Last night, I read about the Mustache templating library (a derivative of
Google's CTemplate) and got all hot and bothered, because it seemed like it
would be sufficiently powerful to replace Velocity for our Narya templating
needs.

I then sought out a Java implementation and found one, and quickly discovered
that it lacked the right level of awesome for my needs. So I foolishly decided
to write my own, because Mustache seemed simple enough that I could reimplement
it in a few hours.

A few hours later, I had a neat and tidy reimplementation of Mustache and then
set about to converting Narya to using it. Then the fun began.

I discovered that Mustache wants everything in a hash, but sometimes you just
want to iterate over the elements of a list, and print them into the template
whole-hog. So I extended Mustache with the special "this" variable for printing
the whole context instead of pulling values out of it by name.

Then I remembered that Velocity allows you to do a deep dive into objects,
calling methods and calling methods on the return values of those methods.
Velocity even allows you to pass constants as arguments to those methods (true,
strings, integers). Well, I reimplemented the compound keys, so that you can
call foo.bar.baz, but I didn't go so far as to support constant arguments. That
seemed a step too far into complexity land and to be the sort of thing that
Mustache tries to avoid. So with compound keys, I just had to add a few
alternative versions of methods we were already calling, since we only ever
passed true/false as an argument.

Then I realized that Mustache doesn't do any smart trimming of newlines, so if
you have:

{{#stuff}}
blah blah
{{/stuff}}

You get the annoying newline after the open-tag and after the close-tag. So I
modified my implementation to trim newlines in those circumstances, so that
template authors don't have to do a bunch of template-weirding whitespace
jockeying.

Then I discovered that Mustache doesn't support any notion of scope. So when
you're inside a so-called section, the only variables visible are those bound
by that section. The stuff outside the section is totally invisible. Well,
that's not how Velocity works, you can reference things outside your loop
iterations. It seemed no terribly affront to Mustache to make things work that
way as well, so I did that.

Then I discovered a problem with the fact that Mustache implicitly binds the
loop object to the root of the namespace, so if you have {{name}} outside the
loop and then your loop object also contains a {{name}} field, then you can't
see the outside {{name}} anymore because it's shadowed. Tough titties, in this
case, I just changed our code to not shadow the name.

Then I encountered a bunch of uses of $vidx to put a space before all but the
first element of a list. So I added two more special variables -first and -last
which allow you to do just that sort of thing (and more) in a more template
friendly way because you don't need a Turing complete language just to decide
whether or not you need to mind the gap.

Then I encoutered some uses of $vidx directly, where we were using it to assign
constants in invocation service related classes. So I added another special
variable -index which resolves to basically the same thing that $vidx resolves
to (a 1-based counter indicating which element you're on in your list
iteration). I rationalized to myself that if you wanted to automatically number
laundry lists in your templates, having -index would be nice.

Finally, I have Narya's templating stuff producing character-for-character
replicas of what it used to do with Velocity. Well, actually there's one
newline in a place where there didn't used to be one, but I think that newline
makes sense and it was maybe some sort of Velocity bug that caused it not to
exist.

I've tested the gendobj, genservice and genreceiver tasks. I have no tested
whatever uses streamable_as.tmpl, but I'm pretty confident that it will work
exactly as before because I modified hundreds of lines of other templates in
exactly the same ways and they all work just fine.

So the world gets yet another templating library:

http://code.google.com/p/jmustache/


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6218 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 06:42:47 +00:00
Charlie Groves c61038277c Go back on looking in the child classpath first; that means the client version of the presents
classes are found before the tools version, and class equality comparisions don't work.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6217 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-22 01:18:48 +00:00
Mark Johnson e96310b43b - Prefer reading from the created classpath instead of the parent classpath
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6216 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-19 23:47:24 +00:00
Charlie Groves 20d97bf26a Mark StreamableArrayList and StreamableHashMap as replaced by their basic Java counterparts. Basic
Map and List types are streamed as fields, which are smaller on the wire.  I'd deprecate them, but
yohoho uses them all over the place.

Handle generating code for StreamableArrayList and StreamableHashMap in actionscript for existing
code.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6215 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-18 21:18:36 +00:00
Dave Hoover 3a25e8a3b9 Update source headers to point to our new home.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6214 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-10-18 18:01:12 +00:00