code logs -> 2010 -> Thu, 06 May 2010< code.20100505.log - code.20100507.log >
--- Log opened Thu May 06 00:00:53 2010
00:07 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
00:23
< Alek>
aw crap.
00:24
< Alek>
I have some sort of virus that once in a while opens a page at justin.tv. something about halo.
00:25 You're now known as TheWatcher[T-2]
00:27 You're now known as TheWatcher[zZzZ]
00:36 Lord_Z [lord_z@Nightstar-bec1add2.dyn.optonline.net] has joined #code
00:40 Lord_Z [lord_z@Nightstar-bec1add2.dyn.optonline.net] has left #code []
00:48
< RichardBarrell>
Alek: reinstall Windows from scratch.
00:49
<@McMartin>
More seriously, run the usual Spybot/AdAware suite and see what it finds.
00:49
<@Namegduf>
Actually, that was good advice if you can do it practically
00:50
<@Namegduf>
Once a system is compromised, only safe thing being totally reimaging, etc.
00:51
<@McMartin>
There's a base assumption that you have nothing of value on any of your machines
00:51
<@Namegduf>
You're presumed to copy off anything of value first
00:52
<@McMartin>
Which can easily include whatever infected you in the first place
00:52
<@McMartin>
Depends on the attack vector
00:52
<@Namegduf>
Which is why you scan it from a clean machine if said stuff includes unbacked up potential attack vector files.
01:02
<@Namegduf>
It's imperfect, but better than not cleaning out the OS at all.
01:04
<@McMartin>
True
01:04
<@McMartin>
If this is a browser hijack, though, a basic registry reset is probably enough.
01:04 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *whistles* Did you hear something?]
01:05
<@Namegduf>
Yeah, if it looks easy to cleanup and you know what you're doing, can be okay to risk just doing that and save the time.
01:05
<@McMartin>
And if it's "you have a page somewhere who's got a banner ad that's firing up popunders", reinstalling your whole OS is seriously overkill. >_>
01:05
<@Namegduf>
Haha.
01:06
<@Namegduf>
Yes, I did take "I have a virus" as meaning they'd figured it out, yeah.
01:06
<@McMartin>
The "something about Halo" makes me suspicious, though~
01:07
< Alek>
I have 5 hard drives of stuff here. -_-
01:08 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
01:08
< Alek>
well, it's happened twice so far.
01:09
< Alek>
both times I've come home after being gone all day and seen the browser open, pointing to justin.tv, some halo-related broadcast. not running, at least.
01:09
< Alek>
I know it wasn't anyone else here, so that leaves a hijack in the machine.
01:09
<@McMartin>
That sounds a lot more like a popup ad than like a virus.
01:09
<@McMartin>
So yes, I would absolutely start with a reputable set of malware/adware scans.
01:10
<@McMartin>
Spybot Search and Destroy and LavaSoft(I think?) AdAware are both free and pretty good.
01:11
< Alek>
spybot it is, then. I should have installed it by now, actually. >_>
01:12 * Alek remembers something, laughs.
01:12
< Alek>
anyone know Avira Antivirus?
01:12
<@McMartin>
Not ringing any bells
01:13
< Alek>
they call their scanning module Luke Filewalker. :P
01:13
<@Namegduf>
Heard of it, no real knowledge of it.
01:13
<@McMartin>
Siiiigh
01:13
<@McMartin>
Hm
01:13
<@McMartin>
Anyone here used the "Mantis" bugtracking system?
01:13
<@Namegduf>
Rings a bell.
01:13
<@McMartin>
(Sorry, total subject change)
01:13
<@Namegduf>
Not more than that.
01:13
<@McMartin>
Yeah, likewise.
01:14
<@McMartin>
Someone's comparison shopping and I have no idea how it stacks up with, e.g. Trac
01:14
<@Namegduf>
I've used it, but couldn't help with the comparison much.
01:15
<@McMartin>
Ah well
01:15 * McMartin has only used Trac and Bugzilla, neither of which have a great deal to recommend them
01:15
<@McMartin>
Trac's marginally better, but it's trying to be Some Of Everything and if you aren't explicitly going for a single interface to everything it's probably not what you want
01:16
<@McMartin>
While I can't point at any single "this is fundamentally wrong" thing about Bugzilla, all my experiences with it have been *terrible*
01:20 Derakon [Derakon@Nightstar-5213d778.ca.comcast.net] has joined #code
01:20 mode/#code [+o Derakon] by Reiver
01:24
< Alek>
aaaugh.
01:24 * Alek swears at Bioshock muchly.
01:25 Reiv[Graduate] [orthianz@Nightstar-1222dec1.xnet.co.nz] has joined #code
02:04
< Alek>
eeeyep.
02:04
< Alek>
a whole 85 browser hijacks.
02:04
< Alek>
most of them StatCounter.
02:05
<@Namegduf>
StatCounter doesn't look like malware.
02:05
<@Namegduf>
Are you sure you're not mixing up "tracking cookies" with browser hijacks?
02:11 Orth [orthianz@Nightstar-749ce8cf.xnet.co.nz] has joined #code
02:13 Reiv[Graduate] [orthianz@Nightstar-1222dec1.xnet.co.nz] has quit [Ping timeout: 121 seconds]
02:59 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: sigh. fucking irssi]
02:59 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
03:37
< Alek>
Nameg, that's what Spybot told me. >_>
03:42
<@ToxicFrog>
Spybot includes tracking cookies in its scan.
03:42
<@ToxicFrog>
So it will turn up huge numbers of results on rpetty much any system.
03:51
< Zed_>
Yeah.
03:51
< Zed_>
Browser hijacks are quite visible, btw
03:51
< Zed_>
They're where you open it and try to do your normal tasks, and then suddenly ridiculous shit happens.
03:51
< Zed_>
Or when you're at your computer and NOT opening your browser, and it opens by itself and starts doing things.
03:52
<@McMartin>
The latter is believed to be happening
03:52
< Zed_>
IE sorta malware thingy?
03:53
< Zed_>
Yeah, those suck.
03:53
< Zed_>
malwarebytes is a good tool for checking on stuff like that, btw
03:53
< Zed_>
My tool of choice
03:53
< Zed_>
if no-one's suggested it yet, consider it suggested
03:57
<@McMartin>
That one hasn't come up yet, so.
03:59
< Alek>
it actually opened in Firefox, not IE. :P
04:24 Reiv[Graduate] [orthianz@Nightstar-f8e041eb.xnet.co.nz] has joined #code
04:26 Orth [orthianz@Nightstar-749ce8cf.xnet.co.nz] has quit [Ping timeout: 121 seconds]
05:29 shade_of_cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has joined #code
05:29 shade_of_cpux is now known as cpux
06:12 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
06:16 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds]
06:32 Derakon is now known as Derakon[AFK]
06:55 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
07:06 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
07:06 mode/#code [+o Kazriko] by Reiver
07:28
< Tarinaky>
Hunh. I didn't know there was an operator class*.
07:29
< Tarinaky>
A conversion operator ^^. Handy.
07:42 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
08:01 AnnoDomini [annodomini@Nightstar-a911a2d9.adsl.tpnet.pl] has joined #code
08:01 mode/#code [+o AnnoDomini] by Reiver
08:11 You're now known as TheWatcher
08:54 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has quit [Client exited]
09:06 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
09:15 Reiv[Graduate] [orthianz@Nightstar-f8e041eb.xnet.co.nz] has quit [Connection reset by peer]
09:23 Zed_ [Zed@Nightstar-e4835f03.or.comcast.net] has quit [Client closed the connection]
09:23 Zed_ [Zed@Nightstar-e4835f03.or.comcast.net] has joined #code
09:35 Reiv[Graduate] [orthianz@Nightstar-bd28d846.xnet.co.nz] has joined #code
09:51 You're now known as TheWatcher[afk]
10:46 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:47 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Connection closed]
10:47 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
12:29 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
12:36 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
13:33 Orth [orthianz@Nightstar-31049c99.xnet.co.nz] has joined #code
13:35 Reiv[Graduate] [orthianz@Nightstar-bd28d846.xnet.co.nz] has quit [Ping timeout: 121 seconds]
14:06 Tarinaky [Tarinaky@Nightstar-2c1b3479.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds]
14:10 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Operation timed out]
14:20 Tarinaky [Tarinaky@Nightstar-1854c260.adsl.virginmedia.net] has joined #code
14:27
<@ToxicFrog>
"class*"?
15:57
< celticminstrel>
I hate it when installers don't give you a "restart later" option. At least launching an application cancels restart though.
15:58
<@jerith>
Restart the application or the system?
15:58
< celticminstrel>
System.
15:58
<@jerith>
The *only* thing that should require a system restart is a system update.
15:59
< celticminstrel>
Or installing drivers, I assume?
15:59
<@jerith>
Drivers are "system", really.
16:00
< celticminstrel>
Exactly.
16:00
< celticminstrel>
For some reason Safari updates also require restart.
16:00
<@jerith>
Nothing should *ever* restart the system without explicit permission.
16:00
< celticminstrel>
Agreed.
16:00
<@jerith>
Safari's built into the OS the same way IE is.
16:01
<@jerith>
Crappy, but.
16:01
< celticminstrel>
It used to be very common on Mac to restart unconditionally, though, and apparently some installers still try to do it.
16:01
<@jerith>
The people who write that crap need to die in a very painful fire.
16:01
< celticminstrel>
Now, however, I can cancel their attempt to restart.
16:02 * jerith is used to an OS that only requires a reboot for kernel updates.
16:29 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *whistles* Did you hear something?]
16:52
<@ToxicFrog>
Hell, even drivers shouldn't always require a reboot, depending on the driver.
16:53
<@ToxicFrog>
I mean, the driver for the disk controller, maybe, but the network card? Sound?
16:57
<@Namegduf>
Linux isn't exactly a microkernel, but that's technically possible if you were to just update specific drivers and not the whole kernel at once.
16:57
<@Namegduf>
s/exactly //
16:57
<@jerith>
Unloading modules can be problematic.
16:57
<@Namegduf>
Yeah, that's the pain.
16:57
<@jerith>
Not worth the effort, generally.
16:57
<@Namegduf>
And why-yes.
16:58
<@Namegduf>
It's possible, but a mixture of not worth the effort, and almost as disruptive as a reboot.
16:58
<@jerith>
If it's necessary, your critical system is *way* too fragile.
16:59
<@Namegduf>
"I know, but I can't change how the uptime numbers go up without being accused of cheating! I need to keep this up or I'll be beaten by someone else!"
16:59
<@ToxicFrog>
Yeah. I'm just pointing out that while driver updates are usually part of kernel updates, they aren't always (see, for example, the virtualbox driver), and when they aren't a reboot usually isn't required.
16:59
<@Namegduf>
That said, my IRC client no longer handles UTF-8 or links longer than a screen width.
16:59
<@Namegduf>
It started freaking out after about a 71 days uptime.
16:59
<@Namegduf>
And I've not rebooted.
17:00
<@Namegduf>
Er, restarted, rather.
17:00
<@Namegduf>
And it's been five days.
17:01
<@jerith>
If uptime's your concern, you're already blasting new kernels to /proc/kcore or whatever.
17:01
<@Namegduf>
Haha.
17:01
<@Namegduf>
I'm considering /upgrade
17:01
<@Namegduf>
But I've historically found it doesn't work.
17:01
<@Namegduf>
I specifically know it doesn't work for SSL connections.
17:02
<@ToxicFrog>
What client is this?
17:02
<@Namegduf>
irssi
17:02
<@Namegduf>
Links don't wrap.
17:02
<@Namegduf>
Instead, they run off the right side of the screen and leave a blank line below.
17:02
<@Namegduf>
Said line is not filled in while changing windows.
17:02
<@Namegduf>
This results in messages appearing in the wrong window in hilarious or offputting arrangements.
17:03
<@ToxicFrog>
Whoops.
17:03
<@Namegduf>
UTF-8 also broke, and I have no idea why.
17:03
<@jerith>
Irssi doesn't do anything with links. Your terminal emulator does.
17:03
<@Namegduf>
It's also in screen, which could be partly responsible, but also has no reason to do what it did.
17:03
<@Namegduf>
irssi uses ncurses
17:03
<@Namegduf>
I believe wrapping within a box thing is its job.
17:04
<@ToxicFrog>
Linkifying is probably the TE's job, though.
17:04
<@ToxicFrog>
Does this only happen with links, or with any really long line?
17:04
<@Namegduf>
Sorry, I was unclear.
17:04
<@ToxicFrog>
01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789
17:04
<@Namegduf>
Any really long line containing no space-yes, that one did it.
17:05
<@Namegduf>
This means the symptom and bizarreness is links, but it isn't inherently the linkiness itself that's responsible.
17:05
<@Namegduf>
I've *no idea* what happened.
17:06
<@Namegduf>
Maybe irssi disagreed with some part of the system being updated under it.
17:06
<@Namegduf>
Maybe my "disappearing channels from channel configuration, but they come back if I save and reload" bug causes memory corruption.
17:06
<@Namegduf>
Maybe it and screen had a disagreement of some kind... really hard to figure out how to debug.
17:07
<@Namegduf>
Bleh, I'll /upgrade and hope it works
17:07 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
17:08
<@Namegduf>
Wow.
17:08
<@jerith>
Did The Magic Happen?
17:09
<@Namegduf>
Well, it upgraded.
17:09
<@Namegduf>
And it worked, except for.. bizarre random garbage in status.
17:09
<@Namegduf>
Oh, I think I understand.
17:09
<@Namegduf>
It interpreted the SSL connections as non-SSL connections, perhaps.
17:09
<@Namegduf>
(They did, indeed, all drop)
17:10
<@Namegduf>
Now to see if the bug is gone.
17:11
<@Namegduf>
Nope.
17:11
<@Namegduf>
Still there.
17:11
<@Namegduf>
Bizarre.
17:12
<@jerith>
Ran 330 tests in 12.739s
17:12
<@Namegduf>
Nice.
17:12
<@jerith>
That would make me happier if the time was an order of magnitude smaller.
17:12
<@ToxicFrog>
"maybe irssi and screen had a disagreement, really hard to debug" basically describes all of my experience with irssi :/
17:12
<@jerith>
There's also about 5s of setup that isn't counted there.
17:13
<@Namegduf>
I'll be really annoyed if *screen* is broken.
17:13
<@Namegduf>
More likely, I accidentallly fed it garbage at some point, and I "broke" the screen window.
17:13 * Namegduf guesses he'll need to kill it and fully restart everything, so... whee.
17:13 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has quit [[NS] Quit: Client restart]
17:14
<@jerith>
Ran 330 tests in 14.565s
17:14 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has joined #code
17:14
<@jerith>
real 0m21.533s
17:14
<@jerith>
Some of those tests do a bunch of I/O. :-/
17:15
<@jerith>
lantea:max_wait jerith$ ls src/domainservice/tests/stored_responses/ | wc -l
17:15
<@jerith>
1427
17:15
< Namegduf>
That fixed it.
17:15
<@jerith>
\o/
17:23
<@ToxicFrog>
Woot.
17:23 * ToxicFrog ended up fixing it by dropping irssi entirely and moving to NX, in the end.
17:52 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
17:54 Orth [orthianz@Nightstar-31049c99.xnet.co.nz] has quit [Ping timeout: 121 seconds]
18:11
< Namegduf>
There is no graphical client that meets my usage requirments
18:11
< Namegduf>
I run with 36 permanent windows in irssi, but I have a lot of merged windows.
18:11
< Namegduf>
Total channels could be approaching 50 or 60.
18:12
< Namegduf>
I could use xirssi, I guess, but I'd rather not.
18:18 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
18:18 mode/#code [+o Derakon] by Reiver
18:22 EvilDarkLord [jjlehto3@Nightstar-f1ccbb45.hut.fi] has quit [Ping timeout: 121 seconds]
18:22 EvilDarkLord [jjlehto3@Nightstar-f1ccbb45.hut.fi] has joined #code
18:23 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection]
18:27 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
18:27 Zed_ [Zed@Nightstar-e4835f03.or.comcast.net] has quit [Connection reset by peer]
18:28 Zed_ [Zed@Nightstar-e4835f03.or.comcast.net] has joined #code
18:48
<@Derakon>
An example of the kind of code cleanup efforts I've been making: http://pastebin.starforge.co.uk/283
18:49
<@Derakon>
This example doesn't even involve changing any algorithms; it's strictly a style cleanup.
19:15
<@ToxicFrog>
I'm kind of regretting not running 'git p4 sync' inside time now.
19:15
<@ToxicFrog>
I started it when I got in at 9 and it's 55% done.
19:16
<@Derakon>
...git wraps p4 now? What?
19:16
<@ToxicFrog>
git-p4 is a third party Python script to allow communication between git and p4.
19:16
<@Derakon>
Ah.
19:17
<@ToxicFrog>
It works similarly to git-svn -- git p4 clone, git p4 sync && git merge (or git p4 rebase), git p4 submit.
19:18
<@ToxicFrog>
I've been hacking on it to make it actually works on our repos, which weigh multiple gigabytes and cause it problems since the original version buffered each checkout in memory entire.
19:19
<@Derakon>
Oops.
19:19
<@ToxicFrog>
Yeah.
19:19
<@jerith>
Eep.
19:30 * Derakon sighs at the use of the variable name 'c'.
19:30
< celticminstrel>
Why?
19:31
<@Derakon>
Single-letter variable names are often unintuitive, and annoyingly hard to replace with something better.
19:31
<@Derakon>
"cc" was significantly easier to replace, for example.
19:31
< celticminstrel>
True, hard to replace.
19:32
<@Derakon>
I'm replacing 'c' with 'camId' (as 'cc' was replaced by 'camIds').
19:32 * gnolam actually uses it from time to time.
19:32
<@Derakon>
"it" is a terrible variable name. ?.?
19:32
< gnolam>
Although, only in shaders and only where it's blindingly obvious that it means "color".
19:34
< celticminstrel>
I think I usually use clr for colours....
19:34
<@Derakon>
for c in range(len(lop)):
19:34
<@Derakon>
p = lop[c]
19:34 * Derakon sighs.
19:34 * Derakon beats Sebastian about the head with the "enumerate" function.
19:34
<@Derakon>
I usually use "col" or "color" for color.
19:34
<@Derakon>
(Usually I don't need to have columns and colors in the same context)
19:35
<@jerith>
I generally use "colour", because I'm curmudgeonly.
19:35
< celticminstrel>
Wouldn't it be easier to say "for c in lop" there?
19:35
<@Derakon>
Celticminstrel: yeah, except the index is actually needed.
19:35
<@Derakon>
(I didn't show the third line)
19:35
< celticminstrel>
Ah.
19:35
<@ToxicFrog>
You can't iterate over (index,key) ?
19:35
<@ToxicFrog>
Er,
19:35
<@ToxicFrog>
(index, value)?
19:35
<@Derakon>
New code:
19:35
<@Derakon>
for camId, port in enumerate(lop):
19:35
<@Derakon>
camSet(camId, port)
19:35
<@Vornicus>
for i,v in enumerate(pile)
19:35
<@ToxicFrog>
Oh, so you can
19:35
<@jerith>
ToxicFrog: enumerate()
19:36
< celticminstrel>
I'll have to remember that.
19:36
<@Derakon>
It's very handy.
19:36 * Vornicus remembers when that was added. Was so happy.
19:36 * jerith *really* wants a dict.update() equivalent that actually returns the updated dict.
19:37
<@Vornicus>
you want a copying merge?
19:38
<@jerith>
If you mean the equivalent of list + other_list (versus list.extend()), then yes.
19:40 * jerith heads home.
19:49
<@McMartin>
In Java, that would be c = new HashMap(aMap).putAll(bMap), I think.
19:49
<@McMartin>
I forget if putAll returns this
19:51
<@Derakon>
It seems like you should be able to add dicts like you do lists. The only question would be what happens on a key conflict.
19:51
<@Derakon>
(Such addition is not supported, at least not in Python 2.5)
19:52
<@McMartin>
Yeah, putAll replaces
19:52
<@McMartin>
The Haskell standard library has you pass in a combining operation, which lets you do awesome and heinous functional things.
20:05
<@Derakon>
"Awesome and heinous" sounds pretty standard for functional programming~
20:06 * Derakon heads to lunch.
20:17
<@jerith>
I need a three-step "mydict = get_dict(); mydict.update(other_dict); return mydict" thing.
20:17
<@jerith>
Which is a pain.
20:18
<@McMartin>
How does update handle key conflicts? Auto-overwrite?
20:18 * jerith nods.
20:19
<@jerith>
Quite often, I actually end up with "mydict = {}; mydict.update(defaults); mydict.update(params); do_something(mydict)"
20:20
<@jerith>
Because I don't want to overwrite defaults with stuff.
20:20 * McMartin nods
20:20
<@McMartin>
Yeah
20:20
<@Vornicus>
mydict = dict(defaults) should do the same as those first two lines
20:21 * jerith nods.
20:43
<@AnnoDomini>
Damn it. What's the Linux command to delete non-empty directories?
20:44
<@Vornicus>
rm -rf dir will do it. Be careful though!
20:45
<@Derakon>
Especially if you're deleting emacs temporary files...
20:45
<@Derakon>
"rm -rf * ~" is not the same thing as "rm -rf *~"
20:45
<@AnnoDomini>
I don't use emacs.
20:45
< celticminstrel>
The former will delete your entire home folder, right?
20:45
<@Derakon>
Yes.
20:46
< PinkFreud>
celticminstrel: and everything in the current directory
20:46
<@AnnoDomini>
I just want to de-virus my pendrive.
20:46
< celticminstrel>
PinkFreud: Which may or may not be part of your home folder.
20:46
<@Derakon>
Usually it is, though.
20:46
< PinkFreud>
celticminstrel: depends on where you currently are.
20:47
< celticminstrel>
Yes.
20:47
< celticminstrel>
I always used just "rm *~" to delete those files. Or "rm '#*#'" for the other kind.
20:47
<@Derakon>
Yeah, the -r isn't even very helpful here since it'll only traverse through directories that themselves end in ~
20:47
<@Derakon>
But some people type "rm -rf" by reflex.
20:47
< celticminstrel>
I see.
20:50 aoanla [AndChat@Nightstar-c6a32286.range81-129.btcentralplus.com] has joined #code
20:51 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has joined #code
20:52
<@Derakon>
Sample line of code:
20:52
<@Derakon>
H.ccd_sub_bin(*(X.curCam_ccdSetImageArgs[:-1] + [allowAutoRestart])) # UGLY !!
20:52
<@Derakon>
(Note that isn't my comment)
20:52
<@Vornicus>
;_;
20:54
<@McMartin>
=(
20:55
<@Derakon>
For those not strongly-versed in Python, what this is doing is passing a tuple as if it were the standard set of arguments for a function.
20:55
<@Derakon>
E.g. if you have a function foo(a, b, c), then you could call foo(*(1, 2, 3)), which would be the same as doing foo(1, 2, 3) directly.
20:56
< celticminstrel>
Which is quite useful actually.
20:56
<@jerith>
I do that often enough that it doesn't seem strange.
20:56
<@Derakon>
Mostly for inheritance.
20:57
<@Derakon>
If your child class doesn't care about arguments handed to the parent class (or only cares about a subset), you can lump the ones you don't care about into a "stick the rest of the arguments in this tuple" special argument, which you then pass to the parent constructor using this mechanism.
20:57 crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code
20:57
<@jerith>
foo(**mydict) is also useful.
20:58
<@Derakon>
What do you use it for aside from "I don't care what these arguments are, but a function I call does" situations?
20:59
<@jerith>
I have a bunch of APIs that take lots of parameters.
21:01
<@jerith>
So I do something like what I was whinging about above and pass it in as **kwargs.
21:01 AnnoDomini [annodomini@Nightstar-a911a2d9.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
21:01
<@Derakon>
How is that an improvement over just specifying the arguments in the function call directly?
21:02
<@jerith>
I get a dict of the non-defaults from elsewhere.
21:02
<@jerith>
It makes sense in context.
21:03
<@Derakon>
Ah.
21:03 AnnoDomini [annodomini@Nightstar-dbc4b0e4.adsl.tpnet.pl] has joined #code
21:03 mode/#code [+o AnnoDomini] by Reiver
21:12 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
21:19 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
21:28 You're now known as TheWatcher
21:29 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
21:37 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
21:44
<@Derakon>
Function ctpp for taking images with the camera imports the wx module so that it can access wx.CYAN. Function ftpp for taking images with the camera in a different fashion doesn't bother importing wx (even though it uses wx.GREEN), because it knows that wx was already imported at the module level.
21:44
<@Derakon>
Yay!
21:44
<@jerith>
Yay! </wrists>
21:46 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
21:47
<@AnnoDomini>
Why... would you put XML brackets around... argh. This hurt my brain.
21:51
<@McMartin>
because it's the end of your wrists.
21:52
<@jerith>
"slash wrists"
21:52
<@McMartin>
I tend to actually read /wrists as an emote, though~
21:52
<@AnnoDomini>
Yes, I know, but why the XML notation? Why not just "/wrists"?
21:53
<@Derakon>
As McM said, it's the end of your wrists.
21:53
< celticminstrel>
I don't get it.
21:53
<@Derakon>
Your <wrists> tag starts at your shoulders, and normally ends right before your <hands> tag.
21:53
< celticminstrel>
...
21:53
<@Derakon>
Jerith is suggesting that it be ended early, presumably with a knife.
21:53
< celticminstrel>
Not really.
21:54
<@Derakon>
...er.
21:54
<@Derakon>
Yes, I seem to have a poor grasp of anatomy today.
21:54 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
21:54
<@McMartin>
Are you aware that "slashing one's wrists" is a form of suicide?
21:54 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
21:54
<@McMartin>
That's an important bit of context~
21:54
<@AnnoDomini>
I never quite understood how one could commit suicide by slashing one's wrists.
21:54
<@jerith>
22:54 -!- Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
21:54
<@jerith>
22:54 <@McMartin> Are you aware that "slashing one's wrists" is a form of suicide?
21:54
<@jerith>
22:54 -!- Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
21:55
<@McMartin>
(Though it's actually more "opening the arteries and veins in your forearm"
21:55
<@jerith>
That is oh so very awesome.
21:55
<@McMartin>
Rippy the Razor sez: down the block, not across the street!
21:55
<@AnnoDomini>
It seems wholly inadequate. And prolonged, if it works.
21:55
<@McMartin>
That's because you're thinking more across the street than down the block
21:55
<@AnnoDomini>
I seep.
21:55
<@Derakon>
If you cut along the arm, then you open up your veins pretty widely.
21:55
<@McMartin>
Yeah, that's because you didn't hit an artery
21:55
<@McMartin>
Then you'd gush
21:55
<@Derakon>
Blood loss is rapid at that point.
21:56
<@Derakon>
s/veins/arteries/, yeah.
21:56
<@McMartin>
It's probably as fast if not faster than having one's throat slit
21:56
<@jerith>
It isn't massively painful and it minimises mess if you do it in a warm bath.
21:56
<@McMartin>
Kids, don't try this at home
21:56
<@AnnoDomini>
Well, I don't actually have experience in the matter, not being suicidal or retarded.
21:56
<@Derakon>
Kids, don't try this.
21:57
<@McMartin>
I'm actually not sure if, say, a workshop accident could result in an arm wound equivalent to slitting your wrists
21:57
<@McMartin>
Speaking of not trying things at home
21:57
<@AnnoDomini>
I'm pretty sure it could, if you - say - are working with a file in a somewhat awkward position, and you miss whatever you meant to hit and instead run the file down the length of your forearm.
21:58
<@Derakon>
I could see you managing to really misuse a rotary saw.
21:58
<@Derakon>
Geeze, this is pretty morbid.
21:59
<@jerith>
If you want to bleed out fast, open the one in your thigh.
21:59
<@jerith>
That's pretty deep, though, and would hurt like... a thing that hurts a lot.
22:00
<@McMartin>
Yeah, it's the depth that makes me wonder how likely such an accident would be.
22:00
<@McMartin>
It seems like anything that could get that deep would probably just take your limb off
22:00
<@McMartin>
This is all on-topic because it's why we're much happier working solely in code instead of with tools
22:00
<@AnnoDomini>
Well, people routinely die from breaking their leg at the thigh.
22:01
<@AnnoDomini>
McMartin: Programmable workshop machines! :p
22:02
<@McMartin>
Which get to operate far, far away
22:02 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
22:02
<@McMartin>
CNC is teh roxxor though, no fooling
22:02
<@jerith>
Quite.
22:02
<@AnnoDomini>
Reiv[Graduate]: Haldiel is being raised from dead. Please post.
22:03
<@Derakon>
I saw a pretty awesome video of a CNC machine milling a motorcycle helmet out of a solid block of aluminum.
22:03
<@McMartin>
<3
22:03
<@AnnoDomini>
:D
22:03
<@AnnoDomini>
Link?
22:03
<@Derakon>
No idea, sorry.
22:03
<@Derakon>
And it wasn't a usable helmet, of course.
22:03 * McMartin got to program a small one (wood carver) in 8th grade as part of Robotics Shop.
22:04
<@Derakon>
Ah, probably http://www.youtube.com/watch?v=KDPA06D1r_8
22:04
<@McMartin>
Derakon: That would have been a horrible waste if it were
22:14
<@Derakon>
A bit under halfway through documenting the sebC module (for working with cameras), I find a function that takes an image and a cropbox and crops the image for you.
22:14
<@Derakon>
Which, yeah, I can see how it relates to cameras, but there's nothing in it actually dealing with the cameras. It's a generic image-processing function.
22:17 aoanla [AndChat@Nightstar-c6a32286.range81-129.btcentralplus.com] has quit [[NS] Quit: ]
22:21
<@Derakon>
testIfCamIsGoodConnected. *sigh*
22:22
<@Derakon>
(A function to validate that the connection to the camera is still open and the camera is responding)
22:26 * McMartin watches his kernel debugger go to town ;_;
22:27 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
22:28
<@Derakon>
Two selected lines from the codebase:
22:28
<@Derakon>
'''
22:28
<@Derakon>
'''
22:28
< celticminstrel>
...
22:28
<@McMartin>
... nothing intrinsically wrong with that, is it? That's an easily expandable here document that's currently "\n\t"
22:29
<@Derakon>
It's just pointless, is all.
22:29
<@McMartin>
Mmm
22:29
<@McMartin>
I mean, this is seb
22:29
<@McMartin>
But it's not intrinsically wrong.
22:29
<@McMartin>
I can see style guides that would want that in some cases
22:30
<@Derakon>
What, some combination of "every function must have a document string" and "don't comment obvious code"?
22:30
<@McMartin>
Though I'd personally prefer '''TODO: Write actual doc string''' for that
22:30
<@Derakon>
(Except this code isn't obvious at all...)
22:30
<@McMartin>
I could see a style guideline to never use escape codes if you can't help it
22:31 Zed_ [Zed@Nightstar-e4835f03.or.comcast.net] has quit [Client closed the connection]
22:32 Zed_ [Zed@Nightstar-e4835f03.or.comcast.net] has joined #code
22:33 * McMartin watches his kernel debugger go to town ;_;
22:35
<@McMartin>
Oh, wait, it's not beign really slow. It's waiting for input.
22:35 * McMartin logs in, hurrrrrr
22:35
<@Derakon>
Reminds me of when I set off a long-running recursive grep to go and forget to tell it what files to grep...
22:36
<@McMartin>
"Man, this is taking forever. At least my CPU usage is still OK..."
22:37
<@Derakon>
Pretty much, yep.
22:43 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
22:48
<@McMartin>
OK, now it's acting deadlocked.
22:48
<@McMartin>
But I really have no idea how slow a Win7 debug kernel is supposed to be.
22:49
<@AnnoDomini>
Too slow. End its life.
22:49
<@McMartin>
It has not yet yielded up the data I seek
22:50
<@AnnoDomini>
(http://www.penny-arcade.com/comic/2007/11/5/)
22:50
<@Derakon>
Hey guys, validate input! http://www.cnbc.com/id/36999483
22:50
<@McMartin>
I dunno, that looks like a valid input, just not the one they wanted
22:51
<@Derakon>
I'm suggesting you have a sanity check for unusual inputs.
22:51
<@Derakon>
I have some code in one section that says "Man, that's a big delay. You know this is in seconds, not milliseconds, right? Sure you want to go ahead?"
22:51 AnnoDomini [annodomini@Nightstar-dbc4b0e4.adsl.tpnet.pl] has quit [[NS] Quit: Awaaaaay.]
22:52
<@McMartin>
That explains why the market rebounded so fast, at least.
22:52
<@McMartin>
Derakon: By then, you've lost FIVE BILLION DOLLARS IN MARGIN TRADES OMG OMZG
22:54
<@Derakon>
I do sometimes think it'd be a good idea to have a half-hour window in which trades are submitted, after which point they resolve simultaneously. Take some of the "OMG must be fast" out of it.
22:54
<@Derakon>
There's probably some good reason why it wouldn't work -- resolving simultaneity if nothing else -- but the current system is obviously broken.
23:11 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Connection reset by peer]
23:27 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
23:30 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has quit [Client closed the connection]
23:35
<@McMartin>
The current system was being gamed by major players so that they'd get info 2s before everyone else, and using that to skim off billions
23:36 Reiv[Graduate] [orthianz@Nightstar-43f07b21.xnet.co.nz] has joined #code
23:53
<@Derakon>
I'm about 60% of the way through cleaning up the style of a ~1k-line module...and the diff is now 1200 lines.
--- Log closed Fri May 07 00:00:54 2010
code logs -> 2010 -> Thu, 06 May 2010< code.20100505.log - code.20100507.log >