#exult@irc.freenode.net logs for 15 Dec 2002 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage


[00:02:18] --> Zxcvb has joined #exult
[00:02:44] <-- Zxcvb has left #exult ()
[00:58:35] --> Kirben has joined #exult
[00:58:35] --- ChanServ gives channel operator status to Kirben
[01:30:07] <Kirben> Fingolfin: could dependency tracking be added to exult ?
[01:30:45] <wjp> you mean in the ming32 makefile?
[01:30:59] <Kirben> in makefile.common.
[01:32:27] <Kirben> So beos, mingw and morphos could all use it.
[01:45:53] <wjp> hm, I guess we could do that
[01:46:01] <wjp> maybe copy the scummvm makefile or something
[01:46:20] <wjp> anyway, something for another day :-)
[01:46:39] <wjp> g'night
[01:47:05] <-- wjp has left IRC ("Zzzz...")
[02:20:24] <-- Dark-Star|away has left #exult ()
[03:16:13] <-- Fingolfin has left IRC ("42")
[04:42:07] <-- Darke|zzZ has left IRC (Remote closed the connection)
[04:55:47] --> Darke|zzZ has joined #exult
[04:57:13] --- Darke|zzZ is now known as Darke
[04:58:01] --- ChanServ gives channel operator status to Darke
[07:19:26] <-- matto has left IRC ("This feeling.. inside me. Finally found my life, I'm finally free. No longer torn in two.")
[07:21:25] --> matto has joined #exult
[08:48:46] --> ShadwChsr has joined #Exult
[08:48:55] <ShadwChsr> Any c++ gods here? :)
[08:49:09] <Darke> No. *grin*
[08:49:31] <Darke> You might find one or two mortal C++ programmers floating around though. *grin*
[08:49:33] <matto> c++
[08:49:41] <matto> I'm learning more about it every day..
[08:49:45] <matto> maybe I can help you
[08:49:47] <ShadwChsr> Well demi god will do
[08:50:19] <ShadwChsr> Back in yeolde days, well, for the past 2 years I've been writing a game in delphi
[08:50:45] <ShadwChsr> not because I'm a lame n00b but because it's just what I knew at the time (all raw API, honest! :)
[08:51:02] <ShadwChsr> Decided to finally learn C++, which was pretty easy since almost all the concepts are the same
[08:51:35] <ShadwChsr> So, of course, in a game you need "collections" - Entities, Sprites, etc
[08:51:38] <ShadwChsr> lists of stuff
[08:51:47] <ShadwChsr> How the heck do you do that in C++? :)
[08:51:55] <ShadwChsr> So far I have a huge list of options
[08:52:26] <ShadwChsr> COM (standard style collections in used to - add/remove/indexof/clear/etc), except thats only usefull for objects used between applications, and has a lot of overhead
[08:52:35] <matto> I don't know delphi ...
[08:52:36] <ShadwChsr> ATL, which is basically COM too
[08:52:53] <ShadwChsr> MFC, which doesn't expose very many nice collection classes
[08:53:09] <Darke> Depends what you want to use them for. *grin* If you're only sticking one 'type' of an object into a container (such as a list of strings) you can use either vector, list, or deque depending upon what you want to do with the data.
[08:53:14] <ShadwChsr> STL - seems promising but looks pretty dated, nothing like what I'm used too. There's also a huge variety of options ;P
[08:53:17] <matto> when you say collections.. you are talking about like linked lists or arrays?
[08:53:35] <ShadwChsr> I'm using a single type, or at least all objects will have a common anscestor
[08:53:47] <matto> Darke is talking about STL stuff (vector)
[08:53:49] <ShadwChsr> like, Entity, Entity_Character, Entity_Player, Entity_NPC, etc
[08:54:01] <matto> you want to use classes problem
[08:54:02] * Darke doesn't understand the dated comment on STL. He's found nothing as flexable or as easily usable in any other language he's used, including Java.
[08:54:08] <ShadwChsr> vectors dont seem usefull since i think I can't insert items
[08:54:10] <matto> err probably
[08:54:12] <matto> (not problem)
[08:54:16] <Darke> Yer you can. *grin*
[08:54:18] <ShadwChsr> lists dont seem usefull because theres no random access
[08:54:28] <ShadwChsr> you can, just with craploads of code, right? :)
[08:54:31] <matto> an entity class... where the other more specific entities would inherit from it
[08:54:40] <ShadwChsr> what about sets?
[08:54:45] <ShadwChsr> that kind of looks more like what I'm used to
[08:54:46] <ShadwChsr> :)
[08:54:48] <matto> I think you can probably insert into vectors... yes.. I haven't used them much, but you can do a lot with them
[08:54:57] <matto> they just have overhead like any other convenience :)
[08:54:58] <Darke> vector<int> v(10); v.insert(4, 42); Complex? *grin*
[08:55:14] <Darke> v.push_back(42); appends.
[08:55:21] <ShadwChsr> Its hard getting any information about STL :P
[08:55:32] <ShadwChsr> the "class member list" I saw didn't have an insert ;P
[08:55:53] <Darke> If you're wanting just a little more flexablilty vs. speed, you use a deque. Which adds push_front, pop_front too.
[08:55:53] <ShadwChsr> lots of "samples" on the web but no freaking member lists!! :P
[08:55:54] <ShadwChsr> hehe
[08:56:08] <Darke> Buy a _book_ y'know, hard copy? *grin*
[08:56:13] <ShadwChsr> bah
[08:56:15] <ShadwChsr> ;)
[08:56:33] <ShadwChsr> ok question 2
[08:56:53] <ShadwChsr> How should I setup my source & header files?
[08:56:56] <ShadwChsr> one header per source?
[08:57:04] <ShadwChsr> one header per source plus additional common headers?
[08:57:06] <Darke> IMO, 'the' STL reference is "The C++ Standard Library: A Tutorial and Reference" by Nicolai M. Josuttis.
[08:57:09] <ShadwChsr> lots of source files, few headers?
[08:57:16] <Darke> However you want. *grin*
[08:57:32] <Darke> Usually it's a ratio of one .h to one .cpp, and the occasional extra .h for truely generic stuff.
[08:57:43] <ShadwChsr> Well I can do it however I want, but I'll spend the next 10 years swearing at it when I get "class already defined" linker errors :P :P
[08:58:11] <ShadwChsr> Thats what I was doing 1-1+extras
[08:58:37] <ShadwChsr> Ok, now how should I design my game class hiearchy? I built a root game object and everything hangs under that
[08:58:47] <Darke> Oh. You're not doing #define scoping headers properly are you?
[08:58:55] <ShadwChsr> Game.Resources.Tiles, Game.Maps.Current.Entities[0].Name, etc
[08:59:07] <ShadwChsr> Dont know what a scoping header is ;)
[08:59:24] <Darke> Inside your header you should have something like this, (lets call the header file "game.h"):
[08:59:27] <Darke> #ifndef GAME_H
[08:59:30] <Darke> #define GAME_H
[08:59:39] <Darke> / lots of header code stuff goes here
[08:59:41] <Darke> #endif
[08:59:42] <ShadwChsr> seen it before, don't know what it does
[09:00:14] <matto> <ShadwChsr> Its hard getting any information about STL :P
[09:00:15] <Darke> It stops the stuff in the header being included multiple times, thus stopping you getting lots of "class already defined" warnings. *Grin*
[09:00:16] <matto> yes, it certainly is
[09:00:38] <ShadwChsr> ahhhhhh... oh I get it a sneaky trick ;)
[09:00:43] <ShadwChsr> makes sense now that i read it
[09:00:44] <ShadwChsr> ;)
[09:00:49] <matto> trying to get info on the STL is an excruciating experience
[09:00:56] <ShadwChsr> in delphi it would get pissy and say "circular reference" (grrr)
[09:01:19] <ShadwChsr> thanks for the tip :)
[09:01:37] <ShadwChsr> Now about my hierarchy design - I only have one problem, and I've ALWAYS had this problem with OO design
[09:01:49] <ShadwChsr> the "hard core" people would say it's because I designed it wrong ;P
[09:02:00] <ShadwChsr> I have a huge hierarchy
[09:02:20] <Darke> http://www.dinkumware.com/manuals/reader.aspx?lib=cpp <- There you go. The C++ library in exacting detail. I taught myself C++ from an earlier verison of this years ago. *grin*
[09:02:32] <ShadwChsr> Lets say I have an entity, and on that entity's class I have a function called "MoveToMap"
[09:02:40] * Darke still doesn't understand why people think it's hard to find STL stuff online. *grin*
[09:02:58] <ShadwChsr> Game.Maps <- list of maps (stiched to make a seemless world), Game.Maps.CurrentMap.Entities[0].MoveToMap
[09:03:18] <Darke> You'll likely want to save it to text files or print it out (like I did) this version nags you to purchase a hardcopy every other page you're reading. *grin*
[09:03:18] <ShadwChsr> kind of makes sense, right? Define the function on the entity since that's what you're affecting
[09:03:35] * Darke nods. Makes sense.
[09:03:40] <ShadwChsr> Problem with that is, "MoveToMap" would need to modify Game.Maps, which is UP the tree
[09:03:43] <ShadwChsr> how do I deal with that?
[09:04:02] <ShadwChsr> Right now I made a "biga$$" global variable which has a pointer to the root object in the hierarchy, game
[09:04:21] <Darke> So your entity exists on a single map, and you want to move it between two maps?
[09:04:23] <ShadwChsr> it just doesn't feel gracefull doing it that way though, calling "Game.whatever" everywhere, makes the code less modular
[09:04:44] <ShadwChsr> Yeah, say, he's standing at the border between the two and walks over the edge to the next
[09:05:18] <ShadwChsr> Now, like I said, all the "hardcore OO" people would say that a class should be self contained
[09:05:28] <matto> Darke: ahhh not a bad website, I'll bookmark this one
[09:05:33] <Darke> One option is to have have to parallel trees game.maps and game.entities. Each entity has a pointer to the current map inside it and 'knows' how to move between maps.
[09:05:44] <ShadwChsr> so does that mean I should put the function on Game.Maps.MoveEntityToMap(Entity1,FromMap,NewMap)?
[09:06:23] <Darke> That's one way, yes.
[09:06:24] <ShadwChsr> Yeah I have a list of game.entities too so I can iterate through them in one step
[09:06:36] <ShadwChsr> but you still need to use a parent object
[09:06:49] <Darke> Or you can have Game.Entities[0].moveMap(targetMap) do it.
[09:06:50] <ShadwChsr> since the entity would be at game.entities.entity, and would need to modify game.entities
[09:07:50] <ShadwChsr> And the entity would contain a pointer to the current map.. hmmm
[09:08:00] <Darke> Why? As I mentioned above, each entity knows which map it's on right? It just calls it's internal map->moveLeft() which would move itself off the current map, and the 'map' itself would know what map it would be moving too, then return the 'new' map.
[09:08:01] <ShadwChsr> currentMap.Remove(this); targetMap.Add(this);
[09:08:07] <Darke> Something like:
[09:08:12] <Darke> Entity::moveLeft()
[09:08:14] <Darke> {
[09:08:29] <Darke> map=map->moveLeft();
[09:08:29] <Darke> }
[09:09:11] <Darke> If the map was the original map, Map::moveLeft() just returns it's own 'this' pointer, else it returns the pointer to the map you've just moved to.
[09:09:53] <ShadwChsr> hmmm
[09:10:16] <ShadwChsr> Should I have the root object in a global at all? or should I just force myself to code it "right"?
[09:10:31] <Darke> Each Map object would 'know' the pointers to the maps to the left/right/top/bottom are.
[09:11:04] <Darke> Sometimes it's impossible to not have a global, and write the code clearly. Don't force your code into a style that makes the code less understandable.
[09:11:18] <Darke> That's one of the tennants of C/C++. *grin*
[09:11:23] <ShadwChsr> wouldn't dealing with that many pointers get ugly? You have collections pointing down, collection members pointing up, and collection members pointing to siblings
[09:11:44] <ShadwChsr> I'm not debating just trying to understand :)
[09:11:55] <ShadwChsr> It's always been the one area I get stuck on
[09:13:02] <Darke> It depends. *grin* Sometimes it's the 'best' option to solve it. You could also just have the Map object know about the entire list of maps and do a mapList->findNextTo(direction, currentMap).
[09:13:46] <Darke> Having minimal binding between objects is good, but often you'd be surprised at how much knowledge is required to be 'minimal'. *grin*
[09:14:43] <ShadwChsr> Yeah, I've considered having collection members having a pointer back to the collection, kinda makes it nasty when you have two collections though ;)
[09:14:53] <ShadwChsr> anyhow at least my brain has some more info into it :)
[09:15:00] <ShadwChsr> I can at least port some more code now :)
[09:15:17] <ShadwChsr> oh, are namespaces a good idea?
[09:15:25] <ShadwChsr> I've been defining everything into a namespace hierarchy
[09:15:44] <ShadwChsr> Lupercalia(enginename).Client
[09:15:47] <ShadwChsr> Lupercalia.Client.Win32
[09:15:48] <ShadwChsr> etc
[09:16:26] <ShadwChsr> kind of like .NET - if C# ever takes off it will be easier to port
[09:17:01] <ShadwChsr> also puts clean divisions between major classes, ie/ Server, Client, Tools,
[09:17:10] <Darke> Namespaces are useful really only when you're interating with multiple libraries between multiple projects. On a project with 100 developers and multiple teams it would be useful, with only a dozen programmers it really isn't. Neither exult nor pentagram use namespaces (except pentagram to perhaps wrap itself in).
[09:18:32] * ShadwChsr nods
[09:20:20] <Darke> Namespaces are almost analogous to classes, for example if you wrap all your objects in one big public: class, you'd have a similar effect. To me, namespaces are only really useful if you've got lots of global data that you want to stop 'accidentally' being used by someone else using your code.
[09:22:30] <ShadwChsr> on the "accidental" part - correct me if im wrong, but C++ doesn't have any properties (??)
[09:22:47] <ShadwChsr> has variable members, but the only properties I've seen are in COM
[09:23:03] <ShadwChsr> for example, if you want a read only property pointing to a private variable that only the class can modify
[09:23:51] <Darke> That's what public:, protected: and private: are for. Also the 'friend' declaration.
[09:24:34] <ShadwChsr> yeah but you can't have a public member readonly
[09:24:49] <Darke> Ultimately though, every variable, reference and pointer can be modified by the calling function if they want to (casting away the 'const'ants for example).
[09:24:53] <Darke> 'const'?
[09:25:01] <ShadwChsr> like this:
[09:25:07] <ShadwChsr> class Game
[09:25:07] <ShadwChsr> {
[09:25:19] <ShadwChsr> private:
[09:25:20] <ShadwChsr> bool isStarted;
[09:25:23] <ShadwChsr> public:
[09:25:31] <ShadwChsr> void Start();
[09:25:34] <ShadwChsr> void Stop();
[09:25:44] <ShadwChsr> bool Started readonly;
[09:25:44] <ShadwChsr> }
[09:25:50] <ShadwChsr> of course, the readonly part is made up
[09:25:53] <ShadwChsr> in C# you would do
[09:25:56] <ShadwChsr> bool Started
[09:25:56] <ShadwChsr> {
[09:26:03] <ShadwChsr> get { return isStarted }
[09:26:03] <ShadwChsr> }
[09:26:04] <ShadwChsr> :P
[09:26:41] <ShadwChsr> that way you dont have rogue code trying to set Started to whatever they want, which would make the "Start" and "Stop" functions behave erratically
[09:27:22] <Darke> Why not have const `bool IsStarted() const { return isStarted; };`?
[09:27:39] <Darke> s/const `bool/`const bool`/
[09:27:50] <ShadwChsr> just not as elegant hehehe
[09:28:10] <Darke> How often do you need to write something like that though? *grin*
[09:28:16] <ShadwChsr> Often ;)
[09:28:23] <ShadwChsr> though I dont *need* to :)
[09:28:30] <Darke> In which case you're not designing properly. *grin*
[09:28:37] <ShadwChsr> nah disagree there :)
[09:28:57] <ShadwChsr> In proper OO design you should only expose things that are safe to f'ck with hehehe
[09:29:09] <ShadwChsr> in this case, i'd be exposing a variable that someone could write to, causing unsafe results
[09:29:20] <ShadwChsr> A function would be less optimized than a variable
[09:29:22] <Darke> What do you think the whole point of classes are? They encapsulate all the data neccessary to be used by the class, and only exposing an _interface_ to interact with them?
[09:29:27] <ShadwChsr> <- picky picky
[09:29:32] <Darke> Wrong! *grin*
[09:30:05] <ShadwChsr> Then why does every modern language have properties? :)
[09:30:10] <Darke> Don't bother trying to second guess the compiler, both directly accessing game->isStarted and using the function returns _exactly_ the same code. Don't say it if you haven't checked your compiler. *grin*
[09:30:26] <ShadwChsr> ;p ;p
[09:30:48] <ShadwChsr> yeah... but.. but.. i'd need to put the brackets () everywhere and that would wear out my keyboard faster
[09:30:51] <ShadwChsr> yeah... thats it
[09:30:52] <ShadwChsr> ;)
[09:30:54] <Darke> Because modern languages weren't designed to be "only 5% slower then C for the same tasks". *grin*
[09:31:06] <Darke> s/only/maximly/
[09:31:41] <ShadwChsr> C is great, but C++ is kind of evil
[09:31:42] <ShadwChsr> ;)
[09:32:11] <ShadwChsr> having it 100% source compatible with C really turned it into rats nest code in many cases :)
[09:32:25] <ShadwChsr> ok, mabye you can explain this one:
[09:32:33] <Darke> And? *grin* C++ can be much safer to use then C.
[09:32:36] <ShadwChsr> whats the difference between :: . and ->
[09:32:56] <ShadwChsr> Safer, only relatively speaking ;)
[09:33:15] <ShadwChsr> :: seems to be used for namespaces and classes
[09:33:16] <matto> . is when you are referencing variables inside a struct (or class)
[09:33:20] <ShadwChsr> . for objects
[09:33:23] <ShadwChsr> what about -> ?
[09:33:26] <matto> -> is the same thing except you are using a struct pointer instead of a struct itself
[09:33:43] <ShadwChsr> dont know what that means
[09:33:53] <matto> you don't know what a pointer is?
[09:34:05] <ShadwChsr> of course I do
[09:34:40] <matto> then I am not sure what you don't understand about what I said
[09:34:41] <ShadwChsr> but what you said didnt make sense
[09:35:00] <ShadwChsr> at least, not to me
[09:35:05] <matto> can you explain?
[09:35:18] <ShadwChsr> somestruct *someobj <- pointer to a struct
[09:35:24] <ShadwChsr> somestruct someobj <- struct
[09:35:32] <ShadwChsr> where does -> fit in? :)
[09:35:43] <matto> struct blah { int i; };
[09:35:49] <matto> struct blah b; struct blah *c;
[09:35:52] <matto> c = &b;
[09:35:55] <matto> b.i = 5;
[09:35:59] <matto> therefore, c->i == 5
[09:36:24] <ShadwChsr> if c has the address of b, wouldn't c.i == 5 as well?
[09:36:57] <matto> no... if it's a pointer, you have to use ->
[09:37:13] <ShadwChsr> why?
[09:37:21] <matto> or you could (probably) say (*c).i == 5
[09:37:27] <matto> but I am not 100% sure
[09:37:36] <matto> a pointer to an object is not the same as the object itself
[09:38:21] <Darke> Because a pointer is a pointer _to_ an object, not an object itself. '.' says 'get me this value of this object', '->' says "redirect from the pointer to the location of the object and get me the value".
[09:38:33] <matto> where b in memory would be equal to something like "0x5 0x0 0x0 0x0", c in memory would be equal to something random like "0x23 0x53 0x12 0x3C"
[09:38:49] <ShadwChsr> Ok explain this one to me:
[09:39:09] <ShadwChsr> A pointer to an object is basically a 32bit memory address (unsigned long)
[09:39:33] <ShadwChsr> the object needs to be stored in memory, so the object is a pointer too, except the compiler hides that from you ;)
[09:39:38] <matto> so as Darke says... '.' says to take the _value_ of the object, apply some offset to it (according to the struct definition) and return the result.. the -> says to get the value at the address pointed to by the pointer, then proceed as before
[09:39:56] <ShadwChsr> So why would you ever want a pointer to an object as opposed to an object?
[09:40:12] <matto> because it is more efficient to pass a pointer of an object as a parameter to other functions
[09:40:16] <matto> (than passing the entire object itself)
[09:40:44] <ShadwChsr> so obj2 = obj1 would copy the memory?
[09:40:58] <Darke> Because objects can only be statically constructed. All the objects exist at the start of the program, you have to have 10 objects in an array, you can't 'potentially' have 50, you have to create all 50, which chews up memory for potentially no gain.
[09:41:05] <Darke> Provided they're not pointers.
[09:41:19] <Darke> Obj obj1, obj2; obj2=obj1 would copy memory.
[09:41:33] <ShadwChsr> wow
[09:41:38] <Darke> Obj *obj1, *obj2; obj2=obj1; would copy pointers.
[09:41:40] <ShadwChsr> every other language I've used that copies a pointer
[09:41:57] <ShadwChsr> ok, what happens when you do
[09:42:08] <Darke> & means 'take the address of'.
[09:42:13] <ShadwChsr> obj obj1; descobj obj2; obj2=obj1
[09:42:14] <ShadwChsr> :)
[09:42:15] <matto> C doesn't really hide anything from the developer, which is why it rules! :)
[09:42:33] <Darke> so: Obj obj1, *obj2; &obj2 = obj1; would copy memory.
[09:42:38] * Darke seconds matto. *grin*
[09:42:45] <matto> the compiler wouldn't let you do that
[09:43:15] <ShadwChsr> ahhhh in all the other languages i've used you need to run .Assign, which is a virtual method
[09:43:15] <ShadwChsr> :)
[09:43:25] <ShadwChsr> which is why it's designed like that as opposed to C++'s method
[09:43:25] <Darke> Urk. Meant obj2 = &obj1 rather. *grin*
[09:43:33] <ShadwChsr> but that still doesn't explain why you need to use -> ?
[09:43:34] <ShadwChsr> ;)
[09:43:47] <matto> I think we've explained that several times :)
[09:43:49] <ShadwChsr> The guy who designed C++ just decided to be an evil bastard that day? or what? :)
[09:43:54] <Darke> Because -> does something different to '.'. Having '.' do two things would be Just Dumb.
[09:43:59] <ShadwChsr> Well, I understand how it works
[09:44:16] <ShadwChsr> Not really though
[09:44:35] <ShadwChsr> % and * have multiple purposes ;)
[09:45:01] <Darke> % has multiple purposes? *blink*
[09:45:08] <ShadwChsr> you're still accessing a member of an object, it doesn't matter if its an object or a pointer to an object :)
[09:45:12] <matto> it's the programmer's responsiblity to decide whether . or -> is appropriate or not..
[09:45:17] <ShadwChsr> mabye that's just * :)
[09:45:30] * Darke thinks * having multiple purposes is silly also. It's the only exception, IIRC.
[09:46:39] <ShadwChsr> Well I still argue that . is used to access a member of an object ;) If I want to change it from a pointer to an object (or vice versa) I need to hack through code to change the stupid arrows lol
[09:46:53] <ShadwChsr> kind of like hungarian enforced by the compiler ;)
[09:48:00] <ShadwChsr> No point arguing over nothing though ;)
[09:48:56] <ShadwChsr> Gotta stir up trouble *once* in awhile... I love challenging things ;) Especially "because that's the way it is" things ;)
[09:48:57] <matto> well in my opinion, it's much better letting the programmer tell the compiler how to treat the variable (. or ->) than having the compiler try to guess (and either 1) get it wrong or 2) add pointless overhead for a worthless convenience hehe)
[09:49:15] <matto> problem #1 being the worst... hehe
[09:49:28] * Darke seconds matto again. *grin*
[09:49:31] <ShadwChsr> compiler wouldn't need to guess though, you declared the variable as a pointer ;)
[09:50:04] <matto> ya but that doesn't mean anything.. I could assign a '1' to a pointer, cast it to an integer and add it to another integer
[09:50:05] <ShadwChsr> I'm gonna shut up now and go back to coding ;)
[09:50:34] <ShadwChsr> yeah, but a++ could divide by 10
[09:50:44] <ShadwChsr> the language is defined for a reason so all compilers handle it the same way ;)
[09:51:01] * matto thinks ShadwChsr is getting a bit too clever
[09:51:31] <ShadwChsr> Its just late, I cause trouble when its late ;P
[09:51:38] <matto> you may be right about the compiler automatically knowing...
[09:51:44] <matto> but I'd have to think about that for a while ...
[09:52:27] <ShadwChsr> Though my logic is flawed because the only way every compiler could handle it the same way would be for everyone to use the same compiler
[09:52:40] <ShadwChsr> every compiler does different optimizations and has different "quirks"
[09:52:59] <matto> ya... I think I have found a bug in g++ which has come at an inopportune time :(
[09:53:06] <ShadwChsr> VC++ being a prime example ;)
[09:53:29] <Darke> ShadwChsr: Yes it does have a... unique interpretation of the C++ standard.
[09:53:51] <ShadwChsr> Apparently VC.NET 2003 will have 98% compliance
[09:54:08] <ShadwChsr> which means 95% if you subtract the buggy areas, but still better than what they have now.. ;)
[09:54:25] <matto> Darke: LOL!!
[09:54:56] <ShadwChsr> And amazingly(!!!) VC.NET 2001(?) actually supports .CC files out of the box (no more hacking the registry!)
[09:55:22] <matto> oh ya?
[09:55:27] <matto> I use that at work
[09:55:51] <ShadwChsr> Yeah, originally when I was investigating the exult source I had to rename files to CPP to see anything in better than notepad ;P
[09:55:51] <Darke> ShadwChsr: Wow! You mean they'll _almost_ be as compliant as gcc then? *grin*
[09:56:05] <Darke> Yep. Colourless has griped at that.
[09:56:46] <ShadwChsr> ironically enough, if you dont rename the files in VC1-6 "colourless" is what you're going to get hehehehehe... no syntax hilighting ;)
[09:57:17] <Darke> That's scarily appropriate. *grin*
[09:57:50] <matto> hahaha
[10:01:28] <ShadwChsr> vector<int> etc..
[10:01:37] <ShadwChsr> how do the <> 's work?
[10:01:40] <ShadwChsr> never seen that before
[10:01:53] <ShadwChsr> I think that's why STL scared me the first time I looked at it, to tell you the truth ;)
[10:02:11] <matto> those <>'s still scare me
[10:02:28] <matto> I only use a minimum subset of C++
[10:02:37] <matto> and it usually involves as few <>'s as possible! hehe
[10:02:37] <ShadwChsr> good idea :)
[10:02:47] <ShadwChsr> Me too, except this STL stuff has <>'s everywhere!
[10:02:54] <matto> it's evil!!
[10:02:56] <ShadwChsr> All I want is a simple object/pointer vector <cries>
[10:02:57] <ShadwChsr> ;)
[10:02:58] <matto> but.. can be useful too :)
[10:03:03] <Darke> They mean "Make me a vector of type <unsigned int>". *grin*
[10:03:11] <Darke> s/unsigned //
[10:03:48] <ShadwChsr> ooo fancy
[10:03:51] <Darke> Which you can then drop ints into. And only ints. If you made one called vector<string> you could only drop strings into it. Not string pointers either, just strings.
[10:03:54] <ShadwChsr> so I can toss whatever into that?
[10:04:00] <ShadwChsr> vector<SuperObject2000>?
[10:04:09] <ShadwChsr> err i mean SuperClass2002 ;)
[10:04:12] <Darke> Yep.
[10:04:20] <ShadwChsr> oooo
[10:04:26] <ShadwChsr> Maybe now I'll start liking C++
[10:04:34] <Darke> Same thing with deque<>'s and lists<>'s and... *grin*
[10:04:44] <ShadwChsr> and here I thought I'd be spending the next few days making descendant classes.. ;)
[10:05:04] <Darke> Nope. Generics is -cool-. *grin*
[10:05:08] * ShadwChsr Hugs c++
[10:05:12] <matto> oh no...
[10:05:20] <matto> not C++!!!!
[10:05:23] <matto> hehe
[10:06:13] <Darke> And now these nifty pointers show up. So stealing from code I'm poking, you can have vector<Node *> and then stick Node *'s into it. But any classes you've subclassed from node, such as IfNode *'s and OperatorNodes *'s.
[10:06:34] <ShadwChsr> *eyes glaze over*
[10:06:46] <ShadwChsr> ;)
[10:07:00] <ShadwChsr> What do I want to throw into the vector? pointers to objects, or objects?
[10:07:11] <ShadwChsr> ohhhh wait, I get it hehehe
[10:07:12] <ShadwChsr> duh
[10:07:25] <ShadwChsr> I keep thinking in object pascal *smack*
[10:07:48] <ShadwChsr> I either need lots of cafeene or lots of sleep
[10:07:56] <ShadwChsr> ironically enough this state is the best time for coding ;)
[10:08:01] <matto> you need to step _away_ from Pascal...
[10:08:09] * Darke nodnods. Same with him. *grin*
[10:08:23] <ShadwChsr> I think it's the same for all programmers
[10:08:41] <ShadwChsr> the best programmers at my last workplace came in at noon and left at 8, and worked best with low lighting
[10:08:42] <ShadwChsr> hehehe
[10:09:19] <ShadwChsr> I was a 10-6 person, but only because I reserved the best coding hours for my own projects ;)
[10:10:00] * Darke snickers.
[10:11:31] <ShadwChsr> the top most class in C++ is "obj", right?
[10:11:36] <ShadwChsr> or is there even one?
[10:11:52] <matto> I don't think there is one
[10:12:00] <matto> but I don't know
[10:12:48] <ShadwChsr> doesn't really matter anyhow
[10:13:01] <Darke> There isn't one.
[10:14:35] <ShadwChsr> how do you name your classes? I have a class I want to call "ResourceManager", but in the game class I want to have a pointer to an object derived from it
[10:14:47] <ShadwChsr> is it safe to do things like "ResourceManager ResourceManager;"?
[10:15:13] <ShadwChsr> Don't want to use hungarian :)
[10:15:40] <ShadwChsr> A few articles I've read say that doing that is safe.. but somehow I don't 100% believe them ;)
[10:16:39] <ShadwChsr> Anyhow, thanks for all the info... should keep me busy for awhile :)
[10:16:41] <ShadwChsr> Night!
[10:16:44] <-- ShadwChsr has left IRC ()
[10:27:14] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[10:30:53] --> Kirben has joined #exult
[10:30:53] --- ChanServ gives channel operator status to Kirben
[11:13:32] --> Fingolfin has joined #exult
[11:13:33] --- ChanServ gives channel operator status to Fingolfin
[11:13:41] <Fingolfin> yo
[11:15:33] <Darke> Hi!
[12:49:22] --> Colourless has joined #Exult
[12:49:22] --- ChanServ gives channel operator status to Colourless
[12:49:40] <Darke> Hi!
[12:51:28] <Colourless> HI!
[13:22:10] <Fingolfin> hI!
[13:22:28] <Colourless> o_0
[13:23:11] * Darke adjusts Colourless' face until it's back to looking more... err... 'normal'.
[13:23:25] <Colourless> hehe
[13:23:32] <Colourless> i am perfectly normal
[13:25:22] * Darke looks dubious. "That's what they allllll say!"
[13:25:38] <Colourless> like you would know what normality is
[13:28:21] <Darke> Sure I do, it's what _I_ live in. Everything else is not-normal. *nodnod*
[13:28:46] <Colourless> my point exactly
[13:41:31] <Colourless> i like games that cost $10 :-)
[13:42:12] * Darke earperks?
[13:43:05] <Colourless> well, a few weeks ago i bought Giants Citizen Kabuto for $10 and last week i bought Star Trek Voyager Elite Force, also for $10 :-)
[13:43:51] <Darke> Oooh. Elite Force is good, though I acquired it for a little more (with it's expansion pack) and ST: Armada I & II (excessively dull games) for $30.
[13:44:48] <Colourless> i don't have expansion
[13:45:06] <Colourless> i 'rarely' buy expansions
[13:52:53] * Darke only acquired it because he got it in a bundle. *grin* Wouldn't have bought the others either but he figured he'd get $30 with of playing out of the ST Elite Force, that even if the others weren't worth playing, it wouldn't matter. *grin*
[13:53:16] <Colourless> :-)
[14:15:19] * Darke grumps at the time and wanders off to sleep. Silly work tommorrow, err, today. Night!
[14:15:33] <Colourless> cya
[14:16:02] <-- Darke has left IRC ("*pawwave*")
[14:39:56] --- Fingolfin is now known as Fingolfin|away
[15:05:07] <-- Colourless has left IRC (Read error: 104 (Connection reset by peer))
[16:05:08] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[16:15:20] --> Dark-Star has joined #exult
[16:42:34] --- Fingolfin|away is now known as Fingolfin
[17:15:42] --> wjp has joined #exult
[17:15:42] --- ChanServ gives channel operator status to wjp
[17:15:44] <wjp> hi
[17:15:57] <Fingolfin> hi
[17:16:11] <wjp> hi :-)
[19:14:45] <matto> hi
[19:35:30] <Fingolfin> (-: ih
[19:36:48] <Dark-Star> hi
[22:18:57] <Dark-Star> bye
[22:18:58] <-- Dark-Star has left #exult ()
[22:28:42] --> Dominus has joined #exult
[22:28:47] --- ChanServ gives channel operator status to Dominus
[22:29:17] <Dominus> hi
[22:35:44] <matto> HI!