<?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/"
	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>Look here first!</title>
	<atom:link href="http://lookherefirst.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lookherefirst.wordpress.com</link>
	<description>Things you always look up twice...</description>
	<lastBuildDate>Sat, 28 Jan 2012 00:18:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lookherefirst.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Look here first!</title>
		<link>http://lookherefirst.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lookherefirst.wordpress.com/osd.xml" title="Look here first!" />
	<atom:link rel='hub' href='http://lookherefirst.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Pseudothreading with BASH</title>
		<link>http://lookherefirst.wordpress.com/2010/01/20/pseudothreading-with-bash/</link>
		<comments>http://lookherefirst.wordpress.com/2010/01/20/pseudothreading-with-bash/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 10:12:23 +0000</pubDate>
		<dc:creator>Riccardo Di Sipio</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[maximum number of threads]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[pseudothreading]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[wc]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=123</guid>
		<description><![CDATA[It&#8217;s more like a trick, but it&#8217;s better than repeat the same operation linearly. Some explanations: TH_NUM=`ps aux &#124; grep Python &#124; grep -v "grep" &#124; wc -l` TH_MAX is the maximum number of &#8220;threads&#8221; that can be executed at the same time. The first grep selects the threads that make use of python (you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=123&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s more like a trick, but it&#8217;s better than repeat the same operation linearly. Some explanations:</p>
<p><code>TH_NUM=`ps aux | grep Python | grep -v "grep" | wc -l`</code></p>
<ul>
<li>TH_MAX is the maximum number of &#8220;threads&#8221; that can be executed at the same time.
<li>The first <code>grep</code> selects the threads that make use of <code>python</code> (you can change this, it depends on your script)
<li>The second <code>grep</code> excludes the command you issued above <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
<li><code>wc</code> counts the number of lines. The first time the result of the pipe is empty, so <code>wc</code> gives &#8220;0&#8243; as result.
</ul>
<p><code>#!/bin/bash<br />
TH_MAX=10<br />
for sample in `ls ./data`<br />
do<br />
   while [ TRUE ]; do<br />
     TH_NUM=`ps aux | grep Python | grep -v "grep" | wc -l`<br />
     if [ "$TH_NUM" -le "$TH_MAX" ]<br />
     then<br />
       echo $( ./analyze_sample.py -s ${sample} ) &gt; /dev/null &amp;<br />
       echo -en " ${sample} "<br />
       break<br />
     else<br />
       echo -en "."<br />
       sleep 1<br />
     fi<br />
   done<br />
done</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=123&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2010/01/20/pseudothreading-with-bash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">disipio</media:title>
		</media:content>
	</item>
		<item>
		<title>Decode command line arguments given to a BASH script</title>
		<link>http://lookherefirst.wordpress.com/2009/08/25/decode-command-line-arguments-given-to-a-bash-script/</link>
		<comments>http://lookherefirst.wordpress.com/2009/08/25/decode-command-line-arguments-given-to-a-bash-script/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 10:21:44 +0000</pubDate>
		<dc:creator>Riccardo Di Sipio</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[decoding]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=119</guid>
		<description><![CDATA[Try the elegant way, at last! For instance, imagine that your programme has the following arguments: ./myprog -s /source/directory -d /dest/directory -c deep Then, the script myprog should contain a piece of code like this: if [ $# -eq 0 ] ; then echo "Usage: $0 -s -d -c" exit 1 fi while [ $# [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=119&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Try the elegant way, at last!</p>
<p>For instance, imagine that your programme has the following arguments:<br />
<code>./myprog -s /source/directory -d /dest/directory -c deep</code></p>
<p>Then, the script myprog should contain a piece of code like this:</p>
<p>
<code><br />
if [ $# -eq 0 ] ; then<br />
 echo "Usage: $0 -s  -d  -c"<br />
 exit 1<br />
fi<br />
while [ $# -gt 1 ] ; do<br />
case $1 in<br />
   -s) source_dir=$2 ; shift 2 ;;<br />
   -d) dest_dir=$2 ; shift 2 ;;<br />
   -c) copy_mode=$2 ; shift 2 ;;<br />
   *) shift 1 ;;<br />
esac<br />
done<br />
</code></p>
<p>
Of course, this is only a hint. Just tailor the decoding according to your needs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=119&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/08/25/decode-command-line-arguments-given-to-a-bash-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">disipio</media:title>
		</media:content>
	</item>
		<item>
		<title>RPy &#8211; simple and efficient access to R from Python</title>
		<link>http://lookherefirst.wordpress.com/2009/07/28/rpy-simple-and-efficient-access-to-r-from-python/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/28/rpy-simple-and-efficient-access-to-r-from-python/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 09:07:18 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[RPy]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=117</guid>
		<description><![CDATA[RPy is an interface that allows you to call R functions and handle R objects in Python. R language<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=117&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://rpy.sourceforge.net/index.html" target="_blank">RPy</a> is an interface that allows you to call R functions and handle R objects in Python.</p>
<p><a href="http://www.r-project.org/" target="_blank">R language</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=117&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/28/rpy-simple-and-efficient-access-to-r-from-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
		<item>
		<title>Using mutable objects as default parameter in Python</title>
		<link>http://lookherefirst.wordpress.com/2009/07/22/using-mutable-objects-as-default-parameter-in-python/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/22/using-mutable-objects-as-default-parameter-in-python/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 16:29:21 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[default parameters]]></category>
		<category><![CDATA[lists]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=115</guid>
		<description><![CDATA[We just came across a weird Python behaviour (of course only weird if you don&#8217;t know why). If you use mutable objects such as lists as the default parameter in a function declaration, you might end up with some unintented behaviour. Everytime the function modifies the object, the default value is in effect modified as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=115&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We just came across a weird Python behaviour (of course only weird if you don&#8217;t know why). If you use mutable objects such as lists as the default parameter in a function declaration, you might end up with some unintented behaviour. Everytime the function modifies the object, the default value is in effect modified as well (e.g. appending to the list). This is also explained in the Python documentation:</p>
<blockquote><p><strong>Default parameter values are evaluated when the function definition is executed.</strong> This means that the expression is evaluated once, when the function is defined, and that that same “pre-computed” value is used for each call.  This is especially important to understand when a default parameter is a mutable object, such as a list or a dictionary: if the function modifies the object (e.g. by appending an item to a list), the default value is in effect modified. This is generally not what was intended.  A way around this  is to use <tt><span>None</span></tt> as the default, and explicitly test for it in the body of the function, &#8230;</p></blockquote>
<p>Find the whole thing <a href="http://www.python.org/doc/current/reference/compound_stmts.html#function-definitions" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=115&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/22/using-mutable-objects-as-default-parameter-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
		<item>
		<title>A Tutorial on Independent Component Analysis</title>
		<link>http://lookherefirst.wordpress.com/2009/07/21/a-tutorial-on-independent-component-analysis/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/21/a-tutorial-on-independent-component-analysis/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:24:04 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ica]]></category>
		<category><![CDATA[independent component analysis]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=112</guid>
		<description><![CDATA[can be found here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=112&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>can be found <a href="http://www.cis.hut.fi/aapo/papers/IJCNN99_tutorialweb/IJCNN99_tutorial3.html" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=112&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/21/a-tutorial-on-independent-component-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
		<item>
		<title>pthreads &#8211; Some useful links and solution for maximum thread number</title>
		<link>http://lookherefirst.wordpress.com/2009/07/21/pthreads-some-useful-links/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/21/pthreads-some-useful-links/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:20:56 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[maximum thread number]]></category>
		<category><![CDATA[pthreads]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=109</guid>
		<description><![CDATA[Manual Reference Pages (including a list of functions that are not thread-safe) Tutorial on pthreads And if you wonder why you cannot create more than X threads on your system (for me this was always 382), this forum provides a solution. Basically, the problem is that each thread created will occupy space for its stack. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=109&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://manual.cream.org/index.cgi/pthreads.7" target="_blank">Manual Reference Pages</a> (including a list of functions that are not thread-safe)</p>
<p><a href="http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html" target="_blank">Tutorial</a> on pthreads</p>
<p>And if you wonder why you cannot create more than X threads on your system (for me this was always 382), <a href="http://ubuntuforums.org/archive/index.php/t-336948.html" target="_blank">this forum</a> provides a solution.</p>
<p>Basically, the problem is that each thread created will occupy space for its stack. On my system, the default thread stack size is 8MB. Therefore, after 382, I simply run out of space.</p>
<p>Solution: Change the stack size to a smaller value, unless you really need 8MB.</p>
<p>pthread_attr_t tattr;<br />
size_t size;<br />
size = PTHREAD_STACK_MIN + WHAT_ELSE_YOU_NEED;<br />
pthread_attr_init(&amp;tattr);<br />
pthread_attr_setstacksize(&amp;tattr, size);</p>
<p>Another interesting page on pthreads is <a href="http://www.cs.cf.ac.uk/Dave/C/node30.html" target="_blank">this</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=109&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/21/pthreads-some-useful-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
		<item>
		<title>Lectures about Gödel Escher and Bach</title>
		<link>http://lookherefirst.wordpress.com/2009/07/07/lectures-about-godel-escher-and-bach/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/07/lectures-about-godel-escher-and-bach/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 16:57:30 +0000</pubDate>
		<dc:creator>Ettore</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[Literature]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=107</guid>
		<description><![CDATA[Here, they&#8217;re free and they look nice<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=107&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ocw.mit.edu/OcwWeb/hs/geb/VideoLectures/index.htm">Here</a>, they&#8217;re free and they look nice <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=107&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/07/lectures-about-godel-escher-and-bach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">JaCk</media:title>
		</media:content>
	</item>
		<item>
		<title>UNIX Network Programming by Stevens</title>
		<link>http://lookherefirst.wordpress.com/2009/07/06/unix-network-programming-by-stevens/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/06/unix-network-programming-by-stevens/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 17:46:57 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=104</guid>
		<description><![CDATA[UNIX Network Programming Volume 1, Third Edition: The Sockets Networking API by W. Richard Stevens; Bill Fenner; Andrew M. Rudoff can be found online at safari books. in addition: just realised that it is not the complete version, just previews. sorry!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=104&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>UNIX Network Programming Volume 1, Third Edition: The Sockets Networking API<br />
by W. Richard Stevens; Bill Fenner; Andrew M. Rudoff</p>
<p>can be found <a href="http://my.safaribooksonline.com/0131411551/" target="_blank">online</a> at safari books.</p>
<p><em>in addition:</em></p>
<p><em>just realised that it is not the complete version, just previews. sorry!</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=104&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/06/unix-network-programming-by-stevens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
		<item>
		<title>Profiling Code Using clock_gettime</title>
		<link>http://lookherefirst.wordpress.com/2009/07/06/profiling-code-using-clock_gettime/</link>
		<comments>http://lookherefirst.wordpress.com/2009/07/06/profiling-code-using-clock_gettime/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 16:31:09 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[C/C++]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=102</guid>
		<description><![CDATA[Find a good explanation here written by Guy Rutenberg.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=102&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Find a good explanation <a href="http://www.guyrutenberg.com/2007/09/22/profiling-code-using-clock_gettime/" target="_blank">here</a> written by <a href="http://www.guyrutenberg.com/" target="_blank">Guy Rutenberg</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=102&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/07/06/profiling-code-using-clock_gettime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
		<item>
		<title>Set Thunderbird to use Gmail&#8217;s Trash folder</title>
		<link>http://lookherefirst.wordpress.com/2009/03/31/set-thunderbird-to-use-gmails-trash-folder/</link>
		<comments>http://lookherefirst.wordpress.com/2009/03/31/set-thunderbird-to-use-gmails-trash-folder/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 18:14:23 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://lookherefirst.wordpress.com/?p=99</guid>
		<description><![CDATA[Sorting all my mail the other day, I realised that Gmail still keeps a copy of every email in the &#8220;All Mail&#8221; folder. Only if the messages are moved to Gmail&#8217;s &#8220;Trash&#8221; folder, they are eventually deleted. This cannot be set in Thunderbird directly afaik. Here is what you have to do.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=99&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sorting all my mail the other day, I realised that Gmail still keeps a copy of <strong>every</strong> email in the &#8220;All Mail&#8221; folder. Only if the messages are moved to Gmail&#8217;s &#8220;Trash&#8221; folder, they are eventually deleted. This cannot be set in Thunderbird directly afaik. <a href="http://lifehacker.com/software/geek-to-live/turn-thunderbird-into-the-ultimate-gmail-imap-client-314574.php" target="_blank">Here</a> is what you have to do.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lookherefirst.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lookherefirst.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lookherefirst.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lookherefirst.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lookherefirst.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lookherefirst.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lookherefirst.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lookherefirst.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lookherefirst.wordpress.com&amp;blog=2221008&amp;post=99&amp;subd=lookherefirst&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lookherefirst.wordpress.com/2009/03/31/set-thunderbird-to-use-gmails-trash-folder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">chris</media:title>
		</media:content>
	</item>
	</channel>
</rss>
