IRC log for #gllug on 20080603

00:14.29*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
00:45.33*** part/#gllug aguai (n=aguai@host86-139-191-40.range86-139.btcentralplus.com)
01:19.06*** join/#gllug catalyst (n=catalyst@allegro/user/angelchild)
01:24.50*** join/#gllug boudicca (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
01:55.02*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
02:57.07*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
03:17.44*** join/#gllug jpds_ (n=jpds@67.193.130.62)
03:18.30*** join/#gllug PussInBoots (i=PussInBo@gateway/tor/x-a0b256e0ce33590a)
04:17.45*** join/#gllug jpds (n=jpds@ubuntu/member/jpds)
06:53.21*** join/#gllug trousers (n=irc@92-233-113-148.cable.ubr12.nmal.blueyonder.co.uk)
06:59.31*** join/#gllug trousers_ (n=irc@92-233-113-148.cable.ubr12.nmal.blueyonder.co.uk)
07:06.05*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
07:06.19*** join/#gllug Leed1 (n=richard@n218103254044.netvigator.com)
07:06.44*** join/#gllug trousers_ (n=irc@92-233-113-148.cable.ubr12.nmal.blueyonder.co.uk)
07:56.16*** join/#gllug PussInBoots (i=PussInBo@gateway/tor/x-efbdf5f9721405d7)
08:19.10*** join/#gllug ranner (n=ranner@general-kt-195.t-mobile.co.uk)
08:25.01bilarh_curses the british weather
08:25.20zaargtoo
08:26.12halisup
08:26.39bilarh_gets busy building an ark
08:33.01bilarh_jeez, it's getting worse
08:35.30haliballs
08:35.45bilarh_you still at home?
08:35.55haliyes
08:36.06halimy colleauge is not in yet so i can head in
08:36.07bilarh_unlucky.
08:36.27haliim googling small'ish disk systems at the moment
08:36.42halihp msa2000i looks cool... iscsi is the future (or something)
08:37.19*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
08:37.25bilarh_bloody hell, i'm so bored here
08:37.37halihowever, i hate hp at the moment, after browsing their site for about 6 minutes they have prompted me to take a survey 8 times!!!1one
08:37.46bilarh_i'm waiting for two new verari disk packs and they should have been here on the 27th, and still no sign
08:37.50zaargyou have the whole internets out there
08:37.55bilarh_yesterday they emailed us and said it had jsut been shipped
08:38.13halibilarh_: hows the move plan going?
08:38.31bilarh_hali: most of it done, just waiting for kit really
08:48.57bilarh_which means that there's eff all going on at the moment
08:49.03bilarh_yesterday i had one ticket again
08:49.32bilarh_and overnight i had two emails, one of which was an automated one and one which was a company wide memo about someone being promoted in a different office in a different country
09:03.20wethrinThe internets have a tendency of running out
09:08.20*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
09:20.08antiphaseHP are in our naughty corner for producing servers which blow up
09:20.49bilarh_fail
09:21.20bilarh_literally blow up or just stop working?
09:21.54*** join/#gllug curson (n=curzon@79-69-57-240.dynamic.dsl.as9105.com)
09:22.54antiphaseStopped working. It was quite importnat, and one of only 2 HP shitboxes in the entire place
09:23.12antiphaseIt wasn't a particularly cheap one either
09:27.46*** join/#gllug ranner81 (n=ranner@213.86.218.124)
09:39.23*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
10:04.54kjalilhmm, what does "> filename" at the beginning of a sh script mean?
10:05.37bilarh_redirect output?
10:06.03bilarh_so if you do an "echo blaha" it will go to filename instead of console
10:06.06bilarh_is guessing
10:06.27antiphaseman sh and search for redirection I'd have thought
10:06.39antiphaseIt does just sound like STDOUT redirection to a file though
10:06.46kjalilstrange, it is followed immediately by a function, and inside this function is "wget" which redirects output to "filename" too
10:07.28bilarh_doesn't wget usually write to stderr, though
10:07.52bilarh_or do you mean with -O - ?
10:07.56kjalilbilarh_: it is "wget -qO - $1 >> filename", so it is redirecting stdout
10:08.06bilarh_ah
10:08.11bilarh_it might work without the redirect
10:08.22kjalilbilarh_: but, right before this function, is a line saying "> filename"
10:08.27bilarh_maybe the wget redirect was there before the whole thing got redirected
10:08.31antiphaseIT sounds hideous
10:08.32bilarh_as in, previous version, then modified
10:08.38bilarh_ah
10:08.39bilarh_i know
10:08.42bilarh_it empties filename :D
10:08.50bilarh_because the >> appends :)
10:09.11bilarh_stdout redirect would be exec 1>blah wouldn't it
10:09.13bilarh_or something similar
10:09.55*** join/#gllug huw-l (n=huw@w1199.insrv.cf.ac.uk)
10:10.14kjalilhmm, forget it. i know what the script is supposed to do, just don't understand that stupid line. reading bash man page now :(
10:10.23*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
10:10.24bilarh_it will empty the file
10:10.34bilarh_as in, truncate it
10:11.44kjalilbilarh_: you are right, If the file does not exist it is created; if it does exist it is trun? cated to zero size.
10:11.52kjalilbilarh_: that's from the man page
10:12.34kjalilbilarh_: but what is the point, if immediately afterwards you are going to append to it?
10:17.41bilarh_instead of doing rm -f blah you can do >blah
10:17.46bilarh_i think it's quite ugly myself
10:18.41kjalilbilarh_: you could even just forget the append, and just write to it, it would accomplish the same thing
10:18.50kjalilbilarh_: unless i'm missing some bigger picture here
10:19.07bilarh_no i don't think you are
10:20.02antiphaseIt was clearly written by a lunatic
10:20.14antiphaseProbably a PHP programmer or suchlike
10:21.27bilarh_when selling a modified car, is it better to put back to standardish and then sell the "bits" separately, or no point?
10:22.28antiphaseIf the bits are worth enough that it's worth your time to remove them, almost certainly unless they're very special
10:22.42antiphaseBolt-ons don't improve the value of cars at all
10:22.55bilarh_ah, so all my bolt ons should be taken off in that case
10:23.10bilarh_cool, if i can get half of what i paid for them, that's 2800 quid right there :)
10:23.21bilarh_minus a remap and some standard replacements
10:23.30bilarh_so probably 2000 after all said and done
10:23.35antiphaseBeer money
10:23.47bilarh_hopefully someone will pay 7k for the car itself
10:24.01bilarh_and then i can spend the 2k on an old porsche 944 or something and stick the rest in my isa
10:24.05kjalilumm, newbieish question: why do things like "last" and some logfiles NOT include the year?
10:24.21bilarh_kjalil: because they're broken
10:25.17bilarh_kjalil: hth ;-)
10:25.17kjalilbilarh_: hmm, what is the most reliable way to find out *when* a linux system was installed?
10:25.31bilarh_i'd check the date of some file in /etc, e.g. the redhat-release or something
10:25.34bilarh_that's unlikely to have changed
10:26.30bilarh_arse, although that's apparently a standard file anyway
10:26.32bilarh_so you can't do that :)
10:27.16bilarh_check the date of /etc/rc0.d :)
10:27.21antiphaseYou can try dumpe2fs if you use ext3 to give file system creation times
10:27.59bilarh_it's actually quite crap that the dists don't create a file somewhere with that info, isn't it?
10:28.03kjalilhmm, perhaps dumpe2fs. last seems useless
10:28.11bilarh_it's not hugely useful, but could be interesting
10:46.37kjalilhmm, does "!$" in perl mean "last error" or something?
10:51.07antiphase$! does
10:52.26antiphase!$ will be expanded to the last argument of the previous command when used in bash
10:55.33kjalilgrrr. sorry i meant $!
10:55.49kjalilantiphase: thanks
10:55.59wethrinWeb browsers--
10:57.57kjalilhates "unless" statements
10:58.40antiphaseThey can be useful when used appropriately and in moderation
10:59.07wethrinlike gotos
10:59.32bilarh_also hates unless
10:59.37bilarh_it's the wrong way, logically, in my head
10:59.46kjalilantiphase: i find them confusing. what does "unless (&a_function(arg1))" mean? does it mean if the function returns 0, or doesn't return 0?
10:59.53bilarh_what was ever wrong with "if not"
11:00.22antiphaseunless mean if not, but it reads differently is all
11:00.44kjalilantiphase: so i should substitute the unless above with if not then?
11:01.18antiphasePErsonal choice really. IT looks like it was writen by someone with no idea of failure cases anyway, so I wouldn't worry about it
11:01.24kjalilantiphase: in perl, is it the same a C, as in (&blah) is the same as "if (&blah != 0)"?
11:01.44antiphase&blah is an old-style function call
11:02.02antiphaseIn C & is the address operator
11:02.07antiphaseSo not really similar at all :)
11:02.26kjalilantiphase: ah, sorry that's not what I meant :)
11:03.05antiphaseIf you're not operating under strict (which you always should), the truth condition will also fail in Perl if the function returns undef, which might not be what you want either
11:03.24antiphaseI'd advise against trying to get old spaghetti Perl that works to run under strict though if it's not already enabled
11:03.39kjalilantiphase: is it under strict
11:03.47kjalils/is it/it is/
11:04.41antiphaseI just wondered because it's not common to use & to make function calls any more, so it's an immediate warning sign that it's shitty code written by someone that doesn't use the language much; althernatively it could just be oooold
11:06.35kjalilantiphase: yes, it's very old code. he is calling a function, then using "unless" on the return value
11:07.57kjalilantiphase: the function is returning 0 on failure, 1 on success. so what is the default value he is looking for is what i'm confused by. He doesn't say "unless (&func() != 0)" for example, just "unless (&func()) { asdfaf }"
11:09.48antiphaseif and unless just operate on the truth of the following expression
11:10.27antiphaseSo you're not strictly comparing something to 0 if you say (foo != 0) but really creating a true or false
11:11.19antiphaseIf and unless just happen to run or not run the following clause depending on the truth of the condition, so if your function returns true or false, you can use it directly if you see what I mean
11:12.17antiphaseTrue in Perl is anything which is defined and not numerical 0 or an empty string
11:13.27kjalilhmm, ok, that makes sense
11:13.35antiphaseperl -e 'print (1 == 0), "\n";'
11:14.10antiphaseIt looks wrong until you realise that a comparison is just an expression which can be true or false
11:14.39antiphasePerl is basically evil, which is why people use PHP now
11:16.13kjalilouch. what the hell does "if ( -1 < $#ARGV ) {" mean? I get it, but why write it like that?
11:16.43bilarh_kjalil: if there are arguments passed on the command line, then
11:16.59bilarh_which part do you think is stupid? :)
11:17.03bilarh_the -1 on the left?
11:17.10antiphaseIT looks fairly retarded
11:17.12kjalilbilarh_: if there are 0 arguments, what does $#ARGV evaluate to?
11:17.33antiphase$#ARGV is the index of the final element of @ARGV
11:17.54antiphaseSo if the array is empty, it is -1
11:18.01bilarh_i always do scalar(@ARGV) myself, it looks neater
11:18.14kjalilthe final element? i thought it was the "count" of the elements, sigh. i need to re-read my perl
11:18.30bilarh_that's one of the problems with perl, i must admit
11:18.31antiphaseIt's the final element, so it is one less than the count of the elements
11:18.35bilarh_that it's possible to abuse the fuck out of it
11:18.51antiphaseI quite like "unless defined $ARGV[0]"
11:19.05antiphaseTMTOWTDI :)
11:19.13bilarh_argh, my eyes
11:19.31bilarh_SWYSA
11:19.46kjalilumm, so if there are no arguments, is the array empty or not, or is it like C where the command is always the first arg?
11:19.53bilarh_BICUT
11:19.58antiphase$0 is the command in Perl
11:20.05antiphase@ARGV contains only arguments
11:22.05kjalilok, this guy is trying to check if there ARE arguments passed in, so that he can parse them. Fine. Now if there are none, $#ARGV will be 0, yes, so WTH is playing around with "-1" for?
11:22.09kjalilgrrr
11:22.23bilarh_note the < :)
11:22.39kjalil-1 < 0
11:23.31bilarh_ignore what i saide
11:23.53antiphase13:17.32 < antiphase> $#ARGV is the index of the final element of @ARGV
11:23.53antiphase13:17.54 < antiphase> So if the array is empty, it is -1
11:24.15antiphaseSo if -1 is less than $#ARGV, there are arguments available
11:24.31antiphaseI think you should name and shame the author of these abominations
11:26.11kjalilah, ok, the "index" now I get it. this code is causing my eyes to go funny
11:28.42kjalilsorry, for so many questions, i hope you guys are patient enough, because I have a few more :)
11:29.31kjalilwhat about: "foreach (@jobs) { eval; }" . It goes thru each array item, but what does "eval" do?
11:29.51antiphase:O
11:29.52bilarh_runs a piece of perl code, afaik
11:30.05bilarh_in that configuration, probably what's in $_ :)
11:30.12antiphaseAssuming @jobs is an array of code references, yes
11:30.17antiphaseThat is horrifying
11:30.20bilarh_quite
11:30.40antiphaseI didn't mean code references
11:30.43antiphaseI need more coffee
11:38.40antiphaseBut anyway, using eval isn't terribly clear in that case unless someone is dynamically generating code. It's usually used so that you can trap a critical failure that would halt your program and handle it nicely
11:43.04*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
11:50.22*** join/#gllug dick_turpin (n=dick_tur@host217-34-163-30.in-addr.btopenworld.com)
11:52.05kjalilantiphase: ok, thanks
12:20.56*** join/#gllug PussInBoots (i=PussInBo@gateway/tor/x-389e2479e0f3656f)
13:13.42*** join/#gllug catalyst (n=catalyst@allegro/user/angelchild)
13:31.58bilarh_dick turping!
13:47.13*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
13:56.14kjalilman, this is confusing. If a script is passed an argument, AND a function within that script is called with an argument, then if *within* the function there is a reference to $1, is it referring to the script's argument, or the function's argument
13:56.18kjalil?
13:57.09bilarh_the scripts
13:57.18bilarh_the arguments to a script come in @_
13:57.24bilarh_s/script/function/
13:57.33bilarh_but then again,
13:57.36kjalilbilarh_: sorry, this is a bash script
13:57.41bilarh_oh right :)
13:57.44bilarh_in that case it's the functions
13:57.57bilarh_i was just going to go off on why perl didn't use $1 at all :)
13:58.01kjalileven though the script itself is passed something on the command-line?
13:58.11bilarh_yep
13:58.23kjalilfeels like shooting someone
13:58.32bilarh_shoot dick_turpin
13:58.58zaargapparently there's a big storm from france coming this way
13:59.04zaarg\o/
13:59.06bilarh_for fucks sake
13:59.10bilarh_what is wrong with the fucking weather
13:59.33bilarh_my parents helpfully called on the weekend and said they had had wonderful weather for a whole week and that they were going to have nice weather for at least the next week as well
13:59.56bilarh_i did feel a bit miserable looking out of the window at that point, i must admit
14:00.05kjalilbilarh_: this stupid script is called with an argument, but there is only 1 function in it, which is called with a diff. argument, but the function uses $1 inside itself, and seems to ignore the command-line arg.
14:00.21bilarh_kjalil: that would make sense :)
14:00.31bilarh_kjalil: that the function ignores the command line arg, i mean...
14:00.45bilarh_kjalil: erm, syntactically i mean... might not make sense to the users etc :)
14:00.48kjalilridiculous. there is no point to the command-line arg then
14:01.13kjalilit is passed in to confuse everyone
14:01.31bilarh_does it require the argument to be passed in?
14:02.40kjalilbilarh_: no, it doesn't use it :)
14:02.49bilarh_kjalil: ah :(
14:03.09bilarh_kjalil: it would have been a quality script if it required the argument, as in complained to the user if it wasn't supplied, but then didn't use it :)
14:03.11kjalilbilarh_: maybe it *used* to, and someone changed it, but not now
14:07.24*** join/#gllug gregj (n=gj@fcu5.internetdsl.tpnet.pl)
14:19.15*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
14:43.41kjalilhmm, what does the {} in "$foo{$1} = [$2, {}]" mean?
14:44.09kjalilit is called from inside an "if" whose condition is a regular expression with a : delimeter
14:48.59bilarh_perl, yes?
14:49.28kjalilbilarh_: yes
14:49.31bilarh_ok
14:49.35kjalilafter this, i have another one :)
14:49.45bilarh_the hash %foo gets a new element with key $1
14:50.06bilarh_the element is an array with the elements $2 and a reference to a hash
14:50.21bilarh_s/a hash/a new anonymous hash/
14:50.52kjalilhmm, new anon hash?
14:51.23bilarh_as in a hash that hasn't got a variable name associated with it, if you see what i mean
14:51.28kjalilbilarh_: i have a feeling, it is there for no reason, i will have to check
14:51.32kjalilbilarh_: ah, yes
14:52.20bilarh_make sense?
14:53.30bilarh_you might have something like
14:53.42bilarh_$ref = $foo{key}[1];
14:53.51bilarh_and then $$ref{mykey2} = "some variable";
15:00.02kjalilactually, i have something like: $foo{$cdom}->[1]->{$from_to[0]} = $from_to[1];
15:00.23kjalilthe [1] seems to be an index into that second {}
15:00.43kjalilso he is putting the contents of from_to[0] in there
15:00.54kjaliland pointing it to from_to[1]
15:02.44bilarh_yeah
15:03.11bilarh_the other way around you mean
15:03.56kjalilwell, from_to contains 2 things, so he is assigning from_to[0] to be the anon hash's key, and it's value is from_to[1], yes?
15:05.18wethrinPerl sucks
15:05.19wethrinruns
15:05.28bilarh_sets the dogs on wethrin
15:05.39wethrinthrows awk at bilarh_
15:06.04bilarh_:(
15:06.06bilarh_was it somethign i sed?
15:06.10wethringroan
15:06.13bilarh_:D
15:06.31wethrinruns off
15:33.32*** join/#gllug Leeds (n=richardc@n218103254044.netvigator.com)
15:44.48kjalilbilarh_: help!!
15:46.19kjalilbilarh_: foreach my $from ( keys %{$rewrite_refs} { s/$from/$rewrite_refs->{$from}/g; }. In what context does the substitution take place here? Is it rewriting the keys in $rewrite_refs?
15:47.58bilarh_hmm
15:48.01bilarh_no
15:48.10bilarh_$from is a local variable, not a reference
15:48.35bilarh_i'd say that it doesn't actually achieve anything useful at all.
15:48.46bilarh_but that's a guess
15:49.10bilarh_hrm sorry
15:49.34bilarh_that's quite a weird substition there...
15:49.42bilarh_it works on $_, but $_ is never modified in the statement
15:49.51kjalilthis is inside a "while (<INFILE>) " context
15:49.57bilarh_aha ok
15:50.13*** join/#gllug Blapto (n=martin@62.189.100.228)
15:50.25bilarh_in that case it would probably be used to change a bunch of strings in <INFILE> to a new definition
15:50.31bilarh_sort of a translation table perhaps
15:50.38kjalilso since INFILE is a big file, is it checking each line in the file and changing whatever matches?
15:50.43bilarh_yeah
15:50.50bilarh_so you have your rewrite_refs hash, right
15:51.05bilarh_and it's got "key" -> "bollocks";
15:51.16bilarh_and then in your text file you have "i have lost my key";
15:51.27bilarh_after the fucntion $_ would read "i have lost my bollocks"
15:53.04kjalilso it is somehow looking at ALL the lines in the file at once, and substng anything that matches? I thought <INFILE> meant, read one line at a time...
16:00.34bilarh_yeah of course
16:00.44bilarh_i meant in the context of the while loop
16:22.42*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
17:17.25*** join/#gllug DiscordianUK (n=ch@chills.demon.co.uk)
18:02.00*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
18:20.33*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
18:27.57cpufreakhmm
18:42.14*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
19:02.07*** join/#gllug boudiccas (n=boudicca@88-108-2-187.dynamic.dsl.as9105.com)
19:31.20*** join/#gllug boudiccas (n=boudicca@88-108-23-146.dynamic.dsl.as9105.com)
20:12.53*** join/#gllug boudicca (n=boudicca@88-108-23-146.dynamic.dsl.as9105.com)
22:09.23*** join/#gllug aguai (n=aguai@host86-137-1-100.range86-137.btcentralplus.com)
22:11.48*** part/#gllug aguai (n=aguai@host86-137-1-100.range86-137.btcentralplus.com)
22:46.23*** join/#gllug etorix (n=etorix@unaffiliated/etorix)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.