<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Kristján&#039;s Cosmic Percolator</title>
	<atom:link href="http://cosmicpercolator.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://cosmicpercolator.com</link>
	<description>My God, it&#039;s full of stars!</description>
	<lastBuildDate>Mon, 27 May 2013 10:41:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Surprising Python by Kristján Valur</title>
		<link>http://cosmicpercolator.com/2013/05/23/surprising-python/comment-page-1/#comment-325</link>
		<dc:creator><![CDATA[Kristján Valur]]></dc:creator>
		<pubDate>Mon, 27 May 2013 10:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=333#comment-325</guid>
		<description><![CDATA[&lt;em&gt;&quot;But again how do you install it into $PATH &quot;&lt;/em&gt;
The answer is that you don&#039;t.  You add the directory to $PATH.
Symbolic links aren&#039;t &quot;shortcuts&quot;.  Shortcuts need help from the shell to manually translate them to the proper place.  The &quot;dereferencing&quot; of the link should not be the job of the executable.  It is a terrible, terrible, hack if the program starts performing the job of the shell for the convenience of a subset of the users.

You mention a number of programs that have this property.  I&#039;m curious as to what they are.  I gave a pretty good counter-example with the world&#039;s most ubiquitous  programming language.

It think that if Python, or any language, decides to perform this sort of shortcut patching for the shell, it should at least be enabled via an optional argument.

As for hard links, nobody in their right mind uses hard links after symbolic links were invented :)]]></description>
		<content:encoded><![CDATA[<p><em>&#8220;But again how do you install it into $PATH &#8220;</em><br />
The answer is that you don&#8217;t.  You add the directory to $PATH.<br />
Symbolic links aren&#8217;t &#8220;shortcuts&#8221;.  Shortcuts need help from the shell to manually translate them to the proper place.  The &#8220;dereferencing&#8221; of the link should not be the job of the executable.  It is a terrible, terrible, hack if the program starts performing the job of the shell for the convenience of a subset of the users.</p>
<p>You mention a number of programs that have this property.  I&#8217;m curious as to what they are.  I gave a pretty good counter-example with the world&#8217;s most ubiquitous  programming language.</p>
<p>It think that if Python, or any language, decides to perform this sort of shortcut patching for the shell, it should at least be enabled via an optional argument.</p>
<p>As for hard links, nobody in their right mind uses hard links after symbolic links were invented <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Surprising Python by Beni Paskin-Cherniavsky</title>
		<link>http://cosmicpercolator.com/2013/05/23/surprising-python/comment-page-1/#comment-324</link>
		<dc:creator><![CDATA[Beni Paskin-Cherniavsky]]></dc:creator>
		<pubDate>Sat, 25 May 2013 02:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=333#comment-324</guid>
		<description><![CDATA[Let me argue that it&#039;s not an obscure feature but a widely applicable unixy behavior.
Consider *any* program whose installation consists of more than one file.  One (at least) is an executable, which you would like to install somewhere on $PATH (/usr/bin, a personal ~/bin etc.).  The other supporting files  (whether data or dynamically loaded code) do not belong there.  How will the executable find them?

One approach is to hardcoding: something like &quot;./configure --prefix=/usr; make&quot; creates an executable that always looks under /usr/lib/foo and/or /usr/share/foo.  A common variant is not compiling the path into the main binary but generating a small wrapper script that knows the path.

But that&#039;s not good enough.
(1) If you&#039;re developing the program, you want to test it without installing in a centralized location.
(2) Same you&#039;re a user who just checked it out from version control.  You might prefer to just run it from there — less of a mess then installing, and you can just &quot;git pull&quot; the newest version without rebuilding (esp. if it&#039;s a purely interpreted code).
(3) Remote execution (like Hadoop) is easier if your program can run unmodified from any location.

The obvious — unavoidable — solution is the executable inspecting argv[0], e.g.
  do_something $(dirname $0)/supporting-file

But again how do you install it into $PATH without dragging the supporting files?  Copying or hardlinking doesn&#039;t leave a trace of where to look for the supporting files, and has to be repeated if you modify/upgrade the program.  But symlinking is perfect!  For it to work, the program must do:
  do_something $(dirname (readlink -f $0))/supporting-file
Indeed I&#039;ve seen this pattern in many programs, and it is precisely what Python automates when filling in sys.path[0]!

[P.S. There is also the self-extracting archive approach, which gives you a standalone fully relocatable binary.  This is handy for remote deployment, but it&#039;s pretty ugly...  Python has builtin zipimport allowing you to avoid extraction — but only for pure python, extension modules must be extracted since you can&#039;t dlopen() from memory.]

=&gt;
IMHO the Right solution would be for Hadoop to use a hardlink tree rathan symlink tree.  Hardlinks are truly transparent so python — or any other app — would not break on them.
[I believe most uses of linktrees to save space, including mercurial clones, employ hardlinks.  Mostly because they&#039;re symmetric - you can delete the original tree and the clone would not be broken.]]]></description>
		<content:encoded><![CDATA[<p>Let me argue that it&#8217;s not an obscure feature but a widely applicable unixy behavior.<br />
Consider *any* program whose installation consists of more than one file.  One (at least) is an executable, which you would like to install somewhere on $PATH (/usr/bin, a personal ~/bin etc.).  The other supporting files  (whether data or dynamically loaded code) do not belong there.  How will the executable find them?</p>
<p>One approach is to hardcoding: something like &#8220;./configure &#8211;prefix=/usr; make&#8221; creates an executable that always looks under /usr/lib/foo and/or /usr/share/foo.  A common variant is not compiling the path into the main binary but generating a small wrapper script that knows the path.</p>
<p>But that&#8217;s not good enough.<br />
(1) If you&#8217;re developing the program, you want to test it without installing in a centralized location.<br />
(2) Same you&#8217;re a user who just checked it out from version control.  You might prefer to just run it from there — less of a mess then installing, and you can just &#8220;git pull&#8221; the newest version without rebuilding (esp. if it&#8217;s a purely interpreted code).<br />
(3) Remote execution (like Hadoop) is easier if your program can run unmodified from any location.</p>
<p>The obvious — unavoidable — solution is the executable inspecting argv[0], e.g.<br />
  do_something $(dirname $0)/supporting-file</p>
<p>But again how do you install it into $PATH without dragging the supporting files?  Copying or hardlinking doesn&#8217;t leave a trace of where to look for the supporting files, and has to be repeated if you modify/upgrade the program.  But symlinking is perfect!  For it to work, the program must do:<br />
  do_something $(dirname (readlink -f $0))/supporting-file<br />
Indeed I&#8217;ve seen this pattern in many programs, and it is precisely what Python automates when filling in sys.path[0]!</p>
<p>[P.S. There is also the self-extracting archive approach, which gives you a standalone fully relocatable binary.  This is handy for remote deployment, but it's pretty ugly...  Python has builtin zipimport allowing you to avoid extraction — but only for pure python, extension modules must be extracted since you can't dlopen() from memory.]</p>
<p>=&gt;<br />
IMHO the Right solution would be for Hadoop to use a hardlink tree rathan symlink tree.  Hardlinks are truly transparent so python — or any other app — would not break on them.<br />
[I believe most uses of linktrees to save space, including mercurial clones, employ hardlinks.  Mostly because they're symmetric - you can delete the original tree and the clone would not be broken.]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Surprising Python by Kristján Valur</title>
		<link>http://cosmicpercolator.com/2013/05/23/surprising-python/comment-page-1/#comment-323</link>
		<dc:creator><![CDATA[Kristján Valur]]></dc:creator>
		<pubDate>Fri, 24 May 2013 09:27:06 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=333#comment-323</guid>
		<description><![CDATA[It&#039;s a an misconceived contract though, IMHO, and I would like to see us take steps to correct our mistakes.  There are ways to do it, optional flags, for example.
But I&#039;m not going to fight that battle, it is a relatively minor issue as it is.  The point of my post was to point out a very surprising, and very obscure, feature.  No one seemed to even know about it, except the BDFL :)]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s a an misconceived contract though, IMHO, and I would like to see us take steps to correct our mistakes.  There are ways to do it, optional flags, for example.<br />
But I&#8217;m not going to fight that battle, it is a relatively minor issue as it is.  The point of my post was to point out a very surprising, and very obscure, feature.  No one seemed to even know about it, except the BDFL <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Surprising Python by Israel Fruchter</title>
		<link>http://cosmicpercolator.com/2013/05/23/surprising-python/comment-page-1/#comment-322</link>
		<dc:creator><![CDATA[Israel Fruchter]]></dc:creator>
		<pubDate>Fri, 24 May 2013 09:13:04 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=333#comment-322</guid>
		<description><![CDATA[I agree it&#039;s weird, but Guido has a point there.
Not breaking the contract with users (same approach as linux kernel)

Last time Python did it with Strings in Python3. the debacle about it isn&#039;t finished to this day.]]></description>
		<content:encoded><![CDATA[<p>I agree it&#8217;s weird, but Guido has a point there.<br />
Not breaking the contract with users (same approach as linux kernel)</p>
<p>Last time Python did it with Strings in Python3. the debacle about it isn&#8217;t finished to this day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Atomic by Kristján Valur</title>
		<link>http://cosmicpercolator.com/2013/03/12/atomic/comment-page-1/#comment-303</link>
		<dc:creator><![CDATA[Kristján Valur]]></dc:creator>
		<pubDate>Sat, 23 Mar 2013 16:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=3#comment-303</guid>
		<description><![CDATA[Yes, I should have mentioned that I&lt;a href=&quot;http://morepypy.blogspot.ch/2012/05/stm-update-back-to-threads.html&quot; rel=&quot;nofollow&quot;&gt; had a conversation with Armin&lt;/a&gt; about this when he originally mentioned this on the PyPy blog.  His patch was more ambitious, and involved not releasing the GIL even when explicitly doing so around blocking IO calls or other long duration calls.
The point of my proposal is to limit ourselves to merely stopping the volountary release of the GIL, but leaving explicit GIL release alone.  This does not introduce any new deadlock cases.]]></description>
		<content:encoded><![CDATA[<p>Yes, I should have mentioned that I<a href="http://morepypy.blogspot.ch/2012/05/stm-update-back-to-threads.html" rel="nofollow"> had a conversation with Armin</a> about this when he originally mentioned this on the PyPy blog.  His patch was more ambitious, and involved not releasing the GIL even when explicitly doing so around blocking IO calls or other long duration calls.<br />
The point of my proposal is to limit ourselves to merely stopping the volountary release of the GIL, but leaving explicit GIL release alone.  This does not introduce any new deadlock cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Atomic by Nick Coghlan (@ncoghlan_dev)</title>
		<link>http://cosmicpercolator.com/2013/03/12/atomic/comment-page-1/#comment-302</link>
		<dc:creator><![CDATA[Nick Coghlan (@ncoghlan_dev)]]></dc:creator>
		<pubDate>Sat, 23 Mar 2013 15:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=3#comment-302</guid>
		<description><![CDATA[Armin Rigo suggested much the same thing as a hook for C extensions to play with when he first started working on his STM experiment, so it sounds good to me. (Armin ultimately rejected his own patch, http://bugs.python.org/issue12850, as not sufficiently interesting, but I think a cheap &quot;threading.atomic()&quot; context manager is interesting enough to be worthwhile, particularly since it allows certain data structure manipulation code to be made safe across multiple interpreter implementations)]]></description>
		<content:encoded><![CDATA[<p>Armin Rigo suggested much the same thing as a hook for C extensions to play with when he first started working on his STM experiment, so it sounds good to me. (Armin ultimately rejected his own patch, <a href="http://bugs.python.org/issue12850" rel="nofollow">http://bugs.python.org/issue12850</a>, as not sufficiently interesting, but I think a cheap &#8220;threading.atomic()&#8221; context manager is interesting enough to be worthwhile, particularly since it allows certain data structure manipulation code to be made safe across multiple interpreter implementations)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Blog moved by Kristján Valur</title>
		<link>http://cosmicpercolator.com/2013/03/02/blog-moved/comment-page-1/#comment-300</link>
		<dc:creator><![CDATA[Kristján Valur]]></dc:creator>
		<pubDate>Wed, 13 Mar 2013 18:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=4#comment-300</guid>
		<description><![CDATA[And:  It turned out that wordpress didn&#039;t actually copy the images in the old blog and stored it locally.  So, I must now resurrect the blog again, and find a way to have those files moved.]]></description>
		<content:encoded><![CDATA[<p>And:  It turned out that wordpress didn&#8217;t actually copy the images in the old blog and stored it locally.  So, I must now resurrect the blog again, and find a way to have those files moved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Blog moved by Kristján Valur</title>
		<link>http://cosmicpercolator.com/2013/03/02/blog-moved/comment-page-1/#comment-299</link>
		<dc:creator><![CDATA[Kristján Valur]]></dc:creator>
		<pubDate>Sat, 09 Mar 2013 10:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://cosmicpercolator.com/?p=4#comment-299</guid>
		<description><![CDATA[And it is done!
After resurrecting my blog on a virtual machine at the office, I realized that it needed to be accessible in the Interzone so that wordpress.com could migrate its images and other content.
So, I zipped it up, transfered it to my phone, and fired it up at home again, on my home workstation which is accessible via NAT traversal at krisvale.servebeer.com.

So, now it is back to doing interesting stuff!]]></description>
		<content:encoded><![CDATA[<p>And it is done!<br />
After resurrecting my blog on a virtual machine at the office, I realized that it needed to be accessible in the Interzone so that wordpress.com could migrate its images and other content.<br />
So, I zipped it up, transfered it to my phone, and fired it up at home again, on my home workstation which is accessible via NAT traversal at krisvale.servebeer.com.</p>
<p>So, now it is back to doing interesting stuff!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Optimizing Python Condition Variables with Telemetry by Kristján Valur</title>
		<link>http://cosmicpercolator.com/2012/05/25/optimizing-python-condition-variables-with-telemetry/comment-page-1/#comment-297</link>
		<dc:creator><![CDATA[Kristján Valur]]></dc:creator>
		<pubDate>Tue, 29 May 2012 09:25:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ccpgames.com/kristjan/?p=213#comment-297</guid>
		<description><![CDATA[Yes, in many other cases we have non-python worker threads and then can keep the queueing non-Python.  In this case, I specifically wanted to use Python worker threads to spare me some pain.
One particularly bothersome thing with using non-python workers, is that object lifetime management becomes more difficult, since the worker cannot use reference counting.  For example, the worker needs its own reference to arguments, or needs to copy them, because the client may get killed before the worker exits.]]></description>
		<content:encoded><![CDATA[<p>Yes, in many other cases we have non-python worker threads and then can keep the queueing non-Python.  In this case, I specifically wanted to use Python worker threads to spare me some pain.<br />
One particularly bothersome thing with using non-python workers, is that object lifetime management becomes more difficult, since the worker cannot use reference counting.  For example, the worker needs its own reference to arguments, or needs to copy them, because the client may get killed before the worker exits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Optimizing Python Condition Variables with Telemetry by Rene Dudfield</title>
		<link>http://cosmicpercolator.com/2012/05/25/optimizing-python-condition-variables-with-telemetry/comment-page-1/#comment-296</link>
		<dc:creator><![CDATA[Rene Dudfield]]></dc:creator>
		<pubDate>Mon, 28 May 2012 14:34:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ccpgames.com/kristjan/?p=213#comment-296</guid>
		<description><![CDATA[Hi,

nice article, thanks.  I&#039;ve found using a non-python queue is quite useful for speeding up things.  The worker threads can insert into the queue without obtaining the python GIL.  Works nicely if your worker code is mostly C stuff.  Seems like you&#039;ve sped up the python side queue stuff quite a lot where that might not be necessary anymore.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>nice article, thanks.  I&#8217;ve found using a non-python queue is quite useful for speeding up things.  The worker threads can insert into the queue without obtaining the python GIL.  Works nicely if your worker code is mostly C stuff.  Seems like you&#8217;ve sped up the python side queue stuff quite a lot where that might not be necessary anymore.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
