I just saw this thread, and I like what I see. I've been trying to make a Perl and PHP implementation of something like DASPRiD's TremStats, but with a lot more functionality, and most of my features thus far have been geared towards admins rather than the general public.
Maybe I don't understand properly, but isn't the purpose of tremsnaps to query servers and store their responses, not to handle local server data (e.g., tremstats parses logs from the local server)? I really don't see much similarity... (Are you trying to do something more like http://betaserv.tk/?)
Most of my stuff right now parses the logs, yes, and much of my focus has been on statistics of the server; imagine if I could add statistics from the entire Tremulous community by using the master list's (limited) information? And yes, to some extent, the betaserv's pages do a few of the same things that mine do, although I am not sure of their implementation methods.
I was wondering if you wouldn't like to join up, and we'll see what a couple of great minds can't come up with. I'm a little handy with PHP, but more so with C/C++ and Perl, so I could use your ideas.
Wasn't DASPRiD planning on rewriting the tremstats parser in C?
I have no idea, actually. Last time I checked his project was entirely dormant, and his site was all but totally inactive.
If you guys have any comments, I'd love to hear them; an outdated version of my project can be found at http://tremtools.googlecode.com. (I say outdated because there is no public collaboration yet, so the Google Code repository is way behind my local SVN repository that I keep my projects in.) Let me know.
Since you asked for comments, I'll make a few:
Your coding style seems non-existent.
Comments are for explaining what unobvious code is doing or what you are doing with the code, not for burying it.
Your code does many things that will not work properly or at all (though you may have fixed them locally).
Your code does a lot of things suboptimally. That is an understatement.
Explain what you'd like to be done better in terms of my "coding style," whether you mean method, syntax, lack of whitespace, etc.
I know that my comments are annoying as hell, at least for that one file. My original version wasn't commented at all, but I think that was before I created the Google Code repository. It actually took me longer to comment that mini-program than it did to code it, I think, but I did so for an express purpose, because I originally wrote it to be tested on the X server and an interested party there was not a coder and so I commented it so as to be understandable by a non-programmer. Because at that point it was not intended to be truly public, I did not take that into consideration; I have yet to clean it up, as you can see, even on my local revisions. The only reason I can read it is because of gedit's syntax highlighting that makes it neither helpful or harmful, but rather all but invisible if I so choose. In my programming environment, it's easy enough to ignore. When there's a ton of people that actually want to start looking at the code, I'll start writing it for them instead of for a couple of friends from X.
I honestly cannot remember where I was at when I last committed the Google Code copy of my code, but I can tell you right now that in some spots it's still like that, and my comments say as much. I intentionally partially code some things but then tell them to do nothing or nothing of great importance, leaving them until I can finish other related parts of the project that depend on them. This is very intentional and is merely an example of setting up functionality that doesn't yet exist. It does exactly what I want it to, however; otherwise, I fix it immediately, be assured of that.
I'm not sure if I mentioned this anywhere other than the X server forums, but I should say that I learned Perl for the sole purpose of writing the original logfile parser. I had never touched Perl before in my life, and am still learning, of course. It is a very versatile but sometimes very obscure language that I find both gratifying and frustrating at the same time. It also happens to be quite fast; not nearly as fast as C, of course, but rather well-performing nonetheless. So if by "optimally" you refer to "optimization" then I suppose that's why. If you'd care to be more specific, I'm sure there's something you can teach me that I'd be very grateful for!
The 404 error is because I'm developing an e-mail script (yet another way of hiding my address).
There's a thousand and one ways to do this, whether it's CGI, JavaScript, or simple encoding like URL escaping using the HTML hex symbols for each character. It should take all of ten seconds to do, if you want me to show you...