#ruby-lang - Sun 6 May 2007 between 00:06 and 00:56

NY Lost Funds



Food(sorry i know this is the wrong room but does anyone here know how to do basic SAS stufF)
kujawtf is SAS
Foodsome statistical programming thing :(
hachiyasounds like SASL
raggi() while iter[Value::OBJECT] != object and iter.next! <- what does the () do here?
rueNothing
desphmm
anyone doing threads in Ruby?
the jabber-bot ruby package does this:
http://pastie.textmate.org/59268
raggirue: it does actually :)
despit looks to me like a busy waiting loop
and the insane CPU usage seems to agree
raggidesp the insane cpu usage is because this loop never sleeps
it's someones insane idea that threading == realtime operations by repeating loops :-S
despdoes anyone do QA for gems? :)
raggidesp: have the message buffer poll the parser to pickup a message from the buffer (ConditionVariable)
s/poll/callback/
you want to stop insane polling :)
despI'm not exactly sure why you say that loop never sleeps
it would appear to me that it should sleep when @jaber.received_messages is empty
wait, that's a function.
er
I can't get my head around this code
raggidesp: you don't want a sleep there
desp: the insane processor useage will probably be coming from a poll to read network data to fill that buffer, if it's in a similar style
or a thread loop somewhere else
despso what is wrong about *this* code?
actioneleven just realized that you can do foo.methods.sort to get a reminder of whats in the api.. hmm.. wonder what took me so long to come across that...
elevenjust realized that you can do foo.methods.sort to get a reminder of whats in the api.. hmm.. wonder what took me so long to come across that...
manveruuhm
desp: there is only one thing wrong
you don't need a thread if you are joining it right afterwards anyway
despyes, I'd think so
raggidesp: you really do want a callback from the buffer though, when messages arrive, rather than trying to iterate through received_messages all the time
despunfortunately, xmpp4r-simple doesn't appear to provide a callback mechanism
which is probably why the author of jabber-bot didn't use it
manveruhmm
someone should port that to eventmachine
raggii'm sure it would be trivial to fix that desp
:)

Page: 2 9 16 23 30 

IrcArchive

NY Lost Funds