#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2015-03-16

Timestamps are in GMT/BST.

00:19:40Watusimoto has joined
00:23:24Guest43629 Quit (Ping timeout: 246 seconds)
01:15:53Nothing_Much has joined
01:45:19Flynnn has joined
01:47:23Flynnn Quit (Client Quit)
02:30:29koda has joined
03:11:46Watusimoto Quit (Ping timeout: 256 seconds)
05:13:49koda Quit (Quit: koda)
05:28:30koda has joined
06:07:05koda Quit (Quit: koda)
06:07:25koda has joined
06:26:29LordDVG has joined
08:13:57LordDVG Quit (Remote host closed the connection)
11:36:31raptor has joined
11:36:32raptor Quit (Changing host)
11:36:32raptor has joined
11:36:32ChanServ sets mode +o
11:36:37raptorgood morning!
11:41:01kaen_mbp has joined
11:42:50kaen_mbp Quit (Remote host closed the connection)
11:48:53kaen_mbp has joined
11:50:19kaen_mbp Quit (Remote host closed the connection)
12:23:28kaen_mbp has joined
12:24:51kaen_mbp Quit (Remote host closed the connection)
12:30:13Invisible has joined
12:30:38Invisible is now known as Guest59531
12:57:28watusimoto has joined
12:57:28ChanServ sets mode +o
12:57:44watusimotohello!
13:02:39raptorhello
13:03:31raptori was looking at the symbol sizes of our 'bitfighter' executable -
13:04:00raptor_Z41__static_initialization_and_destruction_0ii symbol is around 250K
13:04:22raptornext in line is _ZL19OGLCONSOLE_FontData at about 50K
13:04:37raptormost everything is under 1K
13:05:31raptorso i think moving all the stuff from RenderUtils and OpenglUtils into RenderManager will reduce that global static footprint
13:07:44raptorgranted 250K of memory for statics probably isn't hurting us
13:09:32raptoroh, actually there are several chunks - looks liek static initialization amounts to: 472786
13:09:44raptorwe're RAM hogs!
13:12:12raptoralso, i came across the c++ FQA: http://yosefk.com/c++fqa
13:12:34raptorit's funny...
13:39:40watusimotoI think we could use 10x the resources and no one would notice on their modern computers
13:46:47watusimotothe fqa guy is almost as opnionated as I am
13:47:06raptorthere's a lot of good data there
13:47:20watusimotoyes
13:47:24watusimotoit's a good document
13:47:53raptori was lost trying to figure out why calling a pure virtual method from a classes contructor wouldn't work and found the answer there
13:48:10watusimotoit doesn't work because it's c++
13:48:16raptorexactly!
13:48:25watusimotoand we wouldn't want the pretty little compiler to get too tired
13:48:48watusimotodon't work too hard, compiler-snuggins!
13:49:03watusimoto(that was supposed to be a mother-to-infant voice)
13:49:08raptori sometimes wonder what the hobbies of people who maintain c++ compilers are...
13:49:35watusimotothey're all ex-bitfighter devs :-)
13:49:40raptorhaha
13:50:13raptormaybe writing the compiler *is* their hobby
13:51:47watusimotofor some, surely it is.
13:51:50kaen_mbp has joined
13:52:17watusimotoI wonder what we staticaly init that is so big
13:52:24watusimotothat's actually more than I would have guessed
13:52:46raptorwell, there will be about 100 gameobject render methods
13:52:57raptoranother 50 renderutil/openglutil methods
13:53:10watusimotoah, the 472k is with all that?
13:53:14raptori think... but maybe it's TNL stuff?
13:53:25raptori doubt that would make up 472k... maybe 10%
13:53:34raptormaybe not even taht
13:53:34watusimotothere's lots of stuff like help files
13:53:35kaen_mbp Quit (Remote host closed the connection)
13:55:12raptorquestion - are you OK with me getting rid of duplicate methods that use S32 vs F32?
13:55:22raptormaybe using a template instead...
13:55:36raptoreverything would be F32
13:55:39watusimotosure yes
13:55:45raptorok
13:56:05watusimotothere's a lot of duplication added to avoid having to cast in code
13:56:27watusimotomuch of it I've wanted to move to templates but haven't seen it as a priority
13:56:32raptoralso - it seems 1/3 of our methods use: const Color *color, and 2/3 use: const Color &color
13:56:40watusimotoyes
13:56:46raptorcan we... standardize?
13:56:57watusimotosome of it is because we want to pass a null color in some cases
13:57:03raptorah ok
13:57:07raptorthat's what i was wondering
13:57:12watusimotoin others it is performance (you know what they say about premature optimization)
13:57:14raptorif NULL was used somewhere
13:57:34watusimotoso we can get a color pointer from a method, and pass it to abother without creating a new color object
13:57:42raptori thought performance was identical in the two, just one forces the compiler to verify NULL isn't an option
13:57:55watusimotoyes, is some render methods NULL is passed
13:58:08watusimotobut those could perhaps be broken down into different sigs
13:58:25watusimotoconsider this:
13:58:46watusimotoColor color =getColor(); render(color);
13:58:47watusimotovs
13:58:59watusimotoColor *color = getCOlor(); render(color);
13:59:12watusimotothe first will create a new color object, no?
13:59:44raptorhmmm.... i think it depends if getColor returns a &reference?
13:59:52watusimotoI have had all sorts of misery created by returning refs, but maybe if I can find a way to make that work happily, that would be an answer
14:00:02raptorthe pointer is definitely copied in the second case
14:00:12watusimotoyes, but the pointer is just an int
14:00:20raptorwhich is cheaper than the entire object
14:00:24watusimotoyes
14:00:37watusimotowhich is 4 floats and some metadata
14:00:44watusimotoso not much, really
14:01:09watusimotoor maybe only 3 floats
14:01:21raptorthis looks like good advice: http://www.cplusplus.com/articles/z6vU7k9E/
14:01:32raptorread teh 6 scenarios at the bottom under 'to summarize'
14:01:41watusimotoI would totally like to standardize and clean up the inconstencies
14:02:19raptorwhen would a NULL color matter?
14:04:00watusimotosummary: that is all my practice but misses the essential issue
14:04:16watusimotowhich is what to return from a getColor() method
14:04:28raptorColor &getColor();
14:04:29watusimotoif you have the color, I do exactly what they suggest
14:04:49watusimotothe otehr problem with refs is this:
14:05:00watusimotoColor c = getCOlor(); # Returns ref
14:05:13watusimotoand Color &c = getCOlor()
14:05:18watusimotobehave differenly
14:05:25watusimotothe compiler lets you do either without comment
14:05:36watusimotobut the first copies color, the second gets a ref
14:06:08watusimotowith pointers, the compiler chokes if you do it wrong
14:06:55watusimotoI have tried to start returning refs where possible; maybe I should try some more.
14:07:16raptorhmmm
14:07:28raptorwell, my whole goal is simplicity
14:07:34watusimotoI think the big problems were when I was doing it with strings
14:07:39raptorugh strings
14:07:45watusimotoand (perhaps) the strings mutated or something
14:08:06watusimotodon't remember the details... jsut rememeber ripping out a whole bunch of refs becuase of bad !@#$%
14:09:13watusimotobut I share your concerns about consistency and want to clean it up
14:09:33watusimotoideally, getColor() would return a &color; that seems the most modern
14:12:26Guest59531 Quit (Ping timeout: 244 seconds)
14:16:10raptorok, i'll just work on moving render methods into a class
14:16:39raptorthis means that instead of just doing: renderFancyBox() it will be: RenderManager::renderFancyBox()
14:16:53raptormaybe i can get away with a macro...
14:24:00watusimotowe could do a using RenderManager, no?\
14:24:11watusimotothen just renderFancyBox()
14:24:36watusimotono that wouldn't work
14:24:46watusimotoyou're talking static methods, I'm talking namespaces
14:25:04raptoryou mean subclass it?
14:25:11watusimotono, forget it
14:25:11raptorthat might work...
14:28:40watusimotowhy does renderFancyBox need to go into a class?
14:28:49watusimotoas a static, you won't be able to subclass it
14:29:00watusimotoor rather, override it
14:29:38watusimotoif you moved them into a namespace instead, we could "using" the namespace, and omit the prefix
14:29:48watusimotounless the prefix is attractive in itself...
14:30:19raptoroh yeah
14:30:26raptorduh - i forgot about that...
14:30:52raptorwow, that makes it so much simpler... i don't have to change that much code, then
14:30:59raptorthanks!
15:14:33watusimotoyou're welcome :-)
15:27:47Watusimoto_ has joined
16:08:53LordDVG has joined
16:14:21koda Quit (Ping timeout: 252 seconds)
17:27:50koda has joined
18:03:54kaen_mbp has joined
18:14:49Watusimoto_ Quit (Ping timeout: 264 seconds)
18:29:05Watusimoto_ has joined
19:02:34Watusimoto_ Quit (Ping timeout: 250 seconds)
19:18:04Darrel Quit (Read error: Connection reset by peer)
19:18:42Darrel has joined
19:24:53Watusimoto_ has joined
19:48:25LordDVG Quit (Remote host closed the connection)
20:34:35Invisible has joined
20:34:59Invisible is now known as Guest2894
20:38:07Guest2894 Quit (Client Quit)
21:03:11raptor Quit (Remote host closed the connection)
21:11:27Watusimoto_ Quit (Ping timeout: 244 seconds)
21:22:44Watusimoto_ has joined
21:29:55raptor has joined
21:29:55ChanServ sets mode +o
21:36:45kaen_mbp Quit (Remote host closed the connection)
21:51:35watusimoto Quit (Quit: Leaving.)
22:37:13kaen_mbp has joined
22:38:02watusimoto has joined
22:38:02ChanServ sets mode +o
22:41:56kaen_mbp Quit (Ping timeout: 256 seconds)
22:48:52Watusimoto_ Quit (Ping timeout: 264 seconds)
23:01:47koda Quit (Quit: koda)
23:04:31Watusimoto_ has joined
23:40:02Watusimoto_ Quit (Ping timeout: 264 seconds)

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.