<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tolchz.net</title>
	<atom:link href="http://www.tolchz.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.tolchz.net</link>
	<description>Random Stuff from a Random Software Developer</description>
	<lastBuildDate>Tue, 08 Jan 2008 23:46:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Multi-Threaded Programming with QtConcurrent</title>
		<link>http://www.tolchz.net/?p=37</link>
		<comments>http://www.tolchz.net/?p=37#comments</comments>
		<pubDate>Tue, 08 Jan 2008 23:30:38 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.tolchz.net/2008/01/08/multi-threaded-programming-with-qtconcurrent/</guid>
		<description><![CDATA[I&#8217;m really looking forward to QtConcurrent which will be in Qt 4.4; so I downloaded a Qt snapshot to try it out. You can download all of the example code I wrote here, Qt Concurrent Examples Note: I&#8217;ll be calling waitForFinished() in a few of my examples. In an actual application where the function your [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really looking forward to QtConcurrent which will be in Qt 4.4; so I downloaded a Qt snapshot to try it out.</p>
<p>You can download all of the example code I wrote here, <a href='http://www.tolchz.net/wp-content/uploads/2008/01/qtconcurrentexamplestar.gz' title='Qt Concurrent Examples'>Qt Concurrent Examples</a><br />
<span id="more-37"></span><br />
Note: I&#8217;ll be calling waitForFinished() in a few of my examples.  In an actual application where the function your are calling takes some non-insignificant amount of time to return you would probably want to use QFutureWatcher to monitor the status of the QFuture.</p>
<h3>QtConcurrent::map Example</h3>
<p>QtConcurrent::map is used to iterate over a container or sequence and call a function on each element of the container.  It is expected that your function will modify the element it is called upon in some way.  In this example I wrote a simple functor that replaces each string with its upper-cased version.</p>
<pre>
<span class="preprocessor">#include</span> <span class="string">&lt;QtConcurrentMap&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;QStringList&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;QCoreApplication&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;functional&gt;</span>
<span class="keyword">namespace</span>
{
  <span class="keyword">struct</span> <span class="type">UpcaseString</span> : <span class="keyword">public</span> <span class="constant">std</span>::<span class="type">unary_function</span>&lt;<span class="keyword">const</span> <span class="type">QString</span>&amp;,<span class="type">void</span>&gt;
  {
    <span class="type">void</span> <span class="keyword">operator</span><span class="function-name">()</span>(<span class="type">QString</span> &amp; <span class="variable-name">str</span>)
      {
        str = str.toUpper();
      }
  };
}

<span class="type">int</span> <span class="function-name">main</span>()
{
  <span class="type">QStringList</span> <span class="variable-name">strings</span>;
  strings &lt;&lt; <span class="string">"foo"</span> &lt;&lt;  <span class="string">"bar"</span> &lt;&lt;  <span class="string">"baz"</span>;

  <span class="type">QFuture</span>&lt;<span class="type">void</span>&gt; <span class="variable-name">res</span> = <span class="constant">QtConcurrent</span>::map(strings,UpcaseString());
  res.waitForFinished();

  <span class="keyword">for</span>(<span class="constant">QStringList</span>::<span class="type">iterator</span> <span class="variable-name">i</span> = strings.begin(); i != strings.end(); ++i)
    qDebug(<span class="string">"%s"</span>,qPrintable(*i));

}
</pre>
<p>And our results,</p>
<pre class='shell'>
<span class="eshell-prompt">~/mapreduce/qtconcurrentMapExample $ </span>./qtconcurrentMapExample
FOO
BAR
BAZ
<span class="eshell-prompt">~/mapreduce/qtconcurrentMapExample $ </span></pre>
<h3>QtConcurrent::mapped Example</h3>
<p>QtConcurrent::mapped iterates over a container or sequence and accumulates the results of a function into another sequence.  This other sequence, stored in the QFuture, can then be iterated over to retrieve the results.</p>
<pre>
<span class="preprocessor">#include</span> <span class="string">&lt;QtConcurrentMap&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;QStringList&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;QCoreApplication&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;functional&gt;</span>

<span class="keyword">namespace</span>
{
  <span class="keyword">struct</span> <span class="type">UpcaseString</span> : <span class="keyword">public</span> <span class="constant">std</span>::<span class="type">unary_function</span>&lt;<span class="keyword">const</span> <span class="type">QString</span>&amp;,<span class="type">QString</span>&gt;
  {
    <span class="type">QString</span> <span class="keyword">operator</span><span class="function-name">()</span>(<span class="keyword">const</span> <span class="type">QString</span> &amp; <span class="variable-name">str</span>)
      {
        <span class="keyword">return</span> str.toUpper();
      }
  };
}

<span class="type">int</span> <span class="function-name">main</span>()
{
  <span class="type">QStringList</span> <span class="variable-name">strings</span>;
  strings &lt;&lt; <span class="string">"foo"</span> &lt;&lt;  <span class="string">"bar"</span> &lt;&lt;  <span class="string">"baz"</span>;

  <span class="type">QFuture</span>&lt;<span class="type">QString</span>&gt; <span class="variable-name">res</span> = <span class="constant">QtConcurrent</span>::mapped(strings,UpcaseString());
  res.waitForFinished();

  <span class="keyword">for</span> (<span class="constant">QFuture</span>&lt;QString&gt;::<span class="type">const_iterator</span> <span class="variable-name">i</span> = res.begin(); i != res.end(); ++i)
    qDebug(<span class="string">"%s"</span>,qPrintable(*i));
}
</pre>
<p>And again, our results,</p>
<pre class="shell">
<span class="eshell-prompt">~/mapreduce/qtconcurrentMappedExample $ </span>./qtconcurrentMappedExample
FOO
BAR
BAZ
<span class="eshell-prompt">~/mapreduce/qtconcurrentMappedExample $ </span></pre>
<h3>QtConcurrent::mappedReduced Example</h3>
<p>And finally a quick example of mappedReduced.  The key difference in mappedReduced is that a second function is provided that is used to reduce the intermediate results.  In this example I just used a function that concatenates strings; the end result is an upper-cased, concatenated string.</p>
<pre>
<span class="preprocessor">#include</span> <span class="string">&lt;QtConcurrentMap&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;QStringList&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;QCoreApplication&gt;</span>
<span class="preprocessor">#include</span> <span class="string">&lt;functional&gt;</span>

<span class="keyword">namespace</span>
{
  <span class="keyword">struct</span> <span class="type">UpcaseString</span> : <span class="keyword">public</span> <span class="constant">std</span>::<span class="type">unary_function</span>&lt;<span class="keyword">const</span> <span class="type">QString</span>&amp;,<span class="type">QString</span>&gt;
  {
    <span class="type">QString</span> <span class="keyword">operator</span><span class="function-name">()</span>(<span class="keyword">const</span> <span class="type">QString</span> &amp; <span class="variable-name">str</span>) <span class="keyword">const</span>
      {
        <span class="keyword">return</span> str.toUpper();
      }
  };

  <span class="type">void</span> <span class="function-name">concatStrings</span>(<span class="type">QString</span> &amp; <span class="variable-name">result</span>, <span class="keyword">const</span> <span class="type">QString</span> &amp; <span class="variable-name">str</span>)
  {
    result += str;
  }
}

<span class="type">int</span> <span class="function-name">main</span>()
{
  <span class="type">QStringList</span> <span class="variable-name">strings</span>;
  strings &lt;&lt; <span class="string">"foo"</span> &lt;&lt;  <span class="string">"bar"</span> &lt;&lt;  <span class="string">"baz"</span>;

  <span class="type">QFuture</span>&lt;<span class="type">QString</span>&gt; <span class="variable-name">res</span> = <span class="constant">QtConcurrent</span>::mappedReduced(strings,UpcaseString(),&amp;concatStrings);
  res.waitForFinished();

  qDebug(<span class="string">"%s"</span>,qPrintable(res.result()));
}
</pre>
<p>And our results,</p>
<pre class="shell">
<span class="eshell-prompt">~/mapreduce/qtconcurrentMappedReduceExample $ </span>./qtconcurrentMappedReduceExample
FOOBARBAZ
<span class="eshell-prompt">~/mapreduce/qtconcurrentMappedReduceExample $ </span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=37</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QMake Major Mode for Emacs (qt-pro.el)</title>
		<link>http://www.tolchz.net/?p=35</link>
		<comments>http://www.tolchz.net/?p=35#comments</comments>
		<pubDate>Tue, 08 Jan 2008 00:38:36 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[emacs qt]]></category>

		<guid isPermaLink="false">http://www.tolchz.net/2008/01/07/qmake-major-mode-for-emacs-qt-proel/</guid>
		<description><![CDATA[I finally got around to writing a major mode for Qt .pro and .pri files. It doesn&#8217;t provide any indenting features; only font locking. Just load it up and add the following to your .emacs (require 'qt-pro) (add-to-list 'auto-mode-alist '("\\.pr[io]$" . qt-pro-mode)) Get it here qt-pro.el]]></description>
			<content:encoded><![CDATA[<p>I finally got around to writing a major mode for Qt .pro and .pri files.  It doesn&#8217;t provide any indenting features; only font locking.</p>
<p>Just load it up and add the following to your <code>.emacs</code></p>
<pre>
(<span class="keyword">require</span> '<span class="constant">qt-pro</span>)
(add-to-list 'auto-mode-alist '(<span class="string">"\\.pr[io]$"</span> . qt-pro-mode))
</pre>
<p>Get it here <a href='http://www.tolchz.net/wp-content/uploads/2008/01/qt-pro.el' title='qt-pro.el'>qt-pro.el</a></p>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D35&amp;title=QMake+Major+Mode+for+Emacs+%28qt-pro.el%29" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D35&amp;title=QMake+Major+Mode+for+Emacs+%28qt-pro.el%29" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D35&amp;title=QMake+Major+Mode+for+Emacs+%28qt-pro.el%29" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=35</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Posting to WordPress with Emacs (weblogger.el)</title>
		<link>http://www.tolchz.net/?p=34</link>
		<comments>http://www.tolchz.net/?p=34#comments</comments>
		<pubDate>Sun, 06 Jan 2008 04:53:05 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.tolchz.net/2008/01/06/posting-to-wordpress-with-emacs-webloggerel/</guid>
		<description><![CDATA[When you spend most of your day in Emacs, it can be annoying to switch to something else for a text oriented task. With weblogger.el you can post to your blog without ever leaving Emacs. I have WordPress installed, but it should work for any other blogging software with the same XMLRPC interface. Acquiring weblogger.el [...]]]></description>
			<content:encoded><![CDATA[<p>When you spend most of your day in Emacs, it can be annoying to switch to something else for a text oriented task.  With weblogger.el you can post to your blog without ever leaving Emacs.</p>
<p>I have WordPress installed, but it should work for any other blogging software with the same XMLRPC interface.</p>
<p><span id="more-34"></span></p>
<h3>Acquiring weblogger.el</h3>
<p>First grab the latest copy of weblogger.el and xml-rpc.el from <a href="http://cvs.savannah.nongnu.org/viewvc/weblogger/lisp/?root=emacsweblogs">Savannah</a>. It&#8217;s your typical Web-CVS interface, just click the .el file and then click &#8220;download&#8221;.  </p>
<p>Once you&#8217;ve gotten both weblogger.el and xml-rpc.el place them somewhere that Emacs can find them.  I&#8217;ve added <code>~/.emacs.d/</code> to my <code>load-path</code> so I placed both weblogger and xml-rpc there.  <small>(Note: xml-rpc comes with Emacs 22, so it may not be needed.  The version at Savannah is newer though so if you run into any problems get it as well.) </small></p>
<h3>Initial Setup</h3>
<p>First you need to load weblogger.  I added a require line for weblogger to my <code>~/.emacs</code>. </p>
<pre>
<span class="comment-delimiter">; </span><span class="comment">load-path setting is only needed if the directory you put</span>
<span class="comment-delimiter">; </span><span class="comment">weblogger.el in isn't already in your load-path
</span>(add-to-list 'load-path <span class="string">"~/.emacs.d/"</span>)

<span class="comment-delimiter">; </span><span class="comment">Load weblogger
</span>(<span class="keyword">require</span> '<span class="constant">weblogger</span>)
</pre>
<p>Hit <code>C-x C-e</code> with the cursor after the sexp to evaluate it and load weblogger.  Finally weblogger is loaded and you are ready to set it up and post.</p>
<p>First type <code> M-x weblogger-setup-weblog </code> .  This will create a profile for posting, saving the username, url, and some settings to your <code>~/.emacs</code>.  You will be asked for the &#8220;Server Endpoint (url)&#8221; which for WordPress is <code>http://www.server.com/xmlrpc.php</code>.</p>
<h3>Posting</h3>
<p>You&#8217;re now ready to make your first post.  Hit <code>M-x weblogger-start-entry</code> to start your first entry.  When you are finished hit <code>C-x C-s</code> to save and submit the post.  To save your post as a draft without submitting it hit <code>C-c C-c</code>.  </p>
<h3>Editing Earlier Posts (including Drafts)</h3>
<p>To come back to a previous post hit <code>M-x weblogger-fetch-entries</code>.  This will open a buffer with your latest entry.  You can then move to previous entries with <code>C-c C-p</code> and later entries with <code>C-c C-n</code>.</p>
<p>I did notice a bug though, which may actually be in WordPress&#8217;s XMLRPC code.   If you use the <code>&lt;!--more--&gt;</code> tag in your post you will not get the entire post when you try to edit the entry in weblogger.  You need to remove the tag with the WordPress entry and then editing the post from Emacs will work again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Covariant Return Types</title>
		<link>http://www.tolchz.net/?p=33</link>
		<comments>http://www.tolchz.net/?p=33#comments</comments>
		<pubDate>Fri, 04 Jan 2008 23:50:02 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.tolchz.net/2008/01/04/covariant-return-types/</guid>
		<description><![CDATA[I ran across something weird the other day. I had assumed that the return type of an overriding function must be identical to the function that it is overriding. The C++ Standard allows one specific exception to this rule that could possibly come in handy to save some unnecessary casting. In an overridden method that [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across something weird the other day. I had assumed that the return type of an overriding function must be identical to the function that it is overriding. The C++ Standard allows one specific exception to this rule that could possibly come in handy to save some unnecessary casting.<br />
<span id="more-33"></span><br />
In an overridden method that returns a pointer or a reference to a class, you are allowed to change the return type to a derived class instead.  </p>
<h3>C++ Standard</h3>
<p>The return type of an overriding function shall be either identical to the return type of the overridden function or covariant with the classes of the functions. If a function D::f overrides a function B::f, the return types of the functions are covariant if they satisfy the following criteria:</p>
<ul>
<li>both are pointers to classes or references to classes</li>
<li>the class in the return type of B::f is the same class as the class in the return type of D::f or, is an unambiguous direct or indirect base class of the class in the return type of D::f and is accessible in D</li>
<li>both pointers or references have the same cv-qualification and the class type in the return type of D::f has the same cv-qualification as or less cv-qualification than the class type in the return type of B::f.</li>
</ul>
<h3>Example Code</h3>
<p>And a quick example that uses this feature:</p>
<pre>
<span class="preprocessor">#include</span> <span class=
"string">&lt;iostream&gt;</span>

<span class="comment-delimiter">// </span><span class=
"comment">Just create a class, and a subclass
</span><span class="keyword">class</span> <span class=
"type">Foo</span> {};
<span class="keyword">class</span> <span class=
"type">Bar</span> : <span class=
"keyword">public</span> <span class="type">Foo</span> {};

<span class="keyword">class</span> <span class="type">Baz</span>
{
<span class="keyword">public</span>:
  <span class="keyword">virtual</span> <span class="type">Foo</span> * <span class=
"function-name">create</span>()
    {
      <span class="keyword">return</span> <span class=
"keyword">new</span> <span class="type">Foo</span>();
    }
};

<span class="keyword">class</span> <span class=
"type">Quux</span> : <span class=
"keyword">public</span> <span class="type">Baz</span>
{
<span class="keyword">public</span>:
  <span class="comment-delimiter">// </span><span class=
"comment">Different return type, but it's allowed by the standard since Bar
</span>  <span class="comment-delimiter">// </span><span class=
"comment">is derived from Foo
</span>  <span class="keyword">virtual</span> <span class=
"type">Bar</span> * <span class="function-name">create</span>()
    {
      <span class="keyword">return</span> <span class=
"keyword">new</span> <span class="type">Bar</span>();
    }
};

<span class="type">int</span> <span class=
"function-name">main</span>()
{
  <span class="type">Quux</span> *<span class=
"variable-name">tmp</span> = <span class=
"keyword">new</span> <span class="type">Quux</span>();
  <span class="type">Bar</span> *<span class=
"variable-name">bar</span> = tmp-&gt;create();

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=33</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>/etc/passwd Fun</title>
		<link>http://www.tolchz.net/?p=32</link>
		<comments>http://www.tolchz.net/?p=32#comments</comments>
		<pubDate>Wed, 17 Jan 2007 02:46:50 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tolchz.net/2007/01/16/etcpasswd-fun/</guid>
		<description><![CDATA[Several years ago I put up a /etc/passwd script that generates a passwd file full of random usernames with hashes of random floating point numbers for the password. You can see the script in action at http://tolchz.net/etc/passwd . Hit reload a few times to get the full effect. I&#8217;ve recently found several forums that have [...]]]></description>
			<content:encoded><![CDATA[<p>Several years ago I put up a /etc/passwd script that generates a passwd file full of random usernames with hashes of random floating point numbers for the password. You can see the script in action at <a href="http://www.tolchz.net/etc/passwd">http://tolchz.net/etc/passwd</a> . Hit reload a few times to get the full effect.</p>
<p>I&#8217;ve recently found several forums that have &#8220;users&#8221; asking how to crack the passwd file found on my site&#8230;.</p>
<p><a href="http://www.criticalsecurity.net/index.php?showtopic=18612">American Site (The user seems to think it is a Windows password file)</a><br />
<a href="http://www.underground.ag/showthread.php?p=14541">German Site</a><br />
<a href="http://www.soom.cz/index.php?name=webforum/show&#038;thread_id=4928">Czech Site</a><br />
<a href="http://www.gfs-team.ru/forums/showthread.php?t=114">Russian Site</a></p>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D32&amp;title=%2Fetc%2Fpasswd+Fun" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D32&amp;title=%2Fetc%2Fpasswd+Fun" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D32&amp;title=%2Fetc%2Fpasswd+Fun" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim + netrw Problem</title>
		<link>http://www.tolchz.net/?p=31</link>
		<comments>http://www.tolchz.net/?p=31#comments</comments>
		<pubDate>Sat, 13 Jan 2007 00:29:04 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://www.tolchz.net/2007/01/12/vim-netrw-problem/</guid>
		<description><![CDATA[While modifying a remote file with netrw under Windows I ran into a problem upon trying to write the file. scp -q "VIMD72e7.tmp" "host:/path/to/file.txt" VIMD7E7.tmp: No such file or directory shell returned 1 Hit any key to close this window... I think that this is a result of the autochdir option being set. My fix [...]]]></description>
			<content:encoded><![CDATA[<p>While modifying a remote file with netrw under Windows I ran into a problem upon trying to write the file.</p>
<pre>
scp -q "VIMD72e7.tmp" "host:/path/to/file.txt"
VIMD7E7.tmp: No such file or directory
shell returned 1
Hit any key to close this window...
</pre>
<p>I think that this is a result of the autochdir option being set.  My fix is to do a </p>
<pre>
:lcd $TEMP
</pre>
<p>in the buffer with the remote file loaded prior to writing the file.  This lets scp find the temporary file and the copy/write succeeds.</p>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D31&amp;title=Vim+%2B+netrw+Problem" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D31&amp;title=Vim+%2B+netrw+Problem" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D31&amp;title=Vim+%2B+netrw+Problem" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=31</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Falling Snow&#8230;</title>
		<link>http://www.tolchz.net/?p=29</link>
		<comments>http://www.tolchz.net/?p=29#comments</comments>
		<pubDate>Sat, 16 Dec 2006 03:35:07 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://tolchz.net/2006/12/15/falling-snow/</guid>
		<description><![CDATA[Quick falling snow hack with Python and Pygame. Snow eventually accumulates and fills the screen&#8230; Falling Snow Source]]></description>
			<content:encoded><![CDATA[<p>Quick falling snow hack with Python and Pygame.  Snow eventually accumulates and fills the screen&#8230;</p>
<p><a class="imagelink" href="http://tolchz.net/wp-content/uploads/2006/12/snow.png" title="Falling Snow Screenshot"><img id="image28" src="http://tolchz.net/wp-content/uploads/2006/12/snow.thumbnail.png" alt="Falling Snow Screenshot" /></a></p>
<p><a id="p30" href="http://tolchz.net/wp-content/uploads/2006/12/snowpy">Falling Snow Source</a></p>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D29&amp;title=Falling+Snow%26%238230%3B" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D29&amp;title=Falling+Snow%26%238230%3B" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D29&amp;title=Falling+Snow%26%238230%3B" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>links for 2006-12-07</title>
		<link>http://www.tolchz.net/?p=27</link>
		<comments>http://www.tolchz.net/?p=27#comments</comments>
		<pubDate>Thu, 07 Dec 2006 02:20:47 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Bookmarks]]></category>

		<guid isPermaLink="false">http://tolchz.net/2006/12/06/links-for-2006-12-07/</guid>
		<description><![CDATA[http://caml.inria.fr/pub/docs/manual-ocaml/libref/index.html Standard Library Reference for OCaml (tags: caml functional ocaml reference Programming api)]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://caml.inria.fr/pub/docs/manual-ocaml/libref/index.html">http://caml.inria.fr/pub/docs/manual-ocaml/libref/index.html</a></div>
<div class="delicious-extended">Standard Library Reference for OCaml</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/tolchz/caml">caml</a> <a href="http://del.icio.us/tolchz/functional">functional</a> <a href="http://del.icio.us/tolchz/ocaml">ocaml</a> <a href="http://del.icio.us/tolchz/reference">reference</a> <a href="http://del.icio.us/tolchz/Programming">Programming</a> <a href="http://del.icio.us/tolchz/api">api</a>)</div>
</li>
</ul>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D27&amp;title=links+for+2006-12-07" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D27&amp;title=links+for+2006-12-07" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D27&amp;title=links+for+2006-12-07" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>links for 2006-12-06</title>
		<link>http://www.tolchz.net/?p=26</link>
		<comments>http://www.tolchz.net/?p=26#comments</comments>
		<pubDate>Wed, 06 Dec 2006 02:22:12 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Bookmarks]]></category>

		<guid isPermaLink="false">http://tolchz.net/2006/12/05/links-for-2006-12-06/</guid>
		<description><![CDATA[The Objective-Caml system, release 3.09 This manual documents the release 3.09 of the Objective Caml system. It is organized as follows. * Part I, â€œAn introduction to Objective Camlâ€, gives an overview of the language. * Part II, â€œThe Objective Caml languageâ€, is the reference (tags: ocaml programming reference manual documentation functional caml) Developing applications [...]]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://caml.inria.fr/pub/docs/manual-ocaml/index.html">The Objective-Caml system, release 3.09</a></div>
<div class="delicious-extended">This manual documents the release 3.09 of the Objective Caml system. It is organized as follows.<br />
    * Part I, â€œAn introduction to Objective Camlâ€, gives an overview of the language.<br />
    * Part II, â€œThe Objective Caml languageâ€, is the reference</div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/tolchz/ocaml">ocaml</a> <a href="http://del.icio.us/tolchz/programming">programming</a> <a href="http://del.icio.us/tolchz/reference">reference</a> <a href="http://del.icio.us/tolchz/manual">manual</a> <a href="http://del.icio.us/tolchz/documentation">documentation</a> <a href="http://del.icio.us/tolchz/functional">functional</a> <a href="http://del.icio.us/tolchz/caml">caml</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://caml.inria.fr/pub/docs/oreilly-book/html/index.html">Developing applications with Objective Caml</a></div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/tolchz/book">book</a> <a href="http://del.icio.us/tolchz/functional">functional</a> <a href="http://del.icio.us/tolchz/programming">programming</a> <a href="http://del.icio.us/tolchz/reference">reference</a> <a href="http://del.icio.us/tolchz/ocaml">ocaml</a> <a href="http://del.icio.us/tolchz/caml">caml</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://cristal.inria.fr/~remy/cours/appsem/">Using, Understanding, and Unraveling The OCaml Language From Practice to Theory and vice versa</a></div>
<div class="delicious-tags">(tags: <a href="http://del.icio.us/tolchz/book">book</a> <a href="http://del.icio.us/tolchz/functional">functional</a> <a href="http://del.icio.us/tolchz/programming">programming</a> <a href="http://del.icio.us/tolchz/reference">reference</a> <a href="http://del.icio.us/tolchz/ocaml">ocaml</a>)</div>
</li>
</ul>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D26&amp;title=links+for+2006-12-06" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D26&amp;title=links+for+2006-12-06" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D26&amp;title=links+for+2006-12-06" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SLIME Problem with SBCL</title>
		<link>http://www.tolchz.net/?p=24</link>
		<comments>http://www.tolchz.net/?p=24#comments</comments>
		<pubDate>Tue, 31 Oct 2006 22:12:24 +0000</pubDate>
		<dc:creator>tolchz</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Lisp]]></category>

		<guid isPermaLink="false">http://tolchz.net/2006/10/31/slime-problem-with-sbcl/</guid>
		<description><![CDATA[When starting up SLIME (M-x slime) I&#8217;m getting a hangup error: ;; Swank started at port: 36773. 36773 * Process inferior-lisp hangup From searching, this appears to be a problem with Emacs and my version of the Linux Kernel (2.6.8). The workaround is apparently to set the inferior lisp to &#8220;nohup sbcl&#8221; which prevents SBCL [...]]]></description>
			<content:encoded><![CDATA[<p>When starting up SLIME (<code>M-x slime</code>) I&#8217;m getting a hangup error:</p>
<pre>
<code>
;; Swank started at port: 36773.
36773
* 
Process inferior-lisp hangup
</code>
</pre>
<p>From searching, this appears to be a problem with Emacs and my version of the Linux Kernel (2.6.8).  The workaround is apparently to set the inferior lisp to &#8220;nohup sbcl&#8221; which prevents SBCL from receiving the hangup signal.  Unfortunately it also redirects STDOUT/STDIN which seems to cause a problem with the SLIME from CVS.</p>
<p>The solution that I&#8217;ve found is to start swank (the Lisp portion of SLIME) manually in SBCL.</p>
<pre>
<code>
; Load swank
(load "/path/to/swank-loader.lisp")
 
; Start the swank server
(swank:create-server)
</code>
</pre>
<p>Then in Emacs start SLIME with <code>M-x slime-connect</code>, the defaults of Host: 127.0.0.1 and Port: 4005 should be fine.</p>
<p><img id="image25" src="http://tolchz.net/wp-content/uploads/2006/10/ss.png" alt="SLIME Screenshot" /></p>

<span class="slashdigglicious">
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D24&amp;title=SLIME+Problem+with+SBCL" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D24&amp;title=SLIME+Problem+with+SBCL" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.tolchz.net%2F%3Fp%3D24&amp;title=SLIME+Problem+with+SBCL" title="Add to DZone"><img src="http://www.dzone.com/favicon.ico" width="16" height="16" alt="[DZone]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.tolchz.net/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
