<?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>NPCT &#187; Computing</title>
	<atom:link href="http://www.nonperiodic.net/blog/category/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nonperiodic.net/blog</link>
	<description>Nonperiodic Central Trajectory</description>
	<lastBuildDate>Tue, 07 Apr 2009 03:01:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Reloading a File in Adobe Reader</title>
		<link>http://www.nonperiodic.net/blog/2009/04/02/reloading-a-file-in-adobe-reader/</link>
		<comments>http://www.nonperiodic.net/blog/2009/04/02/reloading-a-file-in-adobe-reader/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 20:49:24 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/?p=445</guid>
		<description><![CDATA[When working on document in LaTeX that is going to wind up as a PDF (e.g. my thesis), I prefer to look at it in Adobe Reader. Acroread seems to give the best impression of what the document will actually look like. In practice, though, I use xpdf, because it has a &#8220;reload&#8221; capability that [...]]]></description>
			<content:encoded><![CDATA[<p>When working on document in LaTeX that is going to wind up as a PDF (e.g. my thesis), I prefer to look at it in Adobe Reader.  Acroread seems to give the best impression of what the document will actually look like.  In practice, though, I use <a href="http://www.foolabs.com/xpdf/">xpdf</a>, because it has a &#8220;reload&#8221; capability that allows me to immediately view changes.  Acroread doesn&#8217;t have this.  However, someone very clever has come up with a workaround.  I found out about it <a href="http://www.adobeforums.com/webx/.59b4ab94">here</a>, and it is evidently due <a href="http://www.tug.org/pipermail/pdftex/2009-January/007934.html">Alexander Grahn</a>.</p>
<p>Create a file called ~/.adobe/Acrobat/8.0/JavaScripts/reload.js with:</p>
<pre>
reloadCurrentDoc = app.trustedFunction(
   function(currentDoc) {
      app.beginPriv();
      currentDocView=currentDoc.viewState;
      currentDocPath=currentDoc.path;
      currentDoc.closeDoc();
      currentDoc=app.openDoc(currentDocPath);
      currentDoc.viewState=currentDocView;
      app.endPriv();
   });

app.addMenuItem({
  cName: "reloadCurDoc",
  cUser: "Reload",
  cParent: "File",
  cExec: "reloadCurrentDoc(event.target);",
  cEnable: "event.rc = (event.target != null);",
  nPos: 0
});

app.addToolButton({
  cName: "reloadCurDoc",
  cExec: "reloadCurrentDoc(event.target);",
  cToolText: "Reload the current document",
  cEnable: "event.rc = (event.target != null);",
  cLabel: "Reload",
  nPos: -1
});
</pre>
<p>Reopen Acroread and you now have a reload button!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2009/04/02/reloading-a-file-in-adobe-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Len Adleman&#8217;s Sneakers Anecdotes</title>
		<link>http://www.nonperiodic.net/blog/2009/03/02/len-adlemans-sneakers-anecdotes/</link>
		<comments>http://www.nonperiodic.net/blog/2009/03/02/len-adlemans-sneakers-anecdotes/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 18:50:26 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Science and Math]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/2009/03/02/len-adlemans-sneakers-anecdotes/</guid>
		<description><![CDATA[Computer scientists and mathematicians like the movie Sneakers not only because it is about cryptography, but also because the jargon about factoring used in the movie is authentic. The reason it is authentic is because the directory brought Leonard Adleman (the &#8220;A&#8221; in &#8220;RSA&#8221;) in to help them. He&#8217;s written up some memories about the [...]]]></description>
			<content:encoded><![CDATA[<p>Computer scientists and mathematicians like the movie <a href="http://www.imdb.com/title/tt0105435/">Sneakers</a> not only because it is about cryptography, but also because the jargon about factoring used in the movie is authentic.  The reason it is authentic is because the directory brought <a href="http://en.wikipedia.org/wiki/Len_Adleman">Leonard Adleman</a> (the &#8220;A&#8221; in &#8220;RSA&#8221;) in to help them.  He&#8217;s written up some memories about the experience <a href="http://www.usc.edu/dept/molecular-science/fm-sneakers.htm">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2009/03/02/len-adlemans-sneakers-anecdotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing Line Breaks of Equations in Latex</title>
		<link>http://www.nonperiodic.net/blog/2009/02/19/preventing-line-breaks-of-equations-in-latex/</link>
		<comments>http://www.nonperiodic.net/blog/2009/02/19/preventing-line-breaks-of-equations-in-latex/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 20:08:28 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Science and Math]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/2009/02/19/preventing-line-breaks-of-equations-in-latex/</guid>
		<description><![CDATA[I learned a new Latex trick today. Sometimes you have math notation inline with text, like when you use $&#8230;$. Sometimes with long equations, however, you get line breaks. Like if you have $a+b+c+d+e$, it might happily break it into $a+b+c$ and $+d+e$ on the next line. This is ugly, but using tildes as in [...]]]></description>
			<content:encoded><![CDATA[<p>I learned a new Latex trick today.  Sometimes you have math notation inline with text, like when you use $&#8230;$.  Sometimes with long equations, however, you get line breaks.  Like if you have $a+b+c+d+e$, it might happily break it into $a+b+c$ and $+d+e$ on the next line.  This is ugly, but using tildes as in normal text doesn&#8217;t do the right thing for spacing.  The way around this is to also include curly braces like ${a+b+c+d+e}$.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2009/02/19/preventing-line-breaks-of-equations-in-latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evaluating Amazon EC2 for Scientific Computation</title>
		<link>http://www.nonperiodic.net/blog/2008/11/06/evaluating-amazon-ec2-for-scientific-computation/</link>
		<comments>http://www.nonperiodic.net/blog/2008/11/06/evaluating-amazon-ec2-for-scientific-computation/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 02:16:23 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Science and Math]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/?p=422</guid>
		<description><![CDATA[I&#8217;ve written some fairly heavy Markov chain Monte Carlo code in Java and would like to let it run for a while. The cluster in the Inference Group is not terribly up-to-date and it&#8217;s obnoxious to run computationally-significant jobs on colleagues&#8217; desktops anyway. This seemed like a good opportunity to try out Amazone Elastic Compute [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written some fairly heavy <a href="http://en.wikipedia.org/wiki/MCMC">Markov chain Monte Carlo</a> code in Java and would like to let it run for a while.  The cluster in the <a href="http://www.inference.phy.cam.ac.uk/is/">Inference Group</a> is not terribly up-to-date and it&#8217;s obnoxious to run computationally-significant jobs on colleagues&#8217; desktops anyway.  This seemed like a good opportunity to try out <a href="http://aws.amazon.com/">Amazone Elastic Compute Cloud (EC2)</a>.  The idea with EC2 is that you can fire up an &#8220;instance&#8221; whenever you want and you just pay for when it&#8217;s running and for the bandwidth.  For scientific computation this is very appealling. I don&#8217;t always have jobs to run, so it would be nice to just pay for what I need.  They have the &#8220;normal&#8221; instances that are meant for hosting web applications and they also have &#8220;high-CPU&#8221; instances that would seem well-suited for scientific computation.  They have a &#8220;medium&#8221; type (c1.medium) and an &#8220;extra large&#8221; type (c1.xlarge).  The medium instance has two virtual cores, 1.7GB of memory and costs $0.20/hour.  It seems roughly equivalent to a Core 2 Duo.  The extra large instance has eight cores, 7GB of memory, is 64-bit and costs $0.80/hour. </p>
<p>It is really easy to get one of these up and going.  You can just follow the instructions in <a href="http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/">the Getting Started Guide</a>.  You need to set up various security aspect (which you can do easily from the command line) and then fire up an instance.  You need to pick one of the virtual machine images (AMIs).  I suggest using one of the Ubuntu images <a href="http://alestic.com/">here</a>.</p>
<p>The frustrating part is that unlike web hosting, in scientific computation I want to fire up an instance and take it down easily.  Unfortunately, any data on the instance is lost when you take it down.  So, to get the tools required for your work, you will need to make a custom image.  You start with a base image, set it all up and then store off your custom image to Amazon S3.  From there you can start an instance from your private image just like you could with the public instances.  Whatever calculations you make will need to be stored somewhere else if you shut down the instance again.  If you have some ephemeral state that you require for starting your computation then you&#8217;ll need to upload it whenever you fire up a new instance.</p>
<p>So, it&#8217;s not a magic bullet, but it seems to have some nice potential.  The 8-core machine is kind of like renting a Ferarri for a day.  Even though my code parallellizes quite well, I don&#8217;t get anything near linear speedup.  I think this may be due to limited cache-coherency.   Nonetheless, it seems about twice as fast as the dual-core machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/11/06/evaluating-amazon-ec2-for-scientific-computation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Tom Minka&#8217;s Lightspeed on Linux</title>
		<link>http://www.nonperiodic.net/blog/2008/08/19/installing-tom-minkas-lightspeed-on-linux/</link>
		<comments>http://www.nonperiodic.net/blog/2008/08/19/installing-tom-minkas-lightspeed-on-linux/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 16:26:01 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Matlab]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/?p=403</guid>
		<description><![CDATA[I am a huge fan of Tom Minka&#8217;s Lightspeed Toolbox for MATLAB. I am so dependent on it that I can&#8217;t even remember which functions are native to MATLAB and which are Tom&#8217;s inventions. However, Tom is at Microsoft Research Cambridge and so he doesn&#8217;t spend much time making sure that it works easily on [...]]]></description>
			<content:encoded><![CDATA[<p>I am a huge fan of <a href="http://research.microsoft.com/~minka">Tom Minka&#8217;s</a> <a href="http://research.microsoft.com/~minka/software/lightspeed/">Lightspeed Toolbox</a> for MATLAB.  I am so dependent on it that I can&#8217;t even remember which functions are native to MATLAB and which are Tom&#8217;s inventions.  However, Tom is at <a href="http://research.microsoft.com/aboutmsr/labs/cambridge/">Microsoft Research Cambridge</a> and so he doesn&#8217;t spend much time making sure that it works easily on Linux.  So every time I install it, I have to modify the installation file &#8220;install_lightspeed.m&#8221;.  So, here is the diff:<br />
<verbatim><br />
25,29c25<br />
< if ispc<br />
<     w = fullfile(matlabroot,'toolbox\matlab\elmat\repmat.m');<br />
<   else<br />
<     w = fullfile(matlabroot,'toolbox/matlab/elmat/repmat.m');<br />
<   end<br />
---<br />
>   w = fullfile(matlabroot,&#8217;toolbox\matlab\elmat\repmat.m&#8217;);<br />
84,85d79<br />
< lapacklib = '-llapack';<br />
<   blaslib = '-lblas';<br />
148c142<br />
<       eval(['mex -f ' fullfile(matlabroot, 'bin/matopts.sh') ' matfile.c']);<br />
---<br />
>       mex -f matopts.sh matfile.c<br />
</verbatim><br />
Note that this doesn&#8217;t really fix everything.  I still get errors regarding &#8216;matfile.c&#8217; but it&#8217;s an improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/08/19/installing-tom-minkas-lightspeed-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infinite Gaussian Mixture Modeling with FBM</title>
		<link>http://www.nonperiodic.net/blog/2008/05/29/infinite-gaussian-mixture-modeling-with-fbm/</link>
		<comments>http://www.nonperiodic.net/blog/2008/05/29/infinite-gaussian-mixture-modeling-with-fbm/#comments</comments>
		<pubDate>Thu, 29 May 2008 20:24:18 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Science and Math]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/?p=391</guid>
		<description><![CDATA[I am writing a paper on nonparametric Bayesian density modeling and I would like to compare my technique to the standard approach of the infinite mixture of Gaussians (iMoG). You can read Carl Rasmussen&#8217;s paper to get a feel for what it&#8217;s all about. My plan is to look at hold-out log probabilities on real [...]]]></description>
			<content:encoded><![CDATA[<p>
I am writing a paper on nonparametric Bayesian density modeling and I would like to compare my technique to the standard approach of the infinite mixture of Gaussians (iMoG).  You can read <a href="http://www.kyb.mpg.de/publication.html?publ=2299">Carl Rasmussen&#8217;s paper</a> to get a feel for what it&#8217;s all about.  My plan is to look at hold-out log probabilities on real data.  To do this, I need to have an implementation of iMoG that can give me predictive logprobs.  There are a couple of MATLAB implementations (<a href="http://manymodes.blogspot.com/2008/04/dirichlet-process-mixture-models.html">one</a>, <a href=" http://mr-pc.org/work/">two</a>), but they don&#8217;t (as far as I can tell) provide true predictive estimates directly.  Rather, they give posterior samples from the parameters and you have to do something like <a href="http://www.jstor.org/pss/2670365">(Chib and Jeliazkov, 2001)</a> to get estimates of the logprobs.
</p>
<p>
<a href="http://www.cs.toronto.edu/~radford/">Radford Neal</a>, on the other hand, has his <a href="http://www.cs.toronto.edu/~radford/fbm.software.html">Software for Flexible Bayesian Modeling and Markov Chain Sampling</a> (FBM) that implements mixtures of Gaussians.  I have to learn how to use it anyway, since it seems to be the only implementation of another nonparametric density estimation procedure that I&#8217;m interested in: <a href="http://www.cs.toronto.edu/~radford/dft-valencia.abstract.html">Dirichlet Diffusion Trees</a>.  So this post is going to be about figuring out how to do mixture models with FBM.  Radford provides an example of bivariate density estimation <a href="http://www.cs.toronto.edu/~radford/fbm.2004-11-10.doc/Ex-mixdft-r.html">here</a>.
</p>
<p>
Here is my setup: my data is 5-dimensional, and I have 200 training cases and 28 test cases.  I have whitened the data so that it has the sample statistics of a spherical Gaussian.  I put these data into two files that are just comma-delimited with a line for each case and a column for each dimension.  This is following the conventions described <a href="http://www.cs.toronto.edu/~radford/fbm.2004-11-10.doc/numin.html">here</a> as I understand them.
</p>
<p>
The first thing we do is use the <a href="http://www.cs.toronto.edu/~radford/fbm.2004-11-10.doc/mix-spec.html">mix-spec</a> command.  This command creates the &#8220;log file.&#8221;  Log files in FBM are the &#8220;documents&#8221; that one operates on.  They contain all of the model and results, etc.  The syntax is:<br />
<verbatim><br />
mix-spec log-file N-inputs N-targets [ N-components ]<br />
    / concentration SD-prior [ mean-prior ]<br />
</verbatim><br />
&#8220;log-file&#8221; is the name log &#8220;document&#8221; file &#8211; I&#8217;m going to call mine &#8220;mog.log.&#8221;  &#8220;N-inputs&#8221; you can pretty much ignore for now, as it doesn&#8217;t seem to be implemented.  Just use zero.  &#8220;N-targets&#8221; is the number of variables that you wish to find the joint distribution over.  In my case, this is going to be five.  &#8220;N-components&#8221; is how many Gaussians you want in your mixture.  If you leave it out you get the infinite Dirichlet process mixture, which is what we want.  The &#8220;concentration&#8221; is the parameter that in a sense determines the &#8220;variance&#8221; of the weights that you get out of the Dirichlet prior.  In the infinite case, we have to specify it as a constant multiplied by the number of components, and so we preface it with an &#8220;x&#8221;.  I don&#8217;t know what a good choice is, so I&#8217;m going to pick 5 and write &#8220;x5&#8243;.  The &#8220;SD-prior&#8221; is this big stack of priors on the widths of things, described <a href="http://www.cs.toronto.edu/~radford/fbm.2004-11-10.doc/prior.html">here</a>.  I don&#8217;t feel like I understand very well how to specify these giant stacks of hyperpriors.  The last parameter is the standard deviation of the mean, as far as I can tell.  Overall, the command I&#8217;m issuing is:<br />
<verbatim><br />
> mix-spec mog.log 0 5 / x1 0.05:0.5:0.2 10<br />
</verbatim>
</p>
<p>
After this, you need to issue the <a href="http://www.cs.toronto.edu/~radford/fbm.2004-11-10.doc/model-spec.html">model-spec</a> command.  The first argument is the log file, then the word &#8220;real&#8221; if you&#8217;re modeling real data.  Then you issue another cryptic command about what I think is the prior on the actual mixture Gaussians.  I&#8217;m just doing the example thing, since I don&#8217;t know better:<br />
<verbatim><br />
> model-spec mog.log real 0.05:0.5:0.5:1<br />
</verbatim>
</p>
<p>
Next, you give it data, using the <a href="http://www.cs.toronto.edu/~radford/fbm.2004-11-10.doc/data-spec.html">data-spec</a> command.  The first argument is the log file, so &#8220;mog.log.&#8221;  The next argument is &#8220;input attributes&#8221; which is zero, because it isn&#8217;t used.  Then are &#8220;target attributes&#8221; which should be 5, since we have five dimensions.  Then the slash and we specify our training file, followed by a &#8220;.&#8221; since we don&#8217;t have training inputs, then the same thing again for the test file:<br />
<verbatim><br />
> $FBM/data-spec $LOG 0 5 / \<br />
    macaque-5d-train1.dat . macaque-5d-test1.dat .<br />
</verbatim></p>
<p>
So, now we have the model set up and we have data associated with it.  Now it&#8217;s time for some inference.  You have to invoke some special commands for the infinite case that I&#8217;m just going to take directly from the example:<br />
<verbatim><br />
> mc-spec mog.log repeat 20 met-indicators 10 gibbs-params gibbs-hypers<br />
</verbatim><br />
Now, I ran it for a bunch of iterations:<br />
<verbatim><br />
> mix-mc mog.log 10000<br />
</verbatim><br />
And after this, I looked at what it came up with:<br />
<verbatim><br />
> mix-display mog.log<br />
</verbatim><br />
But most importantly, I wanted to see the logprobs it found:<br />
<verbatim><br />
> mix-pred p mog.log 5000:<br />
</verbatim><br />
The &#8220;p&#8221; means &#8220;give me each log probability&#8221; and the &#8220;5000:&#8221; says &#8220;start after the 5000th iteration.&#8221;
</p>
<p>This seems to maybe actually do what I want&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/05/29/infinite-gaussian-mixture-modeling-with-fbm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rock Band &#8211; Best Cooperative Game Ever</title>
		<link>http://www.nonperiodic.net/blog/2008/05/07/rock-band-best-cooperative-game-ever/</link>
		<comments>http://www.nonperiodic.net/blog/2008/05/07/rock-band-best-cooperative-game-ever/#comments</comments>
		<pubDate>Wed, 07 May 2008 15:19:33 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/?p=389</guid>
		<description><![CDATA[Our downstairs neighbors, who are our very very good friends are moving away. They&#8217;re huge karaoke addicts and so we got them a fun parting gift: Rock Band for the PS2. This game is so much fun, it&#8217;s painful. Obviously, I know people have liked it, and Guitar Hero has been a big hit, but [...]]]></description>
			<content:encoded><![CDATA[<p>Our downstairs neighbors, who are our very very good friends are moving away.  They&#8217;re <b>huge</b> karaoke addicts and so we got them a fun parting gift: <a href="http://www.amazon.com/gp/product/B000WPYNJC/002-8373580-3781643?ie=UTF8&#038;tag=nonperiodicce-20&#038;linkCode=xm2&#038;camp=1789&#038;creativeASIN=B000WPYNJC">Rock Band for the PS2</a>.  This game is so much fun, it&#8217;s painful.  Obviously, I know people have liked it, and Guitar Hero has been a big hit, but I&#8217;ve never tried it.  What&#8217;s really, really neat, though is that it is the best cooperative gaming setup I&#8217;ve ever seen.  With the exception of minigames in Mario Party type games, cooperative play is pretty meager over all.  In Rock Band, however, everyone is on equal footing and contributing to the experience.  It&#8217;s pretty awesome.  We pulled it out at a little house party and <b>everyone</b> jumped in.  We&#8217;re planning a &#8220;battle of the bands&#8221; at an upcoming party where the bands are selected out of a hat and everyone has to do each instrument for at least one song.  It should be pretty hilarious.  The only disappointment is that all of the new downloadable content won&#8217;t be available for the PS2 version.  We&#8217;re already itching for new songs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/05/07/rock-band-best-cooperative-game-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video Card Ugliness</title>
		<link>http://www.nonperiodic.net/blog/2008/05/02/video-card-ugliness/</link>
		<comments>http://www.nonperiodic.net/blog/2008/05/02/video-card-ugliness/#comments</comments>
		<pubDate>Fri, 02 May 2008 15:03:15 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/?p=387</guid>
		<description><![CDATA[I have this fairly nice setup for my home office, since I work from home more or less exclusively. I like to play the occasional PC game, so I have a reasonable video card setup. I had two eVGA 7600GT video cards in an SLI configuration. Well, this all turned sour last Saturday. I pulled [...]]]></description>
			<content:encoded><![CDATA[<p>I have this fairly nice setup for my home office, since I work from home more or less exclusively.  I like to play the occasional PC game, so I have a reasonable video card setup.  I had two <a href="http://www.evga.com/products/moreinfo.asp?pn=256-P2-N550-AX">eVGA 7600GT</a> video cards in an <a href="http://en.wikipedia.org/wiki/Scalable_Link_Interface">SLI</a> configuration.  Well, this all turned sour last Saturday.  I pulled out the cards and&#8230;<br />
<center><br />
<a href='http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-1.jpg'><img src="http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-1-300x189.jpg" alt="Two broken eVGA 7600GT cards" title="7600gt-1" width="300" height="189" class="alignnone size-medium wp-image-383" /></a><a href='http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-2.jpg'><img src="http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-2-300x225.jpg" alt="Two broken eVGA 7600GT video cards" title="7600gt-2" width="300" height="225" class="alignnone size-medium wp-image-384" /></a><br />
</center><br />
Can you see the problem?  Here&#8217;s a pair of close-ups:<br />
<center><br />
<a href='http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-3.jpg'><img src="http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-3-300x225.jpg" alt="Two broken eVGA 7600GT video cards." title="7600gt-3" width="300" height="225" class="alignnone size-medium wp-image-385" /></a><a href='http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-4.jpg'><img src="http://www.nonperiodic.net/blog/wp-content/uploads/2008/05/7600gt-4-300x225.jpg" alt="Busted capacitors on a 7600GT" title="7600gt-4" width="300" height="225" class="alignnone size-medium wp-image-386" /></a><br />
</center><br />
So I ordered an upgrade (no SLI this time around, since I&#8217;m having to pay for it myself) of a <a href="http://www2.pny.com/8800-GT-512MB-PCIe-20-P2562C269.aspx">PNY 8800GT</a>.  It seems pretty nice and was only about $150 after rebate from <a href="http://www.newegg.com/">Newegg</a>.  I was tempted to go back to eVGA, but I had a pretty bad experience with them when I was setting this box up.  I decided to branch out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/05/02/video-card-ugliness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ungoogleable Erlang Documentation</title>
		<link>http://www.nonperiodic.net/blog/2008/02/20/ungoogleable-erlang-documentation/</link>
		<comments>http://www.nonperiodic.net/blog/2008/02/20/ungoogleable-erlang-documentation/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 00:16:51 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Erlang]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/2008/02/20/ungoogleable-erlang-documentation/</guid>
		<description><![CDATA[While I&#8217;m complaining about Erlang: why doesn&#8217;t Google ever return any hits on the documentation? If I google &#8220;perl sprintf&#8221; the first hit is the documentation page http://perldoc.perl.org/functions/sprintf.html. The same thing happens if I Google &#8220;python array&#8221; or &#8220;lisp map&#8221; or &#8220;php echo.&#8221; If I type &#8220;erlang supervisor&#8221; I don&#8217;t get anything manual-like until the [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m complaining about Erlang: why doesn&#8217;t Google ever return any hits on the documentation?  If I google &#8220;perl sprintf&#8221; the first hit is the documentation page <a href="http://perldoc.perl.org/functions/sprintf.html">http://perldoc.perl.org/functions/sprintf.html</a>.  The same thing happens if I Google &#8220;python array&#8221; or &#8220;lisp map&#8221; or &#8220;php echo.&#8221;  If I type &#8220;erlang supervisor&#8221; I don&#8217;t get anything manual-like until the 18th hit with <a href="http://erlang.org/doc/design_principles/sup_princ.html">this page</a>, which isn&#8217;t even the man page.  Moreover, that page <b>doesn&#8217;t even link to the actual manual page</b> despite referring to it:</p>
<blockquote><p>
This section should be read in conjunction with supervisor(3), where all details about the supervisor behaviour is given.
</p></blockquote>
<p>In fact, even if you start <a href="http://erlang.org/doc/">at the documentation page</a>, it&#8217;s not clear how you would find <code>supervisor (3)</code> aside from actually typing &#8220;man supervisor&#8221; at the command prompt.  The <a href="http://erlang.org/doc/reference_manual/part_frame.html">Erlang Reference Manual</a> (with its <b>HORRIBLE HORRIBLE FRAMES</b>) doesn&#8217;t actually talk about the supervisor behaviour, presumably because this is technically an OTP thing.  Eventually, I go to <a href="http://erlang.org/doc/man_index.html">the index</a> and there it is.  Why is this so hard?  I feel like I can&#8217;t be the only one who finds this frustrating.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/02/20/ungoogleable-erlang-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erlang PostgreSQL Roundup</title>
		<link>http://www.nonperiodic.net/blog/2008/02/20/erlang-postgresql-roundup/</link>
		<comments>http://www.nonperiodic.net/blog/2008/02/20/erlang-postgresql-roundup/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 23:56:12 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Britain]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Erlang]]></category>

		<guid isPermaLink="false">http://www.nonperiodic.net/blog/2008/02/20/erlang-postgresql-roundup/</guid>
		<description><![CDATA[Like just about everything to do with Erlang, database driver support appears to be in total disarray. I&#8217;d like to be able to store data in a PostgreSQL database and access it reasonably well. Options appear to be Erlang psql driver that is a fork or something of the code by Erlang Consulting. You can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Like just about everything to do with Erlang, database driver support appears to be in total disarray.  I&#8217;d like to be able to store data in a PostgreSQL database and access it reasonably well.  Options appear to be</p>
<ul>
<li><a href="http://code.google.com/p/erlang-psql-driver/">Erlang psql driver</a> that is a fork or something of the code by Erlang Consulting.  You can&#8217;t even directly download it.  You have to check it out from SVN.  It doesn&#8217;t even have a README file.</li>
<li>On <a href="http://jungerl.sourceforge.net/">Jungerl</a> there claims to be psql project, but you can&#8217;t download it or anything without apparently downloading all this other stuff.  In fact, like the one above, you can only check it out via CVS.  The CVS repository for it is viewable <a href="http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/pgsql/">here</a>.  It only claims to be able to perform &#8220;simple commands&#8221; and the code doesn&#8217;t look like it&#8217;s been updated in a while.</li>
<li><a href="http://erlang-consulting.com/aboutus/opensource.html">Erlang Consulting</a> has released some code, but no examples or anything about how to use it.</li>
<li>There is apparently an <a href="http://linux.die.net/man/3/odbc">ODBC</a> implementation, but from the mailing list it sounds like it is very slow and doesn&#8217;t work well in Linux, while also not implementing many of PostgreSQL&#8217;s features.</li>
<li>ejabberd <a href="https://forge.process-one.net/browse/ejabberd-modules/pgsql">also has an implementation</a></li>
</ul>
<p>There&#8217;s a blog post <a href="http://devtopics.blogspot.com/2006/07/postgresql-part-1.html">here</a> from 2006 where Ernie Makris claims to have written a kick-ass interface and is going to tell us all about it and post it.  Unfortunately he never posts on his blog again.  There is an extensive thread <a href="http://www.trapexit.org/forum/viewtopic.php?t=10861&#038;start=0&#038;sid=4e3fcba8b22227f55c075f7abf4f6c80">here</a> where people express the same frustrations as I am.  This thread is only a couple of months old, so maybe things have gotten somewhere. </p>
<p>It appears, anecdotally, that the one on Jungerl by Christian Sunesson is pretty stable, and it seems to be relatively standalone.  I will give this one a shot first and see where it gets me.  Connection seems straightforward enough:<br />
<verbatim><br />
{ok, Db} = pgsql:connect(&#8220;host&#8221;, &#8220;database&#8221;, &#8220;user&#8221;, &#8220;password&#8221;).<br />
</verbatim><br />
My first little query:<br />
<verbatim><br />
pgsql:squery(Db, &#8220;SELECT NOW()&#8221;).<br />
</verbatim><br />
After turning off SSL in the postgresql.conf file, I got back the quite-reasonable answer:<br />
<verbatim><br />
{ok,[{"SELECT",<br />
      [{desc,0,"now",timestamptz,text,8,-1,0}],<br />
      [[< <"2008-02-19 18:55:06.87229-05">>]]}]}<br />
</verbatim><br />
So, I&#8217;m cautiously optimistic that I might be able to make this work.</p>
<p><b>UPDATE:</b><br />
It looks like the ejabberd stuff may actually be the way to go.  It is a branch of the Jungerl work by Christian Sunesson and it appears to be <a href="https://forge.process-one.net/browse/ejabberd-modules/pgsql/trunk/src">under active development</a>.  Specifically, they have implemented things with <code>gen_server</code>, which would seem to be a big improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nonperiodic.net/blog/2008/02/20/erlang-postgresql-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
