--- Log opened Tue Nov 10 00:00:34 2015 |
--- Day changed Tue Nov 10 2015 |
00:00 | | Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
00:02 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
00:07 | | Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
00:10 | | macdjord|wurk is now known as macdjord |
00:20 | | anion [nobody@Nightstar-gmbj85.vs.shawcable.net] has quit [Ping timeout: 121 seconds] |
00:23 | | Meatyhandbag [sebastianfe@Nightstar-7q7.gvb.224.136.IP] has joined #code |
00:46 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ] |
00:48 | | catadroid [catalyst@Nightstar-himic6.dab.02.net] has joined #code |
01:02 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
01:07 | | Derakon[AFK] is now known as Derakon |
01:20 | | Thalass|pyroduck is now known as Thalass |
02:15 | | catadroid [catalyst@Nightstar-himic6.dab.02.net] has quit [Connection closed] |
02:15 | | catadroid [catalyst@Nightstar-himic6.dab.02.net] has joined #code |
02:24 | | anion [nobody@Nightstar-gmbj85.vs.shawcable.net] has joined #code |
03:19 | | anion [nobody@Nightstar-gmbj85.vs.shawcable.net] has quit [Connection closed] |
03:25 | | anion [nobody@Nightstar-13n01q.eng.wind.ca] has joined #code |
03:27 | | cation [nobody@Nightstar-gmbj85.vs.shawcable.net] has joined #code |
03:29 | | anion [nobody@Nightstar-13n01q.eng.wind.ca] has quit [Ping timeout: 121 seconds] |
03:39 | | Thalass is now known as Thalasleep |
04:02 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
04:13 | | Alek [Alek@Nightstar-10b.5gb.56.172.IP] has joined #code |
04:44 | | Alek [Alek@Nightstar-10b.5gb.56.172.IP] has quit [[NS] Quit: ] |
05:00 | | Derakon is now known as Derakon[AFK] |
05:39 | | Kindamoody[zZz] is now known as Kindamoody |
05:56 | | Meatyhandbag [sebastianfe@Nightstar-7q7.gvb.224.136.IP] has quit [Client exited] |
06:39 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
07:03 | | catadroid` [catalyst@Nightstar-lnd099.dab.02.net] has joined #code |
07:07 | | catadroid [catalyst@Nightstar-himic6.dab.02.net] has quit [Ping timeout: 121 seconds] |
07:26 | | Kindamoody is now known as Kindamoody|afk |
07:57 | | celticminstrel is now known as celmin|sleep |
08:43 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
08:56 | | catadroid` [catalyst@Nightstar-lnd099.dab.02.net] has quit [[NS] Quit: Bye] |
08:56 | | catadroid [catalyst@Nightstar-mvu07s.dab.02.net] has joined #code |
10:03 | | ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has joined #code |
10:04 | | ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has quit [[NS] Quit: Oh so that's how it broke] |
10:56 | | You're now known as TheWatcher[d00m] |
11:39 | | orth [orthianz@Nightstar-jf9tm9.ihug.co.nz] has quit [[NS] Quit: Bye] |
12:09 | | cation [nobody@Nightstar-gmbj85.vs.shawcable.net] has quit [Connection closed] |
12:56 | | catadroid [catalyst@Nightstar-mvu07s.dab.02.net] has quit [Operation timed out] |
12:57 | | catadroid [catalyst@Nightstar-mvu07s.dab.02.net] has joined #code |
12:58 | | gnolam_ [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code |
12:58 | | You're now known as TheWatcher |
12:59 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
13:33 | | catadroid` [catalyst@Nightstar-u6tq5c.dab.02.net] has joined #code |
13:37 | | catadroid [catalyst@Nightstar-mvu07s.dab.02.net] has quit [Ping timeout: 121 seconds] |
13:48 | | catadroid` is now known as cataroid |
14:15 | | catadroid [catalyst@Nightstar-9mv54c.dab.02.net] has joined #code |
14:15 | | cataroid [catalyst@Nightstar-u6tq5c.dab.02.net] has quit [Connection closed] |
15:02 | | * TheWatcher arghs at students being lazy and using globals and shooting themselves in the feet |
15:02 | < TheWatcher> | Zathras warned them. Zathras did. But nobody listens to Zathras. |
15:07 | < catadroid> | I once a global |
15:07 | < catadroid> | it awful concurrency was problem the worst however |
15:08 | < TheWatcher> | Heh |
15:10 | | * catadroid shakes her head straight |
15:10 | < catadroid> | I hate how much I want to run round screaming 'I'm a programmer yes women can be programmers too ffs!' |
15:11 | < TheWatcher> | >.< |
15:11 | < Tamber> | Keep being confused for a secretary? :/ |
15:16 | < catadroid> | Not especially, I just feel somewhat isolated |
15:17 | < catadroid> | And somewhat disturbed by being seen as a cool role model |
15:18 | < Tamber> | :\ |
15:22 | < catadroid> | I mean, that bit is kind of affirming, but I realised that one of our new employees sees me as someone who represents diversity |
15:22 | < catadroid> | and I just want a quiet life |
16:14 | < Azash> | Maybe you should give them a quiet non-life |
16:15 | | Derakon[AFK] is now known as Derakon |
16:31 | < catadroid> | Well, perhaps |
16:31 | < catadroid> | Fire is so messy though |
16:37 | | gnolam_ is now known as gnolam |
17:04 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
17:04 | | catadroid [catalyst@Nightstar-9mv54c.dab.02.net] has quit [[NS] Quit: Bye] |
17:44 | | kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code |
18:00 | | Kindamoody|afk is now known as Kindamoody |
18:01 | | kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Iām not a psychopath. Iām a high-functioning sociopath. Do your research.] |
18:01 | | kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code |
18:32 | | kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Iām not a psychopath. Iām a high-functioning sociopath. Do your research.] |
18:46 | | Kindamoody is now known as Kindamoody[zZz] |
19:00 | | abudhabi is now known as Wulfric |
20:09 | < McMartin> | 07:17 < catadroid> And somewhat disturbed by being seen as a cool role model |
20:10 | < McMartin> | You're also doing really cool stuff, which probably helps with that |
20:10 | < McMartin> | For some value of "help" >_> |
20:18 | < catalyst> | >.> |
20:18 | < catalyst> | Thanks |
21:38 | | Thalasleep is now known as Thalass|pyropractice |
22:23 | | reiv [NSwebIRC@Nightstar-jf9tm9.ihug.co.nz] has joined #code |
22:38 | | cation [nobody@Nightstar-gmbj85.vs.shawcable.net] has joined #code |
22:48 | | Thalass|pyropractice [thalass@Nightstar-283.o7s.158.104.IP] has quit [Ping timeout: 121 seconds] |
23:32 | | reiv [NSwebIRC@Nightstar-jf9tm9.ihug.co.nz] has quit [Ping timeout: 121 seconds] |
23:34 | < McMartin> | 07:07 < catadroid> I once a global |
23:34 | < McMartin> | Globals are terrible! We should never use them! Instead, we should use static class methods and singletons |
23:34 | < [R]> | Ha |
23:34 | < [R]> | Oh fuck, I'm having flashbacks to the ManaWorld client codebase |
23:34 | < [R]> | D: |
23:35 | < McMartin> | Singletons actually do have a benefit I will readily grant |
23:35 | < McMartin> | To wit, they let you explicitly control the order of initialization of your globals |
23:35 | < [R]> | Every single class is initialized once... as a global. There are fifty classes. |
23:35 | < McMartin> | Heh |
23:35 | < [R]> | The ultimate source of those globals are in odd places too. |
23:35 | < McMartin> | That sounds like how most IF systems work~ |
23:36 | < [R]> | The network global is in the UI, the UI global is in the filesystem global, etc... |
23:36 | < McMartin> | Though actually there it's "instantiate the world, then store a snapshop of the initial heap" |
23:36 | < McMartin> | ... did... did they use containment to enforce initialization order? |
23:36 | < [R]> | No idea |
23:36 | < McMartin> | I am having a terrifying vision |
23:37 | < McMartin> | ... I think that would actually *work* |
23:37 | < [R]> | They're just stray "Network _Network;" at the top of whatever .cpp file. |
23:37 | < McMartin> | Ah, then no they aren't. |
23:37 | < McMartin> | It's c++ too |
23:37 | < [R]> | Yup |
23:37 | < McMartin> | So those are being initialized in a completely arbitrary order |
23:37 | < McMartin> | I was imagining that the Network object was *contained by* the Filesystem object |
23:37 | < McMartin> | As a field |
23:38 | < catalyst> | sometimes having carefully selected and controlled global state can reduce complexity |
23:38 | < McMartin> | Which means that you'd enforce that Network was constructed before the Filesystem was, because of the order fields are initialized in! |
23:38 | < McMartin> | ++ |
23:38 | < McMartin> | While you still should avoid them by default, I have to say that globals get a bad rap |
23:38 | < McMartin> | *but* |
23:38 | < [R]> | I'll admit the code didn't look horribly ugly (all methods were pretty small) |
23:39 | < catalyst> | the correct way to have global singletons in C++ now, which ensures correct construction and destruction and thread safety, is to return local statics from get functions |
23:39 | < catalyst> | (construction/destruction order) |
23:39 | < McMartin> | C++ initialization rules have enough terrifying ambiguity built into them that non-primitive types shouldn't be used |
23:39 | < [R]> | But it was a pretty tangled mess (I wanted to try changing the network protocol) |
23:39 | < McMartin> | catalyst: beats me to it with better answers |
23:39 | < [R]> | The server code though (C) was horrible |
23:39 | < catalyst> | Thing& GetThing { static Thing t; return t; } |
23:40 | < McMartin> | Hm |
23:40 | < McMartin> | It occurs to me that I do not know the rules for that. |
23:40 | < McMartin> | Does that run the constructor only when GetThing is called for the first time? |
23:40 | < catalyst> | ^ if you do singletons like this, then the order of calls implicitly constructs them in the correct order of dependency, and the language rules ensure they're destroyed in reverse order, regardless of which compilation unit they're in |
23:40 | < McMartin> | Or is it pre-main? |
23:40 | < catalyst> | when it's called the first time |
23:40 | < McMartin> | *nice* |
23:40 | < catalyst> | so the order is deterministic |
23:40 | | * McMartin yoinks that |
23:41 | < catalyst> | and as of C++11 it's entirely thread safe construction/destruction according to the standard |
23:41 | < [R]> | Server is where I got the "case X: /* 2-page comment */ if (multi-line test) return; /* multi para comment */ { ... }" pattern from. |
23:41 | < catalyst> | (They're known as Meyers Singletons if you care about nomenclature) |
23:41 | < McMartin> | Yeah, I'm used to the C++98 idiom of using a once-flag and having a static pointer that is allocated on first call. |
23:41 | < McMartin> | But I get to use C++11 now |
23:41 | | * McMartin does the Dance of Dancery, also totally needs to get the latest Meyers book. |
23:42 | < McMartin> | ...also I have a major deadline tonight, I should get the leeg to work |
23:54 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:58 | | Emmy [M@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
--- Log closed Wed Nov 11 00:00:00 2015 |