You can not say "I am feeding the dog because I am feeding the dog"
I am asking why you want to write your own.
I dont' really care your actual reasoning. I just hope it's for a good reason
nchambers
because I do. I didn't realize I needed a reason to use twisted
seanicus
again, that's beggining the question
And you can simply say "because I enjoy the challenge"
nchambers
not really. you're just pestering for a reason when none exists
seanicus
or "to learn how to make my own protocol"
nchambers
you're overthinking this
seanicus
Everything anyone does is for a reason.
nchambers
you're welcome to that opinion
seanicus
So...you're doing it for a shitty reason.
nchambers
or I'm not really doing it for any reason at all and you're overthinking it
seanicus
Making more work for yourself, deliberately slowing yourself down
Hey man, it doesn't matter to me. Don't get so defensive when someone is trying to help you. It's an important trait as a programmer to recognize when you're making unnecessary work for yourself, is all.
seeya
nchambers
I'm not being defensive at all. I'm giving you the answer and you clearly don't want to accept it
if it doesn't matter to you, just stop asking then :)
NoImNotN1neVolt
reinventing the wheel is awesome.
if people didn't reinvent the wheel, we'd have bugatis on stone discs.
seanicus
Good point, haha
NoImNotN1neVolt
some of my earliest hobby projects (as a self taught coder) were pointless reinvent-the-wheel type things. screensavers, irc clients, email clients, etc.
some people learn well with hands-on experience, even if they're "doing it wrong" (i definitely was, in hindsight), etc.
also, happy festivus, etc.
seanicus
Yes, I agree with that. I think doing it as a learning exercise is valid.
But projects done as learning exercises tend not to be coded as well as the already-invented-wheel
seanicus: it is still kind of rude to demand people explain their motivations and then judge them for not meeting your standards
sveinse joined the channel
sveinse
What is a reliable method of checking twisted's version, so that I can fail my app is it is too old?
tos9
sveinse: pinning from below in your setup.py
sveinse
tos9: sure, but that moves the resposibility down to the package level. Do I understand this that is implies that one usually don't do application based version checks?
tos9
sveinse: correct
sveinse
using linter is a two edged sword :o :). Especially when twisted use camel cases...
seanicus
njs: not demanding, just asking, then subsequently getting annoying that he gave me a nonanswer
someone knows if there's been any advances in either getting benchmarks for this or if PyPy might have changed in any way that made the issue less problematic?
(i don't really understand the whole issue at hand yet :)
tos9
drebs: Don't know if anything's changed, but I (we've) been running Twisted on PyPy in production for awhile now, and others (like twisted's webpage itself) for even longer, if you're asking a more general question.
drebs
tos9, do you make heavy use of inlineCallbcacks?
it seems that this is the possible problematic point, because of the way defer.returnValue is implemented
iffy joined the channel
drebs has quit
iffy has left the channel
sveinse
Will callLater(0,fn) run the fn immediately, as in when callLater(0,..) returns the fn has been run? Or does it schedule the fn to run immediately once the execution comes back to the event loop?
drebs joined the channel
tos9
drebs: I don't, I try to avoid it for other reasons (it makes diagnosing errors harder)
But one or two places in prod code use it, and those places are likely hot, so yeah it is in some sort of use
sveinse: I forget, but I think the latter
sveinse: should be reasonably easy to check if callLater special cases 0 (or with a debugger)
Is there a global way to catch or hook errors that occurs in the functions of callLater or loopingCall? I.e. be notified of unhandled exceptions in Deferred objects?
The challenge with the behaviour is that a Deferred that fails, dumps its traceback to stderr and stops, but overall the reactor continues as nothing has happened. I the application could be notified, it could take appropriate action
teratorn
sveinse: if you know how to do that then just add the appropriate errbacks :)
sveinse: the problem with this is that you can't know if a Deferred is actually dead or not, until it gets garbage collected and is found to be failed.
because code could always add an errback later, and then the Deferred would have a value again
sveinse
teratorn: firstly, in callLater() or loopingCall() I'm oblivious to the backend implementation using Deferreds. Secondly, I do agree, you could and perhaps should try catch everything that can go wrong, but that creates quite bloated code in a large application
LichtMacher joined the channel
It would be nice if there were a reactor hook when a errback is being collected without a handler. This way the application could be informed that something is not right
teratorn
erm, Deferred has an __del__ method that prints the unhandled error in Deferred...
that is where Unhandled error in Deferred comes from. it happens at GC time