@# 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 26 27 28 29



Comments:

<0> perlbot paste
<1> Paste your code and #perl will be able to view it: http://sial.org/pbot/perl http://dragon.cbi.tamucc.edu:8080 http://erxz.com/pb
<2> |SkyBlue|: you aren't a *little* off, you're *way* off. start over, go read a tutorial. you're *not* going to guess out how Perl's OO works.
<3> I read the tutorial once...but all the talk of $cl***, $method, $self...gets me confused, so I'm trying to create an object instead of using the samples to understand it...it's how my brain works, lol
<0> |SkyBlue|: it's quite important. actually.
<0> brute force programming only leads to ****ty code
<0> which leads to anger
<0> which leads to frustration
<0> which leads to .. the dark side :[
<2> is the dark side hiring? is it easier to get in there than Google?
<3> lol
<4> every now and then, when a new SW movie comes out, one of their top guys gets offed and there's a vacancy to be filled
<4> but I wouldn't count on it happening too often
<5> any idea why Net::POP3 would start failing to ***ign $blah = $popconnection->getfh(); after looping through the first couple hundred of several hundred messages?
<5> like 400 messages, and around 200-300 it just fails to ***ign $blah



<6> "SkyBlueshoes" at 67.64.107.198 pasted "OOP (S)!" (69 lines, 1.3K) at http://sial.org/pbot/15778
<5> and spits out errors that it coudln't read the <$blah> fh for the last hundred or so messages
<2> maybe it is ***igning but the FH is now false...
<4> wallshot: I'm guessing your OS is limiting how many files you can have open at a time
<4> wallshot: close the FHs sooner, I suppose
<5> hmmmm
<5> oh ...
<5> should i close($blah) after i'm done with it? :)
<4> that's always a good plan
<7> and I apologize, but this is the first time I've tried to create modules and objects, usually I throw everything into one file and call it quits, but I'm trying to get into a better scripting format
<4> and it helps prevent these kinds of limitations
<5> i shouldn't be hitting 1024 open files but eh
<0> SkyBlueshoes: well
<0> see that return DBI->connect ?
<7> yes
<0> that constructs a DBI handle
<2> SkyBlueshoes: read perldoc perltoot
<7> oh..ok...
<8> The perldoc for perltoot is at http://perldoc.perl.org/perltoot.html
<0> so NOT a Database.pm object
<7> you can't create an object of a handle, nor a reference....
<7> got it...
<0> sure you can ..
<0> but you return a DBI object
<9> wallshot: it's possible something has set the limit to be a lot lower
<0> and somehow expect perl to magically treat it as a Database object
<5> hmmm that'd be a shame
<0> not going to happen. you need to bless it yourself
<0> and most objects (especially not DBI) don't take lightly to being reblessed
<9> wallshot: that is up to you to check for anyway
<7> ok, so what if I DBI->connect in the main script and put all my methods in Database.pm...would that be better?
<5> hmmmmz
<5> i checked with ulimit
<7> then I wouldn't have to rebless
<7> right?
<2> wallshot: if you're poping, you shouldn't need more than one filehandle...?
<5> one per message
<5> analyze message
<5> loop to next message number
<5> repeat
<5> hrmmm close may have helped
<2> SkyBlueshoes: there's no reason you can't make an object that *contains* the reference to the dbh... but the dbh would be instance data, not the reference you return.
<5> only the last message now fails to get a fh...
<2> sounds like an off-by-one error.
<5> sure does
<5> hmmmm
<5> but pop messages count from 1, not 0
<7> so how do I create an object that references the dbh and use that in my methods?
<7> sub new_db { return /DBI->connect blah
<7> ?
<2> SkyBlueshoes: I could type a tutorial up for you, but it wouldn't be nearly as good as perldoc perltoot
<8> The perldoc for perltoot is at http://perldoc.perl.org/perltoot.html
<9> wallshot: you aren't using the ->list method?
<2> SkyBlueshoes: it'll take you about half an hour. you could easily waste that same amount of time here.
<7> I've read perltoot and I got O'Reily's Advanced programming which talks about horses and cows or something
<2> SkyBlueshoes: *then* write some code that has a chance of being correct and ask for input on that.
<0> read them again ..
<7> lol
<0> really.
<10> If all you got is horses and cows, yeah, I'd read them again.
<11> SkyBlueshoes: You are the author of umm... that channel bot?



<7> ok, I'll try, but I ran out of my ADD meds
<7> yes...
<4> right, there should at least have been three goats in there too
<7> the Christian one y'all were talking about, that's right
<4> or is that three goatse?
<11> SkyBlueshoes: OK. Just thought the nick was familiar.
<11> SkyBlueshoes: I wasn't talking about it, but I looked at the website.
<5> mmm 3some of goats
<7> and I got Tk to work with Net::IRC
<7> :D
<11> Using the words "work" and "Net::IRC" in the same sentence is sketchy.
<7> you use $GUI->after(500, sub { do_one_loop() }); to incorporate the loops
<10> http://www.stupendous.net/archives/2005/02/09/****-the-god-of-war/
<12> ew73's url is at http://xrl.us/jv5k
<13> WSMITH rather
<13> (typing while holding icecream cone)--
<9> .see wsmith
<9> .seen wsmith
<14> wsmith was last seen 8 days and 41 seconds ago, quitting FreeNode (Read error: 110 (Connection timed out)).
<15> .seen dead_people
<14> Sorry, I haven't seen that person.
<9> Alias_: are you sure it's the right wsmith though? :)
<13> yep
<13> he lists this channel as his community reference for DBI::Dumper
<11> This channel has less directed behavior than a school of seamonkeys on crack.
<11> But we ARE a nice community.
<16> Ergh...?
<16> For some reason, on my system, POSIX::mktime( 0, 0, 0, 1, 0, 70 ) == -3600
<0> so we're NICE crackhead seamonkeys?
<0> that's cool.
<0> LeoNerd: local time adjustment
<16> I.e. epoch time (1st Jan 1970 00:00:00)... What have I done wrong? I was expecting 0
<11> Botje: No, the community is nice, we tend to be bitchy crackhead seamonkeys.
<0> $ perl -MPOSIX -le 'print POSIX::mktime( 0, 0, 0, 1,0, 70 )'
<0> -3600
<16> Yeah.. that's 1 hour off... :/
<16> Is that likely to be so on all systems,..?
<0> any system not at GMT :)
<15> $ TZ=GMT perl -MPOSIX -le 'print POSIX::mktime( 0, 0, 0, 1,0, 70 )'
<15> 0 but true
<16> Oh.. :/
<16> So should I fiddle with $TZ then?
<17> hey mauke
<15> if you want 0, why use mktime()?
<16> I'm writing a scanftime() function; give it a string and a strftime()-like format, and it'll pull it apart
<15> what, like strptime?
<16> ..? wherebethat?
<15> in your C libraries and probably on CPAN
<16> Oooh... strptime guesses the format...
<16> Whereas mine is told it explicitly, and is much more strict
<16> Specifically... 04/02/1995 <== 4th Feb or 2nd Apr?
<0> 4 feb of course.
<0> DOING IT THE OTHER WAY ROUND IS PLAIN ****ING WRONG!
<15> http://search.cpan.org/~kscheibel/POSIX-strptime-0.06/lib/POSIX/strptime.pm takes a format string
<12> mauke's url is at http://xrl.us/jv5w
<16> Ahh yes.. there it is
<16> That's what I wanted
<16> Can't locate POSIX/strptime.pm in @INC ... *cries(
<18> 1995-04-02 or 1995-02-04 of couse is the correct way
<18> ISO
<0> feh. ISO.
<18> and DateTime will help you
<0> what have they ever done for us!
<18> merkan way is nutso
<19> Hey everyone :)
<19> Hey Botje :P
<19> good to see you too :P
<20> hi
<19> But anyway, I forgot, is there a simple way to suppress the "Use of uninitialized value in concatenation (.) or string" error message?
<16> Daveman: yes... don't use undef.
<0> { no warnings; #DO EVIL STUFFS HERE }
<19> LeoNerd, rtfm


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

#lisp
ser2net carriage return
#css
#lisp
why is carbon black?
docgnome
ERROR writing user file (Operation not permitted)
pro2my
ubuntu updatemanager greyed
#ati



Home  |  disclaimer  |  contact  |  submit quotes