code logs -> 2012 -> Mon, 13 Feb 2012< code.20120212.log - code.20120214.log >
--- Log opened Mon Feb 13 00:00:01 2012
01:14 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
02:19 Kindamoody[zZz] is now known as Kindamoody
02:35 Attilla [Obsolete@Nightstar-9ecc7891.as43234.net] has quit [Ping timeout: 121 seconds]
04:31 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has quit [Client closed the connection]
04:32 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has joined #code
04:32 mode/#code [+o Vash] by ChanServ
05:12 Kindamoody is now known as Kindamoody|out
05:35 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:43 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
06:06 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has quit [Connection closed]
06:07 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:18 eckse [eckse@Nightstar-47a5b3cb.dsl.sentex.ca] has quit [Connection reset by peer]
06:35 Derakon is now known as Derakon[AFK]
06:50 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
07:00 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
07:58 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
09:03 Attilla [Obsolete@Nightstar-9ecc7891.as43234.net] has joined #code
09:56 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has joined #code
10:40 Red_Queen [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
10:42 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
11:27
< Rhamphoryncus>
I just can't seem to do anything simply
11:28
< Rhamphoryncus>
alias make='make -j "$(grep -c '^processor\s*:' /proc/cpuinfo)"'
11:28
< Rhamphoryncus>
Anybody know how to make that work? I'm using '' twice, which is probably the failure point, but adding escapes just gives different errors
11:32
< Rhamphoryncus>
adding single escapes at the inner ' causes it to complain the ) being unexpected (why? It's in single quotes, it shouldn't be touching any of this until I call it.)
11:32
< Rhamphoryncus>
Double-escaping the inner ' causes it to pass the alias command, but then it hangs when I run it
11:33
< Rhamphoryncus>
Oh, and I'm testing by replacing make with echo
11:41
<@jerith>
You can't escape in single quotes.
11:42
<@jerith>
So replace the inner ' with \" or something?
11:44
< Rhamphoryncus>
result is make -j 0
11:46
<@jerith>
Replace the outer ' with " and the inner " with \"?
11:47
< Rhamphoryncus>
ahhhh that one got it
11:47
< Rhamphoryncus>
I feel like I should have tried it before
11:48
<@jerith>
Or maybe just: alias make="make -j $(grep -c '^processor\s*:' /proc/cpuinfo)"
11:48
< Rhamphoryncus>
Of course plain `` would have worked too, but I avoid them on principle
11:49
< Rhamphoryncus>
I always want my shell commands to avoid the potential for inappropriate evaluation
11:49
<@jerith>
You probably want to evaluate the number of processors at alias-definition time.
11:50
< Rhamphoryncus>
hrm.. when'd be when I log in. That's true.
11:50
< Rhamphoryncus>
grammar fail
12:00
< Rhamphoryncus>
err.. it's doing that anyway
12:00
< Rhamphoryncus>
rhamph@Tetronimo:~$ alias make
12:00
< Rhamphoryncus>
alias make='make -j "4"'
12:01
< Rhamphoryncus>
So what would that be? Doing the wrong thing right?
12:03
<@jerith>
Right thing.
12:03
< Rhamphoryncus>
It wasn't my intent so it's wrong, but the result is right.
12:03
<@jerith>
Unless you expect your shell to migrate to a different machine?
12:03
<@jerith>
I think you's need to escape the $ to delay it.
12:04
<@jerith>
But even then, you don't need the inner quotes.
12:04
<@jerith>
(Since there's no whitespace in the subshell output.)
12:05
< Rhamphoryncus>
As I said it's the principle of it
12:05
< Rhamphoryncus>
Do it securely unless I need to do it otherwise. Don't do it insecurely by default
12:22 Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds]
12:37 Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code
13:00 * TheWatcher eyes this code he has just written
13:00
<@TheWatcher>
my %userdata; @userdata{@{$fields}} = @{$userfields};
13:01
<@Tamber>
Makes perfect sense.
13:03
<@TheWatcher>
Just a bit of a shame it whines if the userfields array is shorter than the fields array when use strict is on.
13:04
<@TheWatcher>
(not that it should happen in this situation, but meh)
13:45 Red_Queen [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
13:50 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
13:53 Kindamoody|out [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
14:00 Kindamoody|out [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has joined #code
14:00 mode/#code [+o Kindamoody|out] by ChanServ
14:03 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
14:03 mode/#code [+o himi] by ChanServ
14:51 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
15:00 Stalker [Z@Nightstar-5aa18eaf.balk.dk] has joined #code
15:08 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
15:08 mode/#code [+o Syloqs_AFH] by ChanServ
15:09 Syloqs_AFH is now known as Syloqs-AFH
15:17 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has joined #code
15:17 mode/#code [+o Vash] by ChanServ
15:58 * TheWatcher vaguely snerks at the perlobj
15:59
<@TheWatcher>
"Summary: That's about all there is to it. Now you just need to go off and buy a book about object-oriented design methodology, and bang your forehead with it for the next six months or so."
16:00
<@Tamber>
Hehehe
16:26
<@gnolam>
Ooh, work
16:49 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
16:49 mode/#code [+o PinkFreud] by ChanServ
17:02 RichyB [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
17:24 Kindamoody|out is now known as Kindamoody
18:41 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
18:43 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
19:07 Kindamoody is now known as Kindamoody[zZz]
19:25 Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has joined #code
20:38 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Client closed the connection]
20:39 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
20:56 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
21:51 Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has quit [[NS] Quit: Page closed]
23:05 Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds]
23:18 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
23:29 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
--- Log closed Tue Feb 14 00:00:18 2012
code logs -> 2012 -> Mon, 13 Feb 2012< code.20120212.log - code.20120214.log >

[ Latest log file ]