@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
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



Comments:

<0> damn dirty parasites
<1> oh... the ones with the gill sticking out of the neck?
<2> .. http://article.gmane.org/gmane.org.user-groups.linux.portland/9843
<3> merlyn's url is at http://xrl.us/knag
<2> just a bit of "legal" humor
<4> oh, yapc::eu 2006 are out
<4> end of august, 30-1st Sep iirc
<4> *dates. yapc::eu *dates* are out.
<5> I have an (expensive) routine foo(x), and I have an array @X of values I need to use frequently. To speed things up, I want to build a hash { x -> foo(x) } out of this array. I could simply do it in a while loop, but I'm looking for something more complicated. Can I do it with map?
<4> frostschutz: perldoc Memoise
<6> "I could simply do it in a while loop, but I'm looking for something more complicated."
<6> this .. boggles me
<6> please explain.
<5> ...or something that could be used in an expression without adding another subroutine
<4> frostschutz: Memoise!
<2> perlbot, xyz problem



<7> <reply>They ask how to do Z, but that's because they think they want to do Y and think that Z will get them there, but really it's because they're a lunkhead, and that's the main (X) problem
<6> lol
<4> Botje: Phrenology to the rescue! You see the recessed eyes? Clear sign of being a PHP programmer
<6> Memoize is indeed nifty.
<6> integral: ah, yes. Now that you mention it, the grunting noises kind of give it away
<2> PHP is great - it keeps most of the visual basic types away fromPerl
<8> http://juerd.nl/php_perl
<2> and as long as they keep saying "python is easier to learn", we won't have to deal with newbies in Perl either
<4> And as long as ruby on rails is hyped, we won't have to touch web frameworks
<2> and we hope Ruby on Rails keeps catching on, so we won't create any more Perl frameworks (we have enough)
<2> bing!
<4> heh
<2> was typing the same thing
<2> and with Java around, no more need to have "embedded perl"
<2> eventually - we can concentrate entirely on golfing japhs!
<4> *sigh* poor tcl. poor lua
<9> mod_perl + mason .... that's all u need :)
<4> people keep going on about refactoring editors, but none have specialised japh functions
<4> hmm, I wonder if there is a relationship between proof strategies and refactoring.
<2> or between proof strategies and 100 proof
<10> mason is going to lose
<11> integral: gotta be :)
<9> love mason & Chris62vw u should too :)
<10> mod_cure, I was talking about George Mason, vs Florida :-)
<9> :)
<11> g-moo
<12> mason
<12> gross merlyn
<2> gross?
<4> hmm, I'd forgotten about chicken
<13> How can you forget about chicken?
<14> are you a chicken man like the outboack commercial guy?
<15> a file handle FF in a array context as <FF> reads the whole file as lines of array?
<16> xahlee: yep.
<15> thanks
<4> xahlee: it's called "list" context.
<16> xahlee: you might want to use a lexical scalar for a filehandle
<4> an array is an actual "object"/thing. You can splice it, etc.
<4> A list is a lot more like a value-type
<17> I have a stupid question I'd like to ask
<12> brettnem: so ask it then
<15> btw, why should file handle be a string?
<4> xahlee: it should?
<17> is there a way, via compiling or such to make a typical perl script execute more effeciently?
<15> never got a clear answer to that
<4> brettnem: not really
<18> Hmm, I'm having trouble getting my simple program to use HTTP::Request on the campus computers. It looks like the appropriate module is in a nonstandard place: /lusr/perl5.8/lib/site_perl/5.8.0/HTTP/Request.pm How can I point perl at this?
<19> brettnem: better choice of algorithm.
<15> integral: zamolxes is saying
<12> xahlee: it shouldn't
<12> xahlee: in fact, it can't be.
<16> using pperl :)
<19> brettnem: coding speed critical parts in C
<19> brettnem: etc.
<18> Can't locate HTTP/Request/Common.pm in @INC (@INC contains: /u/eperez/perl/lib/site_perl//5.8.0 /u/eperez/perl/lib/site_perl/ /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./lookup.cgi line 4.
<18> BEGIN failed--compilation aborted at ./lookup.cgi line 4.
<4> xahlee: no, he's saying it should be lexical. I have no idea where you pulled "string" from.
<4> mini0n: try installing it.
<18> as a user, non-root?
<4> sure.



<4> perlbot life with cpan
<7> Information pertaining to the Comprehensive Perl Archive Network (CPAN) can be found at http://sial.org/howto/perl/life-with-cpan/
<19> tag_: what do you mean that a file handle can't be a string?
<12> PerlJam: if it's a string, it's not a filehandle
<17> I've wrote a script using Cache::BerkeleyDB and LWP::UserAgent. I'm concerned that the LWP portion may be slow if there are many simulatnious requests
<5> Stupid question again, sorry. I need a hash reference on whatever. I can do it by using my %h = whatever; and then using \%h -- how to do it without this variable?
<18> so how would I install it?
<11> frostschutz: the {} anonymous hash construction operator
<4> mini0n: I just pointed you at "life with cpan"
<15> integral: so, you prefer $fh or FH?
<18> gotcha
<11> frostschutz: perldoc perlreftut
<20> The perldoc for perlreftut - Perl references short introduction is at http://perldoc.perl.org/perlreftut.html
<4> xahlee: I prefer the first. A lexical variable into which a handle is autovivified by open.
<15> lol
<4> alternatively you can use IO::File, which does have a better interface than open :-)
<4> lol?
<19> tag_: perl -le 'my $foo = "foo"; open $foo, $foo or die; print <$foo>; print $foo' $foo is both a filehandle and a string.
<15> integral: what the hell does that mean?
<19> tag_: granted, that code isn't strict-safe :-)
<15> autovivified
<4> xahlee: which word?
<17> anyone know of a way to do persistant http requests? ie: connect to a web server and keep pumping requests to it and waiting for responses?
<7> Gumbybrain__ wanted you to know about "BQS": Bot Query Syndrome - if you're reading this, stop talking to the bot, talk to real people instead.
<21> perlbot: Wtf is a bot you know.
<7> I already have an entry for Wtf
<4> xahlee: ah, it means, perl's expecting the variable to contain a data structure, but it sees that it's empty, so it creates one
<11> PerlJam: and of course the old-fashioned syntax is just a bareword, which is syntactically a string :)
<5> hobbs: thanks, for some reason I kept trying %{whatever} ...
<19> hobbs: indeed.
<4> happens with filehandles, arrays, hashes etc when working with them as references in scalars
<12> PerlJam: Suddenly I remember why I don't use perl much anymore
<22> tag_: HERESEY!
<15> integral: so why's $fh better then FH?
<12> xahlee: it's lexical
<4> xahlee: it's lexical.
<23> Hrm. What the hell? Error accept Too many open files (24) happened after Cleanup!
<12> PerlJam: pike is so cool, but it suffers from a lot of things.
<15> tag_: as opposed to what?
<12> buu: you have too many open files dip****
<15> what do you call FH?
<23> tag_: 24?
<12> xahlee: a non-lexical filehandle
<22> buu: thats what you get for screwing with rlimits!
<19> xahlee: FH is a bareword
<12> xahlee: BTW, the opposite of lexical is usually something that's global
<15> tag_: so what's the adv of being lexical?
<4> xahlee: Do you know what "lexical" means? Have you also heard of dynamic scoping?
<12> xahlee: it's cleaner. The filehandle only lives as long as the scope it is defined in.
<19> xahlee: you have fine control over the lifetime of the variable and thus the file's state
<24> what is your header for downloading files?
<24> i totally forgot
<15> ok, i think it basically comes down to that FH is a hack and should be avoided.
<23> tag_: But wha the hell generates that error?
<11> xahlee: for one thing, it's easier to p*** the hande between packages without screwing it up
<25> xahlee: perl itself is a hack
<2> FH is legacy
<2> and works fine, once you're aware of the limitations.
<15> got it. Thanks all.
<2> it's also simpler than a lexical filehandle
<2> open FH, "<somefile" or die;
<2> while (<FH>) { ... }
<11> merlyn: not really
<19> xahlee: for instance, my $content = do { open my $foo, "<", $filename or die; <$fh> }; # $fh only exists in that little block where it is needed an no where else.
<2> simpler than
<2> open my $FH, "<somfile" or die;
<13> merlyn: How is that easier than open my $fh, "<somefile" or die; ?
<22> GumbyBRAIN: busybox
<15> merlyn: are you Randal S?
<21> simcop2387: Steven, ever make it easier for people who want to insure me.
<2> while (<$FH>) { ... }
<2> yes
<15> ha ha. Hi.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

the postfix SMTP server must run
ubuntu obconf broken
#suse
#gaim
#php
#gentoo
dovecot printscreen
mount special device none does not exist
ubuntu zt3000
rpmq ubuntu



Home  |  disclaimer  |  contact  |  submit quotes