code logs -> 2017 -> Wed, 02 Aug 2017< code.20170801.log - code.20170803.log >
--- Log opened Wed Aug 02 00:00:47 2017
00:13 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
00:16 RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has quit [[NS] Quit: Leaving]
00:45 celticminstrel [celticminst@Nightstar-4r2i8l.dsl.bell.ca] has joined #code
00:46 mode/#code [+o celticminstrel] by ChanServ
00:50 Derakon_ is now known as Derakon
00:50 mode/#code [+ao Derakon Derakon] by ChanServ
01:12 Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed]
01:15 Jessikat [Jessikat@Nightstar-mrb0km.dab.02.net] has joined #code
01:55 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code
01:55 mode/#code [+o himi] by ChanServ
02:38 Turaiel[Offline] is now known as Turaiel
03:09
<&Derakon>
Whelp. I'm writing unit tests, for a personal project.
03:09
<&Derakon>
Evidently I've learned something from my tenure at my new job~
03:12
<~Vornotron>
unit tests are great
03:12
<&Derakon>
They are.
03:12
<&Derakon>
In particular, they are almost always the easiest way to actually run your code.
03:13
<&Derakon>
I remember wasting so much bloody time on Jetblade's map generator, writing extensive debugging output and carefully stepping through reams of logs and intermediary map images so I could trace what was going wrong in one particular subroutine.
03:13
<&Derakon>
When I could have just written a unit test that invoked that subroutine directly. ;_;
03:20 Jessikat` [Jessikat@Nightstar-v2v.equ.132.82.IP] has joined #code
03:20
<~Vornotron>
srs.
03:23 Jessikat [Jessikat@Nightstar-mrb0km.dab.02.net] has quit [Ping timeout: 121 seconds]
04:00 Turaiel is now known as Turaiel[Offline]
04:27 Degi [Degi@Nightstar-va3g87.dyn.telefonica.de] has quit [Connection closed]
04:34 celticminstrel [celticminst@Nightstar-4r2i8l.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
04:38 * Derakon grumbles at Python's unittest library.
04:39
<&Derakon>
assertItemsEqual(func(), set([hardcoded_item])) gives "AssertionError: Element counts were not equal"
04:39
<&Derakon>
And then says first "First has 1, Second has 0: <Edge (0, 0) => (10, 0)>" and then "First has 0, Second has 1: <Edge (0, 0) => (10, 0)>"
04:42
<&Derakon>
assertEqual likewise complains that the first set has that edge and the second doesn't, and also that the second has that edge and the first doesn't.
04:42
<&Derakon>
I implemented __eq__ for Edge specifically to handle this, dangit!
05:03
<&Derakon>
...fantastic. Underlying issue appears to be that sets don't do equality tests for complex types.
05:03
<&Derakon>
class Foo(object):
05:03
<&Derakon>
def __init__(self, x):
05:03
<&Derakon>
self.x = x
05:03
<&Derakon>
def __eq__(self, alt):
05:03
<&Derakon>
return self.x == alt.x
05:03
<&Derakon>
a = Foo(0); b = Foo(0)
05:04
<&Derakon>
a == b # True
05:04
<&Derakon>
set([a]) == set([b]) # False
05:04
<&Derakon>
[a] == [b] # True!
05:05
<&Derakon>
...oh, wait, I bet I need to implement __hash__.
05:06
<~Vornotron>
yes. If you implement equality and expect it to be used as a key in something, you must implement __hash__
05:06
<&Derakon>
Yep, that did it.
05:06
<~Vornotron>
generic objects hash (and compare) by object id
05:07
<&Derakon>
Yeah, it was the difference between lists and sets that was tripping me up. I haven't had to deal with Python's magic functions in awhile.
05:07
<&Derakon>
Google has its own version of the unit test library that handles this kind of thing for you!
05:14 Derakon is now known as Derakon[AFK]
07:16 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
07:24 https_GK_1wm_SU [deep-book@Nightstar-r3e.kr6.9.85.IP] has joined #code
07:25 https_GK_1wm_SU [deep-book@Nightstar-r3e.kr6.9.85.IP] has quit [RecvQ exceeded]
07:31 https_GK_1wm_SU [deep-book@Nightstar-r3e.kr6.9.85.IP] has joined #code
07:32 https_GK_1wm_SU [deep-book@Nightstar-r3e.kr6.9.85.IP] has quit [RecvQ exceeded]
08:00 Kindamoody[zZz] is now known as Kindamoody
08:54 Jessikat` [Jessikat@Nightstar-v2v.equ.132.82.IP] has quit [Ping timeout: 121 seconds]
09:17
<&Reiver>
Hey vorn
09:17
<&Reiver>
I've forgotten how to math again
09:17
<&Reiver>
What's the odds of rolling at least 1 nat1 on 5 attacks with a D20?
09:19
<&Reiver>
I know I've done it before but I cannot brain and need to argue with my DM about fumble rules :-P
09:19
<&[R]>
20^5
09:19
<&[R]>
Oh wait, misread
09:20
<~Vornotron>
1 - (1-1/20)^5
09:21
<&Reiver>
... Shit,I cannot cope copy text on this client
09:21
<&Reiver>
Wait no there we go
09:21
<&Reiver>
Thanks, dude, I'd gotten it... Half right :-)
09:22
<~Vornotron>
22.6%
09:22
<&Reiver>
... Bloody hell, this is gonna suuuuck
09:23
<~Vornotron>
there's a reason you generally *don't* fumble
09:23
<~Vornotron>
rather, don't include fumble rule
09:23
<~Vornotron>
s
09:24
<@Azash>
Suggestions including needing a second consequtive nat 1 to confirm the fumble or basing fumbles on missing the DC/AC/whatever by over a certain amount
09:37 Kindamoody is now known as Kindamoody|afk
10:15 * TheWatcher eyes this student
10:15
<@TheWatcher>
They've just added a 6GB file to a project in gitlab... and they're wondering why the commit diff page is crashing
10:16
<&[R]>
WTF
10:16
<&[R]>
What fucking student code is even a gig?
10:19
<@TheWatcher>
None. I'm pretty sure they've shoved a huge data file of some kind in here; I'm trying to clone it to find out WTF, but it's taking a sodding age (as you'd imagine)
10:19 Derakon[AFK] [Derakon@Nightstar-fr5qel.ca.comcast.net] has quit [Ping timeout: 121 seconds]
10:22 Derakon [Derakon@Nightstar-fr5qel.ca.comcast.net] has joined #code
10:22 mode/#code [+ao Derakon Derakon] by ChanServ
10:33
<@TheWatcher>
Yep, there we go. A zip file, containing a single text file, which appears to be a MNIST data set
10:35 * TheWatcher slaps the dumbass, tells them to remove the damned thing from the repo
11:53 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
11:53 mode/#code [+o himi] by ChanServ
12:29 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
12:31 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
12:31 mode/#code [+o Reiv] by ChanServ
12:45
<@TheWatcher>
Reiv: are you aboot?
12:46 Degi [Degi@Nightstar-va3g87.dyn.telefonica.de] has joined #code
12:51
<&Reiver>
TheWatcher: What's up?
14:04 gnolam [quassel@Nightstar-f22.ckv.119.62.IP] has joined #code
14:04 mode/#code [+o gnolam] by ChanServ
14:22 Kindamoody|afk [Kindamoody@Nightstar-5bqe3c.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
14:43 Degi [Degi@Nightstar-va3g87.dyn.telefonica.de] has quit [Connection closed]
15:16 gnolam [quassel@Nightstar-f22.ckv.119.62.IP] has quit [[NS] Quit: Urgh]
15:56 Kindamoody|autojoin [Kindamoody@Nightstar-5bqe3c.tbcn.telia.com] has joined #code
15:56 mode/#code [+o Kindamoody|autojoin] by ChanServ
17:25 gnolam [lenin@Nightstar-ian7gg.cust.bahnhof.se] has joined #code
17:25 mode/#code [+o gnolam] by ChanServ
17:39 Kindamoody|autojoin is now known as Kindamoody
18:28 Derakon [Derakon@Nightstar-fr5qel.ca.comcast.net] has quit [Ping timeout: 121 seconds]
19:11 Kindamoody is now known as Kindamoody|afk
19:20 Degi [Degi@Nightstar-va3g87.dyn.telefonica.de] has joined #code
20:29 RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has joined #code
21:57 Kindamoody|afk is now known as Kindamoody
22:23 Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Connection closed]
22:28 Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code
22:28 mode/#code [+o Alek] by ChanServ
22:32 Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
22:37 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
23:12 Kindamoody is now known as Kindamoody[zZz]
23:59 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
--- Log closed Thu Aug 03 00:00:48 2017
code logs -> 2017 -> Wed, 02 Aug 2017< code.20170801.log - code.20170803.log >

[ Latest log file ]