<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for exarkun</title><link>http://disqus.com/by/exarkun/</link><description></description><atom:link href="http://disqus.com/exarkun/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 03 Apr 2014 21:06:07 -0000</lastBuildDate><item><title>Re: Don't Write Python Scripts, Write Python Libraries
     Posted on Apr 03, 2014 by  Jeff Knupp </title><link>http://jeffknupp.com/blog/2014/04/03/dont-write-python-scripts-write-python-libraries/#comment-1317625711</link><description>&lt;p&gt;Yes!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Thu, 03 Apr 2014 21:06:07 -0000</pubDate></item><item><title>Re: Declaring dependencies in Python</title><link>http://blog.ziade.org/2013/04/13/declaring-dependencies-in-python/#comment-857674114</link><description>&lt;p&gt;What's the reason for this idiom?&lt;/p&gt;&lt;p&gt;    try:&lt;br&gt;....import argparse&lt;br&gt;except ImportError:&lt;br&gt;....install_requires.append('argparse')&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Tue, 09 Apr 2013 11:43:39 -0000</pubDate></item><item><title>Re: Python's += Is Weird, Part II | A. Jesse Jiryu Davis</title><link>http://emptysquare.net/blog/python-increment-is-weird-part-ii/#comment-753692598</link><description>&lt;p&gt;Not sure what you mean here, but it doesn't sound right.  Consider:&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; x = []&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; y = id(x)&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; x += [0]&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; z = id(x)&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; y == z&lt;br&gt;True&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;That is to say, += does *not* create a new list.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Wed, 02 Jan 2013 16:57:17 -0000</pubDate></item><item><title>Re: Python's += Is Weird | A. Jesse Jiryu Davis</title><link>http://emptysquare.net/blog/python-increment-is-weird/#comment-752873234</link><description>&lt;p&gt;You left off my favorite bit of weirdness:&lt;/p&gt;&lt;p&gt;    x = ([],)&lt;br&gt;    try: x[0] += [3]&lt;br&gt;    except TypeError: print "+= raised TypeError"&lt;br&gt;    print "x =", x&lt;/p&gt;&lt;p&gt;If you're not already familiar with this case, see if you can predict the output before running it :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Tue, 01 Jan 2013 16:12:51 -0000</pubDate></item><item><title>Re: Calling All Twisted Daemon Experts</title><link>http://www.jonobacon.org/2012/02/25/calling-all-twisted-daemon-experts/#comment-449972378</link><description>&lt;p&gt;Use &lt;a href="http://twistedmatrix.com/documents/current/core/howto/basics.html" rel="nofollow noopener" target="_blank" title="http://twistedmatrix.com/documents/current/core/howto/basics.html"&gt;twistd&lt;/a&gt; and &lt;a href="http://twistedmatrix.com/documents/current/core/howto/tap.html" rel="nofollow noopener" target="_blank" title="http://twistedmatrix.com/documents/current/core/howto/tap.html"&gt;write a plugin&lt;/a&gt; (better) or &lt;a href="http://twistedmatrix.com/documents/current/core/howto/application.html" rel="nofollow noopener" target="_blank" title="http://twistedmatrix.com/documents/current/core/howto/application.html"&gt;a tac file&lt;/a&gt; (still okay) to glue it to your application.&lt;/p&gt;&lt;p&gt;twistd provides daemonization as well as reactor selection, logging configuration, privilege shedding, debugger integration, profiling, and several other esoteric platform-specific runtime configuration options.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Mon, 27 Feb 2012 11:15:29 -0000</pubDate></item><item><title>Re: Watch This</title><link>http://watchthis.farmr.com/blog/2012/02/19/seeding#comment-449937407</link><description>&lt;p&gt;Ah, interesting.  According to Wikipedia, perhaps they are only the same genus (Brassica) as the rest.  However (also according to Wikipedia), the origin appears to be lost.  Perhaps (my speculation) it was a very early cultivar of Brassica oleracea.  Or not: a little more searching reveals that cabbage and turnips have a different number of chromosomes (20 vs 18).  I don't really know, but this sounds like a stretch for being the result of selective cultivation.  Apparently turnips and cabbage hybridize by both giving all (!) of their chromosomes to the offspring.  Plants are crazy.  Thanks for the challenge: I now find my vocabulary even less up to the task of describing these things. :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Mon, 27 Feb 2012 10:22:35 -0000</pubDate></item><item><title>Re: Tornado Unittesting: Eventually Correct</title><link>http://emptysquare.net/blog/tornado-unittesting-eventually-correct/#comment-389572063</link><description>&lt;p&gt;Consider exploring some prior art.  For example, trial has had pretty good support for asynchronous testing for many years: &amp;lt;http: &lt;a href="http://twistedmatrix.com" rel="nofollow noopener" target="_blank" title="twistedmatrix.com"&gt;twistedmatrix.com&lt;/a&gt;="" documents="" current="" core="" howto="" trial.html=""&amp;gt;.  Trial's solution is better than your assertEventuallyEquals because tests complete *exactly* when they complete, instead of one poll interval afterwards.  If you have 7000 unit tests, you don't want to spend 700 seconds idling just because your tests don't immediately notice that they're already over.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Sun, 18 Dec 2011 21:07:47 -0000</pubDate></item><item><title>Re: wxPython: ANN: Namespace Diff Tool</title><link>http://www.blog.pythonlibrary.org/2011/11/10/wxpython-ann-namespace-diff-tool/#comment-360136976</link><description>&lt;p&gt;Hi Mike, I tried to run this on Ubuntu 10.04 which has Python 2.6 and wxPython 2.8.10, but &lt;a href="http://NDT.py" rel="nofollow noopener" target="_blank" title="NDT.py"&gt;NDT.py&lt;/a&gt; fails with this import error:&lt;/p&gt;&lt;p&gt;Traceback (most recent call last):  File "&lt;a href="http://NDT.py" rel="nofollow noopener" target="_blank" title="NDT.py"&gt;NDT.py&lt;/a&gt;", line 273, in &amp;lt;module&amp;gt;    import wx.lib.agw.pybusyinfo as PBIImportError: No module named pybusyinfo&lt;/p&gt;&lt;p&gt;I know you're just republishing the announcement, but I don't see anywhere further upstream where comments can be posted.&lt;/p&gt;&lt;p&gt;Any ideas about this issue?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Thu, 10 Nov 2011 11:55:43 -0000</pubDate></item><item><title>Re: Twisted.web vs Tornado Performance Test</title><link>http://www.apparatusproject.org/blog/2009/09/twisted-web-vs-tornado-performance-test/#comment-16540725</link><description>&lt;p&gt;I've investigated this a bit further and what I found suggests that this behavior may result from the platform's use of syn cookies.  When I was initially unable to reproduce this, I was using Ubuntu Hardy, which disables syn cookies by default.  After some experimenting on Ubuntu Jaunty, after a tip from Thomas Herve, I was able to reproduce the problem (although only at a much higher concurrency level - around 500).  Jaunty enables syn cookies by default.  Then, returning to Hardy and enabling syn cookies, I was able to produce the behavior there.  I was also able to provoke this behavior from ab running against the Tornado server - which is perfectly sensible if this explanation is correct, since it's primarily do to something the platform TCP stack is doing, not something either Twisted or Tornado is doing.&lt;/p&gt;&lt;p&gt;I haven't dug into this so deeply that I'm entirely confident that this completely explains the behavior, but I think it's a pretty good start.  A direction for further investigation would be to write a client like ab but which reports more identifying information about each connection so that the failing connections can be traced through the entire network.&lt;/p&gt;&lt;p&gt;One thing I'm not sure about is whether OS X uses syn cookies.  Some web pages I've found with Google suggest that it does, but it would be nice to get the information from a more authoritative/reliable source.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Sun, 13 Sep 2009 13:16:54 -0000</pubDate></item><item><title>Re: Twisted.web vs Tornado Performance Test</title><link>http://www.apparatusproject.org/blog/2009/09/twisted-web-vs-tornado-performance-test/#comment-16429704</link><description>&lt;p&gt;Also, I thought this might only show up after many more connections (I only ran 10,000 - but you ran 100,000).  However, I get the same results when running 100,000 total requests.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Fri, 11 Sep 2009 13:07:22 -0000</pubDate></item><item><title>Re: Twisted.web vs Tornado Performance Test</title><link>http://www.apparatusproject.org/blog/2009/09/twisted-web-vs-tornado-performance-test/#comment-16429587</link><description>&lt;p&gt;&amp;gt; What is noticeable is that after 50 concurrent connections, twisted.web’s webserver began to close the connection and not complete the test.&lt;/p&gt;&lt;p&gt;This is strange.  I've run this benchmark against Twisted Web many times in the past, and written lots of apps based on Twisted web.  I've never seen this problem before.  Indeed, I downloaded your &lt;a href="http://twisted.web.py" rel="nofollow noopener" target="_blank" title="twisted.web.py"&gt;twisted.web.py&lt;/a&gt; and ran ab against it at various levels of concurrency.  The tests all completed, up to the highest setting I tried, 1000:&lt;/p&gt;&lt;p&gt;$ ab -c 1000 -n 10000 http://localhost:8080/&lt;br&gt;...&lt;br&gt;Concurrency Level:      1000&lt;br&gt;Time taken for tests:   6.25909 seconds&lt;br&gt;Complete requests:      10000&lt;br&gt;Failed requests:        0&lt;br&gt;Write errors:           0&lt;/p&gt;&lt;p&gt;I wonder if you can investigate the cause of the closed connections you saw?  Or suggest what other factors might be involved which cause the behavior in your environment which are missing from mine.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Fri, 11 Sep 2009 13:05:26 -0000</pubDate></item><item><title>Re: clepy library now on pypi</title><link>http://blog.tplus1.com/index.php/2009/01/20/clepy-library-now-on-pypi/#comment-5408485</link><description>&lt;p&gt;Yep.  It should be pretty clear when you've got it working properly, since the source file/line number the warnings system displays will be useful instead of redundant. :)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Tue, 20 Jan 2009 18:05:42 -0000</pubDate></item><item><title>Re: clepy library now on pypi</title><link>http://blog.tplus1.com/index.php/2009/01/20/clepy-library-now-on-pypi/#comment-5407725</link><description>&lt;p&gt;Sure, but no promises you'll like it (it currently has the same problem as you pointed out for the pylons function, for example (though I wouldn't mind fixing that)) . ;)&lt;/p&gt;&lt;p&gt;&lt;a href="http://twistedmatrix.com/trac/browser/trunk/twisted/python/deprecate.py" rel="nofollow noopener" target="_blank" title="http://twistedmatrix.com/trac/browser/trunk/twisted/python/deprecate.py"&gt;http://twistedmatrix.com/tr...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Tue, 20 Jan 2009 17:22:09 -0000</pubDate></item><item><title>Re: clepy library now on pypi</title><link>http://blog.tplus1.com/index.php/2009/01/20/clepy-library-now-on-pypi/#comment-5407167</link><description>&lt;p&gt;I already have a library for deprecating things. :)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Tue, 20 Jan 2009 16:57:00 -0000</pubDate></item><item><title>Re: clepy library now on pypi</title><link>http://blog.tplus1.com/index.php/2009/01/20/clepy-library-now-on-pypi/#comment-5406914</link><description>&lt;p&gt;Wouldn't it be better if it defaulted to using a stacklevel which pointed the warning message at the real caller, rather than at the implementation of the decorator?&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exarkun</dc:creator><pubDate>Tue, 20 Jan 2009 16:44:13 -0000</pubDate></item></channel></rss>