Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68231

Re: which async framework?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'familiarity': 0.07; 'socket': 0.07; 'http': 0.09; 'merging': 0.09; 'protocols,': 0.09; 'rewrite': 0.09; 'cc:addr:python-list': 0.11; 'antoine': 0.16; 'boundary.': 0.16; 'buggy': 0.16; 'fluent': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'latter,': 0.16; 'reason.': 0.16; 'stuff,': 0.16; 'subject:which': 0.16; 'tcp': 0.16; 'wrote:': 0.18; 'library': 0.18; 'wed,': 0.18; 'trying': 0.19; 'meant': 0.20; 'written': 0.21; 'platforms': 0.22; 'cc:addr:python.org': 0.22; 'convenient': 0.24; 'instance,': 0.24; 'module,': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'quickly': 0.29; "doesn't": 0.30; 'specified': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'directly,': 0.31; 'libraries': 0.31; 'protocols': 0.31; 'request,': 0.31; 'file': 0.32; 'probably': 0.32; 'plain': 0.33; 'actual': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; "i'll": 0.36; 'subject:?': 0.36; 'should': 0.36; 'issue': 0.38; '12,': 0.39; 'course.': 0.60; 'most': 0.60; 'simple': 0.61; 'more': 0.64; 'between': 0.67; 'close': 0.67; 'mar': 0.68; 'six': 0.68; 'default': 0.69; 'long-term': 0.74; 'million': 0.74; 'potentially': 0.81; 'transfer': 0.82; 'actually,': 0.84; 'notably,': 0.84; 'quickest': 0.84; 'yourself?': 0.84; 'passive': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=NXj+XpibHgwrKS+hfxma/SU/pRGgMwVOVmd8w/6qWh4=; b=JUCeE1uVrdC1h31mOBTY7d2+YfnXzlNTD8ut/FqYww0IJ2wJYdUn0Mly0F1V3foGeR wrNtqfPdFAZK2qKirxtZ/eSdyC6XP5e5junXAw5IKiIPN+cTk8Gilik+WtbqDUf3ZuwT JTsmhsz2kjDw+YVJ4OhoGJkSYMjFlZFwCVasl+0EoVFsgoOrIiUaK7fvEn14ZcPYYZyz hMombKxV9Yjw1VD5xQJNCtiqaCZLQBlvAiEDli9f36ms3lVwZJIWXoncUPLNPwQyMeMl 7zoLcIsMIBolJFEjKGgS26EYSzrrQELBPRvfGupBXMkcrCEsrg0+/nU8nClIUZ+wf4Ua t6OA==
MIME-Version 1.0
X-Received by 10.66.11.66 with SMTP id o2mr49318144pab.142.1394558237079; Tue, 11 Mar 2014 10:17:17 -0700 (PDT)
In-Reply-To <loom.20140311T170030-477@post.gmane.org>
References <531E22DF.7030709@simplistix.co.uk> <1733040935416225908.878896sturla.molden-gmail.com@news.gmane.org> <loom.20140311T170030-477@post.gmane.org>
Date Wed, 12 Mar 2014 04:17:16 +1100
Subject Re: which async framework?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8054.1394558241.18130.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1394558241 news.xs4all.nl 2879 [2001:888:2000:d::a6]:39000
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68231

Show key headers only | View raw


On Wed, Mar 12, 2014 at 3:01 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
> Yes, why use a library when you can rewrite it all yourself?
> Actually, you should probably issue system calls to the kernel directly,
> the libc is overrated (as is portability, I suppose).

It's a trade-off, of course. I am fluent in over six million forms of
TCP socket communication (give or take), so I'll often skip the
libraries and just directly connect a socket. But on the flip side,
some protocols are just way more convenient to let a library handle.
An HTTP POST request, for instance, requires - potentially - a whole
lot of escaping and merging and stuff, or a simple call to one
function with a dictionary of form data. But I like to retain close
familiarity with the actual protocols, in case I'm trying to transfer
a file onto a target system that provides something buggy or
incomplete... most notably, the innumerable platforms whose FTP
clients don't support passive mode. (RFC 959 specified it in 1985, why
doesn't the default WinXP client support it??) I've written a good few
FTP clients for that reason.

There's a huge difference between something meant to do a huge amount
of work long-term and something to just quickly move some data across
a VM boundary. For the latter, I'll do whatever's quickest *right
now*, and that may well mean "don't bother figuring out the XYZ
module, just do it over a plain socket".

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: which async framework? Chris Angelico <rosuav@gmail.com> - 2014-03-12 04:17 +1100

csiph-web