code logs -> 2010 -> Sun, 29 Aug 2010< code.20100828.log - code.20100830.log >
--- Log opened Sun Aug 29 00:00:39 2010
00:33 You're now known as TheWatcher[T-2]
00:36 cpux is now known as cpux[vidyagames]
00:36 You're now known as TheWatcher[zZzZ]
00:37 Anno[Laptop] [annodomini@Nightstar-3be1e04d.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:41 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
01:01 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
01:15 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
01:18 RichardBarrell [mycatverbs@Nightstar-689c9c54.cable.virginmedia.com] has quit [Connection closed]
01:37
< celticminstrel>
The only question is whether calling Update() in the onPaint() handler is a recursive loop. Hopefully not.
01:38
< celticminstrel>
...didn't do anything anyway... :/
01:38
< celticminstrel>
.
02:00
< celticminstrel>
Okay, something is clearly wrong. :/
02:01
< celticminstrel>
...wait... O_O
02:04
< celticminstrel>
It helps if I bind the right function to the event. 9_9
02:09
< McMartin>
Yeah. Stuff like this is why I answered RB as I did - GUI programming is never actually any fun.
02:09
< McMartin>
But it is something it's good to know the basics of how to do.
02:09
<@jerith>
http://pyweek.org/e/boomslang/ -- Our pyweek entry.
02:09
< McMartin>
And it's a fairly unique skill within programming
02:11
< McMartin>
>DRINK OCEAN
02:11
< McMartin>
Norse gods couldn't drink up the sea. You don't have a chance.
02:12
< Derakon>
A new response for FotH?
02:12
< McMartin>
Actually, an old one
02:12
< McMartin>
jerith: Ah, the famous Malfunctioning Cryosleep Ship genre. =)
02:13
<@jerith>
McMartin: Indeed.
02:13
<@jerith>
This one comes with zero screwdrivers and about a parsec of duct tape.
02:14
< McMartin>
Is that speedrun one minute 48 seconds or one hour 48 minutes?
02:15
< celticminstrel>
Who is RB? Anyway, current problem is that I push something onto an std::stack, and discover it's still empty afterwards. :/
02:16
< McMartin>
RB is Richard Barrell, who asked whether Qt4 made GUI programming actually warm and fluffy, to which I replid that it's always and permanently made of spiders - but that IMO Qt's were less poisonous than most.
02:16
< McMartin>
Pastebin your stack code
02:16
< celticminstrel>
Ah.
02:17
< celticminstrel>
It's pretty simple code; like four lines of it...
02:17
< celticminstrel>
Unless you also want the point where the stack is declared?
02:17
< McMartin>
More context is probably better
02:17
< McMartin>
The STL is a harsh mistress
02:17
< Derakon>
WX's layout code is basically a clumsy implementation of HTML tables.
02:18
< celticminstrel>
I probably won't be using wx's layout code; I'll use absolute positioning.
02:18
< Derakon>
Jetblade's is just "Okay, I'll draw things exactly where you tell me to. Up to you to deal with linebreaks."
02:18
< celticminstrel>
At least for this project.
02:18
<@jerith>
McMartin: Minutes, not hours.
02:20
< McMartin>
Derakon: Qt and I *think* now GTK too use nested H/V grids with spring-spacer widgets if you don't want all widgets of the same size.
02:20
< McMartin>
By nesting them you can get pretty good results - and if you don't want to work it out by hand you can design them in Qt Designer or Glade.
02:20
< McMartin>
OHowever, I could not for the life of me get Glade or Gtk in the raw to do the image-container widget that Blorple needed, which is why I switched from PyGTK to Java/Swing.
02:21
< Derakon>
That sounds like "a clumsy implementation of HTML tables" too. :(
02:21
< McMartin>
HTML tables don't have springs.
02:21
< Derakon>
IIRC you can set cells to percentage / constant width.
02:22
< McMartin>
Yeah, the basic mechanic here is "set everything to its its minimum size. Then, divide up all remaining space between the spring objects."
02:22
< McMartin>
That's not percentage.
02:22
< McMartin>
Note that minimum also means "constant" sincey ou can demand more space than you use as being your Real Minimum.
02:22
< Derakon>
Mm, fair, and WX works that way too.
02:22
< Derakon>
But the general approach to layout is just so clumsy in terms of the code needed.
02:23
< McMartin>
This is why you have an army of robots.
02:23
< Derakon>
It really cries out for a markup language.
02:23
< McMartin>
Yes, like XML, which is exactly what GTK and Qt do.
02:23
< Derakon>
Ah.
02:23
< celticminstrel>
http://pastebin.starforge.co.uk/341
02:23
< McMartin>
And what it really truly cries out for is a visual editor
02:23
< McMartin>
Which both have
02:23
< celticminstrel>
By the way, wxWidgets also supports XML definitions of GUI interfaces.
02:24
< McMartin>
However, generally, the XML is turned into autogenerated code during a compilation step.
02:24
< celticminstrel>
Which is not the case in wxWidgets?
02:24
< McMartin>
(Glade by default doesn't do this, but can; Qt by default does do this, but doesn't have to)
02:24
< McMartin>
Not sure; I haven't used any wx interface generators.
02:24
< celticminstrel>
Same here.
02:24
< McMartin>
I've used Glade, Visual Basic, and Qt Designer.
02:24
< celticminstrel>
So, anything blatantly wrong with that code with regards to the stack?
02:24
< Derakon>
I suppose WX might have an XML-based system.
02:24
< celticminstrel>
It does, Derakon.
02:24
< celticminstrel>
.
02:24
< Derakon>
But if so I haven't encountered it.
02:25
< celticminstrel>
They call it XRC.
02:25
< celticminstrel>
I don't need it for this though.
02:25
< McMartin>
celticminstrel: YOu forgot an & on the return type of resPaths().
02:25
< McMartin>
So it's doing a copy constructor when you call it, adn then pushing into the copy.
02:26
< celticminstrel>
Ahah.
02:26
< McMartin>
(Also, those in-function statics should be in-class statics instead)
02:26
< celticminstrel>
...but wait, it's returning a reference.
02:26
< McMartin>
(in-function statics are icky and really just a way to get some OO effects in a non-OO language, that non-OO language being C)
02:26
< McMartin>
celticminstrel: That's my point; it's not. You forgot the & on that one function, while the other two have it
02:26
< celticminstrel>
Oh, it's not. It's supposed to be.
02:27
< celticminstrel>
I used in-function statics because I couldn't get it to compile with in-class statics.
02:27
< McMartin>
Odd
02:27
< McMartin>
Oh, I wonder if it's because it's a templated class full of statics.
02:28
< celticminstrel>
Yeah, I think it's that.
02:28
< McMartin>
My template fu is not as good as it should be
02:28
< McMartin>
Anyway, back to I7 to finish off the last couple of suggestions.
02:28
< celticminstrel>
The trouble is that statics need to be defined, and I couldn't do that in a useful way.
02:28
< McMartin>
I'd consider making them all non-static and then having a single global that instantiated the class.
02:33
< celticminstrel>
Then I'd still have to instantiate it once for every type of resource I want... then again, it would solve the problem that this setup doesn't delete the resources on shutdown...
02:34
< celticminstrel>
On the other hand, convenience may be reduced...
02:35
< McMartin>
Depending on how much needs to be done on shutdown and how much timing control you need, net convenience may increase
02:35
< McMartin>
In *fact* you might be best off having explicit startup/shutdown routines.
02:36
< celticminstrel>
Okay, the basic idea behind this is that I call get<type>("name") and it returns a pointer to the resource that it found, throwing an exception if it couldn't find it; then it holds onto the resource until I tell it to drop it (since I'll need each resource many times).
02:37
< celticminstrel>
The get function is a global (ie not a class) template function at present.
02:38 * McMartin nods
02:38
< McMartin>
I'd have to think pretty hard about that to get it right, since it's a little off my personal beaten track.
02:39
< McMartin>
It's not an intrinsically bad way to do things, but I personally lean towards uniform reference techniques (that is, all gettable resources are a single supertype, all loadables inherit from it)
02:39
< McMartin>
Your way is entirely reasonable but it's not one where I have answers to hand, if you will.
02:39
< celticminstrel>
Well, the resources are types that I did not create (like wxImage, wxSound, wxFont, wxCursor).
02:40
< celticminstrel>
So the supertype method seems like it'd be kind of difficult.
02:40
< McMartin>
Yeah, it's definitely harder in that case, and an argument for doing it your way.
02:41
< McMartin>
(But it's not actually impossible; you have the managers return containers that hold them, and then work around the typecast issue in one of several ways)
02:41
< celticminstrel>
True, it's not impossible.
02:41
< McMartin>
I'm not criticizing your design here, I hasten to add.
02:41
< celticminstrel>
I also wanted to have the pool to hold onto the resources until I no longer need them.
02:41
< McMartin>
I'm just explaining that it pushes parts of C++ that are a bit outside of my comfort zone so I'll be less helpful
02:41
< celticminstrel>
Okay.
02:42
< McMartin>
Yeah, that's a good move, and I'm guessing with your map setup that you're doing some kind of reference/dereference system, which will eventually unload once you hit refcount 0
02:43
< celticminstrel>
Well, actually, I don't yet have any mechanism to auto-unload it, which is bad.
02:43
< McMartin>
Well, you've got an infrastructure that could build it up, anyway.
02:43
< McMartin>
Even if it's not there yet, you could add it without too much trouble.
02:43
< celticminstrel>
Could I?
02:44
< McMartin>
New maps to the manager class, probably from type pointer to integer, that integer being the refcount.
02:44
< McMartin>
get() bumps it up by 1, and a release() would drop it and do the check
02:44
< celticminstrel>
Hm, maybe.
02:44
< McMartin>
If you wanted to get *really* fancy - though you'd have to go the container route to do it - you could hide that inside the container, and make the thing you return increment on construction (that which is returned) and decrement on destruction (when it leaves scope).
02:45
< McMartin>
That's getting into some fairly advanced topics, though, given where (IIRC) you are in your C++ development?
02:45
< McMartin>
Rolling your own smart pointers is a high-intermediate kind of trick.
02:45
< celticminstrel>
Huh? Oh.
02:45
< celticminstrel>
More important, perhaps, is a mechanism to deal with a situation where the program ends without releasing the resource.
02:46
< McMartin>
You could set up an atexit() handler that runs through all the maps and calls a releaseall() on them...
02:46
< McMartin>
(or whatever - some function that iterates through the map and does your necessary cleanup steps)
02:46
< McMartin>
Oh oh
02:46
< celticminstrel>
Hm. That's actually a fairly decent idea...
02:46
< McMartin>
One thing to watch out for
02:46
< McMartin>
If you do go the live-collection route?
02:47
< celticminstrel>
(I probably won't. <_< )
02:47
< McMartin>
Make sure you don't end up ruining your performance by doing a bunch of load-unload-reload-unload-etc stuff because you're keeping stuff too separate.
02:47
< McMartin>
OK, drawing this sprite!
02:47
< McMartin>
Don't need this anymore (chuck)
02:47
< McMartin>
Time to get it again, going to disk...
02:47
< McMartin>
... hitting the disk N times a frame = bad~
02:47
< celticminstrel>
Yeah; I'm not sure how I would do the refcount thing on this without doing that.
02:48
< McMartin>
If you're doing something that's, for lack of a better word, "level based", it's probably best to load the cache at the beginning of each level and then clear the cache (probably with the same thing your atexit thing will call!) between levels.
02:48
< celticminstrel>
It's not level based. It's an RPG.
02:48
< McMartin>
s/level/zone/
02:48
< McMartin>
Still holds~
02:48
< celticminstrel>
Okay, sure.
02:49
< celticminstrel>
Though there are some things that will be needed in all zones.
02:49
< McMartin>
But yeah, clearing and reloading the cache would be something that would make perfect sense to do while zoning.
02:49
< McMartin>
Making it so universal stuff stays loaded is an optimization.
02:49
< McMartin>
I'd hold off on that until later - zoning is going to take awhile anyway
02:49
< celticminstrel>
The game code is all done; I didn't write it.
02:50
< celticminstrel>
I'm just moving it out of Carbon.
02:50
< McMartin>
Oho.
02:50
< celticminstrel>
And bugfixing/tweaking too, but that's for later.
02:50
< McMartin>
Do whatever it takes now, then optimize as part of tweaking later.
02:50
< McMartin>
(I may have asked this before, but I've forgotten if I did: what is it you're porting to wx?)
02:50
< celticminstrel>
So, I'll add a function to release all resources of a specific type, and look into the atexit thing.
02:51
< celticminstrel>
Blades of Exile.
02:52
< McMartin>
Nod nod.
02:52
< celticminstrel>
Nod nod?
02:52
< McMartin>
wx probably a decent choice, then.
02:52
< McMartin>
It's had cross-system compat for longer than either of the other two major open source alternatives.
02:52
< McMartin>
s/cross-system/single-source cross-system/
02:52
< celticminstrel>
wxWidgets has?
02:52
< McMartin>
Yeah
02:52
< McMartin>
It had it first.
02:53
< McMartin>
Qt3 did *not* have it, Qt4 was the first to have true single-source across Mac/Win/Lin in that line.
02:53
< McMartin>
I'm not sure if Gtk has single-source including Mac yet.
02:53
< McMartin>
TF would most likely know.
02:54
< celticminstrel>
I've heard that Gtk is working on a Mac-native version.
02:54
< ToxicFrog>
Single-source as in "your program using Gtk does not need seperate branches for different OSes"?
02:54
< celticminstrel>
Yeah, I don't want to have separate branches.
02:55
< celticminstrel>
A bit of conditional compilation is fine though.
02:55
< ToxicFrog>
As far as I am aware, this is the case, with the caveat that I've only ever used Gtk from Lua and C - most of that Lua.
02:56
< McMartin>
TF: Yeah, that was what I meant.
02:56
< McMartin>
I remember for awhile you needed to roll your own ObjC bindings to Finder in Gtk.
02:56
< ToxicFrog>
...at least, for windows/linux/BSD. I don't know about OSX, because I don't have an OSX machine to test with; I can't offhand think of a reason why it wouldn't work, but OTOH OSX's version of X11 sucks ass and I don't know if Gtk still uses it.
02:57
< McMartin>
Requiring X11.app doesn't count, no~
02:57
< McMartin>
(SDL you needed an ObjC shell but it shipped with their devkit and could be trivially folded into the makefile the same way SDLmain.lib was for WIn32)
02:57
< celticminstrel>
Especially not when the program being ported was Mac-native to start with.
02:57
< celticminstrel>
Yeah, I've used SDL with that.
02:58
< McMartin>
Yeah. wx and Qt4 do what needs doing on their own. (and later versions of Qt4 actually bind to Cocoa instead of Carbon. Not sure what wx uses, but getting it to wx will make it easier to get it to something else if it's necessary later)
03:01 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
03:02
< celticminstrel>
wxMac binds to Carbon; wxCocoa binds to Cocoa and is supposedly not considered stable, or something; I forget exactly.
03:03
< celticminstrel>
But I'm assuming that I can swap out wxMac for wxCocoa whenever, with little to no trouble. <_<
03:07
< celticminstrel>
Uh. "Expected ';' before iter". This on the line where I declare iter as a variable of type std::map<std::string,type*>::iterator.
03:08
< celticminstrel>
In other news, wxWidgets doesn't understand tilde expansion. Not that this truly matters...
03:09
< ToxicFrog>
What's the actual line?
03:09
< ToxicFrog>
Also, tilde expansion is a shell thing.
03:10
< celticminstrel>
Yeah, but any library dealing with files should know about it in my opinion.
03:11
< celticminstrel>
std::map<std::string,type*>::iterator iter = resPool<type>::resources.begin();
03:11
< ToxicFrog>
Why?
03:11
< ToxicFrog>
For starters, it's completely unknown on windows
03:11
< celticminstrel>
Because it's a way of specifying a relative path.
03:11
< celticminstrel>
Sure, it's unknown on Windows, but there are similar concepts that it could be translated to.
03:12
< ToxicFrog>
Er, what? It's not at all relative!
03:12
< celticminstrel>
I'm guessing EXC_ARITHMETIC is divide by zero?
03:13
< ToxicFrog>
~ is an absolute path in shells that support it.
03:13
< celticminstrel>
And what about that line I pasted just above?
03:13
< celticminstrel>
It's relative to the current user. <_<
03:13
< ToxicFrog>
And yeah, the similar concept is what you should be doing: getenv("HOME")
03:13
< celticminstrel>
Though, there are other ways of getting that sort of information which are more portable.
03:13
< ToxicFrog>
That's not what "relative path" means and you know it.
03:15
< celticminstrel>
Meh.
03:15
< ToxicFrog>
(the "more portable way" is typically to look for $APPDATA, and if that's unset, assume you aren't on windows and try $HOME instead)
03:15
< celticminstrel>
So, see anything wrong with this line?
03:15
< celticminstrel>
std::map<std::string,type*>::iterator iter = resPool<type>::resources.begin();
03:15
< ToxicFrog>
No, but I rarely do C++, I even more rarely do templates and I never do the STL.
03:16
< celticminstrel>
And I'm not sure why I bothered to ask about EXC_ARITHMETIC when it's perfectly obvious that it was a divide by zero.
03:17
< celticminstrel>
Okay, this works! Yay! Except for that one line, which is actually somewhat important, but meh.
03:18
< celticminstrel>
And the fact that it doesn't properly refresh when I resize the window... the window's not supposed to be resizable, so I suppose that's not important, but on the other hand I might as well add it since it's only about three lines of code.
03:20
< celticminstrel>
All I have is tiling a pattern in the background of the window, so it's not that spectacular. <_<
03:21
< McMartin>
If you're doing user directories on Mac vs. Linux vs. Windows, you need conditional compilation to do the OS-approved thing in each one.
03:21
< McMartin>
You can use Linux everywhere and get only some whining, but it's worse in 7 than XP to do that on Windows.
03:21
< celticminstrel>
By "Linux everywhere" do you mean slash-separated paths?
03:22
< McMartin>
No, I mean using ~/.appname as your personal app data path
03:22
< celticminstrel>
...okay... :/
03:22
< McMartin>
(On Windows, ~ is %USERPROFILE%, but you really want it in %APPDATA%\AppName)
03:22
< celticminstrel>
In the actual product, I'll probably get the path of the application and do all paths relative to that, anyway, so tilde expansion isn't actually needed.
03:22
< McMartin>
(And on Mac it should really be in ~/Library/Application Support/AppName/)
03:23
< McMartin>
You really don't want to do that, because your average user only has read-only access to /usr/bin or C:\Program Files.
03:23
< celticminstrel>
These don't need to be writable.
03:23
< McMartin>
Unless you mean for loading resource files, in which case, yes.
03:23
< McMartin>
Yeah
03:23
< celticminstrel>
Yeah, loading resource files.
03:24
< celticminstrel>
For the resource files that are writable (user-providable), I'll have the path of a scenario file to work from, so I'll just strip off the extension and build the path on that.
03:24
< ToxicFrog>
My approach is to check for $APPDATA, and if that's set, put it in $APPDATA/Program; otherwise, check for $USERPROFILE, and put it in $USERPROFILE/.Program; otherwise, assume I'm not on windows, put it in ~/.Program.
03:24
< ToxicFrog>
Well, s/~/$HOME/
03:25
< celticminstrel>
For temporaries that were unzipped, I can put them in Application Support, I suppose... but they are just temporary, so I dunno...
03:25 cpux[vidyagames] is now known as cpux
03:26
< celticminstrel>
McMartin: Do you see anything wrong with this line?
03:26
< celticminstrel>
std::map<std::string,type*>::iterator iter = resPool<type>::resources.begin();
03:27
< celticminstrel>
Okay, time to discover atexit...
03:35
< ToxicFrog>
For temporaries, use, um
03:35
< ToxicFrog>
Hrm
03:35
< ToxicFrog>
mkstemp is POSIX, so you don't have it on windows
03:36
< ToxicFrog>
Does windows define $TEMP? If so use that there and /tmp everywhere else?
03:37
< celticminstrel>
I considered putting them inside the application package at one point, but that's not portable, and also the user may lack write access there. And I wouldn't be surprised if there are other problems too. Um... I dunno if Windows defines $TEMP? I guess /tmp works well enough... those would be automatically deleted on a UNIX system, right?
03:38
< ToxicFrog>
Yes. But /tmp doesn't exist on windows.
03:38
< celticminstrel>
If wxWidgets provides a way to get a path to the temporary folder (I suspect it may), I'll use that.
03:38
< celticminstrel>
Yep. wxStandardPaths::GetTempDir.
03:42
< celticminstrel>
Ooh, maybe I need to add the template keyword for disambiguation.
03:43
< celticminstrel>
No...?
03:43
< celticminstrel>
...oh right, that's for when the template parameter appears to the left of a :: operator.
03:43
< celticminstrel>
Wait. It does.
03:44
< celticminstrel>
Ah. It needs typename, I bet.
03:46
< celticminstrel>
My tiling argument is flawed.
03:46
< celticminstrel>
Um. s/argument/algorithm/
03:48
< celticminstrel>
Fixed by changing < to <= ^_^
03:50
< celticminstrel>
I don't suppose anyone here knows how structs would have been padded in a Mac program created in 1997?
03:51
< McMartin>
Windows does in fact define %TEMP%
03:51
< McMartin>
C:\Users\McMartin>echo %TEMP%
03:51
< McMartin>
C:\Users\McMartin\AppData\Local\Temp
03:52
< celticminstrel>
I suppose I should take that as a "no". Oh well.
03:52
< McMartin>
(On XP, that would be the rather more verbose C:\Documents and Settings\McMartin\Local Settings\Application Data\Temp, I believe. There may be some points I missed, or Application Data may be gone)
03:52
< McMartin>
Best way to find out is to hexdump your data and take a look at it.
03:53
< McMartin>
It's not only chip- but compiler-dependent.
03:53
< celticminstrel>
It's a rather monolithic struct.
03:54
< celticminstrel>
I do know however that he managed to get it to be the same in the Windows version, because compatibility between Mac-created and Windows-created files is limited to endian-swapping.
03:55
< celticminstrel>
I'd guess he used CodeWarrior, but I really don't know for sure. I doubt he had OSX at that time.
03:58
< celticminstrel>
I guess I can try hex-dumping... it's just kind of tedious, especially when I don't necessarily know what data needs to be in which field.
04:06
< celticminstrel>
...duh, I forgot to implement my iterator!
04:06
< celticminstrel>
... s/implement/increment/
04:11
< celticminstrel>
Hm. Can I erase elements from a map without invalidating the iterator...
04:12
< celticminstrel>
No mention, so probably not. Plan B then.
04:16
< celticminstrel>
...okay, why is it trying to delete things twice?
04:19
< celticminstrel>
I wonder if I even need it to map to pointers... what are the requirements on the value type of a map? Just that it is copy-constructible?
04:22
< celticminstrel>
...copy assignable, according to the SGI website, though the one seems like it would imply the other...?
04:23
< celticminstrel>
Ah, I see...
04:23
< Vornicus>
celmin: I can, given some sense of the kinds of data that are stored at all, reverse engineer a binary file. I pulled it off for the original King's Bounty...
04:23
< McMartin>
copy-assignable means operator= is defined.
04:23
< celticminstrel>
Vornicus: And I imagine it would help immensely to have the structs the file was based off of, right?
04:24
< Vornicus>
If i have the /structs/ I win automatically.
04:24
< celticminstrel>
McMartin: Turns out that when SGI says "Assignable", they mean both copy-constructible and copy-assignable.
04:24
< McMartin>
Aha
04:24
< Vornicus>
All I need to figure out after that is endianness and padding.
04:24
< celticminstrel>
Vornicus: I have the structs, but there just seems to be a bit of padding issues that I'm putting off on resolving.
04:24
< celticminstrel>
Yeah, that.
04:25
< Vornicus>
Which are pretty simple, comparatively.
04:25
< celticminstrel>
Is this an offer to help? <_<
04:27
< Vornicus>
got a hexdump of the relevant section of the file, and the structs? Sure.
04:28
< Vornicus>
( vorn@nightstar.net )
04:29
< celticminstrel>
McMartin: Most of the wx classes in question define both a copy constructor and a copy assignment operator, and they use reference counting, so it looks like they'll be fine to store directly instead of via pointer. The other one is an std::vector<std::string>, which should be fine I think? (Though, wxSound doesn't mention an operator=...)
04:30
< celticminstrel>
Vornicus: The file is 103kB, just so you know.
04:30
< Vornicus>
Fine with me.
04:31
< celticminstrel>
wxSound does not define operator=, but it does define a copy constructor... would this be a problem?
04:31
< celticminstrel>
Vornicus: You want the hex dump, not the actual file, right?
04:31
< Vornicus>
Hex dump, yes.
04:31
< celticminstrel>
Could you do the save file too?
04:32
< celticminstrel>
Also, should I include it inline in the email or in an attachment?
04:33
< Vornicus>
Attach
04:37
< McMartin>
std::vector<std::string> is absolutely OK
04:41
< celticminstrel>
And what about wxSound?
04:41
< celticminstrel>
(TextWrangler auto-recover just failed... :( )
04:42
< McMartin>
I'm unfamiliar with wxSound
04:42
< celticminstrel>
It defines neither copy constructor nor operator=.
04:42
< celticminstrel>
Meaning that it has the compiler-defined ones.
04:44
< celticminstrel>
It contains pointers, so it might be unsafe.
04:44
< celticminstrel>
It does explicitly define a destructor, though that might be just for the sake of virtual.
05:09
< celticminstrel>
Then again, I could just use a Boost smart pointer to get around that... in fact, come to think of it, using a Boost smart pointer would seem to solve the entire problem!
05:12
< celticminstrel>
That means the pointers are automatically deleted when the container is destructed, which is precisely what I need.
05:12
< celticminstrel>
But now, too tired. Good night.
05:12
< McMartin>
It's better than that
05:12
< celticminstrel>
Oh?
05:13
< McMartin>
If you have a loose pointer to it in a function, it won't truly be destructed until that other function is through with it too
05:13
< McMartin>
boost::shared_ptr<> is fully and properly reference-counted.
05:13
< McMartin>
And I should have thought of that before mentioning rolling one's own smart pointers previously. -_-
05:13
< celticminstrel>
Yeah, but the fact that the containers are global objects means that their destruction will occur after any other code has finished executing... right?
05:14
< celticminstrel>
Using the smart pointer is redundant for most of the wx classes, which are reference-counted already, but it's not a bad redundancy in my opinion.
05:14
< celticminstrel>
Anyway, good night.
05:15
< McMartin>
Yeah, pretty much
05:15
< McMartin>
And you do have the load/unload constantly risk too
05:15
< celticminstrel>
Hm?
05:15
< celticminstrel>
I do?
05:15
< McMartin>
(If you use boost::shared_ptr<>)
05:16
< McMartin>
(Like we discussed before - but if you're keeping them in the map you're OK0
05:16
< McMartin>
)
05:16
< celticminstrel>
Okay.
05:16
< celticminstrel>
Is it foolish to put wxWidgets in ~/Library?
05:17
< celticminstrel>
...that's not really important.
05:17
< celticminstrel>
Good night.
05:18 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:54
< Vornicus>
celmin: crap on a cracker, man, you're completely mad.
06:23 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:34 Stalker [Z@5E691D.FC7C16.F8708C.94F74E] has joined #code
06:48 Stalker [Z@5E691D.FC7C16.F8708C.94F74E] has quit [Ping timeout: 121 seconds]
06:55 Orthia [orthianz@Nightstar-6d69cd09.xnet.co.nz] has quit [[NS] Quit: Fare thee well, old machine. Next I see you, may you be... replaced.]
07:00 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
07:04 Vornicus is now known as Vornicus-Latens
07:15 Derakon is now known as Derakon[AFK]
07:25 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
08:21 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
09:59 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
10:24 You're now known as TheWatcher
10:29 Anno[Laptop] [annodomini@Nightstar-3be1e04d.adsl.tpnet.pl] has joined #code
10:54 * TheWatcher eyes this code
10:55
< TheWatcher>
972 lines of perl in one file
10:55
< TheWatcher>
I suspect it is time to roll out the refactor tractor
10:55 * TheWatcher starts hacking it about into modules
10:55 * jerith provides a machete.
11:21 Abu[Laptop] [annodomini@Nightstar-acbc3c5c.adsl.tpnet.pl] has joined #code
11:22 Anno[Laptop] [annodomini@Nightstar-3be1e04d.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
11:53 cpux [chatzilla@Nightstar-20a84089.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
11:53 cpux_ [chatzilla@Nightstar-20a84089.dyn.optonline.net] has joined #code
11:53 cpux_ is now known as cpux
12:01 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
13:35 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
13:54 aoanla [AndChat@Nightstar-8a69abb6.range217-42.btcentralplus.com] has joined #code
14:11 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
14:14 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
15:35 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:43 Vornicus-Latens is now known as Vornicus
17:19 aoanla [AndChat@Nightstar-8a69abb6.range217-42.btcentralplus.com] has quit [[NS] Quit: ]
17:40 Derakon[AFK] is now known as Derakon
19:44 aoanla [AndChat@Nightstar-8a69abb6.range217-42.btcentralplus.com] has joined #code
20:22 * gnolam raegs at developers who do not understand 'cancel' buttons.
20:23
< gnolam>
I'm looking at you, Valve.
20:23
< Tarinaky>
o.O?
20:23
< Tarinaky>
What happened?
20:24
< Abu[Laptop]>
Somebody set up us the bomb.
20:35 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
20:39
< Tarinaky>
What you say?
20:41
< Abu[Laptop]>
You have no chance to survive make your time!
20:42
< Tarinaky>
Take off every ZIG.
20:42
< Abu[Laptop]>
You know what you doing.
20:42
< Tarinaky>
Every ZIG take off.
20:44
< celticminstrel>
...what, gnolam?
20:44
< Abu[Laptop]>
I think I said this before to you, but you should refresh your memory of that meme. You messed up thrice.
20:44
< celticminstrel>
Memes are annoying.
20:45
< Abu[Laptop]>
Problem, comrade?
20:45
< Tarinaky>
Abu[Laptop]: I don't consider that meme worth my time when it comes to being correct.
20:46
< Abu[Laptop]>
Philistiiiiiiine.
20:46
< Tarinaky>
AYB is not Philistine material.
20:47
< Tarinaky>
Supporting AYB is more like being a former member supporter of the Nazi party of Germany in modern day society
20:48
< Abu[Laptop]>
It's a classic meme, and if you know it, you should take :effort: to know it properly, rather than in a disjointed fashion.
20:49
< Tarinaky>
So's Nietzsche.
20:50
< Tarinaky>
People still get away with misquoting or quoting out of context with that.
20:50
< Abu[Laptop]>
Then that's bad of them and they should feel bad.
20:51
< Tarinaky>
Yes professor.
20:54
< aoanla>
To be fair, philosophers still argue about correct quoting of Nietzsche.
20:55
< aoanla>
What with the neurosyphilis and the antisemetic cousin
20:56
< Tarinaky>
Hehe. Never realised that Syphilis could cause an Abnormal Gait.
20:56
< Tarinaky>
Which has made me think of the Ministry of Silly Walks.
20:58
< Alek>
antisemetic cousin?
20:58
< Alek>
his cousin was against semen?
20:58
< Tarinaky>
Well, Jewish semen anyway.
20:58
< Tarinaky>
Any Jewish gametes really.
20:59
< aoanla>
Right.
21:00
< aoanla>
She edited his books after he died, which distorts the original message.
21:00
< aoanla>
Since Nietzsche hated antisemites.
21:05 Stalker [Z@5E691D.FC7C16.75EF63.7ED998] has joined #code
21:25 Stalker [Z@5E691D.FC7C16.75EF63.7ED998] has quit [Ping timeout: 121 seconds]
21:32 aoanla [AndChat@Nightstar-8a69abb6.range217-42.btcentralplus.com] has quit [[NS] Quit: ]
21:38 cpux [chatzilla@Nightstar-20a84089.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
21:38 cpux [chatzilla@Nightstar-20a84089.dyn.optonline.net] has joined #code
21:53 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:04 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
22:11 cpux [chatzilla@Nightstar-20a84089.dyn.optonline.net] has quit [[NS] Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716]]
22:13 cpux [chatzilla@Nightstar-20a84089.dyn.optonline.net] has joined #code
22:17 cpux is now known as cpux[fooding]
22:45 cpux[fooding] is now known as cpux
--- Log closed Mon Aug 30 00:00:40 2010
code logs -> 2010 -> Sun, 29 Aug 2010< code.20100828.log - code.20100830.log >