Live data from Hacker News

The Twisted Way

glyph.twistedmatrix.com

1–10 of 32 posts

Re: The Twisted Way

#2
It's a library, not the Tao. And it is a big, complex library which introduces plenty of its own unique jargon and abstractions, which is why people find it confusing.

The fact that Twisted advocates have to keep browbeating others to accept it is just one indication that it's not perfect and it's not for everyone.

Re: The Twisted Way

#3
Twisted is the least accessible of the big Python libraries that I've come across. I've come to it a couple of times when it seemed like it would suit a problem I had, only to throw up my hands in frustration and go look for a solution somewhere else.

Unfortunately this article did nothing to enlighten me - it has some pretensions of being philosophical without explaining any of the practicalities.

Does anyone use Twisted in production? Do you consider it worth the learning curve, and would you use it again if you were implementing your system now?

Re: The Twisted Way

#4
post #3

Twisted is the least accessible of the big Python libraries that I've come across. I've come to it a couple of times when it seemed like it would suit a problem I had, only to throw up my hands in frustration and go look for a solution somewhere else. Unfortunately this article did nothing to enlighten me - it has some pretensions of being philosophical without explaining any of the practicalities. Does anyone use Tw…

I use Twisted and love it. What really helped me was reading the source code instead of trying to decipher the documentation. The code is really readable and things started clicking once I made that investment.

Re: The Twisted Way

#5
post #3

Twisted is the least accessible of the big Python libraries that I've come across. I've come to it a couple of times when it seemed like it would suit a problem I had, only to throw up my hands in frustration and go look for a solution somewhere else. Unfortunately this article did nothing to enlighten me - it has some pretensions of being philosophical without explaining any of the practicalities. Does anyone use Tw…

[deleted]

Re: The Twisted Way

#6
post #4
post #3

Twisted is the least accessible of the big Python libraries that I've come across. I've come to it a couple of times when it seemed like it would suit a problem I had, only to throw up my hands in frustration and go look for a solution somewhere else. Unfortunately this article did nothing to enlighten me - it has some pretensions of being philosophical without explaining any of the practicalities. Does anyone use Tw…

I use Twisted and love it. What really helped me was reading the source code instead of trying to decipher the documentation. The code is really readable and things started clicking once I made that investment.

If you don't mind - what did you build with it? Was Twisted the only suitable library - what about Tornado?

I'm curious because Twisted has been around for ages and seems to be in active development but I've never talked to anyone who actually uses it.

Re: The Twisted Way

#7
post #4
post #3

Twisted is the least accessible of the big Python libraries that I've come across. I've come to it a couple of times when it seemed like it would suit a problem I had, only to throw up my hands in frustration and go look for a solution somewhere else. Unfortunately this article did nothing to enlighten me - it has some pretensions of being philosophical without explaining any of the practicalities. Does anyone use Tw…

I use Twisted and love it. What really helped me was reading the source code instead of trying to decipher the documentation. The code is really readable and things started clicking once I made that investment.

> What really helped me was reading the source code instead of trying to decipher the documentation.

That's an awful excuse. People rely on libraries in order to do their jobs. A "worse" library with better documentation helps more people.

Re: The Twisted Way

#8
post #6
post #4

Earlier quoted context omitted.

I use Twisted and love it. What really helped me was reading the source code instead of trying to decipher the documentation. The code is really readable and things started clicking once I made that investment.

If you don't mind - what did you build with it? Was Twisted the only suitable library - what about Tornado? I'm curious because Twisted has been around for ages and seems to be in active development but I've never talked to anyone who actually uses it.

I've used twisted in a quite a few production projects. One of them was for the management interface of a wireless switch. The best part about twisted is that it comes with about two dozen client and server implementations for various standard protocols. At another one of my previous gigs, we were using Cyclone (the twisted port of Tornado) for a document management system. Eventually, the customers wanted the ability to upload documents via (S)FTP using the same credentials their users used for the web based system. With I was able to code something up in about an hours time. I believe it wouldn't have been that easy if we weren't using twisted.

Re: The Twisted Way

#9
post #3

Twisted is the least accessible of the big Python libraries that I've come across. I've come to it a couple of times when it seemed like it would suit a problem I had, only to throw up my hands in frustration and go look for a solution somewhere else. Unfortunately this article did nothing to enlighten me - it has some pretensions of being philosophical without explaining any of the practicalities. Does anyone use Tw…

I've used it, and had some success with it, but now use my own stack for network programming.

I struggled with twisted several times without getting it. Then I did some non-blocking socket/select programming and thought, "I wish I had a library that.." and then realised what twisted did.

There's a few reasons I'm not using it now. Main one is that I've turned against frameworks. I find it's generally easier to understand a problem and write the code than to really learn a generic framework and coax it to your needs. And by just writing the code yourself you don't have to deal with dependencies, you have more freedom to make changes, debugging is easier, it's easy to deploy in a restricted environment.

Also, I have a rule of thumb when I'm writing python that if I'm using inheritance I'm doing something wrong. I have huge trouble understanding duck-type code that uses inheritance. Encapsulation is always possible, and I find it a lot easier to refactor. Twisted uses inheritance extensively. The docs encourage you to extend their classes. In places the application developer is expected to reach into framework objects and poke variables.

Re: The Twisted Way

#10
GREAT SOLUTIONS IN ENGINEERING

Problem: bicycle seats are hard. They hurt.

Analysis: there must be something wrong with your pants.

"Solution": dorky pants.

from http://dilbert.com/strips/comic/1994-07-18/

Problem: Python has poor support for threads, and concurrency in general.

Analysis: you must need more middleware.

"Solution": incomprehensible callback-based frameworks.

Post reply on HN