[00:13:06] caedes has quit: Ping timeout: 265 seconds
[00:13:14] Chieftain has quit:
[00:30:40] tereay has quit: Remote host closed the connection
[00:35:26] caedes has joined #peragro
[00:35:26] ChanServ sets mode: +v caedes
[00:35:33] arpu has joined #peragro
[00:51:07] <azaghal> Night
[02:03:02] needle has quit: Ping timeout: 264 seconds
[02:04:12] needle has joined #peragro
[02:34:57] arpu has quit: *.net *.split
[02:42:25] <LinuxO> Tucos, I only want to give the player some physics experience :P
[02:47:05] arpu has joined #peragro
[02:50:35] caedes has quit: *.net *.split
[02:51:48] caedes has joined #peragro
[03:08:46] amogorkon has quit: Read error: Connection reset by peer
[04:56:01] caedes has quit: Ping timeout: 265 seconds
[05:06:29] caedes has joined #peragro
[05:06:29] ChanServ sets mode: +v caedes
[05:09:50] Chieftain has joined #peragro
[05:42:56] Easton has joined #peragro
[06:02:43] caedes has quit: Ping timeout: 265 seconds
[06:07:14] caedes has joined #peragro
[06:07:14] ChanServ sets mode: +v caedes
[06:16:20] Chieftain_afk has quit: Ping timeout: 248 seconds
[06:24:28] caedes has quit: Ping timeout: 265 seconds
[06:25:07] caedes has joined #peragro
[06:25:07] ChanServ sets mode: +v caedes
[06:47:15] Vornne has quit: Ping timeout: 245 seconds
[06:49:19] Vornne has joined #peragro
[06:49:19] ChanServ sets mode: +o Vornne
[06:55:23] needle has quit: Ping timeout: 240 seconds
[06:55:52] needle has joined #peragro
[07:12:19] Deepa|AFK has joined #peragro
[07:15:38] DeepyDC has quit: Ping timeout: 258 seconds
[07:26:39] TheAncientGoat has joined #peragro
[07:58:20] Chieftain has joined #peragro
[08:18:20] Arerano_Areramau has joined #peragro
[08:42:24] Easton has quit: Ping timeout: 240 seconds
[08:50:56] TheAncientGoat has quit: Ping timeout: 265 seconds
[08:51:55] tereay has joined #peragro
[09:27:17] LinuxO has quit: Ping timeout: 248 seconds
[09:41:10] LinuxO has joined #peragro
[09:52:08] azaghal has quit: Ping timeout: 265 seconds
[11:04:23] TheAncientGoat has joined #peragro
[11:11:13] Vornne has quit: Ping timeout: 260 seconds
[11:12:54] Vornne has joined #peragro
[11:12:54] ChanServ sets mode: +o Vornne
[11:27:41] Vornne has quit: Ping timeout: 260 seconds
[11:29:24] Vornne has joined #peragro
[11:29:24] ChanServ sets mode: +o Vornne
[11:31:57] azaghal has joined #peragro
[11:31:58] ChanServ sets mode: +o azaghal
[11:38:13] <azaghal> Yo
[11:38:55] Vornne has quit: Ping timeout: 245 seconds
[11:40:48] Vornne has joined #peragro
[11:40:48] ChanServ sets mode: +o Vornne
[11:46:11] <azaghal> Vornne: No, I mean that I'm _calling_ it from within a destructor.
[11:46:39] <azaghal> (~IoServiceRunner)
[11:47:47] <sueastside> hey azaghal
[11:50:20] <Tucos> hey sueastside, azaghal
[11:59:33] <azaghal> Tucos, sueastside: Yo
[12:01:05] Vornne has quit: Ping timeout: 240 seconds
[12:03:22] Vornne has joined #peragro
[12:03:22] ChanServ sets mode: +o Vornne
[12:05:10] * Tucos go hooome
[12:55:09] T_afk has quit: Remote host closed the connection
[13:30:37] <Deepa|AFK> http://theoatmeal.com/comics/angler
[13:35:00] Baldur has joined #peragro
[13:38:29] amogorkon has joined #peragro
[13:38:29] amogorkon has quit: Changing host
[13:38:29] amogorkon has joined #peragro
[13:38:33] <azaghal> Deepa|AFK: Eww
[13:38:45] <Deepa|AFK> :D
[13:41:06] <azaghal> http://s3.amazonaws.com/theoatmeal-img/comics/handshakes/limp.png - I hate people shaking hands like this.
[13:41:42] <azaghal> http://s3.amazonaws.com/theoatmeal-img/comics/handshakes/close.png - this makes me go "Get the fuck out"
[13:46:48] <azaghal> http://theoatmeal.com/comics/apple :D
[13:47:38] <azaghal> http://theoatmeal.com/comics/legos - rofl
[13:47:41] <azaghal> So true :D
[14:05:28] needle has quit: Ping timeout: 264 seconds
[14:06:50] needle has joined #peragro
[15:53:49] <Vornne> azaghal: but you only call .join(), not interrupt, which doesn't throw any exceptions (the note about it throwing thread_interrupted was about it being an interruption point: if the thread blocking on join() is itself interrupted, the exception will be thrown and then caught by the other thread object after everything has destructed)
[15:54:52] <azaghal> Vornne: Are you sure?
[15:55:02] <Vornne> another thing: maybe you want to use work.reset() rather than ioService.stop()? don't know, just my guess
[15:55:28] <azaghal> Vornne: Nah, ioService.stop() will also signal worker to sod off.
[15:55:41] <azaghal> Vornne: It's listed as alternative in Boost.Asio docs.
[15:56:09] <azaghal> The thing is, if something interrupts the current thread, doesn't that mean my join fails and the IoServiceRunner::thread keeps running?
[15:56:14] <Vornne> yeah, but apparently it doesn't wait for other operations to finish
[15:56:32] <azaghal> I know. That's why I need to .join()
[15:56:46] <azaghal> In order to make sure it has actually stopped before destroying the io_service.
[15:56:53] <azaghal> Hm...
[15:57:03] <azaghal> Am I passing io_service as reference or by value... Hm...
[15:57:28] <Vornne> join won't affect whether the io service finishes other handlers or not
[15:57:34] <azaghal> Vornne: Before I added the stop()/join() thing the program would complain at exit in ~IoServiceRunner.
[15:57:50] <azaghal> Hm...
[15:57:58] <Vornne> just means the enclosing thread waits for it to finish before continuing
[15:57:59] <azaghal> Yeah, run() exits immediately, you're right.
[15:58:22] <azaghal> Ok, then work.reset() should be done instead to make sure it's not the one blocking.
[15:59:01] <azaghal> So run() then keeps running, and has no worker object.
[15:59:13] <azaghal> And it waits for the rest to finish.
[15:59:17] <azaghal> Vornne: Is that good?
[15:59:34] <azaghal> Vornne: My main question is whether I should mask the exception in destructor or not?
[16:00:31] <Vornne> re the dtor issue, the only problem could be if the IoServiceRunner::thread object had two other threads calling interrupt() and join() (in the dtor) at the same time - which shouldn't happen, the thread object is not thread safe
[16:01:06] <azaghal> Well, what if something tries to interrupt the thread running the join()?
[16:01:19] <Vornne> join() only throws an exception if the thread is blocking, and something else calls interrupt() on it
[16:01:30] <azaghal> Yes, that's what I'm wondering about.
[16:01:38] <Vornne> how? it's a private member of IoServiceRunner
[16:01:52] <azaghal> No, not on IoServiceRunner::thread thread.
[16:02:00] <azaghal> On thread running the destructor?
[16:02:28] <Vornne> hmm yeah, got mixed up
[16:02:55] <azaghal> The problem is that I'm not sure how I should proceed.
[16:03:06] <azaghal> I could catch it, ignore it, and resume trying to join().
[16:03:30] <azaghal> But should that be something normal? It kind of feels like breaking the boost.thread system.
[16:04:09] <Vornne> hmm, it sounds like a rather far fetched case, but fair enough to try make sure it's correct
[16:04:36] <Vornne> I'll try look it up
[16:05:57] <azaghal> Well, it's kind of weird.
[16:06:20] <azaghal> I could simply state in docs "Do not fuck with this, beach!"
[16:07:19] <Vornne> presumably the IoServiceRunner would be created in the main thread, hence destructed by it, which probably shouldn't ever be interrupted
[16:08:07] <azaghal> Well...
[16:08:12] <azaghal> Not sure who'd create it.
[16:08:29] <azaghal> Server, for example, has its own io_service thread which has async calls associated with it.
[16:08:41] <azaghal> So it's more of a "some other thread withing Boost.Asio" which spawns it.
[16:09:00] <azaghal> Wait...
[16:09:21] <azaghal> In case of Tcp server class, the one who instantiates the server class creates the IoServiceRunner as well.
[16:09:24] <Vornne> I thought IoServiceRunner was your singleton type part server thing?
[16:09:37] <azaghal> Nah, you can spawn as many as you want.
[16:09:46] <azaghal> Currently I have one for server, one for connections.
[16:09:56] <azaghal> Although, I could presumably use the same one.
[16:10:16] <azaghal> If I use shared pointer for both.
[16:10:31] <azaghal> The server would just close its socket to get detached from it and let it live if it gets destroyed.
[16:10:35] <Vornne> ok
[16:11:17] <azaghal> I still have no idea, to be honest, what kind of performance issues single/multiple io_service objects can introduce.
[16:11:34] <azaghal> I.e. does single io_service offer same performance as multiple ones etc.
[16:11:40] <Vornne> neither ;)
[16:12:23] <azaghal> Neither?
[16:13:30] <Vornne> about having no idea
[16:13:48] <azaghal> Erm
[16:13:58] <azaghal> You mean there's no performance issue in both cases?
[16:14:26] <Vornne> no, I mean that I have no idea either about the performance issuse
[16:14:29] <azaghal> Oh, ok
[16:14:38] <Vornne> ;)
[16:15:15] <Vornne> was an unfortunate choice of word
[16:15:28] <azaghal> Heheh
[16:16:37] <azaghal> Back after lunch.
[16:16:46] <sueastside> hey Vornne
[16:17:04] <azaghal> Vornne: Btw, I'm thinking of introducing a macro for defining shared etc pointers.
[16:17:11] <azaghal> Oh, and one more thing.
[16:17:14] <azaghal> Which one do you like more?
[16:17:39] <azaghal> Stuff like PT::Network::Connection::TcpSPtr or PT::Network::Connection::Tcp::SPtr?
[16:17:51] <Vornne> hi sueastside
[16:19:04] <Vornne> azaghal: I'd go with TcpSPtr, so "class Tcp" can be forward declared, and TcpSPtr used in headers
[16:19:12] <azaghal> Ah, true.
[16:19:40] <azaghal> Any conventions on macro naming?
[16:21:16] <Vornne> all upper case with underscores, prefixed with some project specific thing like PT_
[16:21:45] <Vornne> e.g. PT_TYPEDEF_SHARED_PTR
[16:21:51] <Vornne> or whatever
[16:25:53] <azaghal> PT_TYPEDEF_PTR, for example.
[16:26:03] <azaghal> (since it should define a number of stuff)
[16:29:16] <Vornne> hmm, but arent you basically talking of "#define PT_TYPEDEF_PTR(n) typedef ::boost::shared_ptr<n> n##SPtr"? that's only going to typedef shared_ptrs rather than any pointer
[16:29:35] <Vornne> PT_TYPEDEF_SPTR would be better, if you want it short
[16:30:51] <azaghal> Vornne: Not just shared. I'd like other stuff as well
[16:31:13] <azaghal> Like weak pointer, maybe boost::ref, scoped_ptr.
[16:31:15] <Vornne> what exactly would the macro do then?
[16:31:32] <azaghal> Oh, const as well.
[16:31:37] <Vornne> you'd have to add other macros for that, like PT_TYPEDEF_WEAK_PTR, right?
[16:31:56] <azaghal> Yeah, but why have 10 lines for something so common?
[16:32:48] <Vornne> what I've done before is just define const and non with one macro call
[16:33:16] <azaghal> I could have it like that too.
[16:33:38] <azaghal> I guess there could be conveniance macro as well for all types/combinations.
[16:33:55] <Vornne> weak and scoped pointers are much more rare (probably)
[16:34:39] <Vornne> and boost::ref is a function call, not a class template
[16:35:04] <Vornne> boost::reference_wrapper is the class, ref() automatically returns it
[16:37:40] <Vornne> PT_TYPEEF_PTR would probably be ok if you want to make an "all in one" solution; however I'd suggest splitting it with PT_TYPEDEF_SPTR which is called by the first macro
[16:38:20] <Vornne> doesn't matter really, it's only a small keypress saving thing for the devs ;)
[16:41:14] <Vornne> azaghal: btw I just remembered something: to make it more safe just add "boost::this_thread::disable_interruption di;" after ioservicerunner.cpp:32
[16:43:16] <Vornne> the situation should never occur, imho, but no harm in making it more robust with 1 line
[16:51:03] <azaghal> Ah, right.
[16:51:11] <azaghal> Hm...
[16:51:50] <azaghal> Vornne: Maybe I could make a macro that picks up which type of smart_ptr was included and act accordingly?
[16:53:13] <Vornne> if you like... but that sounds like getting a bit fancy ;P
[16:53:46] <Vornne> to do that next thing it will need boost::mpl or something, and so on :P
[16:55:14] <Vornne> I'd suggest the dev should choose what to typedef, either manually, PT_TYPEDEF_SHARED_PTR, or PT_TYPEDEF_PTR (which calls PT_TYPEDEF_SHARED_PTR as part of it) - using whatever name variation you fancy
[16:55:43] <Vornne> bbl
[18:03:22] Baldur has quit: Read error: Connection reset by peer
[18:04:05] Baldur has joined #peragro
[18:05:07] <azaghal> sueastside: Just ran into hilarious comic about that Twilight stuff... Let me know if you want to see it - don't show it to you know whom, though :)
[18:23:59] <Deepa|AFK> http://www.facebook.com/pages/Team-Dracula-Because-no-self-respecting-vampire-sparkles/111391038878011
[18:26:58] <sueastside> azaghal: just paste it, she knows the movies are ridicilous
[18:34:33] Baldur has quit: Quit: ChatZilla 0.9.86 [Firefox 3.6.3/20100401080539]
[18:55:09] Easton has joined #peragro
[19:12:36] DeepyDC has joined #peragro
[19:14:28] <azaghal> Time to do some running.
[19:14:40] <azaghal> sueastside: http://theoatmeal.com/story/twilight
[19:14:50] <azaghal> sueastside: Watch the video at the end too :)
[19:15:57] Deepa|AFK has quit: Ping timeout: 258 seconds
[19:26:12] <azaghal> Running
[20:07:35] <azaghal> Back
[20:36:15] amogorkon has quit: Quit: quit-ten schmecken gut!
[20:36:58] amogorkon has joined #peragro
[20:36:58] amogorkon has quit: Changing host
[20:36:58] amogorkon has joined #peragro
[20:42:09] <Tucos> \o
[20:57:17] loufoque has joined #peragro
[21:21:56] Baldur has joined #peragro
[21:27:50] <Chieftain> http://www.youtube.com/watch?v=SJPwcZu3p1Y
[21:27:53] <Chieftain> be warned its funny but dirty
[22:06:50] <azaghal> Chieftain: I failed...
[22:20:42] TheAncientGoat has quit: Remote host closed the connection
[22:25:56] <Chieftain> ?
[22:27:36] <azaghal> Chieftain: The video.
[22:27:43] <azaghal> I never thought marbles and rubber ducky...
[22:28:07] <Chieftain> lol\
[22:37:28] <azaghal> http://lwn.net/Articles/393777/rss
[22:42:54] Chieftain has quit:
[22:43:35] Baldur has quit: Quit: ChatZilla 0.9.86 [Firefox 3.6.3/20100401080539]
[22:45:28] Baldur has joined #peragro
[22:51:27] azaghal_ has joined #peragro
[22:51:27] ChanServ sets mode: +o azaghal_
[22:53:45] azaghal has quit: Ping timeout: 248 seconds
[23:09:17] Baldur_ has joined #peragro
[23:09:22] Baldur_ has quit: Client Quit
[23:10:24] Baldur has quit: Ping timeout: 260 seconds
[23:33:57] <azaghal> Anyone knows how to get the code for letters in html?
[23:36:25] <azaghal> Heh
[23:53:33] loufoque has quit: Remote host closed the connection