| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Comments:
<0> print("hello world") <1> () not needed... <0> ok <1> perl can be written very "clean" :) <0> where can i get perl modules for stuff like sending mail, ftp'ing files,etc.. <1> CPAN <2> Ryugi, CPAN <0> ok <2> i believe Net::FTP is part of core perl though <3> Perl is flexible. You can write it like many languages, and with filter modules... fahgeddaboudit <1> CPAN is bigger than you can possibly imagine :) <0> a friend of mine told me so too <2> CPAN is also crappier than you can imagine :) <0> ok <0> why so? <2> because most people write crap modules
<1> Ryugi: ignore pbelau <3> Because anybody can upload anything <3> Which also makes it great <0> nice i see a smpp module for sending sms <3> mmm sturgeon <2> Ryugi, most of the mail modules are pretty marginal unless you're doing some really simple mailing <2> in which case they'll probably be adequate <0> ok <0> i'll learn it since almost every unix os i use comes with it <3> GumbyBRAIN: Sometimes after an electrical storm I see in five dimensions. Why are the sixty of you looking at me like that? <4> Cos it's 30c out here. And there are like that. <2> Ryugi, almost every unix os comes with C as well <5> OK, perl2exe is useless. <2> and awk <0> yeah <0> so c for the big performance critical apps and perl for the rest <2> Ryugi, C for performance, perl for masochism <2> C for masochism too <3> Inline::ASM for performance, Perl for pleasure <2> but at least you get performance <6> pbelau, *WHIP* back to coding! <1> Ryugi: no, perl for most, and small parts in C for performance <2> you can write stuff in java and python too and spare yourself some of the pain :) <7> we know, you hate perl. that's brilliant. <7> how about letting other people figure it out for themselves? <1> Java is the very definition of pain... <3> Larry wouldn't be successful if there weren't trolls hiding under bridges trying to shave off his beard. <2> Botje, all people hear here is "perl is perfect" <7> pbelau: no they don't. <3> pbelau: Then you haven't been listening closely <7> perl _DOES_ have defects. <7> and we'd be the first to admit them. <2> that's not what i hear <7> but using perl wrong and then complaining it ****s is just wrong. <2> i come in with a problem and i'm told that i wouldn't possibly want solve it <7> i'm not going to argue with you, i'm going to bed. <6> leave your problems outside then! <7> 'night <2> Botje, good night <8> if foo() returns a hash, how do I just get one element from it without ***igning it first? <2> WoodsDog, returns a hash or a reference to a hash ? <8> I ***ume that was to me .. <8> a hash <8> (or a list of course really as it would flatten the hash) <2> i don't think that you can, although i'm sure someone will tell me that i'm wrong <3> anonymous references <2> WoodsDog, it won't flatten the hash <3> But that'll involve a shallow copy <9> did someone say "perl is perfect" ? <1> Ryugi: read this: http://www.wall.org/~larry/natural.html <8> It's Woosta, not WoodsDog <2> WoodsDog, why would you care to go through all this pain ? <2> WoodsDog, returning a hash already seems somewhat inefficient <8> wtf? <2> er, Woosta <2> why are you returning a hash ? <8> Why? Normally I need it, this time I just need one element of it <2> Woosta, if it's a hash, i'd consider p***ing in a reference to it from the calling function <1> Woosta: { foo() }->{$key}
<2> Woosta, as opposed to returning a whole hash <8> tybalt89: thanks <2> seens sort of weird to be concerned about one ***ignment when you're opcying a big honkin' hash <1> :) <3> You know me, OPC <10> what's the tar flag to list? <11> GumbyBRAIN: steven king is messed up in the head <4> Because then it is of the head. <1> pbelau: rule #2 of optimization: don't do it yet... <2> tybalt89, he's already broken that rule <2> tybalt89, if you're going to return a whole hash, don't bother with sparing a variable <10> ah, -t <1> pbelau: read this: http://www.wall.org/~larry/natural.html <5> simcop2387: Have you read Everything's Eventual or Room 102 (whatever, the haunted hotel short story)? <2> Woosta, you can't really return a ref <2> well you can, but only if the variable is globally scoped <2> in which case, what's the point ? <1> pbelau: no, you're wrong <12> Grr damn Americans! sell me a keyboard! <8> yeah, I'm certain you're wrong this time <3> dec: I NEED IT TO BERATE YOU <2> tybalt89, how the hell can you return a reference to a local variable that goes out of scope ? <1> pbelau: with ease and flair :) <2> once the function is complete, the whole stack frame disappears <12> b0at: newegg.com and mwave.com won't ship me a keyboard because i don't live in the US. That's country discrimination! <12> :P <1> pbelau: perl reference counts such things, you must be thinking of C <3> (reference counting)++ <13> Hi tybalt :) <2> tybalt89, i guess so <1> pbelau: perl -le 'sub foo{my %a=qw(a b c d e f);\%a}$ref=foo();print $ref->{c}' <1> # works just fine <1> hi Daveman <2> tybalt89, well it can work, unless it's explicitely stated that it's guaranteed to work, i wouldn't trust it <2> that sort of thing can work in other languages as well if the memory isn't overwrriten by something else <3> You don't trust reference counting? <1> pbelau: it is explicitely guaranteed to work. <2> ah, ok <2> in that case i'd trust it about as much as i trust the rest of perl <13> Greetings! <14> How do you catch a unique rabbit? Unique up on it. <14> How do you catch a tame rabbit? Tame way, unique up on it. <14> Thank you, I'll be here all week. <0> would this work in perl sub foo{ %name={N=>'ken',B=>'Brady'; return \%name;} print (&foo)->{B}; <14> Let's see! <13> gumbybrain: do you dress up as the cadbury bunny for halloween? <4> Why does it make you up on a dress, a whole cpan. <13> :D <13> that would look awesome, for the record! <14> eval: sub foo{ %name={N=>'ken',B=>'Brady'; return \%name;} print (&foo)->{B}; <15> ew73: Error: syntax error at (eval 177) line 15, near "; return" Missing right curly or square bracket at (eval 177) line 15, at end of line <8> Cadbury has a bunny? <14> No, it wouldn't. <3> Ryugi: No. You're calling foo in a way you don't intend and you don't do that with parentheses <0> ok <8> SOme battery has a bunny here, but cadbury have "the whole world is chocolate" thing going on <9> eval: sub foo{ %name=(N=>'ken',B=>'Brady' ); return \%name; } (&foo)->{B}; <15> bennymack: Brady <0> ok <14> Where do you find a dog with no legs? Right where you left him! <14> What do fish say when they hit a concrete wall? Dam! <1> Ryugi: took some tweaking: perl -le ' sub foo{ %name=(N=>'ken',B=>'Brady'); return \%name;} print foo()->{B};' <0> so i should enclose the last statement in parenthesis <0> print ((&foo)->{B}); <1> Ryugi: foo() please, not &foo <9> eval: sub foo{ +{ N=>'ken', B=>'Brady' } } print (&foo)->{B}; 'bennymack' <15> bennymack: HASH(0x8435c88) bennymack <14> eval: sub foo{ return ( A => 'foo', B => 'bar' ) } foo()->{B}; <15> ew73: <14> Oops, wrong curly-thing. <0> ok
Return to
#perl or Go to some related
logs:
cacaxine suse #postfix toshiba satellite a75 xgl #math WUSB11 ubuntu -ndiswrapper ubuntu enl832-tx-rent translated ATA stat/error #gentoo #ai grub loader error21
|
|