Re: [Python-Dev] The socket HOWTO

2011-06-08 Thread Eli Bendersky
On Wed, Jun 8, 2011 at 21:07, geremy condra wrote: > On Tue, Jun 7, 2011 at 10:37 AM, Eli Bendersky wrote: > > > > Just be careful not to reproduce http://www.apress.com/9781590593714 :-) > > These things tend to get out of hand very quickly. > > You say that like it's a bad thing. The first few

Re: [Python-Dev] The socket HOWTO

2011-06-08 Thread geremy condra
On Tue, Jun 7, 2011 at 10:37 AM, Eli Bendersky wrote: > > Just be careful not to reproduce http://www.apress.com/9781590593714 :-) > These things tend to get out of hand very quickly. You say that like it's a bad thing. The first few chapters of that would make a great replacement for the howto.

Re: [Python-Dev] The socket HOWTO

2011-06-08 Thread Nick Coghlan
On Tue, Jun 7, 2011 at 1:54 PM, Glyph Lefkowitz wrote: > how is UDP different from TCP? > > The phrase "UDP" never appears in the HOWTO.  DGRAM sockets get a brief > mention as "anything else" in the sentence: "... you’ll get better behavior > and performance from a STREAM socket than anything els

Re: [Python-Dev] The socket HOWTO

2011-06-08 Thread Nick Coghlan
On Wed, Jun 8, 2011 at 3:37 AM, Eli Bendersky wrote: > Just be careful not to reproduce http://www.apress.com/9781590593714 :-) > These things tend to get out of hand very quickly. At the level Glyph and Martin are talking about, you're more likely to end up with http://authors.phptr.com/tanenbau

Re: [Python-Dev] The socket HOWTO

2011-06-07 Thread Eli Bendersky
> Yes, these are all excellent concepts to be familiar with.  But the word > "socket" (and the socket HOWTO) refers to a specific way to interface with > those concepts, the Berkeley socket API: > .  Which you don't have to > know anything about if yo

Re: [Python-Dev] The socket HOWTO

2011-06-07 Thread Glyph Lefkowitz
On Jun 5, 2011, at 3:35 PM, Martin v. Löwis wrote: > And that's all fine. I still claim that you have to *understand* > sockets in order to use it properly. By this, I mean stuff like > "what is a TCP connection? how is it established?", "how is UDP > different from TCP?", "when data arrives, what

Re: [Python-Dev] The socket HOWTO

2011-06-07 Thread Łukasz Langa
Wiadomość napisana przez C McL w dniu 2011-06-07, o godz. 00:15: > I cannot even remember ever visiting the wiki. FWIW neither can I. The Wiki link on the front page is below Jobs and Merchandise so it's easy to miss it altogether ;-) -- Best regards, Łukasz Langa Senior Systems Architecture

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread C McL
> Date: Mon, 6 Jun 2011 22:59:04 +0900 > From: step...@xemacs.org > To: solip...@pitrou.net > CC: python-dev@python.org > Subject: Re: [Python-Dev] The socket HOWTO > > I know that is your opinion, because I've read your posts. I > disagree. The document is impe

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Antoine Pitrou
Le lundi 06 juin 2011 à 22:59 +0900, Stephen J. Turnbull a écrit : > Antoine Pitrou writes: > > > So did you read the discussion before posting? > > Yes. It's rude to assume that those who disagree with you are > irresponsible and uninformed. Would you please stop it? > > > The sockets HOWTO

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Stephen J. Turnbull
Antoine Pitrou writes: > So did you read the discussion before posting? Yes. It's rude to assume that those who disagree with you are irresponsible and uninformed. Would you please stop it? > The sockets HOWTO *doesn't* serve both groups. > Actually, I would argue that it serves neither of

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Steven D'Aprano
Antoine Pitrou wrote: On Mon, 06 Jun 2011 10:33:14 +0200 "Martin v. Löwis" wrote: [...] How can you make such claims when several people have indicated that the howto *actually* helped them? The point here is that the examples in that document are very poor (the only substantial example actu

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Antoine Pitrou
On Mon, 06 Jun 2011 10:33:14 +0200 "Martin v. Löwis" wrote: > Am 06.06.2011 10:11, schrieb Antoine Pitrou: > > Le lundi 06 juin 2011 à 17:01 +0900, Stephen J. Turnbull a écrit : > >> You might question whether the same document should serve both the > >> "cargo cult the examples" group and the "re

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Martin v. Löwis
Am 06.06.2011 10:11, schrieb Antoine Pitrou: > Le lundi 06 juin 2011 à 17:01 +0900, Stephen J. Turnbull a écrit : >> You might question whether the same document should serve both the >> "cargo cult the examples" group and the "read the fine print" group. >> That's a valid question, but here my fee

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Martin v. Löwis
> > Did you run a user survey? > > Martin undoubtedly has a lot of experience with users, and it's quite > reasonable for him to express his opinions based on that informal > sample, yes. In particular, this is collected experience from interaction with students learning Python, or other languag

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Antoine Pitrou
Le lundi 06 juin 2011 à 17:01 +0900, Stephen J. Turnbull a écrit : > You might question whether the same document should serve both the > "cargo cult the examples" group and the "read the fine print" group. > That's a valid question, but here my feeling is that the answer is > "yes". So did you re

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Stephen J. Turnbull
Antoine Pitrou writes: > Did you run a user survey? Martin undoubtedly has a lot of experience with users, and it's quite reasonable for him to express his opinions based on that informal sample, yes. The issue here is the difference between existential and universal quantifiers. Martin's argu

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Stephen J. Turnbull
exar...@twistedmatrix.com writes: > However, does that really have anything to do with improving the socket > howto? Thank you! > The Python documentation can include a clear explanation of what > functionality the socket module provides - without forcing you to read > Stevens _or_ use T

Re: [Python-Dev] The socket HOWTO

2011-06-06 Thread Antoine Pitrou
On Mon, 06 Jun 2011 00:22:11 +0200 "Martin v. Löwis" wrote: > >>> I'm not sure why the examples are good (for example, modern client > >>> code should probably use create_connection() with a host name, not > >>> connect()). > >> > >> I disagree. create_connection is an advanced function - you shou

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread exarkun
On 5 Jun, 10:35 pm, mar...@v.loewis.de wrote: First, Twisted doesn't always use the BSD sockets API; the Windows IOCP reactor, especially, starts off with the socket() function, but things go off in a different direction pretty quickly from there. Hmm. Are you saying it doesn't use listen, con

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Martin v. Löwis
> First, Twisted doesn't always use the BSD sockets API; the Windows IOCP > reactor, especially, starts off with the socket() function, but things > go off in a different direction pretty quickly from there. Hmm. Are you saying it doesn't use listen, connect, bind, send, recv? To me, that's the co

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Martin v. Löwis
>>> I'm not sure why the examples are good (for example, modern client >>> code should probably use create_connection() with a host name, not >>> connect()). >> >> I disagree. create_connection is an advanced function - you shouldn't >> be using it unless you know what it is doing. > > Can you exp

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Raymond Hettinger
> On Jun 4, 2011, at 11:32 PM, Martin v. Löwis wrote: > >> b) telling people to use Twisted or asyncore on the server side >> if they are new to sockets is bad advice. People *first* have >> to understand sockets, and *then* can use these libraries >> and frameworks. Those libraries aren't

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Glyph Lefkowitz
On Jun 4, 2011, at 11:32 PM, Martin v. Löwis wrote: > b) telling people to use Twisted or asyncore on the server side > if they are new to sockets is bad advice. People *first* have > to understand sockets, and *then* can use these libraries > and frameworks. Those libraries aren't made to b

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Antoine Pitrou
On Sun, 05 Jun 2011 08:32:38 +0200 "Martin v. Löwis" wrote: > >> -1. I think there should be a Python-oriented introduction to sockets. > >> You may have complaints about the specific wording of the text, but > >> please understand that these are probably irrelevant to most > >> first-time readers

Re: [Python-Dev] The socket HOWTO

2011-06-04 Thread Martin v. Löwis
>> -1. I think there should be a Python-oriented introduction to sockets. >> You may have complaints about the specific wording of the text, but >> please understand that these are probably irrelevant to most >> first-time readers of this text. My observation is that people actually >> don't read t

Re: [Python-Dev] The socket HOWTO

2011-06-04 Thread Neil Hodgson
Antoine Pitrou: > So what you're saying is that the text is mostly useless (or at least > quite dispensable), but you think it's fine that people waste their > time trying to read it? I found it useful when starting to write socket code. Later on I learnt more but, as an introduction, this doc

Re: [Python-Dev] The socket HOWTO

2011-06-04 Thread Antoine Pitrou
Hello, On Sun, 29 May 2011 17:20:29 +0200 "Martin v. Löwis" wrote: > > I would like to suggest that we remove the socket HOWTO (currently at > > http://docs.python.org/dev/howto/sockets.html) > > -1. I think there should be a Python-oriented introduction to sockets. > You may have complaints ab

Re: [Python-Dev] The socket HOWTO

2011-05-29 Thread Martin v. Löwis
> I would like to suggest that we remove the socket HOWTO (currently at > http://docs.python.org/dev/howto/sockets.html) -1. I think there should be a Python-oriented introduction to sockets. You may have complaints about the specific wording of the text, but please understand that these are proba

Re: [Python-Dev] The socket HOWTO

2011-05-29 Thread Gregory P. Smith
On Sun, May 22, 2011 at 11:22 PM, Nick Coghlan wrote: > On Sun, May 22, 2011 at 3:38 AM, Georg Brandl wrote: > > On 05/21/11 18:01, Senthil Kumaran wrote: > >> So a rewrite with good pointers would be more appropriate. > > > > Even then, it's better off in the Wiki until the rewrite is complete.

Re: [Python-Dev] The socket HOWTO

2011-05-22 Thread Nick Coghlan
On Sun, May 22, 2011 at 3:38 AM, Georg Brandl wrote: > On 05/21/11 18:01, Senthil Kumaran wrote: >> So a rewrite with good pointers would be more appropriate. > > Even then, it's better off in the Wiki until the rewrite is complete. Perhaps replacing it with a placeholder page that refers to the

Re: [Python-Dev] The socket HOWTO

2011-05-21 Thread Georg Brandl
On 05/21/11 18:01, Senthil Kumaran wrote: > On Sat, May 21, 2011 at 05:37:05PM +0200, Georg Brandl wrote: >> > >> > I would like to suggest that we remove the socket HOWTO (currently at >> > http://docs.python.org/dev/howto/sockets.html) >> >> +1, or a big rewrite. >> > > I favor a rewrite over

Re: [Python-Dev] The socket HOWTO

2011-05-21 Thread Senthil Kumaran
On Sat, May 21, 2011 at 05:37:05PM +0200, Georg Brandl wrote: > > > > I would like to suggest that we remove the socket HOWTO (currently at > > http://docs.python.org/dev/howto/sockets.html) > > +1, or a big rewrite. > I favor a rewrite over removal. I have read it once/twice and have never rev

Re: [Python-Dev] The socket HOWTO

2011-05-21 Thread Ross Lagerwall
On Sat, 2011-05-21 at 17:07 +0200, Antoine Pitrou wrote: > Hello, > > I would like to suggest that we remove the socket HOWTO (currently at > http://docs.python.org/dev/howto/sockets.html) > > My main issue with this document is that it doesn't seem to have > a well-defined destination: > - peopl

Re: [Python-Dev] The socket HOWTO

2011-05-21 Thread Eli Bendersky
> I would like to suggest that we remove the socket HOWTO (currently at > http://docs.python.org/dev/howto/sockets.html) > > My main issue with this document is that it doesn't seem to have > a well-defined destination: > - people who know sockets won't learn anything from it > - but people who don

Re: [Python-Dev] The socket HOWTO

2011-05-21 Thread Georg Brandl
On 05/21/11 17:07, Antoine Pitrou wrote: > > Hello, > > I would like to suggest that we remove the socket HOWTO (currently at > http://docs.python.org/dev/howto/sockets.html) +1, or a big rewrite. Georg ___ Python-Dev mailing list Python-Dev@python.o

[Python-Dev] The socket HOWTO

2011-05-21 Thread Antoine Pitrou
Hello, I would like to suggest that we remove the socket HOWTO (currently at http://docs.python.org/dev/howto/sockets.html) My main issue with this document is that it doesn't seem to have a well-defined destination: - people who know sockets won't learn anything from it - but people who don't k