code logs -> 2014 -> Wed, 26 Mar 2014< code.20140325.log - code.20140327.log >
--- Log opened Wed Mar 26 00:00:08 2014
00:20 You're now known as TheWatcher[zZzZ]
00:23 Derakon[AFK] is now known as Derakon
00:31 Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code
00:31 mode/#code [+o Orthia] by ChanServ
01:11 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [[NS] Quit: No Ping reply in 180 seconds.]
01:12 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
01:31 Vornicus [Vorn@Nightstar-28h42k.sd.cox.net] has quit [Connection closed]
01:51 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:51 mode/#code [+qo Vornicus Vornicus] by ChanServ
01:58 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
02:53 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
02:59 Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [[NS] Quit: Going dooooown...]
03:00 Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code
03:00 mode/#code [+o Orthia] by ChanServ
03:06 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
03:06 mode/#code [+o himi] by ChanServ
03:42 Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds]
03:42 Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code
03:42 mode/#code [+o Orthia] by ChanServ
03:51 Shiz [mark@Nightstar-t98.fff.21.178.IP] has quit [Ping timeout: 121 seconds]
03:55 Shiz [mark@Nightstar-3hueb6.shiz.me] has joined #code
04:00 Derakon is now known as Derakon[AFK]
04:39 Kindamoody[zZz] is now known as Kindamoody
05:03 celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
05:04 Turaiel is now known as Turaiel[Offline]
05:21 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
05:21 mode/#code [+o JackKnife] by ChanServ
05:24 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.]
05:28 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code
06:57 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code
07:04 ErikMesoy|sleep is now known as ErikMesoy
07:19 You're now known as TheWatcher
07:28 Erik [8f610223@Nightstar-obfcgl.mibbit.com] has joined #code
08:12 You're now known as TheWatcher[afk]
08:25 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving]
08:53 Kindamoody is now known as Kindamoody|afk
09:55
< Erik>
I have eight continues in this for loop. :O (would have been nine, but the pattern winds up placing the ninth continue at a branch in the end of the loop. Unnecessary.)
09:57 You're now known as TheWatcher
10:16
<~Vornicus>
the heck are you doing
10:19
< Erik>
try: (var = access dict 1 with questionable key), except: continue. if not var: try: (var = access dict 2 with questionable key), except: continue. if not var: continue. #if we got here, we have var. #do things with var.
10:19
< Erik>
continue is basically saving me a whole load of nested conditionals
10:20
< Erik>
Without it I'd be indenting easily ten deep
10:20
<~Vornicus>
This seems... smelly.
10:23
< Erik>
well, continue is basically cleaned-up goto
10:25
<~Vornicus>
Yes, but the overall structure here seems like it could be seriously reduced.
10:26
<~Vornicus>
Like for one thing, you could be using dict1.get(key)
10:27
<~Vornicus>
var = dict1.get(key); if not var: dict2.get(key); if not var: continue #if we got here, we have var.
10:28
<~Vornicus>
well, okay, it's not quite right - if dict1 doesn't have it then it should just continue, but I don't quite understand the point then.
10:29 * Erik tries to see where he can prune in the full tree.
10:30
<~Vornicus>
try: for d in pile_of_dicts: var = d[k]; if var: break;; except: continue; #got var, let's do this
10:32
< Erik>
no, I'm doing too many other things as well, but thanks
10:32
< Erik>
and I will take the advice to reduce the amount of continues where I can
10:33
<~Vornicus>
Also you can wrap more than one statement in a try.
10:35 mode/#code [+o RchrdB] by ChanServ
10:55 Syka [the@Nightstar-ivv.fm9.126.1.IP] has joined #code
10:56 Syka is now known as NSGuest9426
11:02
< Shiz>
v = None
11:02
< Shiz>
if v is None:
11:02
< Shiz>
v = dict1.get(k, None)
11:02
< Shiz>
if v is None:
11:02
< Shiz>
v = dict2.get(k, None)
11:04 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
11:06
< Erik>
Shiz: I tried something like that in the first draft of this, it got very wordy very fast with all the temp Nones to declare
11:07
<~Vornicus>
Don't need to put None if you're using get like that -- it defaults to that.
11:08 NSGuest9426 [the@Nightstar-ivv.fm9.126.1.IP] has quit [Ping timeout: 121 seconds]
11:10 Syka [the@Nightstar-ivv.fm9.126.1.IP] has joined #code
11:11 Syka is now known as NSGuest35539
11:12 NSGuest35539 is now known as Syk
11:13 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
11:15 orth [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code
11:23 orth_ [orthianz@Nightstar-7sn5i0.callplus.net.nz] has joined #code
11:23 orth [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Connection closed]
11:30 orth_ [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [[NS] Quit: Bye]
11:37 Julius is now known as AnnoDomini
11:42
<@Azash>
Out of curiosity, wouldn't it be better to just have an array of dicts, iterate through and break the loop when your var gets assigned a value?
11:42
<@Azash>
It's much less verbose and allows you to have an easier time adding/removing dicts
11:45
< Erik>
It would, if things were simpler. But in the full version I didn't post, I'm getting data from a second dict with the key I got from a first dict, accessing one of two dicts and doing different things depending on which one I got, etc.
11:46
< Erik>
I have pruned down to five continues so far
11:46 Syk [the@Nightstar-ivv.fm9.126.1.IP] has quit [Ping timeout: 121 seconds]
11:47
<@Azash>
Oh Vorn beat me to it anyway
11:59
< Erik>
I keep stumbling over the fact that join() only takes one argument.
12:06 Syka [the@Nightstar-cel.8oj.156.120.IP] has joined #code
12:07 Syka is now known as NSGuest15396
12:07 NSGuest15396 [the@Nightstar-cel.8oj.156.120.IP] has quit [Connection closed]
12:08 Syka [the@Nightstar-cel.8oj.156.120.IP] has joined #code
12:09 Syka is now known as NSGuest38902
12:23
< Erik>
Got a pile of mess to work. "Now you can document the code."
12:25
<@Azash>
muh tdd
12:37
< Erik>
muh error handling
12:37
< AnnoDomini>
muh muh
13:11
< Shiz>
muh hum
13:20 NSGuest38902 [the@Nightstar-cel.8oj.156.120.IP] has quit [Ping timeout: 121 seconds]
13:21 Syka [the@Nightstar-cel.8oj.156.120.IP] has joined #code
13:21
< Erik>
muh two-line executive summary for people who do not want to tinker with the program, just run it
13:22
< Erik>
muh explanation of which variables are what object types for people who do want to tinker with the program
13:22 Syka is now known as NSGuest48339
13:22 NSGuest48339 is now known as Syk
13:28 Syk [the@Nightstar-cel.8oj.156.120.IP] has quit [Ping timeout: 121 seconds]
13:33 Syk [the@Nightstar-cel.8oj.156.120.IP] has joined #code
13:48 Derakon[AFK] is now known as Derakon
14:09 Syk [the@Nightstar-cel.8oj.156.120.IP] has quit [Ping timeout: 121 seconds]
14:53
<@gnolam>
Guergh
14:54
<@gnolam>
There are downsides to being the sole developer on a project.
14:56
<@Azash>
Such as most things
15:09 Erik [8f610223@Nightstar-obfcgl.mibbit.com] has quit [[NS] Quit: http://www.mibbit.com ajax IRC Client]
15:24 You're now known as TheWatcher[afk]
15:38 Turaiel[Offline] is now known as Turaiel
15:46 Orthia [orthianz@Nightstar-7sn5i0.callplus.net.nz] has quit [Ping timeout: 121 seconds]
15:47 Turaiel is now known as Turaiel[Offline]
15:51 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has joined #code
15:52 mode/#code [+o Orthia] by ChanServ
17:25 ErikMesoy1 [Erik@Nightstar-6v0.mal.203.80.IP] has joined #code
17:25 ErikMesoy [Erik@Nightstar-6v0.mal.203.80.IP] has quit [Ping timeout: 121 seconds]
17:31 ErikMesoy1 is now known as ErikMesoy
17:31 mode/#code [+o ErikMesoy] by ChanServ
19:59 You're now known as TheWatcher
20:19 725AAJB99 [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:19 082AAJB4M [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:20 082AAJB4M [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
20:20 725AAJB99 is now known as Vornicus
20:20 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:35 Kindamoody|afk is now known as Kindamoody
21:44 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
22:12 Kindamoody is now known as Kindamoody[zZz]
22:13 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:56 ErikMesoy is now known as ErikMesoy|sleep
23:00 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
23:29 celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has joined #code
23:29 mode/#code [+o celticminstrel] by ChanServ
--- Log closed Thu Mar 27 00:00:23 2014
code logs -> 2014 -> Wed, 26 Mar 2014< code.20140325.log - code.20140327.log >

[ Latest log file ]