| |
| |
| |
|
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
Comments:
<0> Elly: Eh? <1> buu: it doesn't wr0k :( <1> I only see 'iterating' once <1> err, twice <1> start, I see it, I connect, I get one line of text from each end of the connection, I see 'iterating' again, and it halts <0> Elly: Googlepages eh? <1> jawohl mein fuhrer <2> Elly: I think maybe the readline operator doesn't play nice with non-blocking <3> "heng" at 24.82.160.208 pasted "use modules" (31 lines, 341B) at http://sial.org/pbot/16714 <0> Elly: I get infinite loops <1> buu: it works on Linux <1> :( <4> Ani-_: hi, can you please take a look at http://sial.org/pbot/16714 ? thanks <1> but on Win32 it fails <0> Elly: Oh, well, it's win32 <0> heng: Um. get() is defined in third; not second;
<1> :( <0> heng: Why do you try to call second::get? <5> jade what was that link again, i just kicked the power cord out of the machine <4> buu: get method in third module is to extract the value from different configuration file, that is why I need to call it in first and second <6> heng, ofcourse you get an error. You did not create a sub get in second.pm... And you didn't import it from third.pm... <2> Elly: looks broken to me actually... you accept the connection, open a new one, read once from each end... and then throw away both sockets. <6> heng, perhaps you should take a look at perldoc Exporter? <7> Exporter To access this perldoc please type, at a command line, 'perldoc Exporter'. If you lack this package you may also find it at http://perldoc.perl.org/Exporter.html <2> Elly: you need maybe another while loop. Or forking. Or both. Or Net::Daemon <0> heng: That doesn't answer my question. <1> hobbs: it works on linux <6> But do note, exporting something by default (especially something like get()) is a bad idea. <1> the connections stay open properly <4> Ani-_: en... I use third in second, not enough ? <1> and send data back and forth <6> heng, nope <1> I don't throw them away because I only ever connect to it once <0> Elly: I actually just get iterate spam <2> Elly: it has no business working, though. Your logic just isn't right. <0> ! <1> hobbs: it does <1> buu: I do too <1> but try connecting to it <1> then you also get text going both ways <5> never mind i found it <0> Heh, ports would help. <1> eg, proxytest.pl 10000 www.google.com:80 <4> buu and Ani-_: I need to exports ( get ) in third ? <1> I think it's just win32 ****ing =\ <6> heng, yes. Or fully qualify it in second. (that is: third::get()) <1> I remember looking at IO::Socket::INET once and it had a thing in blocking: if ($^O ne 'win32') or something <2> Elly: look at your while loop. Every time through the loop you perform _one_ accept, _one_ socket ->new, _two_ readlines, _two_ prints, and then you start over <4> Ani-_: let me give it a try, ps, why first.pm didnt complain but second ? <1> hobbs; yep <1> which is what I want to do <2> Elly: you want to only move one line in each direction per connection? <1> no <4> Ani-_: I explictly use get as third::get() in second, didnt work either, hehe :-) <1> heh <1> the $ls->accept() call <0> Elly: Actually you're right, it does work <1> MAY return null <6> heng, it should work. <0> I still get iterate spam <1> in which case that block does not execute <4> Ani-_: trying :-) <1> and it keeps reading the two it already has <1> because of $ls->blocking(0) <1> but on win32, $ls->blocking(0) appears to be a no-op, and it hangs at that line <1> maybe I can ioctl it <2> Elly: oh yeah, I see it. That's a really bad trick ;) <1> hobbs: it's just a demonstration hack <1> to point out that nonblocking I/O doesn't work on win32 :P <2> Elly: and I believe it would explode badly if you got a new connection while already handling one <1> hobbs: maybe <1> as I said, demo hack <2> gotcha <1> theoretically getting a new connection would close the old ones and open new ones, but that's not really important <8> too many distractions <2> anyway, yeah, blocking is the most likely culprit. But my rule is that nothing is _expected_ to work on windows <0> Elly: Why do you need blocking(0) on win32?
<1> buu: to handle more than one socket at once? <0> Elly: Um. Bad idea. Select. <1> buu: select() works on Win32? <0> I think so <0> There are a few cases it doesn't work for, stuff like unix pipes or something <0> IO::Select is much saner. <3> "zshzn" at 69.156.119.27 pasted "fun fun naughty fun" (8 lines, 416B) at http://sial.org/pbot/16715 <9> poll()!!! <0> amnesiac: Shut up you c whore. <9> buu, :) <9> poll > select on compliant systems <1> I bet you win32 isn't 'compliant' <1> for any given definition of compliant <1> woah, .llnl.gov? <10> Fold the steel plated garment of distrust and put it in the drawer of redemption! The time is neara for teens and puppies alike, there will be no want in the wont. <0> Elly: I'm fairly certain I've gotten select to work well on win32 <0> amnesiac: Perl lacks poll you cunt. Go implement it. <8> poll $buu <11> select() only works on sockets in win32 <8> no no no <8> finger $buu <8> yay! <12> fd <0> Elly: With select your logic becomes very simple. You have an accepting socket, and an array of recv sockets mapped to an array of sending sockets <12> Hi, I have a nub question =) Can anyone tell me why i can't do @array ||= ('a', 'b', 'c') <8> eval: @a ||= 1..6; <13> sili: Error: Can't modify array dereference in logical or ***ignment (||=) at (eval 110) line 1, at EOF <0> Loutenous: Scalar context. <1> buu! it am teh wr0k <0> Elly: Yay! <9> buu, what about IO::Poll? you cunt! <0> amnesiac: PLEASE DIE IN A FIRE. <6> hmm, sili, it doesn't work? :/ <9> what about POE::Loop::IO_Poll? <9> bastard! <0> I care not for your pathetic attempts. <1> http://akroma.googlepages.com/proxytest.txt <1> it wins? <0> Yay winning. <9> buu-- <9> buu-- # because his ignorance <0> Elly: You're missing the ability to handle multiple connections <9> buu-- # no more poll for him <0> perlbot karma buu <14> Karma for buu: -243 <0> Shucks. <9> ouch <9> buu++ # I'm being friendly <0> perlbot karma buu <14> Karma for buu: 8 <12> eval: $a ||= 1..6; <13> Loutenous: Return: <0> Elly: Something like $s1=new_out_socket; $s2=new_in_socket; $x{$s1}=$s2; $x{$s2}=$s1; <12> =) <9> o.O <9> wtf are you talking about buu? <1> buu: it's intentional <15> Dr Who's set design (on the trailer) reminds me of Farscape <12> thank you buu and sili. <16> i am getting a "subrutine_name() called to early to check prototype" error...but my script seems ok (and i can't figure out what the issue could be), what might it be, or is this something that can be ignored? <5> IPC::Session <5> ! <15> csb: don't use prototypes. <15> csb: they're bad practice. <15> perlbot prototypes <14> Overhyped Prototypes - http://library.n0i.net/programming/perl/articles/fm_prototypes/ <16> integral: i didn't even know i _was_ using prototype <6> Again someone using protoptypes? <15> csb: something like: sub foo($$$) { }. nuke the "($$$)" bit. <6> Who was using them yesterday? :/ <15> Only idiots and morons use prototypes. <8> integral: ouch
Return to
#perl or Go to some related
logs:
libQtGui_debug gentoo awb4422 gentoo drivespace sdodson RedHat sin4x = 4sinxcosx
open_dir atm
authenticateUser freebsd mp3 hot white cum jesuashok #linux
|
|