#pentagram@irc.freenode.net logs for 3 Jan 2005 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[00:39:57] --> Kirben has joined #pentagram
[00:39:57] --- ChanServ gives channel operator status to Kirben
[01:15:26] <watt> grrr... rats... most of the neat thing I want to do with palettes is going to require the newest version of gimp.
[01:16:10] <watt> I think... the 2.0 api online doesn't appear to actually be 2.0's api
[01:16:35] <watt> nope.. it's 2.2-pre2
[01:18:55] <watt> how about it? Force the upgrade to 2.2 to use a pentagram plugin? Might be excessive.. but I think it could be way cooler.
[03:49:02] <servus> apt-get install gimp
[05:08:37] <watt> ??
[05:09:03] <watt> meant to type that on a console?
[05:14:24] <watt> neat...... girl in Wisconsin survived rabies without the use of vaccine
[05:14:31] <watt> http://olympics.reuters.com/newsArticle.jhtml?type=domesticNews&storyID=7218293
[05:15:02] <watt> Induced a coma and pumped her full of drugs.
[05:20:45] <watt> hmm.. I wonder what the best way to allow the plugin to build under mingw would be.... I really should get a separate windows comp to do stuff like that...
[05:21:27] <watt> because dual-booting feels like too much of a hassle to do when I think about doing those type of things.
[07:31:05] --> sbx has joined #pentagram
[08:26:07] --> Colourless has joined #Pentagram
[08:26:07] --- ChanServ gives channel operator status to Colourless
[08:27:08] <wjp> watt: depends on when you gimp 2.2 will be released relative to pentagram :-)
[08:27:09] <wjp> hi Ryan
[08:27:15] <wjp> s/you/you think/
[08:27:51] <Colourless> hi
[12:12:23] <wjp> Kirben: thanks for updating Makefile.mingw; I forgot about that :/
[13:04:05] <-- Kirben has left IRC ("System Meltdown")
[14:10:26] <watt> well, gimp 2.2.1was released the 29th
[14:32:56] <watt> oh course, I guess I should at least wait until 2.2.1 has an ebuild in portage.
[14:33:30] <watt> hmmm.. wondering if the car is warm enough yet
[14:38:37] <servus> Gimp 2.2.1 is in apt-get. Debian strikes again
[14:42:58] --> sbx|afk has joined #pentagram
[15:06:00] <wjp> watt: well, then I really have no problems with requiring 2.2
[15:07:00] <-- sbx has left IRC (Read error: 110 (Connection timed out))
[15:07:29] <wjp> although if it's possible to fallback to a default hardcoded palette when using 2.0 using some #ifdef trickery, that would be better
[15:08:06] * Colourless thinks that is a good idea... #ifdef stuff
[15:08:29] <Colourless> but then again, I did write SoftRenderSurface.inl :-)
[15:08:35] <Colourless> i think everyone knows
[15:13:15] <wjp> hehe :-)
[15:15:04] --> WattAtWork has joined #pentagram
[15:16:36] <WattAtWork> That was entirely way too dangerous of a commute for my tastes
[15:16:43] <-- Chetic has left IRC ()
[15:18:48] <WattAtWork> servus: Really? That's the reason I initially kept away from Debian... packages didn't seem new enough for me. (I refused to use XFree86-3.3 after playing with 4.x)
[15:19:16] <wjp> XFree86 was probably due to licensing issues, right?
[15:19:40] <wjp> wasn't 'that' change made in 3.4?
[15:20:22] <WattAtWork> well, 4.3 yeah... but the > 4.0 version supported my video much better
[15:23:48] <WattAtWork> I still need to switch to freedesktop's X11... I've been putting that off.
[15:28:25] <sbx|afk> hmm, I'm not sure which X11 I'm using now... whatever comes with Slackware 10
[15:53:53] <servus> watt, I'm not even on Debian Unstable:>
[15:54:14] <servus> How can I check my XFree version?
[15:54:22] <servus> I hope my power stays on. It's blizzarding here... again :|
[15:55:01] <servus> http://imdb.com/title/tt0094541/?fr=c2l0ZT1kZnxteD0yMHxzZz0xfGxtPTIwMHx0dD1vbnxwbj0wfHE9cnVuYXdheSByYWxwaHxodG1sPTF8bm09b24_;fc=1;ft=1
[15:55:02] <servus> Whoops
[15:55:06] <servus> XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-6 20040707142024 fabbione@fabbione.net)
[15:56:28] <servus> Sorry for the spam :">
[16:00:12] <WattAtWork> np... hmm... I have a feeling I'll be putting debian on my laptop soon then if I can fit in around 500M... (very old laptop)
[16:04:06] <WattAtWork> I think I remember that movie (or series of them?)
[16:05:25] <servus> It was a complete mischan, the Ctrl-C didn't copy :) It was a series, yes. I even appear as a tiny speck in the background in a few scenes :P
[16:51:07] --> WattAtWork_ has joined #pentagram
[17:09:11] <-- WattAtWork has left IRC (Read error: 110 (Connection timed out))
[17:22:24] --> Chetic has joined #pentagram
[17:46:23] <-- Chetic has left IRC (adams.freenode.net irc.freenode.net)
[17:47:45] --> Chetic has joined #Pentagram
[17:48:55] <-- Chetic has left IRC (adams.freenode.net irc.freenode.net)
[17:49:43] --> Chetic has joined #Pentagram
[17:52:55] <-- servus has left IRC ("Leaving")
[17:56:06] <-- Chetic has left IRC (Remote closed the connection)
[18:05:52] --> servus has joined #pentagram
[18:33:43] --> Chetic has joined #pentagram
[18:52:07] <-- Darke has left IRC (Read error: 110 (Connection timed out))
[18:59:45] --> edbgon has joined #pentagram
[19:12:56] <wjp> Colourless: do you know of any issues with MSVC and templated member functions of non-templated classes?
[19:13:02] <wjp> as in http://www.math.leidenuniv.nl/~wpalenst/test/test3.cpp
[19:13:27] <wjp> (not pentagram-related, by the way; scummvm compile problem in MSVC)
[19:14:07] <Colourless> there are some
[19:14:35] <wjp> MSVC 7 appears to have problems with a construction like http://www.math.leidenuniv.nl/~wpalenst/test/test1.cpp
[19:16:00] <Colourless> test3 compiled fine
[19:16:11] <Colourless> got a linker error no entry point :-)
[19:16:19] <wjp> surprising :-)
[19:17:06] <Colourless> test1 fine too
[19:17:17] <wjp> .NET, right?
[19:17:28] <Colourless> yes
[19:17:34] <wjp> k, thanks for checking
[19:17:55] <Colourless> MSVC 7 aka .Net aka 2002
[19:18:05] <wjp> oh, 7 is .net ?
[19:18:13] <Colourless> yes
[19:18:21] <Colourless> 7.1 is .Net 2003
[19:18:31] <Colourless> a few minor differences
[19:18:37] <wjp> I wonder what's causing scummvm to fail then
[19:18:43] <wjp> how about test2?
[19:19:13] <Colourless> fine
[19:19:27] <wjp> hm...
[19:19:34] <wjp> in scummvm that class c is templated as well
[19:20:28] <wjp> could you try the new test1.cpp as well?
[19:20:36] <Colourless> all compile fine with the 2003 compiler
[19:21:16] <Colourless> that compiled fine with 2003...
[19:21:36] <Colourless> and 2002
[19:22:01] <Colourless> wait...
[19:22:05] <Colourless> template class
[19:22:08] <Colourless> needs to be instantiated
[19:23:01] <wjp> doesn't main() do that?
[19:23:08] <Colourless> which is what you've done
[19:23:11] <Colourless> yeah
[19:23:38] <wjp> could you also try with f() returning T* instead of void?
[19:24:03] <Colourless> and returning 0?
[19:24:24] <Colourless> still fine
[19:24:36] <wjp> interesting
[19:24:53] <wjp> now I guess the only remaining difference is that scummvm calls that templated function from within a static member
[19:26:07] <Colourless> test2 dies with MSVC6
[19:26:15] <Colourless> and test3 too
[19:27:05] <wjp> something using type as expression?
[19:27:14] <wjp> s/thing/thing about/
[19:27:34] <Colourless> test2.cpp(7) : error C2143: syntax error : missing ';' before '<'
[19:27:34] <Colourless> test2.cpp(7) : error C2182: 'f' : illegal use of type 'void'
[19:27:34] <Colourless> test2.cpp(7) : error C2433: 'f' : 'friend' not permitted on data declarations
[19:27:34] <Colourless> test2.cpp(7) : error C2244: 'f' : unable to resolve function overload
[19:27:34] <Colourless> test2.cpp(7) : error C2059: syntax error : '<'
[19:27:34] <Colourless> test2.cpp(7) : error C2238: unexpected token(s) preceding ';'
[19:27:42] <Colourless> test3.cpp
[19:27:42] <Colourless> test3.cpp(9) : error C2062: type 'int' unexpected
[19:28:11] <wjp> well, I guess MSVC6 really doesn't like templated members :-)
[19:29:00] <Colourless> so got another test?
[19:29:07] <edbgon> that is illegal use of type void... the police will be by soon
[19:29:18] <wjp> new test1.cpp
[19:29:39] <wjp> next test would be scummvm itself :-)
[19:30:09] <Colourless> fine
[19:30:27] <wjp> http://www.math.leidenuniv.nl/~wpalenst/test/singleton.h is the actual code
[19:31:23] <wjp> if that works I might have to start hitting somebody :-)
[19:32:36] <Colourless> used that and this:
[19:32:37] <Colourless> #include "singleton.h"
[19:32:37] <Colourless> DECLARE_SINGLETON(int);
[19:32:37] <Colourless> int main(void)
[19:32:37] <Colourless> {
[19:32:37] <Colourless> return 0;
[19:32:39] <Colourless> }
[19:32:41] <Colourless> and it compiled fine
[19:32:46] <wjp> wow
[19:33:07] <wjp> thanks for checking again
[19:35:51] <Colourless> it didn't like this:
[19:35:51] <Colourless> template<class T>
[19:35:51] <Colourless> struct Foo
[19:35:51] <Colourless> {
[19:35:51] <Colourless> T Bar;
[19:35:51] <Colourless> };
[19:35:53] <Colourless> DECLARE_SINGLETON(Foo<int>);
[19:36:10] <wjp> does Foo have to templated?
[19:36:15] <Colourless> but was fine if i did this:
[19:36:15] <Colourless> typedef Foo<int> Foo_int;
[19:36:15] <Colourless> DECLARE_SINGLETON(Foo_int);
[19:36:49] <wjp> oh, but that's because the #define is broken I see
[19:37:03] <wjp> there should be a space between the T and the >
[19:38:23] <Colourless> yep that fixed it
[19:39:40] <Colourless> i can't possibly work out what you're problem is then.
[19:39:53] <wjp> me neither
[19:40:52] * WattAtWork_ thinks.... Is the concept of this code to do something along the terms of "GUIApp * GUIApp::get_Instance() {return Singleton<GUIApp>::instance;}"?
[19:40:54] <wjp> the actual use of Singleton is subclassing it, btw, like class ConfigManager : public Singleton<ConfigManager>
[19:41:59] <wjp> hm, I wonder if that could cause it
[19:42:03] <WattAtWork_> or that... hehe
[19:42:34] <wjp> followed by a DECLARE_SINGLETON(ConfigManager);
[19:43:27] <Colourless> that is... strange
[19:43:29] <WattAtWork_> I'd imagine the ConfigManager inheriting from the Singleton of type ConfigManager could be an issue.
[19:45:27] <Colourless> this was fine:
[19:45:28] <Colourless> struct Foo;
[19:45:28] <Colourless> struct Foo : public Common::Singleton<Foo>
[19:45:28] <Colourless> {
[19:45:28] <Colourless> int Bar;
[19:45:28] <Colourless> };
[19:45:29] <Colourless> DECLARE_SINGLETON(Foo);
[19:46:37] <wjp> and this one? http://www.math.leidenuniv.nl/~wpalenst/test/singleton.cpp
[19:46:39] <Colourless> even removing the struct Foo; was fine
[19:47:09] <Colourless> um
[19:47:14] <Colourless> that doesn't include the header?
[19:47:23] <Colourless> becase that is the header :-)
[19:47:31] <wjp> yeah, I know :-)
[19:47:41] <wjp> it has some extra stuff at the bottom, though
[19:47:46] <Colourless> singleton.cpp(35) : error C2248: 'CM::CM' : cannot access private member declared in class 'CM'
[19:48:14] <Colourless> constructor is privat
[19:48:14] <Colourless> e
[19:48:21] <wjp> yeah, but there's a friend
[19:48:24] <Colourless> it desn't like that
[19:49:43] <Colourless> what is SingletonBaseType??
[19:49:55] <wjp> typedef in Singleton
[19:50:25] <Colourless> ah yeah
[19:52:01] <-- servus has left IRC (Read error: 110 (Connection timed out))
[19:52:35] <Colourless> making it
[19:52:36] <Colourless> friend SingletonBaseType* makeInstance<SingletonBaseType>();
[19:52:39] <Colourless> compiled fine
[19:52:42] <Colourless> now gets a linker error
[19:53:21] <Colourless> singleton.obj : error LNK2019: unresolved external symbol "class CM * __cdecl makeInstance<class CM>(void)" (?
[19:53:22] <Colourless> makeInstance@?$@VCM@@@@YAPAVCM@@XZ) referenced in function "public: static class CM & __cdecl Common::Singleto
[19:53:22] <Colourless> n<class CM>::instance(void)" (?instance@?$Singleton@VCM@@@Common@@SAAAVCM@@XZ)
[19:53:45] <wjp> peculiar
[19:59:39] --> Darke has joined #pentagram
[20:02:16] --> servus has joined #pentagram
[20:03:47] <Colourless> no idea how to fix that make instance
[20:05:05] <wjp> are there patches/patchlevels for MSVC, by the way? So could your version be more up-to-date than someone elses?
[20:05:53] <Colourless> i have
[20:05:53] <Colourless> 13.00.9466
[20:06:54] <Colourless> heh...
[20:06:56] <Colourless> i fixed it :-)
[20:07:01] <Colourless> use
[20:07:01] <Colourless> friend SingletonBaseType* ::makeInstance<>();
[20:07:10] <Colourless> compiles fine
[20:07:15] <wjp> unfortunately that breaks gcc :/
[20:07:36] <wjp> s/breaks/doesn't compile in/
[20:09:33] <wjp> um, strange; it does compile now
[20:09:54] <wjp> how incredibly confusing
[20:10:23] <WattAtWork_> yeah, confusing seems like the correct word for it
[20:10:32] <WattAtWork_> :-)
[20:10:49] <wjp> ah, I see
[20:11:13] * servus . o O ( At least you're not dealing with the 3D Studio Max SDK... :)
[20:11:23] <-- edbgon has left IRC ("Lost terminal")
[20:11:24] <wjp> scummvm appararently has CM in namespace Common
[20:11:28] <wjp> didn't realize that
[20:11:44] <Colourless> ah ok. lets see
[20:12:38] <Colourless> it is not happy
[20:13:11] <Colourless> Common::
[20:13:18] <Colourless> singleton.cpp(62) : error C2275: 'T' : illegal use of this type as an expression
[20:14:10] <wjp> amazing, so it's all because of that namespace?
[20:15:23] <Colourless> yes seems that way
[20:15:49] <wjp> that particular error can by bypassed by 'return ::makeInstance<T>()' instead of 'return makeInstance<T>()', by the way
[20:16:11] <wjp> but that leaves the friend issue
[20:16:41] <Colourless> wait
[20:16:48] <Colourless> doing
[20:16:48] <Colourless> friend SingletonBaseType* ::makeInstance<>();
[20:16:53] <Colourless> also fixed that problem too
[20:17:05] <Colourless> just gives a different error
[20:17:07] <Colourless> go figure
[20:17:36] <Colourless> the friend line is the problem
[20:17:42] <Colourless> the namespace just confuses it about what error
[20:18:17] <wjp> pity you don't have a 'protected' for superclasses
[20:19:43] <Colourless> put make instance in common and use Common::makeInstance<>() as the friend
[20:20:12] <wjp> or even put makeInstance inside Singleton
[20:20:19] <Colourless> yeah or that
[20:20:40] <Colourless> or *gasp* just use new....
[20:21:02] <Colourless> though putting make instance in the singlton makes an ugly ugly friend line :-)
[20:21:04] <wjp> there are some other classes which have more complex specialized makeInstances
[20:21:23] <wjp> nah, the friend line becomes easier
[20:21:31] <wjp> 'friend makeInstance()'
[20:23:20] <Colourless> that didn't work ;-)
[20:23:28] <wjp> ack
[20:23:45] <wjp> um, with the correct returntype
[20:24:04] <wjp> 'friend SingletonBaseType* makeInstance();'
[20:24:36] <Colourless> needed to use
[20:24:37] <Colourless> friend SingletonBaseType * Singleton<SingletonBaseType>::makeInstance();
[20:24:51] <wjp> hm, interesting
[20:26:20] <Colourless> so you are saying this:
[20:26:21] <Colourless> friend SingletonBaseType* ::makeInstance<>();
[20:26:23] <Colourless> will not work for you
[20:26:28] <wjp> yes
[20:26:45] <wjp> error: `Common::ConfigManager* makeInstance()' should have been declared inside `::'
[20:27:03] <wjp> the one after 'needed to use' works in g++ as well
[20:31:07] <Colourless> i wonder why using the :: doesn't work for you... i would have thought it would have
[20:31:19] <wjp> I don't quite understand the error g++ gives
[20:31:46] <Colourless> hmm
[20:31:50] <wjp> I'll try with gcc 3.4.2
[20:31:52] <Colourless> is make instance actually IN ::
[20:31:53] <servus> Is this inside the namespace declaration?
[20:31:57] <Colourless> that is the global namespace
[20:32:02] <Colourless> in scummvm's code
[20:32:07] <Colourless> or is it in another namespace
[20:32:24] <wjp> singleton.cpp:82: error: `Common::CM* makeInstance()' should have been declared inside `::'
[20:34:09] <servus> Must be a new file... not in wjp's doxygen, I'll leave you alone=)
[20:34:33] <Colourless> beats me
[20:35:16] <servus> I don't get the line though -- why would you have an lvalue (or a typedef) and then a function?
[20:43:39] <Colourless> my 'solution' if it works would be move make instance into Common and use friend SingletonBaseType* Common::makeInstance<>();
[20:44:25] <wjp> works here
[20:44:39] <wjp> so it doesn't need any extra :: in instance() ?
[20:45:12] <wjp> (I mean _singleton = makeInstance<T>(); vs ::makeInstance<T>(); )
[20:45:19] <wjp> um, Common::, of course
[20:53:14] <Colourless> no
[20:53:48] <Colourless> leave everything as is, just put makeInstance into namespace Common and add Common:: to the friend line
[20:54:12] <Colourless> which i'm sure is what you've done
[20:54:28] <wjp> http://www.math.leidenuniv.nl/~wpalenst/test/singleton.cpp
[20:54:47] --> Luck|Chetic has joined #pentagram
[20:55:56] <-- Luck|Chetic has left IRC (Client Quit)
[20:56:22] --> Luck|Chetic has joined #pentagram
[20:56:28] <-- Chetic has left IRC (Read error: 104 (Connection reset by peer))
[20:59:33] <wjp> oh great
[20:59:44] <wjp> that breaks when CM is outside namespace Common with gcc
[21:00:55] * wjp sighs
[21:06:30] <wjp> I wonder if we went from an MSVC bug to a g++ bug :-)
[21:07:22] <wjp> it only complains when I try to befriend a templated function in another namespace
[21:08:03] <wjp> if I remove the template, it works; if I remove the namespace, it works
[21:08:04] <-- Luck|Chetic has left IRC (Client Quit)
[21:18:33] <wjp> hm, not getting much better...
[21:18:38] <wjp> template<class SingletonBaseType> friend SingletonBaseType* Common::makeInstance();
[21:18:41] <wjp> :-)
[21:18:56] <Colourless> that s what you need?
[21:21:26] <wjp> hm, well, it's the only way I managed to get a templated function from a namespace to be a friend
[21:21:31] <wjp> http://www.math.leidenuniv.nl/~wpalenst/test/test4.cpp
[21:21:41] <wjp> first friend line in there doesn't work for me, second one does
[21:21:57] <wjp> might be a g++ bug
[21:22:23] <Colourless> works here
[21:22:28] <wjp> both?
[21:22:45] <wjp> interesting
[21:22:51] <Colourless> yes
[21:23:13] <Colourless> whether or not it 'actually' works when resolved is a different matter :-)
[21:23:39] <Colourless> but in the scummvm code, template<class SingletonBaseType>... worked
[21:32:47] * wjp sighs
[21:33:10] <wjp> maybe we should decide to avoid friend declarations as much as possible in pentagram :-)
[21:33:36] <Colourless> i agree
[21:33:37] * WattAtWork_ nods.
[21:33:51] <Colourless> shouldn't really need them
[21:34:15] <wjp> I did add a couple
[21:34:32] <wjp> but they're really very simple friends :-)
[21:59:01] <Colourless> time for me to go
[21:59:02] <-- Colourless has left IRC ("casts improved invisibility")
[22:04:58] <wjp> interesting read: http://gcc.gnu.org/ml/gcc-bugs/2002-10/msg01003.html
[22:09:09] <wjp> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8355
[22:09:25] <wjp> gcc bug that's been open since october 2002... :/
[23:13:45] --> Kirben has joined #pentagram
[23:13:45] --- ChanServ gives channel operator status to Kirben
[23:34:15] <-- WattAtWork_ has left #pentagram ()
[23:50:24] <servus> That's why I like MSVC6. We don't have bugs. We have new ways of doing things :>