#nuvie@irc.freenode.net logs for 11 Aug 2007 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage


[00:47:28] --> Yuv422 has joined #nuvie
[01:04:02] <SB-X> hi yuv
[01:04:16] <Yuv422> hi SB-X
[01:04:21] <Yuv422> how's things?
[01:04:35] <SB-X> fine, im still working on Event and keybindings
[01:04:46] <Yuv422> how's it going?
[01:05:18] <SB-X> well it's a little slow since I didn't plan everything out ahead of time, but it's coming together now
[01:06:17] <SB-X> i still havnt copied the main commands over to InputActions yet; only Drop and Talk are tied into event right now
[01:06:35] <Yuv422> right
[01:06:45] <SB-X> it hasn't been compilable for a day or two, trying to get that fixed now :)
[01:06:52] <Yuv422> I look forward to seeing your changes
[01:06:58] <Yuv422> hehe
[01:07:25] <SB-X> what did you think of luteijn's new debug output?
[01:07:54] <Yuv422> looks good
[01:08:09] <Yuv422> haven't looked at the msgscroll stuff yet.
[01:08:22] <SB-X> that probably works fine... do you think it needs so many debug levels?
[01:09:23] <Yuv422> probably not but it doesn't hurt t have them in there
[01:09:35] <SB-X> i guess not
[01:10:07] <Yuv422> I'm not sure about the negated debug define
[01:10:34] <Yuv422> I would be more inclined to say DEBUG rather than WITHOUT_DEBUG
[01:10:54] <Yuv422> debug code is usually turned on rather than off
[01:11:08] <Yuv422> but that doesn't really matter either
[01:11:23] <SB-X> i wonder if DEBUG or WITH_DEBUG would conflict with SDL
[01:11:33] <SB-X> something is conflicting now
[01:11:43] <Yuv422> NUVIE_DEBUG
[01:11:57] <Yuv422> that won't clash I'd imagine ;-)
[01:12:13] <SB-X> unless those were just errors from pieter's sound system
[01:12:17] <SB-X> nope that would work
[01:12:48] <SB-X> i'd also still like PERR (or perr) to just send errors without having to specify the level
[01:12:56] <SB-X> maybe that's there still
[01:13:03] <Yuv422> I think it is usually better to go with the true case eg DEBUG rather than not DEBUG
[01:13:11] <Yuv422> brb
[01:13:22] * Yuv422 wanders off to hang out some washing
[01:14:37] <SB-X> configure scripts use --without-feature (and --with-feature) so it was probably meant to match that naming style
[01:14:47] <SB-X> also luteijn really likes the debug output and would always have it turned on anyway
[01:21:09] <Yuv422> #ifdef RELEASE
[01:21:15] <Yuv422> #undef DEBUG
[01:21:25] <Yuv422> #endif
[01:22:14] <Yuv422> it's ok
[01:22:22] <Yuv422> we don't need to change it
[01:38:11] --- harbingerkun is now known as harb[away]
[01:42:23] * Yuv422 makes a magic test save game
[01:42:46] <Yuv422> start of the game with all spells
[02:01:41] --- harb[away] is now known as harbingerkun
[02:03:24] <SB-X> how did you get all spells at the start of the game? you used spell 255?
[02:03:31] <Yuv422> yes
[02:03:43] <Yuv422> and spammed my exp right up
[02:03:47] <Yuv422> and level
[02:03:52] <Yuv422> so I could cast them all
[02:34:19] <-- harbingerkun has left IRC (Remote closed the connection)
[02:34:27] --> harbingerkun has joined #nuvie
[03:43:31] <luteijn> the issue with the SDL (and maybe other libs) debug output is just the style clash (e.g. no timestamp etc) not anything to do with defines.
[03:46:40] <luteijn> As nuvie is still full of bugs 'd think we'd want debugging on by default, and at the highest level; WE are currently the ones mostly building it... even for the first 'release' we should consider leaving debug enabled by default, so when the masses (ehh the other 2.3 people interested) start running into misfeatures and issues, there would be something more to go on.
[03:48:50] <Yuv422> hi luteijn
[03:48:52] <Yuv422> I agree
[03:49:03] <luteijn> The number of debug levels is just because I didn't make those names up myself, cisco uses those levels of logging, and they make sort of sense. We probably need to adjust the level things are logged at some more:
[03:50:32] <luteijn> at the moment I took all the things that said ERROR or WARNING in te message and logged those at that level; some more critical things that would cause/be caused by corrupted state went higher than that, most of the spam or don't know what to do went to debugging, and some things to info or notification
[03:52:00] <luteijn> probably more effective if debugging only has the really spammy things, e.g. state-dumps that get done every turn, or big tables; basically the stuff that is only interesting when almost tracing through the program..
[03:52:20] <Yuv422> sounds ok to me
[03:54:23] <luteijn> I sort of agree with SB-X that it would be handy to have something like PERR(x...) to just dump some quick info without having to type the full DEBUG(0,LEVEL_DEBUGGING,"blah: %s",blah->c_str());
[03:55:43] <Yuv422> yeah short hand would be nice
[03:56:08] <Yuv422> I have keyword completion on my ide but macros would be faster
[03:56:33] <luteijn> I used both when converting, and I guess I would be in the future..
[03:56:45] <SB-X> luteijn: (re SDL debug output) ah ok, sorry i misunderstood
[03:57:43] <luteijn> SB-X: probably my fault, I tend to be either too verbose (see last few huge blocks of text) or too terse.
[03:59:08] <SB-X> heh np, I didn't know about the logging levels... do you have a list of descriptions for them?
[04:00:11] <luteijn> anyway, shorthand form would limit the flexibility; you can probably define a keyboard-macro to say press F9 for "DEBUG(0,LEVEL_DEBUGGING,"");" and position the cursor in insertmode between the "" (and F10 for one where you're just in the right spot for completion of the LEVEL_ )
[04:00:36] <luteijn> Eh, you mean which levels there are, or what they are/should be used for?
[04:00:42] <SB-X> not being a network engineer I don't really know what they all mean, some of them seem redundant which is mainly why I suggested fewer levels
[04:00:47] <SB-X> what they should be used for
[04:01:15] <SB-X> and their order of "importance" (though i can get that from the code)
[04:01:51] <luteijn> I would guess most of them are self explanatory, especially in the context with the others and the order they are in. The order is defined in the enum in nuvieDefs.h
[04:02:50] <luteijn> probably just googling for 'cisco logging levels DEBUGGING INFORMATIONAL' would get you a list and the official definitions..
[04:07:14] <SB-X> http://www.ciscopress.com/articles/article.asp?p=24109&seqNum=7&rl=1
[04:07:30] <luteijn> I've mostly used ERROR, WARNING, DEBUGGING so far. difference between NOTIFICATION and INFORMATIONAL is a somewhat the same as between ERROR and WARNING; I've tried to use notefication to report decisions made by the program, and info for causes that might influence future decisions. e.g. info: half the memory is used up! note: conducting garbage collection. warning: FIXME: garbage collection not yet implemented! error: tried to allocate more memory tha
[04:08:06] <SB-X> their logging system seems a bit more advanced than ours
[04:08:40] <luteijn> Eh yes, they can log to the console, the buffer, a syslog server etc.
[04:08:45] <SB-X> i wouldve thought information and notification would be the other way around (notification is a higher level)
[04:09:02] <luteijn> yes, that's how I used them
[04:09:26] <SB-X> by higher level i mean lower number
[04:09:48] <SB-X> don't we have garbage collection already? :)
[04:09:49] <luteijn> to me half the memory gone is a non-critical not even worth a warning type of message.
[04:10:25] <SB-X> yeah but you put an exclamation mark after it so it looked important
[04:12:41] <SB-X> this page also gives a pretty obvious description http://www.tech-recipes.com/rx/2094/cisco_pix_logging_debugging_to_emergency
[04:13:12] <SB-X> I guess the meanings are rather obvious when looked at in an ordered list like that. Thanks for explaining it some more anyway.
[04:15:27] <SB-X> any reason not to use cisco's syslog names? (LOG_EMERG, LOG_ALERT, LOG_CRIT etc)
[04:31:12] <Yuv422> to change the topic a bit do you think the random nature of sleep and other spells was done with turn by turn saving throws?
[04:31:36] <Yuv422> if asleep roll dice and try to wake up
[04:31:52] <Yuv422> roll under exp or something similar
[04:32:03] <Yuv422> maybe I should have a look in ida
[04:38:47] <SB-X> Is the other option that they stored the timeout in memory when the game was loaded or actor cached in?
[04:39:07] <SB-X> but still set a random timeout
[04:39:45] <Yuv422> I can't see it in objlist
[04:39:53] <Yuv422> and it's random each time the game loads
[04:40:08] <Yuv422> just wondering if they stored a counter
[04:40:18] <Yuv422> or just did a check each turn
[04:41:01] <SB-X> I don't think they stored a persistent counter in memory, else they would have saved in in the objlist.
[04:41:32] <Yuv422> yeah that sounds vaild
[04:42:07] <Yuv422> I wonder what version of turbo-c origin used?
[04:42:07] <SB-X> they store a lot of global data like that, but it seems like they were interested in saving memory as well as disk space, so probably only kept what was necessary (in memory and on disk)
[04:42:58] <SB-X> what came out in 1988?
[04:44:55] <Yuv422> 1.5
[04:46:27] <SB-X> no idea what kind of roll would be used to check sleep
[04:46:48] <SB-X> maybe it's just really random
[04:46:56] <SB-X> not based on stats
[04:48:11] <Yuv422> I want to see if I can find the random function in game.exe
[05:00:11] <-- SB-X has left IRC ("BRB")
[05:06:07] --> sb-x has joined #nuvie
[05:06:28] <Yuv422> wb SB-X
[05:07:21] <sb-x> ty
[05:07:47] <Yuv422> turbo-c 2.01 has the same id string
[05:08:03] <Yuv422> (c) 1988
[05:08:35] <sb-x> :D
[05:08:49] <sb-x> are you going to try and duplicate origin's build environment? ;)
[05:08:52] <Yuv422> I'm compiling a small app with rand()
[05:09:01] <Yuv422> then going to run it through ida
[05:09:16] <Yuv422> see if I can pick up the rand sub in game.exe
[05:31:29] <luteijn> I used the cisco logging levels because Yuv mentioned prefixing categories like [ERROR] [WARNING] [INFO], and in my head those associated to the cisco log levels. Actually maybe we can change what is currently 'DEBUG()' into 'LOG()' and add a new 'DEBUG()' that would be a shorthand for LOG(0,LEVEL_DEBUGGING,...);. Then again, the 'debug' messages tend to be the ones that have lots of optional entries that have to be printed without a header...
[05:48:15] <luteijn> Next week the 'olds' on the webpage is one year old again.. Who's going to write the yearly update?
[05:49:36] <Yuv422> rock paper scissors?
[05:49:41] <Yuv422> ;-)
[06:18:47] <sb-x> I'll write it.
[06:18:58] <sb-x> sometime around then
[06:19:02] <sb-x> sleep time now
[06:19:03] <sb-x> cya
[06:19:40] <-- sb-x has left IRC ("*casts gate travel*")
[07:10:05] <Yuv422> I think I've found the u6 random function
[07:10:31] <Yuv422> looks like it returns a number between a min/max
[07:11:00] <Yuv422> using the fishing pole
[07:11:11] <Yuv422> is a 1 in 5 chance
[07:11:31] <Yuv422> of getting a fish
[07:38:36] <Yuv422> I'm off now
[07:38:37] <Yuv422> cya
[07:54:53] <-- Yuv422 has left IRC ()
[15:13:42] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[18:24:16] <luteijn> hmm looks like I broke the windows version.. daily snapshot fails on startup after just printing "zd [" to stderr.. I guess its fprintf doesn't grok %zd, so just prints that, then at the next %s tries to use the timestamp as a string..
[18:41:04] <luteijn> getting the timestamp slightly differently now, hopefully that helps.
[19:35:54] <-- luteijn has left IRC ("BitchX-1.1-final -- just do it.")