<?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/"
		>
<channel>
	<title>Comments for self.collect(&amp;:code)</title>
	<atom:link href="http://benanne.net/code/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://benanne.net/code</link>
	<description>Sander Dieleman&#039;s glorified private pastebin. Or blog. Whatever.</description>
	<lastBuildDate>Tue, 02 Mar 2010 15:37:24 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Scoped mixins by Sander</title>
		<link>http://benanne.net/code/?p=186&#038;cpage=1#comment-188</link>
		<dc:creator>Sander</dc:creator>
		<pubDate>Tue, 02 Mar 2010 15:37:24 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=186#comment-188</guid>
		<description>I was talking about the PHP naming convention, which I purposefully mimiced. An inside joke with a friend, I thought it would be obvious. It definitely wasn&#039;t intended to be taken seriously.</description>
		<content:encoded><![CDATA[<p>I was talking about the PHP naming convention, which I purposefully mimiced. An inside joke with a friend, I thought it would be obvious. It definitely wasn&#8217;t intended to be taken seriously.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scoped mixins by anon</title>
		<link>http://benanne.net/code/?p=186&#038;cpage=1#comment-187</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Tue, 02 Mar 2010 15:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=186#comment-187</guid>
		<description>I don&#039;t see anything that looks like PHP that doesn&#039;t look like any other language. Try harder next time :-/</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see anything that looks like PHP that doesn&#8217;t look like any other language. Try harder next time :-/</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache rewrite rules are almost as horrid as XSLT by Sander</title>
		<link>http://benanne.net/code/?p=295&#038;cpage=1#comment-186</link>
		<dc:creator>Sander</dc:creator>
		<pubDate>Tue, 23 Feb 2010 10:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=295#comment-186</guid>
		<description>Thanks, that does make a lot of sense :) I guess I missed REQUEST_URI when I skimmed through the docs.</description>
		<content:encoded><![CDATA[<p>Thanks, that does make a lot of sense <img src='http://benanne.net/code/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I guess I missed REQUEST_URI when I skimmed through the docs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache rewrite rules are almost as horrid as XSLT by feniix</title>
		<link>http://benanne.net/code/?p=295&#038;cpage=1#comment-185</link>
		<dc:creator>feniix</dc:creator>
		<pubDate>Tue, 23 Feb 2010 06:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=295#comment-185</guid>
		<description>you don&#039;t need to do grouping, use grouping when you need to mangle the uri like exchanging parameters position or creating SEO friendly urls.
In in your case is just a waste of cpu and memory I recommend:
&quot;The Definitive Guide to Apache mod_rewrite&quot; 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www.got-djent.com$ [NC]
RewriteRule .* http://got-djent.com%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTP_HOST} ^www.benanne.net$ [NC]
RewriteRule .* http://benanne.net%{REQUEST_URI} [R=301,L]</description>
		<content:encoded><![CDATA[<p>you don&#8217;t need to do grouping, use grouping when you need to mangle the uri like exchanging parameters position or creating SEO friendly urls.<br />
In in your case is just a waste of cpu and memory I recommend:<br />
&#8220;The Definitive Guide to Apache mod_rewrite&#8221; </p>
<p>RewriteEngine On</p>
<p>RewriteCond %{HTTP_HOST} ^www.got-djent.com$ [NC]<br />
RewriteRule .* <a href="http://got-djent.com%" rel="nofollow">http://got-djent.com%</a>{REQUEST_URI} [R=301,L]</p>
<p>RewriteCond %{HTTP_HOST} ^www.benanne.net$ [NC]<br />
RewriteRule .* <a href="http://benanne.net%" rel="nofollow">http://benanne.net%</a>{REQUEST_URI} [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache rewrite rules are almost as horrid as XSLT by ziggy</title>
		<link>http://benanne.net/code/?p=295&#038;cpage=1#comment-183</link>
		<dc:creator>ziggy</dc:creator>
		<pubDate>Fri, 13 Nov 2009 09:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=295#comment-183</guid>
		<description>In httpd.conf you have to put this in the VirtualHost, Directory section.

Your understanding of the . wildcards is exactly correct. I see several versions of this code but no idea which one is a millisecond faster.

One reason to do this is so that all your links in end up at the same place, otherwise your googlejuice is spilled over duplicate pages, which isn&#039;t good.</description>
		<content:encoded><![CDATA[<p>In httpd.conf you have to put this in the VirtualHost, Directory section.</p>
<p>Your understanding of the . wildcards is exactly correct. I see several versions of this code but no idea which one is a millisecond faster.</p>
<p>One reason to do this is so that all your links in end up at the same place, otherwise your googlejuice is spilled over duplicate pages, which isn&#8217;t good.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixing lousy introspection support in Python DB APIs (partially) by Sander</title>
		<link>http://benanne.net/code/?p=352&#038;cpage=1#comment-182</link>
		<dc:creator>Sander</dc:creator>
		<pubDate>Fri, 30 Oct 2009 23:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=352#comment-182</guid>
		<description>The fix in question is very similar to the one for &lt;code&gt;is_null&lt;/code&gt; that is detailed here: an information schema query is used to &quot;correct&quot; the data. Note that my choice of words may have been a bit inappropriate; the API doesn&#039;t really define how the returned data should be interpreted, so one can&#039;t really argue that it is &quot;wrong&quot; in this case. It is, however, unintuitive and not very useful :)

The query in question is: &lt;pre lang=&quot;SQL&quot;&gt;SELECT character_maximum_length FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_schema = &#039;db_name&#039; AND table_name = &#039;tbl_name&#039; AND column_name = &#039;col_name&#039;&lt;/pre&gt;
This should return the value that any reasonable person would expect for &lt;code&gt;internal_size&lt;/code&gt; on a &lt;code&gt;VARCHAR&lt;/code&gt; field.

In the project I described, I wrote a wrapper function that calls &lt;code&gt;cursor.description&lt;/code&gt; and then applies a number of fixes by running queries on &lt;code&gt;INFORMATION_SCHEMA&lt;/code&gt; if necessary (for both MySQL and PostgreSQL). It then returns the &quot;corrected&quot; tuple.

I don&#039;t know if this is the best way to retrieve this kind of information, but it works, at least :) I hope this helps. If it doesn&#039;t, don&#039;t hesitate to tell me and I&#039;ll see what I can do.</description>
		<content:encoded><![CDATA[<p>The fix in question is very similar to the one for <code>is_null</code> that is detailed here: an information schema query is used to &#8220;correct&#8221; the data. Note that my choice of words may have been a bit inappropriate; the API doesn&#8217;t really define how the returned data should be interpreted, so one can&#8217;t really argue that it is &#8220;wrong&#8221; in this case. It is, however, unintuitive and not very useful <img src='http://benanne.net/code/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The query in question is:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> character_maximum_length <span style="color: #993333; font-weight: bold;">FROM</span> INFORMATION_SCHEMA<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">COLUMNS</span>
<span style="color: #993333; font-weight: bold;">WHERE</span> table_schema <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'db_name'</span> <span style="color: #993333; font-weight: bold;">AND</span> table_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'tbl_name'</span> <span style="color: #993333; font-weight: bold;">AND</span> column_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'col_name'</span></pre></div></div>

<p>This should return the value that any reasonable person would expect for <code>internal_size</code> on a <code>VARCHAR</code> field.</p>
<p>In the project I described, I wrote a wrapper function that calls <code>cursor.description</code> and then applies a number of fixes by running queries on <code>INFORMATION_SCHEMA</code> if necessary (for both MySQL and PostgreSQL). It then returns the &#8220;corrected&#8221; tuple.</p>
<p>I don&#8217;t know if this is the best way to retrieve this kind of information, but it works, at least <img src='http://benanne.net/code/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I hope this helps. If it doesn&#8217;t, don&#8217;t hesitate to tell me and I&#8217;ll see what I can do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixing lousy introspection support in Python DB APIs (partially) by Brian Morton</title>
		<link>http://benanne.net/code/?p=352&#038;cpage=1#comment-181</link>
		<dc:creator>Brian Morton</dc:creator>
		<pubDate>Fri, 30 Oct 2009 22:59:13 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=352#comment-181</guid>
		<description>You mention that a fix for MySQL&#039;s erroneous internal_size has been written.  Would you mind sharing the details of that information?  I am tracking down some details to fix a Django bug that affects introspection and I think that information might be useful.  I&#039;m assuming it is a patch to MySQLdb, but is it in a release version, or only in trunk?

Thanks for any help you can give me.</description>
		<content:encoded><![CDATA[<p>You mention that a fix for MySQL&#8217;s erroneous internal_size has been written.  Would you mind sharing the details of that information?  I am tracking down some details to fix a Django bug that affects introspection and I think that information might be useful.  I&#8217;m assuming it is a patch to MySQLdb, but is it in a release version, or only in trunk?</p>
<p>Thanks for any help you can give me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache rewrite rules are almost as horrid as XSLT by Max</title>
		<link>http://benanne.net/code/?p=295&#038;cpage=1#comment-62</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Fri, 28 Aug 2009 16:00:51 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=295#comment-62</guid>
		<description>Alright ;) in that case I agree with you.  Everyone &quot;knows&quot; that whatever you type is on the www, unless you&#039;re on corporate intranet or something.  And it only breaks caching if you don&#039;t redirect from one to the other.  Really the strongest argument is that it&#039;s...vestigial.  There&#039;s no reason you *need* to have it.  It&#039;s definitely a growing trend to not have it.</description>
		<content:encoded><![CDATA[<p>Alright <img src='http://benanne.net/code/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  in that case I agree with you.  Everyone &#8220;knows&#8221; that whatever you type is on the www, unless you&#8217;re on corporate intranet or something.  And it only breaks caching if you don&#8217;t redirect from one to the other.  Really the strongest argument is that it&#8217;s&#8230;vestigial.  There&#8217;s no reason you *need* to have it.  It&#8217;s definitely a growing trend to not have it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache rewrite rules are almost as horrid as XSLT by Sander</title>
		<link>http://benanne.net/code/?p=295&#038;cpage=1#comment-61</link>
		<dc:creator>Sander</dc:creator>
		<pubDate>Fri, 28 Aug 2009 15:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=295#comment-61</guid>
		<description>The &quot;less typing&quot; argument was in jest ;) Well, kind of, anyway. It certainly isn&#039;t a good enough reason to loudly campaign for the abolishment of &quot;www&quot;. The main reason I prefer without is because, well, it doesn&#039;t do anything useful, and because of the caching situation.

The ctrl+enter thing is a nice trick which I often use myself (and also its friends shift+enter and ctrl+shift+enter), but that is guaranteed to work by putting a redirect in place. Class B compliance is the best of both worlds, really.</description>
		<content:encoded><![CDATA[<p>The &#8220;less typing&#8221; argument was in jest <img src='http://benanne.net/code/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Well, kind of, anyway. It certainly isn&#8217;t a good enough reason to loudly campaign for the abolishment of &#8220;www&#8221;. The main reason I prefer without is because, well, it doesn&#8217;t do anything useful, and because of the caching situation.</p>
<p>The ctrl+enter thing is a nice trick which I often use myself (and also its friends shift+enter and ctrl+shift+enter), but that is guaranteed to work by putting a redirect in place. Class B compliance is the best of both worlds, really.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache rewrite rules are almost as horrid as XSLT by Max</title>
		<link>http://benanne.net/code/?p=295&#038;cpage=1#comment-60</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Fri, 28 Aug 2009 15:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://benanne.net/code/?p=295#comment-60</guid>
		<description>I&#039;m not totally sure I believe in the &quot;no www&quot; movement.  It certainly doesn&#039;t save you typing!

For instance, if twitter didn&#039;t also accept www.twitter.com, I would have to type t-w-i-t-t-e-r-dot-c-o-m-enter.  But because they DO allow www, all I have to type is t-w-i-t-t-e-r-ctrl-enter.  That&#039;s like 3 characters difference!  And yes, it works in all browsers.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not totally sure I believe in the &#8220;no www&#8221; movement.  It certainly doesn&#8217;t save you typing!</p>
<p>For instance, if twitter didn&#8217;t also accept <a href="http://www.twitter.com" rel="nofollow">http://www.twitter.com</a>, I would have to type t-w-i-t-t-e-r-dot-c-o-m-enter.  But because they DO allow www, all I have to type is t-w-i-t-t-e-r-ctrl-enter.  That&#8217;s like 3 characters difference!  And yes, it works in all browsers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
