#pentagram@irc.freenode.net logs for 22 Feb 2003 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[01:41:17] <-- wjp has left IRC ("Zzzz...")
[02:33:53] --> Servus has joined #Pentagram
[03:59:49] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:00:06] --> DarkeZzz has joined #pentagram
[04:05:11] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:07:04] --> DarkeZzz has joined #pentagram
[04:11:41] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:12:11] --> DarkeZzz has joined #pentagram
[04:17:14] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:17:43] --> DarkeZzz has joined #pentagram
[04:23:05] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:23:16] --> DarkeZzz has joined #pentagram
[04:24:52] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:26:51] --> DarkeZzz has joined #pentagram
[04:27:19] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:27:26] --> DarkeZzz has joined #pentagram
[04:45:01] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[04:45:34] --> DarkeZzz has joined #pentagram
[09:08:17] <-- Servus has left IRC ()
[09:10:02] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[09:35:20] --> DarkeZzz has joined #pentagram
[10:00:57] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[10:01:13] --> DarkeZzz has joined #pentagram
[10:01:14] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[10:01:49] --> DarkeZzz has joined #pentagram
[10:02:23] <-- DarkeZzz has left IRC (vinge.freenode.net irc.freenode.net)
[10:02:35] --> DarkeZzz has joined #pentagram
[10:03:07] <-- exultbot_ has left IRC (signing off...)
[10:04:11] --> exultbot has joined #pentagram
[10:04:11] --- Topic for #pentagram is: Missing: topic of #pentagram. If you have any information regarding the topic, please inform an op ASAP
[10:04:11] --- Topic for #pentagram set by wjp at Sun Jan 26 14:47:58 2003
[11:05:28] <-- DarkeZzz has left IRC (sterling.freenode.net irc.freenode.net)
[11:05:38] --> DarkeZzz has joined #pentagram
[11:08:14] --> Cashman has joined #pentagram
[11:09:34] <-- Cashman has left IRC (Client Quit)
[11:16:28] <-- DarkeZzz has left IRC (sterling.freenode.net irc.freenode.net)
[11:16:42] --> DarkeZzz has joined #pentagram
[11:40:14] --- DarkeZzz is now known as Darke
[11:40:22] --- ChanServ gives channel operator status to Darke
[12:12:06] --> Cashman has joined #pentagram
[12:20:13] <-- Cashman has left IRC ()
[12:44:15] <-- Kirben has left IRC ("System Meltdown")
[12:52:27] --> Colourless has joined #Pentagram
[12:52:27] --- ChanServ gives channel operator status to Colourless
[12:55:05] --> wjp has joined #pentagram
[12:55:05] --- ChanServ gives channel operator status to wjp
[13:48:12] --> emacsen has joined #pentagram
[13:48:20] <emacsen> Is this about people living in Arlington?
[13:48:46] <wjp> uh? who?
[13:48:51] <Colourless> um, no
[13:49:01] <emacsen> what's it about?
[13:49:12] <wjp> http://pentagram.sf.net
[13:49:24] <emacsen> Ah
[13:49:41] <Colourless> it's about pagans :-)
[13:50:19] <wjp> and remorseless, regretless crusaders ;-)
[13:51:06] <Colourless> yes true
[13:51:56] <wjp> speaking of which, I got an email yesterday asking if we were planning to support the crusaders
[13:52:28] <Colourless> bah. they are TGWDS are they noe?
[13:52:33] <Colourless> s/noe/not/
[13:52:53] <Colourless> by definition, we don't support them :-)
[13:54:30] <Darke> Yes, they're unsupported by definition. *grin*
[13:56:24] <wjp> technically the question was if it would be possible to play them using pentagram :-)
[13:56:50] <Colourless> oh, thats an entirely different question then
[13:57:13] <Colourless> sure, they might be playable one day
[13:57:39] <Darke> Unless we're feeling particularly nasty and code it so we'll never be able to support them. *grin*
[15:14:02] <Colourless> idea: when writing a reply to the "C++ questions!!!!" thread I thought up an idea about dynamic casts
[15:14:19] <Colourless> firstly i don't think I need to re-iterate my objections to their use
[15:14:59] <Colourless> however I understand that using virtual AnotherClass *Class::AsAnotherClass() methods isn't really the nicest things to have around
[15:15:47] <Colourless> so, i was thinking we could actually use some virtual functions to have our own Run Time Type Info and dynamic cast functions in every class
[15:16:04] <Colourless> the idea I have is so simple, it could be added to every class with only 2 macros
[15:18:36] * Darke earperks.
[15:18:57] <Colourless> it will pretty much involve having a virtual function in every class that checks to see if the wanted class is 'that' class. If it is, it will return the object, if it's not, it check the parent class to see if that is the correct type
[15:19:48] <Colourless> and so on
[15:19:55] * Darke nods.
[15:20:39] <Colourless> the class type would be defined by a pointer to a static constant in each class which would probably a string of the name of the class
[15:20:50] <Colourless> it would have it's own specific type though
[15:22:41] * Darke nods.
[15:22:52] * Darke nods again. Just 'cause he's doing that a lot.
[15:23:01] <Colourless> so the casting functions would look 'something' like this: virtual void * Cast(pClassType *type);
[15:23:44] <Colourless> if (type == ThisClass::classType) return this;
[15:24:03] <Colourless> else return Parent::Cast(type);
[15:24:15] <Colourless> would pretty much be what would be in the functions
[15:24:21] <Colourless> or similar
[15:24:46] <Colourless> things would need to be done a little differently for multiple inheritance, but it would still work
[15:25:23] <Colourless> the idea will also allows you do up cast and down cast, which some implimentations of dynamic_cast can have problems with
[15:27:28] <Colourless> to do a cast in the code you'd use a macro like the following
[15:27:57] * Darke nods.
[15:28:07] <Colourless> #define P_DYNAMIC_CAST(type,object) ((type*) object->Cast(type::classType))
[15:28:50] <Colourless> oh i forgot to mention, the base class will have to return NULL if it's not the wanted class :-)
[15:32:04] * wjp nods; interesting idea
[15:32:09] <Colourless> you could alternitavly possibly use a template instead
[15:32:19] <wjp> would be nice to make it so that it could use the 'real' dynamic_cast if available
[15:32:48] <wjp> or maybe always use the 'custom' one for consistency; shouldn't matter much
[15:32:54] <Colourless> yes being able to do that would be useful
[15:39:55] <wjp> how exactly do you want to handle casting to a child class? (i.e., you have an Item*, which you want to cast to an Actor*)
[15:40:02] <wjp> s/i.e./e.g./ :-)
[15:40:29] <Colourless> what do you mean?
[15:41:02] <wjp> well, this seems to be for casting from child classes to parent classes
[15:41:16] <Colourless> the Cast function is virutal
[15:41:26] <wjp> ah, ok :-)
[15:41:34] * wjp should read more carefully :-)
[15:42:00] <Colourless> this template function should work the same as dynamic_cast
[15:42:03] <Colourless> template<class ,class B> A* p_dynamic_cast(B *object)
[15:42:03] <Colourless> {
[15:42:03] <Colourless> return (A*) object->Cast(A::classType);
[15:42:03] <Colourless> }
[15:42:12] <Colourless> looks like I missed out an 'A' there :-)
[15:42:57] * wjp nods; it would automatically deduce the B from the argument given, right?
[15:43:21] <wjp> so you'd be able to use p_dynamic_cast<A*>
[15:43:45] <Colourless> yes
[15:57:41] <wjp> multi-color-dragon? sounds like he's asking for trouble :-)
[15:57:54] <wjp> (re. last post on C++ questions thread)
[15:58:14] <Colourless> ooh, someone 'attempting' to be funny :-)
[16:08:01] * Darke snickers.
[16:24:51] <-- Colourless has left IRC (Read error: 104 (Connection reset by peer))
[16:26:05] --> Colourless has joined #Pentagram
[16:26:05] --- ChanServ gives channel operator status to Colourless
[16:26:28] <Colourless> wow, that was intelligent :-)
[16:26:37] <Colourless> doing a 'Kill Process Tree' on explorer isn't a wise idea let me tell you
[16:26:59] <wjp> :-)
[16:27:47] <Darke> Soo... did it take down your *entire* machine, like a 'killall init' is want to do? Or something slightly less spectacular? *grin*
[16:28:01] <Colourless> well, i did force every app to quit :-)
[16:28:01] <wjp> killall init? is that allowed?
[16:28:24] <Darke> No, I'm not trying it, but I'd say the odds are that it is allowed. *grin*
[16:28:46] <Darke> I know you can do a `kill -9` on init's pid.
[16:28:56] <wjp> that would be 1 :-)
[16:29:30] <Colourless> actually, not 'every' app quit. Task Manager (where i did it) was still running, but explorer wasn't used to run that. I used the Ctrl-Shift-Esc key combination to run it
[16:29:50] <Darke> Provided you aren't using a particular kernel security patch that randomizes it. *grin*
[16:29:56] <Colourless> As soon a i did it I really really quickly saw the process list just disappear :-)
[17:18:16] <Colourless> time to leave
[17:18:17] <Colourless> cya
[17:18:19] <-- Colourless has left IRC ("casts invisibility")
[17:48:19] * Darke yawns and decides that sleep would also be good. *grin* Night!
[17:49:30] <wjp> g'night :-)
[17:49:45] <wjp> oh, I just added VirtualPath functionality to FileSystem, btw :-)
[17:50:03] <wjp> just working on reading U8/data paths from a config file now, and then I'll commit
[17:51:16] <wjp> incidentally, I think it might be a good idea to use a different character than '/' as a path separator for virtual paths... it might be very confusing to users. But we should talk about that sometime :-)
[17:52:42] * Darke yays! and ponders... umm... what else shall we use then? Pretty much every other special character that might be useful is... well... useful and used somewhere else. *grin*
[17:57:23] --- Darke is now known as DarkeZzz
[18:34:30] <-- emacsen has left IRC ("Client Exiting")