code logs -> 2010 -> Tue, 14 Sep 2010< code.20100913.log - code.20100915.log >
--- Log opened Tue Sep 14 00:00:39 2010
00:01
<@Derakon>
Time to hit the gym.
00:01 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
00:08 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
00:10 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
00:29 AnnoDomini [annodomini@Nightstar-cc165a6d.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:51 You're now known as TheWatcher[T-2]
00:52 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
00:52 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Connection reset by peer]
00:55 You're now known as TheWatcher[zZzZ]
01:09 Derakon[AFK] is now known as Derakon
02:28 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
--- Log closed Tue Sep 14 02:36:16 2010
--- Log opened Tue Sep 14 02:36:29 2010
02:36 TheWatcher[zZzZ] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code
02:36 Irssi: #code: Total of 17 nicks [3 ops, 0 halfops, 0 voices, 14 normal]
02:36 mode/#code [+o TheWatcher[zZzZ]] by Reiver
02:37 Irssi: Join to #code was synced in 52 secs
03:16 Derakon is now known as Derakon[CIV]
03:17 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
03:48 Derakon[CIV] is now known as Derakon
04:18 Orthia [orthianz@Nightstar-3a706714.xnet.co.nz] has joined #code
05:31 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:55 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
06:08 Vornicus [Vorn@Nightstar-d6447053.wlfrct.sbcglobal.net] has joined #code
06:08 mode/#code [+o Vornicus] by Reiver
06:35 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
06:47 Derakon is now known as Derakon[AFK]
07:23 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:26
< Alek>
http://www.techcomedy.com/single/new_stories.php?content_number=83826
08:06 Anno[Laptop] [annodomini@Nightstar-ee70b7bd.adsl.tpnet.pl] has joined #code
08:29 Anno[Laptop] [annodomini@Nightstar-ee70b7bd.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
08:29 Anno[Laptop] [annodomini@Nightstar-59e11451.adsl.tpnet.pl] has joined #code
09:29 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:32 You're now known as TheWatcher
09:54 Anno[Laptop] is now known as AnnoDomini
10:17 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
11:49 Vornicus is now known as Vornicus-Latens
12:38 cpux is now known as shade_of_cpux
13:23 AnnoDomini [annodomini@Nightstar-59e11451.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
13:23 Anno[Laptop] [annodomini@Nightstar-39830f96.adsl.tpnet.pl] has joined #code
14:09 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
14:14 Gruber [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
14:15 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
14:17 Gruber is now known as gnolam
15:14 Anno[Laptop] is now known as AnnoDomini
15:59 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
17:00 AnnoDomini is now known as ST
17:19
< Alek>
*nix cheat sheet
17:19
< Alek>
http://i.imgur.com/CJkR9.png
17:58
< Tarinaky>
Alek: It's notably missing the command for putting a job in the background.
17:59
< Alek>
?_?
18:00
< Alek>
not the only thing it's missing.
18:00
< Alek>
and it's got some interesting tweaks too.
18:00
< Alek>
look for the command that makes the computer faster.
18:10 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
18:18 Vornicus-Latens is now known as Vornicus
19:29
< PinkFreud>
Alek: 755 is rwx, not rw.
19:29
< PinkFreud>
er, for the owner.
19:30
< PinkFreud>
not to mention that appears to be specifically geared towards linux, not *nix in general - 'free', for instance, is largely only found on linux.
19:57 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
20:19 ST is now known as AnnoDomini
20:25
< AnnoDomini>
Is there any easy way to make non-case-sensitive regexps in Perl?
20:25
< celticminstrel>
Yes.
20:26
< celticminstrel>
I think case-sensitivity is i. In Perl, this goes right after the closing slash, I believe.
20:27
< AnnoDomini>
So like: /^!die/i
20:27
< celticminstrel>
I think that'll work, yes.
20:27
< celticminstrel>
You can put other flags there too.
20:28
<@TheWatcher>
yes, that will work
20:29
< AnnoDomini>
Is index case-sensitive?
20:30
< celticminstrel>
Huh?
20:30
<@TheWatcher>
yes
20:31
< AnnoDomini>
I have this: $dpos = index $args,'d';
20:31
< AnnoDomini>
Any way to make it case insensitive?
20:32
< celticminstrel>
Does it accept a regex instead of a string for the second argument?
20:32
<@TheWatcher>
$dpos = index lc($args),'d';
20:32
< celticminstrel>
I don't really know Perl. <_<
20:32
< AnnoDomini>
Thanks, TheWatcher.
20:32
< celticminstrel>
...duh. Of course.
20:34
< AnnoDomini>
Will s/a//i also work as I think it will?
20:34
<@TheWatcher>
yes, A or a will be removed from the string
20:35
< celticminstrel>
Should do, yeah. Assuming you think it will remove all A's.
20:35
<@TheWatcher>
(the first one encountered)
20:35
< celticminstrel>
...too slow. <_< And apparently inaccurate too.
20:35
<@TheWatcher>
to remove all A or as you'll need s/a//ig;
20:36
< AnnoDomini>
Huh. Thanks.
20:37 * AnnoDomini goes upload the newest script to the shell account.
20:40
< AnnoDomini>
This is awesome. I can have a bot running, without the hum of a computer next to my ear when I sleep at night.
20:44
<@TheWatcher>
(Just idly, if any of your regexps are inside loops, and you're not using any variables in them (they only contain literal values) you might want to stick the 'o' flag on the end of them - that tells the regexp engine to only compile the expression the first time it is encountered and cache the compiled version, as opposed to recompiling it every time. Can help speed up loops a fair bit.)
20:52
< AnnoDomini>
Don't have them in loops. I use them for parsing the command and flags attached to the string being parsed before it enters the loops.
20:52
< AnnoDomini>
http://pastie.org/1159018 <- What I have so far.
21:02 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
21:08
< celticminstrel>
I'd look, but, well, it's Perl... <_<
21:10
< AnnoDomini>
You mean it's equally unreadable pre- and post-compilation? :p
21:12
< celticminstrel>
It's not very readable in general, anyway...
21:13
< AnnoDomini>
http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
21:15 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
21:15 mode/#code [+o Derakon] by Reiver
21:16
< celticminstrel>
So, I have a list of lists, and I want to merge all the sublists into one list. Is there a one-liner for this or do I need to use a loop?
21:19
< gnolam>
What language are we talking about?
21:19
< celticminstrel>
[x for y in list for x in y] seems to work.
21:19
<@Derakon>
Python, apparently.
21:20
< celticminstrel>
Though, it seems kind of backwards... I feel like the for clauses should be in reverse order.
21:20
<@Derakon>
http://stackoverflow.com/questions/406121/flattening-a-shallow-list-in-python
21:21
<@Derakon>
Googled for "python flatten list of lists"
21:21
< celticminstrel>
Oddly, "flatten" was not the first term that came to mind to describe what I wanted.
21:22
<@Derakon>
Well, it's what you're doing. :)
21:22
< celticminstrel>
Yep. Now that I see the term I know it fits.
21:23 * Derakon tries to figure out how to get Matlab to run a script file.
21:23
<@Derakon>
You would not think this would be difficult.-
21:25
<@Derakon>
Ah ha. I must name the file with a '.m' file extension.
21:26
<@Derakon>
Brilliant, Holmes.
21:27
<@Derakon>
...okay, now I get to figure out how to stop it from outputting a few thousand lines of unnecessary output which are surely slowing it down by a factor of a hundred or so.
21:37 Orthia [orthianz@Nightstar-3a706714.xnet.co.nz] has quit [Ping timeout: 121 seconds]
21:50 * Derakon eyes Matlab.
21:50
<@Derakon>
save(filename, variable) saves the variable to filename.
21:50
<@Derakon>
Okay.
21:50
<@Derakon>
Works fine at the interactive prompt.
21:50
<@Derakon>
To use it with programmatically-generated filenames, the second argument must be the string of the variable name holding the filename!
21:51
<@Derakon>
I.e. save('output.txt', 'foo') where foo is a variable holding some data.
21:51
<@Derakon>
This is Sebastian-level idiocy!
22:04 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
22:44 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
23:24
< gnolam>
... it's M code.
23:24
< gnolam>
It's the worst designed language I have ever come across.
23:25 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
23:33
<@Derakon>
Gnolam: that implies it was designed.
23:34
< AnnoDomini>
Maybe it was grown organically.
23:48
<@Derakon>
Maybe water is wet.
23:53 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
23:56
<@ToxicFrog>
Fuuuuuuuuuuuuuuuuuuuuuuuck video editing and everything related to it
23:56 shade_of_cpux is now known as cpux
--- Log closed Wed Sep 15 00:00:40 2010
code logs -> 2010 -> Tue, 14 Sep 2010< code.20100913.log - code.20100915.log >