#perl
31 October 2007
Total 28 pages. You are browsing page 1/28.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Wed Oct 31 00:00:02 2007
00:04 <****>;"?
00:04 <****> evil! evil!
00:05 <****> Clearly, evil's the way to do things... :)
00:05 <****> Bac9: er, why?
00:05 <****> Somni: trying to do a select after it, but select doesn't see anything more because it's all been buffered
00:06 <****> don't mix select with buffered operations, haven't we been over this?
00:06 <****> Somni: do you know an unbuffered way to get a whole line?
00:06 <****> sysread in a loop
00:06 <****> Bac9: do your own buffering
00:06 <****> you have to do your own buffering
00:07 <****> Somni: I am trying to read in a full line, then read in chunks of 4k
00:07 <****> ok..
00:08 <****> Somni: you're saying I should resort to alarms?
00:08 <****> I'm saying you should do your own buffering, how did alarms enter into it?
00:08 <****> Somni: never mind, thinking ahead two steps
00:08 * Khisanth hits Somni with a hammer
00:09 <****> ow
00:09 <****> Somni: doing my own buffering is a pain, if I wanted to do my own buffering I would have written this in C
00:09 <****> then write it in C
00:10 <****> Somni: but I want simplicity of perl for something simple
00:10 <****> we've been over all the various solutions, you keep chosing the ones that look most like C then bitching about it
00:10 <****> choosing
00:10 * Khisanth stares at POE
00:10 <****> Somni: I merely came here to ask how to get at the data in the read buffer, you're making it more then it really is
00:10 <****> you don't
00:11 <****> thus, it follows to ask why, and to offer a better solution
00:11 <****> Khisanth: I don't need anything event driven, just a stream of data, then close socket
00:11 <****> except you are doing something event driven
00:11 <****> Somni: I am?
00:11 <****> when there's something to read, you read it; that's catching an event
00:11 <****> yeah, you certainly don't need a "hey there is a line of data here" event
00:12 <****> Bac9: How would you get at a filehandle's buffer in C?
00:12 * CPAN upload: WWW-Ofoto-1.23 by MGRIMES
00:12 <****> Somni: no, no, you're looking at it backwards, it's "when there's nothing to read for 5 min then close socket", that's the behaviour I want
00:12 <****> Bac9: still an event
00:12 <****> Somni: how is "no event for 5 min" an event?
00:12 <****> Bac9: you either implement your own little event loop, or you use one of the ones implemented for you and get to designing your own application
00:13 <****> bitching that it looks like C isn't going to solve your problem
00:13 <****> Somni: you sound like the only thing you're noticing is C
00:13 <****> Bac9: it's a timed event, "wait five minutes, then do something"
00:14 <****> Bac9: I'm not the one commenting that it looks like C whenever I get to a solution
00:14 <****> Somni: I suppose you can look at it that way... I'll try with alarms them
00:39 <****> any thoughts on how to send a raw command to an irc server using Net::IRC?
00:39 <****> to do a whois for example
00:39 <****> perlbot: Net::IRC
00:39 <****> Net::IRC is deprecated, undocumented, unloved and completely superceded by POE::Component::IRC
00:45 <****> hrm
00:45 <****> looks to have a whois sub
00:47 <****> jjshoe: read the source, that is where most of the documentation is anyway
00:49 <****> Khisanth that's what I'm doing
00:58 <****> error checking, testing, HOW!
01:03 <****> initself $?
01:04 <****> YES
01:04 <****> maybe
01:04 <****> $?
01:04 <****> hrm
01:05 <****> The status returned by the last pipe close
01:06 <****> bash -x most useful is. $? after suspect commands, too
01:15 <****> Fatal.pm: friend or foe?
01:16 <****> Interesting idea.. not sure I'd use it in practice
01:17 <****> how bout diz? http://axkit.org/docs/presentations/tpc2002/exceptions.pdf
01:17 <****> initself's url is at http://xrl.us/7uyb
01:25 <****> Is there a way to do a check on perl syntax without executing a script?
01:26 <****> The -c flag
01:26 <****> jagerman, cheers ;)
01:29 <****> some stuff can still get executed
01:31 <****> Like BEGIN and CHECK blocks
01:57 <****> why when using the strict mode in XML::Simple in one module, it turns on that same mode for the XML::Simple call used for a different xml file in the calling script?
01:58 <****> which binds tighter? = or =~
01:58 <****> =~
01:58 <****> shardz: perldoc perlop
01:58 <****> if we agree on the meaning of 'tighter'
01:58 <****> Woosta: thanks
01:58 <****> mauke: yeah maybe I should have rtfm :/
02:09 <****> :D
02:10 <****> o.O?
02:12 * CPAN upload: Parse-Marpa-0.001_027 (+ ) by JKEGL
02:12 <****> what does last do if you just run it outside of a loop?
02:12 <****> initself: TIAS
02:12 <****> srsly, how hard is it to type perl -e last in a terminal?
02:13 <****> O rly?
02:13 <****> mauke: right, i know i alread tried it:
02:13 <****> Can't "last" outside a loop block at -e line 1.
02:13 <****> but if you look here:
02:13 <****> http://www252.pair.com/comdog/mastering_perl/Chapters/12.error_handling.html
02:13 <****> initself's url is at http://xrl.us/7uzp
02:13 <****> crap
02:13 <****> he does this: OPEN: {
02:13 <****> which is, a loop?
02:13 <****> yeah, bare blocks count as loops
02:14 <****> eval: {redo}
02:14 <****> (infinite loop)
02:14 <****> mauke: Error, killing eval due to timeout
02:14 <****> of course, last == next in simple blocks
02:14 <****> mauke: bare block = infinite loop?
02:14 <****> what?
02:15 <****> initself: Bare block == single loop.
02:15 <****> k
02:16 <****> ok, he has a bare block
Total 28 pages. You are browsing page 1/28.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
