<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Code Kills - Comments</title>
    <link>http://blog.codekills.net/</link>
    <description>Code Kills - </description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:david@wolever.net" />
    <generator>Serendipity 1.1.3 - http://www.s9y.org/</generator>
    <pubDate>Wed, 07 Jan 2009 14:13:44 GMT</pubDate>

    <image>
        <url>http://blog.codekills.net/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Code Kills - Comments - Code Kills - </title>
        <link>http://blog.codekills.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>David Wolever: Why I Don't Like git</title>
    <link>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#c88</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=42</wfw:comment>

    

    <author>david@wolever.net (David Wolever)</author>
    <content:encoded>
    &lt;p&gt;&lt;strong&gt;Zuzel&lt;/strong&gt;: mmm I hadn&#039;t though of using git-stash -- I&#039;ll try that the next time everything explodes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jeff&lt;/strong&gt;: Ah, ok -- that makes sense.  I&#039;ve just fiddled around with &lt;code&gt;git branch&lt;/code&gt; and that&#039;s making a bit more sense.  I think I&#039;m &lt;em&gt;starting&lt;/em&gt; to understand why it needs to use rebase, too... But that will take a 12 hour plane trip to think over.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Felipe&lt;/strong&gt;: Yup &lt;img src=&quot;http://blog.codekills.net/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; Well, sort of.  I don&#039;t like it because it makes more complex workflows (eg, as Jeff mentioned, push some changes over to SVN while ignoring others) easier at the expense of complicating simple workflows (eg, with svk I can simply remember revision numbers, where with git I&#039;d either need to remember the delta (eg HEAD~10) or the SHA hash)... And since the majority of the things I use version control for are simple, I don&#039;t like the extra complexity.&lt;/p&gt;

&lt;p&gt;For example, to perform the same set of actions in Bazaar, I sit around waiting^H^H^H^H^H^H^H^H^H^H can use exactly the same commands I would use when I&#039;m dealing with a native bzr repository (eg, &lt;code&gt;bzr co svn://..../&lt;/code&gt;; &lt;code&gt;bzr commit&lt;/code&gt; (which can either commit locally or commit then push to SVN), &lt;code&gt;bzr push&lt;/code&gt;, what have you).&lt;/p&gt;

&lt;p&gt;Anyway, thanks for the suggestions -- I&#039;ll keep playing around, and maybe one day I&#039;ll understand how to rebase the index packs from master into remote...&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 27 Aug 2008 14:42:02 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/42-guid.html#c88</guid>
    
</item>
<item>
    <title>Felipe Contreras: Why I Don't Like git</title>
    <link>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#c87</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=42</wfw:comment>

    

    <author>felipe.contreras@gmail.com (Felipe Contreras)</author>
    <content:encoded>
    &lt;p&gt;You don&#039;t like git because you are using it wrong and don&#039;t care to learn the right way?&lt;/p&gt;

&lt;p&gt;Check any git-svn tutorial.&lt;/p&gt;

&lt;p&gt;What you want is git-svn rebase, not fetch.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 27 Aug 2008 13:19:15 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/42-guid.html#c87</guid>
    
</item>
<item>
    <title>Jeff Balogh: Why I Don't Like git</title>
    <link>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#c86</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=42</wfw:comment>

    

    <author>me@jeffbalogh.org (Jeff Balogh)</author>
    <content:encoded>
    &lt;p&gt;If you look at the output from &lt;code&gt;git svn fetch&lt;/code&gt;  you might notice:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;r13 = 45f5309 (zuze)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That &lt;code&gt;(zuze)&lt;/code&gt; marker tells you what branch the new patch belongs to.  Right now you&#039;re on master, so of course you can&#039;t see code that&#039;s only on the zuze branch.&lt;/p&gt;

&lt;p&gt;Check out &lt;code&gt;git branch -r&lt;/code&gt; to see all the remote branches, and use &lt;code&gt;git checkout zuze&lt;/code&gt; to switch to that branch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;zuze&lt;/code&gt; is a remote branch, which means that you can&#039;t commit changes to it (I think, I&#039;m not at my machine right now so I can&#039;t check).  If you wanted to make changes, you would create a new local branch that tracks the remote branch: &lt;code&gt;git checkout -b &amp;lt;local branch name&amp;gt; remotes/zuze&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;git-svn&lt;/code&gt; uses &lt;code&gt;rebase&lt;/code&gt; because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If it merged local and upstream changes, subversion would have no idea what was going on.&lt;/li&gt;
&lt;li&gt;If you have local patches, you don&#039;t need or want the merge commit anyways; rebase tells git to pop your patches out of the old tree, add the new upstream changes to your repo, and reapply your local changes.&lt;/li&gt;
&lt;/ol&gt;
 
    </content:encoded>

    <pubDate>Wed, 27 Aug 2008 12:50:15 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/42-guid.html#c86</guid>
    
</item>
<item>
    <title>Zuzel Vera Pacheco: Why I Don't Like git</title>
    <link>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#c85</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/42-Why-I-Dont-Like-git.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=42</wfw:comment>

    

    <author>zuze@uh.cu (Zuzel Vera Pacheco)</author>
    <content:encoded>
    &lt;p&gt;Try with:
git stash
git-svn rebase
git stash apply&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 27 Aug 2008 11:54:36 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/42-guid.html#c85</guid>
    
</item>
<item>
    <title>Ben: Solving Gridflip</title>
    <link>http://blog.codekills.net/archives/16-Solving-Gridflip.html#c84</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/16-Solving-Gridflip.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=16</wfw:comment>

    

    <author>david@wolever.net (Ben)</author>
    <content:encoded>
    &lt;p&gt;@cc:&lt;/p&gt;

&lt;p&gt;While that is true in the general case, if you study the behaviour of say, a 3x3 or 4x4 grid (initialized to some random state), you&#039;ll notice that not every flip is worth flipping. If a row or col is already positive, there is no point to flipping it. So while what you said is true in the general case, it&#039;s not really applicable in the case of gridflip because you&#039;ll notice that the solution space is greatly decreased by the fact that it&#039;s pointless to flip already-positive rows and columns.&lt;/p&gt;

&lt;p&gt;Because of this, each and every configuration does not need to be brute-forced, and therefore can be recursively solved.&lt;/p&gt;

&lt;p&gt;My recursive solution (the iterative one is also buried in there somewhere too):&lt;/p&gt;

&lt;p&gt;http://apps.facebook.com/files/shared/rd9zj2z018&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Tue, 19 Aug 2008 21:54:30 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/16-guid.html#c84</guid>
    
</item>
<item>
    <title>Andrey: OpenMP and Visual C++ the free way (sorta)</title>
    <link>http://blog.codekills.net/archives/25-OpenMP-and-Visual-C++-the-free-way-sorta.html#c83</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/25-OpenMP-and-Visual-C++-the-free-way-sorta.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=25</wfw:comment>

    

    <author>karpov@viva64.com (Andrey)</author>
    <content:encoded>
    &lt;p&gt;That do you think about article &quot;32 OpenMP traps for C++ developers&quot;?
http://www.viva64.com/articles/32_OpenMP_traps.html&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 11 Jul 2008 14:12:33 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/25-guid.html#c83</guid>
    
</item>
<item>
    <title>Johnny: Python Brain-Teaser</title>
    <link>http://blog.codekills.net/archives/41-Python-Brain-Teaser.html#c82</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/41-Python-Brain-Teaser.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=41</wfw:comment>

    

    <author>johnnyfx91@hotmail.com (Johnny)</author>
    <content:encoded>
    &lt;p&gt;Huh????&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Thu, 10 Jul 2008 17:32:06 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/41-guid.html#c82</guid>
    
</item>
<item>
    <title>Rafael: Python Brain-Teaser</title>
    <link>http://blog.codekills.net/archives/41-Python-Brain-Teaser.html#c79</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/41-Python-Brain-Teaser.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=41</wfw:comment>

    

    <author>rafael@nexedi.com (Rafael)</author>
    <content:encoded>
    &lt;p&gt;x.get_me.im_class
&lt;class __main__.Bar at 0xb7a66b6c&gt;&lt;/p&gt;

&lt;p&gt;For me he expects that x is class Bar and not from class Foo : )&lt;/p&gt;

&lt;p&gt;a good way to do it is:&lt;/p&gt;

&lt;p&gt;def get_me(self):
     return self.me&lt;/p&gt;

&lt;p&gt;class Foo:
    me = &quot;foo&quot;&lt;/p&gt;

&lt;p&gt;class Bar:
    me = &quot;bar&quot;
    def get_me(self):
        return self.me&lt;/p&gt;

&lt;p&gt;Foo.get_me = get_me
&lt;h1&gt;and maybe&lt;/h1&gt;&lt;/p&gt;

&lt;p&gt;Bar.get_me = get_me
&lt;h1&gt;For keep everything the same.&lt;/h1&gt;&lt;/p&gt;

&lt;p&gt;x = Foo()&lt;/p&gt;

&lt;p&gt;print x.get_me()&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://blog.codekills.net/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 30 May 2008 15:08:17 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/41-guid.html#c79</guid>
    
</item>
<item>
    <title>David Wolever: SSH Connection Sharing</title>
    <link>http://blog.codekills.net/archives/40-SSH-Connection-Sharing.html#c77</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/40-SSH-Connection-Sharing.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=40</wfw:comment>

    

    <author>david@wolever.net (David Wolever)</author>
    <content:encoded>
    &lt;p&gt;The only attack vector opened up by shared connections relies on the attacker having access to &lt;code&gt;~/.ssh/$socket&lt;/code&gt; while the connection is still active.  To do that, though, they either need root or access to your account (permissions are 600 by default).&lt;/p&gt;

&lt;p&gt;So, if you don&#039;t trust root, you might not want to use this trick... But, then, a malicious root could exploit many other attack vectors (modifying &lt;code&gt;/usr/bin/ssh&lt;/code&gt; is the first that comes to mind), so you probably shouldn&#039;t be using that machine either &lt;img src=&quot;http://blog.codekills.net/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I&#039;m not sure what race conditions during reboot you have in mind, though... Sure, someone &lt;em&gt;might&lt;/em&gt; gain access to a dead socket, but that would just leave them with a bunch of &lt;code&gt;read(2)&lt;/code&gt; errors.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 17 May 2008 14:18:54 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/40-guid.html#c77</guid>
    
</item>
<item>
    <title>Greg Wilson: SSH Connection Sharing</title>
    <link>http://blog.codekills.net/archives/40-SSH-Connection-Sharing.html#c76</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/40-SSH-Connection-Sharing.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=40</wfw:comment>

    

    <author>gvwilson@cs.toronto.edu (Greg Wilson)</author>
    <content:encoded>
    &lt;p&gt;For bonus marks, discuss how to use shared connections as an attack vector.  (Hint: think race conditions during reboot.)&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 17 May 2008 11:43:39 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/40-guid.html#c76</guid>
    
</item>
<item>
    <title>dwmsyron: Secure RSS with DrProject</title>
    <link>http://blog.codekills.net/archives/28-Secure-RSS-with-DrProject.html#c75</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/28-Secure-RSS-with-DrProject.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=28</wfw:comment>

    

    <author>david@wolever.net (dwmsyron)</author>
    <content:encoded>
    &lt;p&gt;&quot;If [attackers] get [the key] wrong, they will have to wait for the legitimate user to get a new key, find that key, then try again.&quot;&lt;/p&gt;

&lt;p&gt;That fixes one problem by creating another. An attacker could deny service (disable legitimate feeds) by setting up a script that frequently uses wrong keys.&lt;/p&gt;

&lt;p&gt;That said, users should at least have the ability to generate new keys.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 07 May 2008 02:39:58 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/28-guid.html#c75</guid>
    
</item>
<item>
    <title>Anonymous: 'Optimal Movie Seating' Puzzle</title>
    <link>http://blog.codekills.net/archives/14-Optimal-Movie-Seating-Puzzle.html#c73</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/14-Optimal-Movie-Seating-Puzzle.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=14</wfw:comment>

    

    <author>codekills@gmail.com (Anonymous)</author>
    <content:encoded>
    &lt;p&gt;I&#039;m curious, after the 5 CPU hours, what was the optimum solution you came up with? I used a different method that is probabilistic, and runs quickly, but I&#039;m not sure if it&#039;s close to an optimum solution. Since I&#039;m going through far fewer iterations (~500), I&#039;d love to know the actual solution you came up with. 36 seems to be the highest score I can get, and there seem to be a few ways to get that. Here are some of the configurations I got:
([&#039;M&#039;, &#039;E&#039;, &#039;I&#039;, &#039;A&#039;, &#039;B&#039;, &#039;D&#039;, &#039;C&#039;, &#039;Z&#039;, &#039;S&#039;, &#039;W&#039;, &#039;V&#039;, &#039;P&#039;, &#039;L&#039;, &#039;J&#039;, &#039;R&#039;, &#039;T&#039;], 36)
([&#039;R&#039;, &#039;S&#039;, &#039;Z&#039;, &#039;C&#039;, &#039;W&#039;, &#039;V&#039;, &#039;P&#039;, &#039;L&#039;, &#039;J&#039;, &#039;D&#039;, &#039;A&#039;, &#039;B&#039;, &#039;T&#039;, &#039;I&#039;, &#039;E&#039;, &#039;M&#039;], 36)
([&#039;M&#039;, &#039;S&#039;, &#039;Z&#039;, &#039;C&#039;, &#039;B&#039;, &#039;A&#039;, &#039;T&#039;, &#039;E&#039;, &#039;I&#039;, &#039;R&#039;, &#039;W&#039;, &#039;P&#039;, &#039;V&#039;, &#039;L&#039;, &#039;J&#039;, &#039;D&#039;], 36)&lt;/p&gt;

&lt;p&gt;(note, these use the relationships array and score pointing on the puzzle page, and takes into consideration the rules for triplets and pairs.)&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 19 Apr 2008 22:39:16 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/14-guid.html#c73</guid>
    
</item>
<item>
    <title>David Cooper: SSH and HTTPS on the same port?!</title>
    <link>http://blog.codekills.net/archives/36-SSH-and-HTTPS-on-the-same-port!.html#c72</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/36-SSH-and-HTTPS-on-the-same-port!.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=36</wfw:comment>

    

    <author>dave@kupesoft.com (David Cooper)</author>
    <content:encoded>
    &lt;p&gt;Brilliant, Dave! I love it!&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Tue, 15 Apr 2008 15:44:01 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/36-guid.html#c72</guid>
    
</item>
<item>
    <title>Raj: OpenMP and Visual C++ the free way (sorta)</title>
    <link>http://blog.codekills.net/archives/25-OpenMP-and-Visual-C++-the-free-way-sorta.html#c71</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/25-OpenMP-and-Visual-C++-the-free-way-sorta.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=25</wfw:comment>

    

    <author>codekills@gmail.com (Raj)</author>
    <content:encoded>
    &lt;p&gt;Thank you for the immeadiate reply!!!&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Thu, 10 Apr 2008 03:52:15 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/25-guid.html#c71</guid>
    
</item>
<item>
    <title>Ted Campbell: OpenMP and Visual C++ the free way (sorta)</title>
    <link>http://blog.codekills.net/archives/25-OpenMP-and-Visual-C++-the-free-way-sorta.html#c70</link>
            <category></category>
    
    <comments>http://blog.codekills.net/archives/25-OpenMP-and-Visual-C++-the-free-way-sorta.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=25</wfw:comment>

    

    <author>codekills@gmail.com (Ted Campbell)</author>
    <content:encoded>
    &lt;p&gt;I don&#039;t have VS2005 Express installed right now, so I&#039;m going off memory. 
This trick wasn&#039;t a complete solution and I was mostly interested in for playing around with OpenMP.  I don&#039;t think it makes sense at all for redistributable things.&lt;br /&gt;
1.  Install the Vista Update version of the Windows SDK&lt;br /&gt;
2.  Redirect your paths within Visual Studio to target the compilers included with the SDK instead of included ones.  Although, the included ones may also support the /openmp flag, so do check.&lt;br /&gt;
3.  Install the Visual Studio 2005 SP1 redistributable pack from the MS site.&lt;br /&gt;
4.  Use some pragmas or something to make sure the omp.h header is included only in release mode.  You could also change the header itself to not include the the debug lib and always use the release lib.&lt;br /&gt;
5.  Add the /openmp flag to your compile flags&lt;br /&gt;
6.  Cross your fingers and hope it works.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;&lt;/p&gt;

&lt;p&gt;p&gt;Once again, before you waste your time, the restrictions with this are, a) No debug libraries for openmp, b) No MSM file for openmp which means you cannot create installers that include the openmp libraries and other users must download the VS2005SP1 redist pack themselves.&lt;/p&gt;

&lt;p&gt;Hope that helps what you are looking for.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Tue, 08 Apr 2008 12:30:35 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/25-guid.html#c70</guid>
    
</item>

</channel>
</rss>