00:04.08 | *** join/#utah Reilithion (n=lucas@75-162-244-44.slkc.qwest.net) |
00:26.58 | *** join/#utah cgibreak (n=cgibreak@2001:470:1f05:732:0:0:0:2) |
00:32.38 | *** join/#utah cgibreak (n=cgibreak@cgibreak.us.to) |
00:41.34 | *** join/#utah cgibreak (n=cgibreak@cgibreak.us.to) |
00:44.33 | *** join/#utah cgibreak (n=cgibreak@cgibreak.us.to) |
00:46.45 | Reilithion | resists the urge to make a crack about cgibreak. |
00:48.09 | *** join/#utah levi (n=user@levi.dsl.xmission.com) |
00:48.47 | levi | Gah. These crappy RJ45s come loose too easily. |
00:58.19 | *** join/#utah cgibreak (n=cgibreak@cgibreak.us.to) |
01:52.13 | *** join/#utah emcnabb (n=emcnabb@cpe-069-134-233-156.nc.res.rr.com) |
01:52.13 | *** mode/#utah [+v emcnabb] by ChanServ |
03:02.19 | *** join/#utah elg (n=fugalh@216.31.27.110) |
03:02.19 | *** mode/#utah [+v elg] by ChanServ |
03:13.26 | *** join/#utah tuple (n=fugalh@216.31.27.110) |
03:13.27 | *** mode/#utah [+v tuple] by ChanServ |
03:49.14 | *** join/#utah emcnabb (n=emcnabb@cpe-069-134-233-156.nc.res.rr.com) [NETSPLIT VICTIM] |
03:49.14 | *** join/#utah eggyknap (n=eggyknap@unaffiliated/eggyknap) |
03:49.14 | *** join/#utah unum (n=unum@li32-229.members.linode.com) |
03:49.14 | *** mode/#utah [+v emcnabb] by irc.freenode.net |
04:34.58 | *** join/#utah Sargun (n=Sargun@atarack/staff/sargun) |
04:42.41 | Supaplex | levi: which rj45? |
04:45.36 | Reilithion | Yeah, let's pretend like that matters. |
05:13.02 | Reilithion | s/like/ |
06:04.01 | levi | Supaplex: Some crappy beat-up ones on cables I made a long time ago. |
11:06.25 | *** join/#utah cgibreak (n=cgibreak@cgibreak.us.to) |
11:33.20 | *** part/#utah Reilithion (n=lucas@75-162-244-44.slkc.qwest.net) |
11:33.34 | *** join/#utah jshipley_ (n=jshipley@ip67-88-113-150.z113-88-67.customer.algx.net) |
12:32.56 | *** join/#utah cgibreak (n=cgibreak@cgibreak.us.to) |
13:55.17 | *** join/#utah elg (n=fugalh@216.31.27.110) |
13:55.24 | *** mode/#utah [+v elg] by ChanServ |
14:30.18 | elg | http://news.bbc.co.uk/1/shared/spl/hi/pop_ups/08/americas_enl_1227119670/html/1.stm |
14:30.23 | brac | [BBC News | Enlarged Image] |
14:30.43 | *** join/#utah gshipley (n=gshipley@nat/redhat/x-d3ca72653ed5984c) |
14:31.14 | elg | A) that's a horrible original. Really, you couldn't get your new general to sit down for 3 minutes with a real photographer? |
14:31.45 | elg | B) what a botched job adding that background. that's the fakest thing I've ever seen except those dumb "elf me" things people send every year |
14:34.24 | *** join/#utah emcnabb (n=emcnabb@nat/redhat/x-48c44b275471247c) |
14:34.24 | *** mode/#utah [+v emcnabb] by ChanServ |
14:36.49 | *** join/#utah wps (n=wps@208.53.47.251) |
14:37.41 | *** join/#utah RyanE_ (i=Piadas@rberick.dsl.xmission.com) |
14:40.01 | *** join/#utah elg (n=fugalh@216.31.27.110) |
14:40.01 | *** mode/#utah [+v elg] by ChanServ |
14:40.36 | elg | -chat |
14:40.36 | brac | Good one! |
14:48.47 | *** join/#utah redbeard2 (n=jphall@97-117-59-103.slkc.qwest.net) |
14:59.28 | *** join/#utah thaddeusq (n=thaddeus@216.49.181.128) |
15:05.49 | herlo | is planning a Fedora 10 release party on December 6... |
15:05.53 | herlo | just trying to decide *where* |
15:44.33 | *** join/#utah Jayce^ (n=jayce@office.bluehost.com) |
15:44.33 | *** mode/#utah [+o Jayce^] by ChanServ |
15:55.17 | *** join/#utah TimRiker (n=timr@70-7-16-25.pools.spcsdns.net) |
15:55.29 | *** mode/#utah [+o TimRiker] by ChanServ |
16:11.53 | *** join/#utah fungus (n=olsonl@bromine.sosstaffing.com) |
16:12.57 | unum | speaking of fedora who upgrades kernel versions and adds major new features to a STABLE release? |
16:16.15 | herlo | unum: several people |
16:16.23 | herlo | depends on the feature |
16:17.51 | jsmith | unum: I'd still profer that it beats maintaining a metric ton of patches against a vanilla kernel |
16:18.16 | unum | they added xen which apparantly breaks the nvidia driver |
16:19.39 | unum | the way they do the linux kernel now does it make it harder for the debian method, but I still prefer it |
16:20.04 | *** join/#utah wps (n=wps@208.53.47.251) |
16:24.10 | *** join/#utah TimRiker (n=timr@70-7-16-25.pools.spcsdns.net) |
16:24.10 | *** mode/#utah [+o TimRiker] by ChanServ |
16:24.49 | fozzmoo | Fedora isn't CentOS. It's meant to be bleeding edge. :) |
16:30.16 | jsmith | unum: Typically the Xen driver is a seperate kernel image, as I recall |
16:30.29 | jsmith | unum: (especially considering that Xen isn't keeping up with the latest kernels) |
16:35.37 | *** join/#utah Tadaka (n=Tadaka@c-67-177-61-219.hsd1.ut.comcast.net) |
16:38.16 | *** join/#utah elg (n=fugalh@216.31.27.110) |
16:38.16 | *** mode/#utah [+v elg] by ChanServ |
16:40.42 | unum | http://minnesota.publicradio.org/features/2008/11/19_challenged_ballots/ <- people can't vote |
16:40.46 | brac | [MPR: Challenged ballots: You be the judge] |
16:45.09 | jshipley_ | but they're from minnesota... I thought that it was florida that can't vote. |
16:45.59 | fozzmoo | If this were Florida, there'd be a lot more than a handful of people who can't vote. |
16:47.25 | elg | some of those are hard calls. others are ludicrous |
16:47.34 | elg | most are cases where the people should have gotten a new ballot |
16:52.02 | unum | elg: agreed |
16:52.07 | unum | http://www.google.com/hostednews/ap/article/ALeqM5gp-8cbq0WhtqqH2km7dv1QuDmG7wD94J3K8O0 |
16:52.08 | fozzmoo | elg: Yeah. The election judges obviously didn't make that last point clear before they went into the booth. |
16:52.12 | unum | gotta love stories like that |
16:53.13 | fozzmoo | It's a reminder that it's not the federal govt that's a threat to our privacy. :) |
16:56.18 | tensai | s/not the/not *just* the/ |
17:00.12 | levi | Fun toy: http://www.typealyzer.com/ |
17:02.40 | unum | wow, xkcd is just soooooo wrong........... |
17:03.40 | fozzmoo | s/not the/not just the/ |
17:04.35 | tensai | they say "is this the case for electronic ballots", as if people aren't going to come up with more ridiculous ways to screw up electronic voting |
17:04.59 | tensai | aside from all the issues electronic voting already has |
17:05.10 | levi | unum: I like the previous one, Theft of the Magi. |
17:05.52 | levi | unum: And my friend who is a Chem professor loved 'A Bunch of Rocks'. |
17:06.56 | herlo | jsmith-away: have you not heard of paravirt_ops? |
17:11.59 | *** join/#utah gshipley_ (n=gshipley@nat/redhat/x-c071ae49fcfb58a3) |
17:16.38 | *** join/#utah elg (n=fugalh@dhcp25.cs.nmsu.edu) |
17:16.38 | *** mode/#utah [+v elg] by ChanServ |
17:16.54 | *** join/#utah thaddeusq (n=thaddeus@216.49.181.128) |
17:19.03 | elg | i'm a "doer" apparently. i'm also apparently a basketball-playing chick with pigtails and legwarmers |
17:19.26 | elg | it's actually not a bad analysis except for the outdoors part |
17:21.07 | jshipley | typealyzer got me entirely wrong, on every single MBTI point |
17:23.43 | *** join/#utah bbeattie (n=bbeattie@208.53.57.89) |
17:25.30 | elg | so you think, buahaha |
17:30.16 | *** join/#utah gshipley (n=gshipley@nat/redhat/x-3d92859f6c4420b9) |
17:31.53 | Jayce^ | http://www.antimusic.com/news/08/nov/21Guns_N_Roses_Release_Means_Free_Dr_Pepper_For_All.shtml |
17:31.54 | brac | [Guns N' Roses Release Means Free Dr Pepper For All - antiMUSIC News] |
17:32.02 | Jayce^ | Free Dr. Pepper :) |
17:33.41 | Sargun | fuck yah. |
17:33.45 | Sargun | Err |
17:33.51 | Sargun | s/fuck/not **** |
17:40.20 | harleypig | The fact that I like blue does *NOT* mean that I like ZoobieLand! |
17:40.47 | Jayce^ | paints a large Y across harleypig's backside, and drops him off at the U |
17:43.15 | fozzmoo | Sports. |
17:43.18 | fozzmoo | scoffs |
17:44.51 | *** join/#utah undertakingyou (n=will@undertakingyou.dsl.xmission.com) |
17:45.52 | harleypig | Jayce^: everyone has a y on their backside ... that little spot right below the small of the back where the butt cheeks start to curve out. |
17:45.56 | harleypig | :> |
17:46.45 | harleypig | and your all welcome for that wonderful imagery. |
17:48.03 | harleypig | s/your/you're/ |
17:48.47 | harleypig | nasty bad foul language ... she's back in town today ... |
17:48.53 | harleypig | I'm going for a JD lunch. |
17:49.39 | Jayce^ | harleypig, you'd better not be driving her around again |
17:49.58 | herlo | harleypig: is that the witch with a capital B? |
17:50.11 | harleypig | feh ... I have to play nice to prove to the judge that I'm doing all I can to facilitate her involvement with the kids. |
17:50.43 | harleypig | Bias against males in the Utah legal system is heavy and rampant. |
17:50.56 | harleypig | At least as far as family matters are concerned. |
17:51.42 | fozzmoo | http://www.newegg.com/Product/Product.aspx?Item=N82E16811997301 |
17:51.47 | fozzmoo | Question for y'all... |
17:51.50 | unum | that's common in most state courts |
17:52.11 | fozzmoo | Do you think these rack-rails can be used to mount on a 2-post (telco) rack? |
17:52.18 | fozzmoo | Like center-mount. |
17:56.12 | fozzmoo | Gawl. I didn't think this was a hard question. |
17:56.17 | fozzmoo | But it seems to have cleared out the room. |
17:56.55 | *** join/#utah wps_ (n=wps@208.53.47.251) |
17:57.47 | mrpull | fozzmoo: I'd guess not |
17:58.17 | mrpull | 2 post racks suck anyway :) |
17:58.28 | mrpull | shelfs and straps :-( |
17:58.33 | mrpull | shelves |
17:58.43 | fozzmoo | Well I know they suck. |
17:58.53 | mrpull | it's IRC tradition |
17:58.58 | mrpull | don't help solve the problem |
17:59.03 | mrpull | just tell people their problem sucks |
17:59.06 | fozzmoo | heh heh. |
17:59.35 | elg | mrpull: that sucks |
17:59.48 | mrpull | elg: it is your attitude that sucks |
17:59.51 | mrpull | ;-) |
18:00.07 | elg | wait, my attitude is not my problem, it's yours |
18:00.39 | fozzmoo | T-shirt design right there. |
18:00.45 | mrpull | it is true that it sucks that my attitude sucks |
18:01.03 | harleypig | or tell people what they're trying to do |
18:01.25 | herlo | harleypig: agreed! |
18:02.46 | elg | harleypig: you're trying to tell mrpull he's wrong |
18:02.46 | fozzmoo | You're just trying to eat grass! |
18:02.46 | harleypig | elg: yeah, trying to do too many things a once |
18:02.46 | herlo | harleypig: my agreed! was in reference to your statement about the state of Utah |
18:04.27 | unum | mrpull: I thought the tradition was to tell them that their chosen distro/program sucks |
18:04.45 | unum | ie: "I need help with exim" "exim sucks you should be using postfix" |
18:04.48 | mrpull | unum: that is part b |
18:05.03 | unum | we did that to some one on sllug this week and it actually worked |
18:05.22 | unum | he is repenting of his sendmail ways and is now using postfix |
18:05.30 | elg | shudders |
18:05.32 | mrpull | but part c says it can be generalized to. $yourway suck && $myway good |
18:05.53 | fozzmoo | http://hotair.com/archives/2008/11/20/video-new-congressman-plans-to-spend-all-his-time-at-the-office-literally/ |
18:06.02 | unum | I once got kicked out of a channel for asking about csh |
18:06.28 | *** mode/#utah [+o elg] by ChanServ |
18:06.35 | *** kick/#utah [unum!n=fugalh@dhcp25.cs.nmsu.edu] by elg (never mention that program) |
18:06.59 | harleypig | :D |
18:07.18 | mrpull | oh man |
18:07.43 | harleypig | wonders if unum knows a kick is no the same as a ban |
18:07.45 | *** join/#utah unum (n=unum@li32-229.members.linode.com) |
18:08.05 | elg | wb. be sure to avoid the-shell-that-won't-be-named |
18:08.37 | *** part/#utah albino (n=albino@69.12.222.214) |
18:10.28 | jshipley | how about fish or scsh |
18:10.42 | jshipley | ooh... mudsh sounds fun |
18:11.17 | elg | suspects he's afk and his client just rejoined him when I did /invite |
18:11.18 | unum | oops I wasn't paying attention... |
18:11.38 | unum | last time when I say the guy get op I said uh oh |
18:11.42 | unum | and then he kicked me |
18:11.46 | unum | we tried to get it on bash... |
18:15.02 | unum | this is an on topic discussion of gay marriage -> http://qntm.org/?gay |
18:15.30 | elg | ok, you lost me there |
18:15.43 | harleypig | wrong window? |
18:15.47 | *** join/#utah sjansen (n=sjansen@97-117-59-103.slkc.qwest.net) |
18:15.53 | harleypig | twisted understanding of 'on topic'? |
18:16.05 | harleypig | blatant attempt to wrest discussion? |
18:16.43 | sjansen | Anyone know of a F/OSS solution for spell checking an entire Web page or (even better) site? |
18:17.01 | unum | it's about designing a database to handle non-traditional marriare |
18:17.03 | fozzmoo | ispell? |
18:17.23 | jshipley | well, wget and ispell |
18:18.04 | fozzmoo | unum: it's a common fact databases are created by intelligent design. |
18:18.23 | fozzmoo | and therefore, do not support non-traditional marriage. |
18:22.19 | unum | fozzmoo: you've never seen one of my databases :) |
18:22.33 | fozzmoo | unum: I have a wide stance. |
18:23.47 | unum | uh.... |
18:25.13 | fozzmoo | unum: If you want to show me your database, I suppose I could show you mine. |
18:25.55 | sjansen | <PROTECTED> |
18:26.06 | sjansen | <PROTECTED> |
18:26.58 | elg | no, the stuff before the link lost me |
18:27.36 | elg | sjansen: cat site.html > /dev/null |
18:27.42 | elg | bingo! no misspelled words |
18:27.58 | sjansen | http://www.youtube.com/watch?v=E0Y16fm5IHc |
18:38.21 | *** join/#utah zzzirk (n=lzirkel@c-67-177-13-115.hsd1.ut.comcast.net) |
18:39.27 | mrpull | shatner on the sh*tter? I had to navigate away. |
18:41.10 | *** join/#utah Zelut (n=christer@ubuntu/member/zelut) |
18:41.39 | fozzmoo | sjansen: hee hee |
18:41.53 | Zelut | question for the perl geeks. how can I define a scalar as a regex? ie; my $search = some_regex; |
18:42.22 | fozzmoo | Zelut: it's just a string. |
18:42.52 | fozzmoo | my $search = '^...?meow'; |
18:43.12 | fozzmoo | Or you can do: my $search = qr/^...?meow/; |
18:43.35 | Zelut | I tried qr which always hits true, same with the string. |
18:44.15 | Zelut | what I'm trying to do is while(<FILE>) { if ( $search ) { push (@list, $_) } } |
18:44.35 | fozzmoo | Do if( m/$search/) |
18:45.16 | fozzmoo | Otherwise, you're just saying "if $search is non-zero" which it is. |
18:45.16 | mrpull | gotta match it... not test if is non-false :) |
18:45.27 | Zelut | hmm. I thought if ( $search ) was just a shortcut for m//, guess not. |
18:45.32 | Zelut | makes sense |
18:45.56 | Zelut | it all makes sense now |
18:46.32 | Zelut | I think I need to just lurk in here while I study teh Perl. I think redbeard2 is getting tired of PM questions ;) |
18:47.00 | fozzmoo | heh. |
18:47.04 | fozzmoo | I doubt he is. |
18:49.06 | Zelut | he's getting less and less responsive as the week draws out. |
18:49.21 | harleypig | Zelut: or just busier and busier :] |
18:49.46 | Zelut | so if I had used: my $search = qr/regex/; then I would not need to use ( m// ), correct? |
18:50.07 | Zelut | harleypig: he's not even on the road this week. how busy could he be? ;) |
18:52.41 | Zelut | ...looks like it still wants m//. I thought qr/foo/ defined it as a regex? ..but I guess it still needs to be told to m// huh. |
18:53.59 | *** join/#utah tiwula (n=lane@75.148.99.197) |
18:56.21 | fozzmoo | qr// doesn't make it a regex operation. it's just a fancy way of quoting the expression. |
18:57.07 | fozzmoo | Otherwise, you could do this: if ($string =~ qr/^...meow/) ... |
18:57.14 | fozzmoo | (and that doesn't work) |
18:57.46 | fozzmoo | Wait. |
18:57.52 | fozzmoo | I need to brush up on my stuff! |
18:58.00 | *** join/#utah fugue88 (n=dsowen@fugue88.dsl.xmission.com) |
18:58.07 | Zelut | this is what a co-worker told me. I'm just trying to get my facts straight. |
18:58.13 | fozzmoo | Looking at 'perldoc perlop |
18:58.17 | harleypig | $r = qr/somestuff/ |
18:58.25 | harleypig | $string =~ /$r/ |
18:58.28 | fozzmoo | <PROTECTED> |
18:58.31 | fozzmoo | <PROTECTED> |
18:58.34 | fozzmoo | <PROTECTED> |
18:58.56 | fozzmoo | Where $re = qr/$pattern/; |
18:58.57 | harleypig | $r looks like (?options:somestuff) |
18:58.57 | *** join/#utah mecworks_ (n=marc@nat/novell/x-cb03d1942852f5da) |
18:59.52 | fozzmoo | Why do it this way? It says 'Precompilation of the pattern into an internal representation at the moment of qr() avoids a need to recompile the pattern every time a match "/$pat/" is attempted.' |
19:00.37 | Zelut | thats what he was suggesting.. qr// precompiles the regex |
19:01.13 | fozzmoo | So, back to your original code... |
19:01.25 | fozzmoo | You had if ( $search ) |
19:01.43 | fozzmoo | Should be: if ($_ =~ $search) |
19:01.53 | sjansen | if $search contains anything at all. A string. A reference. A precompiled regex. |
19:01.54 | Zelut | ..which I understand now as basically "is $search non-zero", which doesn't help me. |
19:02.24 | harleypig | fozzmoo: if $search is a regex then if ( $search ) and if ( $_ =~ $search ) are equivalent. |
19:02.31 | Zelut | fozzmoo: so ($_ =~ $search) or ( m/$search/ ) are roughly equivalent, correct? |
19:02.43 | fozzmoo | harleypig: Really? |
19:03.04 | Zelut | is confused again now.. thanks harleypig |
19:03.13 | fozzmoo | writes some code. |
19:03.15 | sjansen | doesn't believe harleypig |
19:03.28 | harleypig | heh |
19:03.32 | sjansen | wants to see someone else write a test case to disprove harleypig's vicious lies |
19:04.06 | mrpull | I've got 50 cents that harleypig isn't right |
19:04.16 | harleypig | [harleypig@roster www]$ perl -e '$s=qr/12/;$_=1234;if($s){print"hi\n"}' |
19:04.16 | harleypig | hi |
19:04.37 | Zelut | how 'bout that |
19:04.37 | harleypig | hmmm |
19:04.43 | harleypig | [harleypig@roster www]$ perl -e '$s=qr/12/;$_=34;if($s){print"hi\n"}' |
19:04.43 | harleypig | hi |
19:04.45 | mrpull | what if $s is 0 |
19:04.47 | mrpull | ? |
19:04.47 | harleypig | that's a problem. |
19:05.11 | harleypig | No, I was talking about the special case of $search being a precompiled regex. |
19:05.12 | fozzmoo | my $re = qr/Dog/; foreach ( 'Dog', 'Cat' ) { if($re) { print "Found it\n"; } |
19:05.14 | Zelut | lol, $s is defined so its true; print "hi\n" |
19:05.16 | harleypig | I think I'm wrong. |
19:05.28 | fozzmoo | It prints "Found it" twice. |
19:05.42 | harleypig | Yeah, I'm wrong |
19:05.53 | fozzmoo | gasps |
19:05.57 | harleypig | Zelut: sorry about that |
19:05.57 | harleypig | D |
19:05.58 | harleypig | :D |
19:06.13 | Zelut | fozzmoo: but if (m/$re/) will work properly.. or if ( $_ =~ $re ) even? |
19:06.22 | fozzmoo | Yes. |
19:06.46 | Zelut | is there really any difference other than if ( $_ =~ $re ) is more specific--maybe more clear? |
19:07.15 | harleypig | Zelut: though, if you're using //, the m isn't needed. |
19:07.24 | fozzmoo | It's optional. |
19:07.26 | fozzmoo | I like it. |
19:07.27 | fozzmoo | :) |
19:07.30 | fozzmoo | A little more verbosity. |
19:07.37 | fozzmoo | Says, "Hey! I'm matching stuff here!" |
19:07.47 | sjansen | If you like verbosity, why not use if ( $_ =~ $re ) ? |
19:08.09 | fozzmoo | sjansen: Why use Perl at all? |
19:08.31 | Zelut | from what I've read it sounds like too many perl coders disregard verbosity for nasty one-liners. |
19:08.51 | Zelut | is reading "Perl Best Practices" in the early stages to try and avoid any bad habits. |
19:08.54 | sjansen | If you're gonna get all fancy with Mr. Invisible $_ then is a little m// really gonna make it easier to look yourself in the mirror in the morning? |
19:08.58 | fozzmoo | Zelut: Excellent plan. |
19:09.14 | fozzmoo | sjansen: You're right. |
19:09.15 | harleypig | Mr. Invisible $_ ? |
19:09.20 | fozzmoo | default scalar. |
19:09.40 | harleypig | I know what it is ... I've never seen that particular phrase. |
19:09.51 | Zelut | sjansen: I've decided that next time anyone asks me what I miss about GL that my answer will be "sjanen's wit" |
19:09.55 | fozzmoo | A better way: while(my $line <FILE>) { if ( $line =~ $search ) |
19:10.03 | mrpull | doesn't it normally go by The Scaler Who Shall Not Be Named? |
19:10.20 | fozzmoo | sorry... |
19:10.24 | harleypig | fozzmoo: for my $line ( <FILE> ) { ... } |
19:10.24 | fozzmoo | A better way: while(my $line = <FILE>) { if ( $line =~ $search ) |
19:10.31 | Zelut | fozzmoo: I think now we're getting into TMTOWTDI |
19:10.40 | fozzmoo | Zelut: It's inevitable. |
19:10.43 | sjansen | Really? Mr. Invisible $_ is all the rage in #painfully_awesome_perl_hackers |
19:11.05 | fozzmoo | PBP should discourage the use of $_. :) |
19:11.18 | harleypig | sjansen: I don't frequent #painfully_awesone_perl_hackers cause they all posers. |
19:11.44 | harleypig | fozzmoo: There are times where implicit use of $_ is ok. |
19:11.46 | Zelut | ok. well I prefer this while(FILE) method over my previous `grep` method. felt like cheating. |
19:12.04 | fozzmoo | hee hee. |
19:12.24 | Zelut | if I was just going to grep I may as well have used bash |
19:12.26 | harleypig | Zelut: what's wrong with @a = grep { } <FILE> ? |
19:13.02 | fozzmoo | Zelut: PBP also talks about Perl6::Slurp, if I remember correctly, as a better way to "slurp" the contents of a file. |
19:13.05 | harleypig | Zelut: wait til you see a grep { } map { } grep {} @array |
19:13.17 | Zelut | harleypig: does that grep support the same fanciness as m// ? |
19:13.40 | Zelut | has not learned map yet, but Jayce^ described it as High Order of Perl skillz. |
19:13.49 | harleypig | no ... grep {} ... you can put whatever you want into the {} block. |
19:13.55 | Jayce^ | zelut grep takes a pattern or a block.. so a pattern isa pattern :) |
19:13.56 | fozzmoo | grep() is similar in spirit to, but not the same as, grep(1) and its relatives. In particular, it is not limited to using regular expressions. |
19:13.59 | harleypig | Zelut: feh ... it's not that hard. |
19:14.21 | Jayce^ | harleypig, be gentle, he's new :) |
19:14.29 | fozzmoo | Some might say map() is a less verbose way of doing foreach iterations over a list. |
19:14.29 | harleypig | {} is a code block. grep { arbitrary perl code } @array |
19:14.48 | harleypig | Jayce^: :] |
19:14.52 | Zelut | in my previous cheating using `grep` I found issues between `grep` and `egrep` output. I was guessing I might have similar problems with @a = grep ... |
19:14.52 | fozzmoo | But it sure is handy. |
19:15.11 | fozzmoo | needs to drive to Logan and install a mail server. |
19:15.42 | harleypig | Zelut: General rule of thumb ... if you find yourself doing 'map { } @array', use foreach (@array) instead. |
19:16.02 | harleypig | But @array = map {} @otherarray can be very useful. |
19:16.05 | Jayce^ | harleypig, not necessarily :) |
19:16.18 | high_roller | does anyone do consulting here? I've been asked to do some work, but I'm trying to figure out what rate I should charge |
19:16.27 | fozzmoo | high_roller: What kind of work? |
19:16.29 | fozzmoo | Who's the customer? |
19:16.45 | harleypig | high_roller: how much do you think can fleece them for? |
19:16.48 | Zelut | let me read perldoc -f map first.. |
19:16.52 | high_roller | just basic admin stuff |
19:16.56 | harleypig | err ... I mean ... |
19:17.02 | fozzmoo | high_roller: also, ongoing? One-time? |
19:17.10 | high_roller | it will be ongoing |
19:17.16 | fozzmoo | I'll charge $100+/hr if it's a one-off job. |
19:17.54 | fozzmoo | If it's ongoing and amounts to several hours/week consistently, my rates will go down as far as $40-60/hr |
19:18.09 | fozzmoo | But if it's a neighbor and not a business, I'll go as low as $20. :) |
19:18.26 | high_roller | ok, thats good to know, thanks |
19:18.53 | fozzmoo | Advice: Don't tell them you go as 'high_roller' on IRC. :) |
19:19.06 | fungus | If it's windows add $50/hr, and if it's exchange add yet another $50/hr |
19:19.17 | fozzmoo | Oh yeah- I double my rate for Windows work. |
19:19.44 | fozzmoo | Exchange work... If I ever had to do it... I'd make them sign a waiver saying I wasn't responsible for blood stains. |
19:19.53 | high_roller | oh I don't touch windows servers |
19:20.03 | high_roller | or desktops |
19:20.17 | high_roller | this is side work, so I can afford not to have to deal with windows |
19:21.29 | Tene | Zelut: my @squares = map {$_ * $_} (1,2,3,4,5,6,7,8,9,10); |
19:21.35 | high_roller | I'd also be a terrible windows admin |
19:33.11 | jshipley | squares = [x*x for x in range(1,11,1)] |
19:33.18 | jshipley | I like that one better :) |
19:34.03 | harleypig | http://thepasseys.com/wp-content/uploads/2008/05/ute-fan.jpg |
19:34.53 | Zelut | harleypig: wow |
19:35.41 | jshipley | wow... sports fanatics are just sad |
19:36.15 | harleypig | Especially Zoobie fans ... |
19:36.21 | harleypig | looks around nervously |
19:36.52 | harleypig | Zoobie zoobie fan ... (to the tune of macho man) |
19:36.53 | jshipley | It would be like dressing up as Vader to go see the Episode 3 premiere |
19:37.34 | harleypig | I wanna go dressed as Leia as Jabba's slave ... |
19:37.48 | harleypig | Just think of the mayhem |
19:38.13 | jshipley | I'd love to see somebody standing in line dressed as Jabba |
19:38.30 | harleypig | Wasn't jabba nekkid? |
19:38.36 | harleypig | raises his hand |
19:38.39 | harleypig | I'll do it! |
19:38.39 | jshipley | meh, too fat to tell |
19:38.48 | jshipley | how about if you go dressed as Pizza the Hut |
19:39.10 | harleypig | People'd eat to much off of me ... |
19:39.16 | harleypig | I'd end up m issing body parts. |
19:39.44 | jshipley | Hmm... you could go to see Twilight dressed up as Pizza... and let the mortals know just how the vampires view them |
19:40.17 | harleypig | The closest I'll get to a Twilight movie is passing the suckers in line going to see Quantum of Solace. |
19:40.44 | jshipley | I've already seen more than enough of the Twilight movie, and that's just from the tv ads |
19:40.45 | harleypig | I'll yell "He gets staked in the end!" |
19:41.01 | sjansen | Zelut: Don't let the name "Higher Order Perl" scare you. That's just fancy fancy computer scientist terminology. The CS elite is convinced that commoners are too stupid, too lazy and unworthy of learning their secrets. So they hide it in scary terms to make themselves feel special. |
19:42.19 | harleypig | Definitely too lazy, hence unworthy. |
19:42.31 | sjansen | True to form, though, Perl doesn't setup all the standard walled gardens and ivory towers. Forget purity, this stuff is useful! TIMTOWTDI |
19:43.03 | harleypig | I've always thought that should be TIAMTOWTDI |
19:43.31 | jshipley | sjansen: "Higher Order" isn't all that scary... it's just a function that takes a function as input and returns a function |
19:43.37 | unum | There Is/Are More Than One Way To Do It? |
19:43.42 | sjansen | Higher Order just mans recognizing that the seperation between code and data is artificial. Code is data. |
19:43.54 | sjansen | s/mans/means/ |
19:43.55 | Tene | my @squares = map {$^a * $^a}, 1..* |
19:44.46 | harleypig | unum: A = Always |
19:45.01 | unum | ah |
19:45.03 | sjansen | jshipley: I'm think more about the associated terminology like "first class" and "functors" and so on. |
19:46.47 | jshipley | I've always thought it should be TOOTWDI... |
19:46.58 | harleypig | jshipley: That's python. |
19:47.03 | jshipley | sjansen: no doubt about it, functional programming can be kind of mindblowing at first |
19:47.27 | Zelut | someone remind me how to assign $value from the argument to ./command.pl value? |
19:47.37 | jshipley | harleypig: I know :) |
19:47.46 | harleypig | jshipley: ah :] |
19:47.54 | harleypig | Zelut: rephrase? |
19:48.08 | Zelut | harleypig: figured that didn't make as much sense as it did in my head.. |
19:48.22 | harleypig | :D |
19:48.25 | Zelut | harleypig: I run ./command.pl argument and I want 'argument' to be assigned to my $value;. |
19:48.46 | harleypig | Zelut: ah ... $value = $ARGV[0] |
19:49.51 | Zelut | harleypig: there it is. I was trying $ARGV[1] probably because I'm used to bash. $0 being ./command.pl, $1 being argument. |
19:51.27 | jshipley | or, $value = shift |
19:52.01 | harleypig | Zelut: funny thing is, $0 in perl is the program being run. |
19:52.35 | Zelut | harleypig: well thats just... inconsistent. |
19:53.00 | Tene | Zelut: you really want to use http://search.cpan.org/~rgarcia/perl-5.10.0/lib/Getopt/Std.pm |
19:54.02 | Zelut | Tene: I haven't even started with modules yet.. |
20:01.05 | Tene | Zelut: it's similar to getopt in bash. |
20:01.35 | harleypig | Is Getopt::Std part of the core? |
20:02.09 | harleypig | Guess it is |
20:20.25 | *** join/#utah Sargun (n=Sargun@atarack/staff/sargun) |
20:35.08 | levi | sjansen: 'Higher Order' doesn't have anything to do with code/data. It just means functions that can take other functions as arguments, or that can return functions as results. |
20:36.18 | levi | sjansen: You're thinking of homoiconicity. |
20:38.24 | levi | sjansen: There are lots of language that support higher-order functions that are not homoiconic. |
20:40.17 | levi | sjansen: Though, now that I reread what you wrote, I see what you were trying to say vs. what I interpreted it as, and I guess you knew what you were talking about. :) |
20:40.51 | levi | I.e., in higher-order languages, code (i.e. functions) are first-class data objects. |
20:43.19 | sjansen | Tene: Of course, in Perl6 there's still more than enough rope to shoot yourself in the foot. |
20:43.20 | sjansen | eightyeight: You can shoot your self in the foot with rope? |
20:43.20 | sjansen | sjansen: You can in Perl. It's just that kind of language. |
20:45.12 | sjansen | levi: Thank you for illustrating my point. |
20:45.27 | sjansen | Zelut: Don't worry. Using Perl won't make you homoiconic. |
20:45.31 | sjansen | ;-) |
20:45.38 | levi | Heh. |
21:07.10 | *** join/#utah wps (n=wps@208.53.47.251) |
21:08.31 | *** join/#utah wps (n=wps@208.53.47.251) |
21:12.43 | sjansen | http://www.windley.com/archives/2008/11/the_conservative_view_on_guantanamo.shtml |
21:12.55 | sjansen | Who would've thought I'd actually agree with Phil Windley about something. |
21:16.53 | elg | sjansen: I don't know the answer to that question |
21:17.36 | tensai | elg: who'd have thought you wouldn't know the answer to that question? |
21:17.58 | elg | harleypig would have thought I wouldn't know the answer to that question |
21:18.13 | elg | but only because Jayce^ told him to think so |
21:18.33 | elg | and we all know Jayce^ is just ibot's puppet |
21:29.43 | tensai | ~puppet |
21:32.54 | elg | ~puppet it <reply>Jayce^ |
21:33.03 | elg | ~puppet is <reply>Jayce^ |
21:33.03 | ibot | elg: okay |
21:39.41 | elg | goodbye puppet |
21:39.48 | elg | makebelieve time is over i guess |
21:41.55 | levi | Yay, weird obscure bug turned out to have an easy fix. |
21:47.25 | Zelut | Is there a cleaner way to do this: |
21:47.41 | Zelut | foreach my $line (@array) { print $line } |
21:48.11 | jlp_work_ | Zelut: doesn't print @array do what you want? |
21:48.47 | Zelut | jlp_work_: normally yes, but I need to print via a module (Irssi::print) which, for some reason, prints the # lines in an array, but not its contents. |
21:49.10 | jlp_work_ | ahh, it's taking the @array in scalar context |
21:49.16 | Zelut | jlp_work_: but it prints $line just fine, so I figured I'd have to pull them out.. |
21:49.25 | Tene | Zelut: print for @array |
21:49.55 | Tene | Wait, does that work in Perl 5? |
21:50.16 | jlp_work_ | Tene: looks like it does |
21:50.16 | Zelut | Tene: or, my example should be: foreach my $line (@array) { Irssi::print $line }. I have to use than module. |
21:50.39 | Tene | Irssi::print for @array; |
21:50.42 | levi | Evil, evil perl. :P |
21:50.51 | jlp_work_ | chuckles |
21:50.57 | elg | silly silly perl |
21:51.28 | levi | You're right, it is a silly kind of evil. |
21:51.29 | Tene | levi: which part is evil there? |
21:51.40 | Zelut | Not enough arguments for Irssi::print at (eval 114) line 46, near "Irssi::print for " |
21:51.43 | Tene | Not saying it's not, just wondering which you were noticing. |
21:52.01 | Tene | Zelut: Ah. print $_ for @array |
21:52.01 | levi | It's not so much the parts of perl that are evil. It's just the conglomerate. :) |
21:52.17 | Tene | erm... Irssi::print $_ for @array; |
21:52.24 | levi | The ad-hocity of it all. |
21:52.53 | Zelut | Tene: that works. looks like it needs a chomp though. Too many newlines. |
21:53.02 | Tene | levi: I'm curious about whether you feel that's less so or more so in Perl 6. |
21:53.15 | Zelut | Tene: chomp $_ for @array; ... /me is taking a wild guess. |
21:53.21 | Tene | Zelut: yes. |
21:53.23 | Zelut | Tene: or just chomp @array; I suppose works doesn't it. |
21:53.32 | Tene | No, that form doesn't work. |
21:53.55 | Tene | wait, yes it does |
21:54.01 | Tene | I've just never used it. You're right. |
21:54.05 | levi | Well, Perl 6 seems to throw in even more random 'hey, cool stuff!' bits, but also seems to try to make the whole language hang together better. But I haven't really looked at them closely enough to make a real judgement. |
21:54.09 | Zelut | I could have sworn I'd used it before.. |
21:55.07 | levi | I've been concentrating lately on Factor, which turns out to be a wicked awesome language that will undoubtedly fail to take over the world. :) |
21:55.50 | Zelut | where is the best place to close(FILE); ? I have open(FILE, "<foo"); while(<FILE>) { blah; return } |
21:56.04 | Tene | Zelut: after the while. |
21:56.51 | Tene | I looked at factor, but I had trouble getting interested in it. I saw a whole lot of "Hey, we use a stack! That's how you pass arguments around! It's a stack! Look, stacks!" but not much beyond it. |
21:57.31 | sjansen | Factor! It's Forth for the new generation! |
21:57.40 | Tene | It was weird seeing the calling conventions discussed so heavily. |
21:57.56 | Tene | Or I'm misremembering, as I think most times i tried to read about it were late at night. |
21:58.15 | levi | Well, it's certainly the first thing you've got to come to grips with when you play with it. |
21:58.29 | levi | Concatenative language theory is kind of interesting, though. |
21:58.55 | Tene | I kept thinking I was missing something exciting about using stacks to pass data around. |
21:58.55 | sjansen | Zelut: I would discourage "foo($_) for @array;" in all but the most trivial situations. Sure "for my $line (@array) { foo($line); }" takes three times as many lines, but they're good lines. |
21:59.10 | levi | Instead of building programs based on applying functions to arguments, you write them by composing functions through concatenation. |
21:59.16 | Tene | sjansen: 'chomp' and 'print' aren't trivial situations? |
21:59.39 | levi | Tene: The stack itself is just a convenient way to get the concatenative property. |
21:59.50 | sjansen | Tene: Not if you need to use both at the same time. |
22:00.36 | Tene | levi: seems like you should be able to automate translation between the two styles, yes? |
22:01.54 | levi | The interesting thing about concatenative languages is that they strongly punish writing long, convoluted, special-purpose code. Small concatenative programs are incredibly simple to read, while long ones quickly become opaque. So, refactoring into small chunks becomes second nature. |
22:02.23 | levi | Tene: Yes, and in fact, that is done *in Factor* to support things like named local variables and whatnot. |
22:02.46 | Tene | So it's just a different calling convention then, right? |
22:03.37 | levi | Well, I don't think it's 'just' a different calling convention. |
22:03.55 | Tene | What are the significant consequences of it, then? |
22:05.00 | levi | It significantly changes the style of programs that are written. |
22:05.07 | Tene | Hmm. |
22:05.28 | levi | It also makes parameters and return values symmetric. |
22:05.53 | levi | Anyway, there's a lot more to Factor than just being stack-based. |
22:06.29 | Tene | I remember having trouble finding that. I kept thinking "Okay, yes, it's stack-based, I get it, can we move on please?" |
22:06.48 | levi | You don't seem to have made much of an effort to do so. |
22:07.00 | Tene | No, I probably didn't. |
22:07.34 | levi | Anyway, I'm working on a paper describing it for a class. I'll let you guys see it when we're done. |
22:07.51 | Tene | Great! |
22:10.37 | levi | Aside from being stack-based, Factor also does higher-order functions, has an extensible parser, is homoiconic, is largely implemented in itself, and compiles to machine code. It's also got a lot of neat libraries. |
22:11.52 | Tene | I seem to have trouble being interested in things outside of the perl world. I'm probably missing out on a lot of interesting things. |
22:12.29 | levi | Indeed, there are lots of interesting programming languages that are not Perl. :) |
22:19.23 | Sargun | forth? |
22:19.39 | Zelut | ok, I'm baffled.. |
22:19.41 | Zelut | open(FILE, "<$autolog_path") or die "EPIC FAIL: $!"; |
22:19.51 | Zelut | reports EPIC FAIL: No such file or directory. |
22:20.15 | Zelut | _but_ I have it print $autolog_path; before the die and the path it prints is copy/paste accesible when I try. |
22:22.50 | Tene | add a space after the < |
22:22.59 | Tene | even better, pass the < as a separate argument. |
22:23.12 | Tene | open(FILE,'<',$autolog_path) |
22:24.17 | unum | http://www.americancivicliteracy.org/resources/quiz.aspx <- this quiz is mentioned on /. |
22:24.30 | unum | and I think it's a bogus quiz(I only missed one question by the way) |
22:26.17 | unum | "The matter is complicated by the fact that the historical Socrates seems to have been notorious for asking questions but not answering, claiming to lack wisdom concerning the subjects about which he questioned others." <- socrates didn't believe you could know anything |
22:26.25 | unum | that question is completely wrong |
22:26.35 | unum | oops wrong channel |
22:27.09 | Zelut | Tene: oddly, using the same syntax, it can find other files.. |
22:28.02 | Tene | Zelut: ah, according to the documentation, whitespace there is irrelevant, so you're right. |
22:28.49 | Zelut | I tell it to print $path, which I can then manually list in the shell and everything works.. |
22:28.56 | Zelut | but when the script tries to do it, EPIC FAIL. |
22:29.13 | Tene | Zelut: you sure you're in the right directory? no cd and such? |
22:29.19 | Tene | system('pwd') |
22:29.44 | Zelut | Tene: its giving what I would assume is a full path, ~/logs/dir/file.log |
22:29.50 | Zelut | Tene: does it not translate the ~ properly? |
22:30.48 | Tene | looks like no. |
22:36.09 | Zelut | Tene: did some testing and it looks like it does resolve ~ properly.. |
22:36.26 | Tene | huh |
22:39.08 | Zelut | this is really stumping me.. |
22:40.00 | Tene | Zelut: strace it |
22:40.05 | Tene | see what it tries to open. |
23:04.00 | *** join/#utah gerberb (n=gerberb@opensuse/member/Gerberb) |
23:22.19 | *** join/#utah ibot (i=ibot@rikers.org) |
23:22.19 | *** topic/#utah is http://plug.org/irc | Channel log @ http://ibot.rikers.org/%23utah/ | Topic? Topic? We don't need not stinkin' topic! |
23:22.19 | *** mode/#utah [+o ibot] by ChanServ |
23:23.31 | *** part/#utah bbeattie (n=bbeattie@208.53.57.89) |
23:26.07 | *** join/#utah mrpull1 (i=xmjake@xmission.xmission.com) |
23:29.25 | mrpull1 | python geeks... |
23:30.12 | Heartsbane | so |
23:30.25 | mrpull1 | actually, I may have answered my own question |