![]() |
Forums » List all forums » » Forum: Game Design » » » Thread: Messy Logs » » » » Post: Re: Messy Logs |
Print at Jan 19, 2021 10:31:20 AM |
Posted by popiel at Dec 25, 2003 6:51:40 AM | ||||
Re: Messy Logs
Actually, XML doesn't offer the main advantage of a database system: random access to arbitrary records without reading (on average) half of the whole thing. But that's irrelevant...
They could do that already. The chat log is very easily parsed with newline separated records of one of two flavors: a datestamp, or an output line with a prefix timestamp. Very simple to parse with just a couple regular expressions, scanf patterns, or even fixed-width fields + overflow. The issue is that we're missing data in the log. This could be rectified with a 'method' attribute in XML as Diamondblade suggests, or it could be rectified as easily (and much more concisely without reducing human readability) by sticking in [flagofficer]/[crew]/[broadcast]/[whatever] right after the timestamp, to make it look like this: [09:18:01] [crew] Talek says, "This is getting silly." Yes, you can't just use a stylesheet to format this prettily for your web browser... my gosh, we're up to a perl 1-liner. If you want to sort, collate, spindle, or mutilate the log, you can't use just a stylesheet anyway... and we're still at only a few lines of perl. XML ain't no magic bullet. ---------------------------------------- Talek Owner of Occam's Razors on Epsilon Officer in the Roundhouse Rum Runners |
Powered by mvnForum
mvnForum copyright © 2002-2006 by MyVietnam.net