<?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>Ed Baskerville</title>
	<atom:link href="http://edbaskerville.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://edbaskerville.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 03:06:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using the SUNDIALS ODE package on Lion</title>
		<link>http://edbaskerville.com/2011/10/11/using-the-sundials-ode-package-on-lion/</link>
		<comments>http://edbaskerville.com/2011/10/11/using-the-sundials-ode-package-on-lion/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 22:24:48 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[ODE]]></category>
		<category><![CDATA[SUNDIALS]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/?p=240</guid>
		<description><![CDATA[The SUNDIALS project from Lawrence Livermore National Lab is a package of tools for solving systems of ordinary differential equations (ODEs) and related problems, including MPI parallelization and GMRES-based step methods. I am testing it for use on large food &#8230; <a href="http://edbaskerville.com/2011/10/11/using-the-sundials-ode-package-on-lion/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="https://computation.llnl.gov/casc/sundials/main.html">SUNDIALS</a> project from Lawrence Livermore National Lab is a package of tools for solving systems of ordinary differential equations (ODEs) and related problems, including <a href="http://en.wikipedia.org/wiki/Message_Passing_Interface">MPI</a> parallelization and <a href="http://en.wikipedia.org/wiki/Generalized_minimal_residual_method">GMRES</a>-based step methods. I am testing it for use on large food web models, in the hope that it will be faster and more robust than Matlab&#8217;s methods (or, certainly, than implementing fancy methods myself). This entry covers the steps I took to get it built and working on Mac OS X Lion.</p>
<ol>
<li>If you just upgraded to Lion and haven&#8217;t done this yet, install <a href="http://itunes.apple.com/us/app/xcode/id448457090?mt=12">Xcode</a> from the Mac App Store.</li>
<li>Install gfortran prebuilt for Lion: <a href="http://r.research.att.com/gfortran-4.2.3.dmg">http://r.research.att.com/gfortran-4.2.3.dmg</a></li>
<li>If you haven&#8217;t done this already, install and set up <a href="http://www.macports.org/">MacPorts</a>.</li>
<li>Install OpenMPI via MacPorts with the command <code>sudo port install openmpi</code>. This can take a long time (hours), since it depends on also doing a separate MacPorts install of GCC 4.4. Starting this install is a good way to end the day.</li>
<li>Download SUNDIALS 2.4.0 (the whole package, <code>sundials-2.4.0.tar.gz</code>) from <a href="https://computation.llnl.gov/casc/sundials/download/download.html">the SUNDIALS download page</a>. Move it to wherever you like and extract it (double-clicking works fine).</li>
<li>Open a terminal window, <code>cd</code> into the SUNDIALS directory, and run the following (I set my CC to gcc for the sake of safety, even though Lion defaults to <a href="http://llvm.org/">LLVM</a>):
</ol>
<pre>./configure CC=gcc F77=gfortran \
--prefix=/usr/local/sundials \
--enable-shared \
--with-mpicc=/opt/local/bin/openmpicc \
--with-mpif77=/opt/local/bin/openmpif77
make
sudo make install</pre>
<p>That&#8217;s it; SUNDIALS should now be installed in <code>/usr/local/sundials</code>. You can use the prefix <code>/usr/local</code> if you like, but this way it&#8217;s conveniently kept separated from everything else.</p>
<p>To use it, it&#8217;s a matter of making sure that <code>/usr/local/sundials/include</code> is in your header search path, <code>/usr/local/sundials/lib</code> is in your library search path, and you give the linker <code>-l[library name]</code> (that&#8217;s a &#8220;hyphen lowercase ell&#8221;) for any libraries you need. For example, for the SUNDIALS example file <code>cvsFoodWeb_ASAi_kry.c</code>, I needed <code>-lsundials_nvecserial -lsundials_cvodes</code></p>
<p>In Xcode, you can do this via the following steps:</p>
<ul>
<li>Make a new Application/Command-Line Tool project.</li>
<li>Add your source code, e.g., <code>cvsFoodWeb_ASAi_kry.c</code></li>
<li>In the project settings, add <code>/usr/local/sundials/include</code> to Header Search Paths. Oddly, this causes Header Search Paths to remain empty, but a User Header Search Paths field appears with your desired path.</li>
<li>Check Always Search User Paths</li>
<li>Add your library flags, e.g., <code>-lsundials_nvecserial -lsundials_cvodes</code>, to Other Linker Flags.</li>
</ul>
<p>If everything has gone according to plan, the code should now build and run successfully.</p>
<p>So far, these steps only work for serial code: when I get an MPI example compiling and running, I&#8217;ll post those steps as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2011/10/11/using-the-sundials-ode-package-on-lion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pause Processing.js</title>
		<link>http://edbaskerville.com/2011/10/03/pause-processing-js/</link>
		<comments>http://edbaskerville.com/2011/10/03/pause-processing-js/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 15:23:57 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/?p=216</guid>
		<description><![CDATA[Processing.js is great. But while working on a network visualization sketch (coming soon), I found I sometimes wanted to pause/restart its execution manually. (Note that there is a built-in pauseOnBlur directive that will only run the animation when the window &#8230; <a href="http://edbaskerville.com/2011/10/03/pause-processing-js/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://processingjs.org/">Processing.js</a> is great. But while working on a network visualization sketch (coming soon), I found I sometimes wanted to pause/restart its execution manually. (Note that there is a built-in <code>pauseOnBlur</code> directive that will only run the animation when the window is in front.)</p>
<p>Turns out this is really easy to do. In fact, they even do it on this <a href="http://processingjs.org/reference/articles/jsQuickStart">tutorial page</a> for JavaScript developers. But since Googling &#8220;pause processing.js&#8221; came up short and the relevant functions didn&#8217;t strike me as relevant in the reference docs, here&#8217;s what I came up with before I found the documentation:</p>
<pre>
&lt;p&gt;
  &lt;button id="toggleBtn" onClick="toggle();"&gt;Pause&lt;/button&gt;
&lt;/p&gt;

&lt;script type="text/javascript"&gt;
// If you attached weird "Processing language" code
// to a canvas with id "sketch":
var processing = Processing.getInstanceById("sketch");

// If you're doing everything in raw JavaScript like me,
// you probably did something like this:
var processing = new Processing( ... );
// ...

var looping = true;
function toggle()
{
  if(looping)
  {
    processing.noLoop();
    document.getElementById("toggleBtn").textContent = "Play";
  }
  else
  {
    processing.loop();
    document.getElementById("toggleBtn").textContent = "Pause";
  }
  looping = !looping;
}
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2011/10/03/pause-processing-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First steps with Python</title>
		<link>http://edbaskerville.com/2011/03/10/first-steps-with-python/</link>
		<comments>http://edbaskerville.com/2011/03/10/first-steps-with-python/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 03:29:35 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/?p=182</guid>
		<description><![CDATA[First up, I&#8217;m trying to resume my habit, lost when I started grad school, of posting various things to this website, mostly experiences getting computer things to work. This is mostly for my own benefit—easy to find command-line instructions—with the &#8230; <a href="http://edbaskerville.com/2011/03/10/first-steps-with-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First up, I&#8217;m trying to resume my habit, lost when I started grad school, of posting various things to this website, mostly experiences getting computer things to work. This is mostly for my own benefit—easy to find command-line instructions—with the side effect that other people can see it if they want to. If I get ambitious, I might start posting science-related things here too.</p>
<p>This post is about my long-overdue first steps with Python, which, like Spanish, I have been on the verge of starting to learn for about six years.</p>
<p>First impression: my god, I should have done this six years ago. At last I have a go-to scripting language. Today I am (by and large) saying goodbye to bash, R, Matlab, and, when performance doesn&#8217;t much, Java/C++/Objective-C.</p>
<p><span id="more-182"></span></p>
<p>More details: the &#8220;multi-paradigm&#8221; buzz is legit. It&#8217;s a nice dynamic (Really Dynamic) object-oriented language, but functional constructs—which I use sparingly, not being a Functional Programming Genius—seem well done. And you never need to use objects at all: procedural style, just with functions, is also fine. It&#8217;s very expressive—lots of sophistication with few lines of code—but the code still comes out quite readable (depending, of course, on the author). In general, it seems to have lots of features without suffering from syntax excess. And there are lots of well-supported libraries, because apparently lots of people feel the way I&#8217;m starting to.</p>
<p>The useful stuff: although Python 3 itself seems ready to go, the package support isn&#8217;t quite there yet, so I&#8217;m going to stick with Python 2.7.1 for the time being.</p>
<p>Beyond Python, I think I&#8217;ll need four basic packages to start with: numpy, scipy, matplotlib, and rpy2.</p>
<p>To do numerical work—the kind of things many people use Matlab for—you&#8217;ll want numpy and scipy, which seem very mature and use fast C libraries like LAPACK under the hood. For graphics, many people seem to use matplotlib, which emulates Matlab&#8217;s plotting abstractions. Finally, because (despite being an atrocious language) R has lots of useful packages for statistical work, rpy2 lets you use those packages—including graphics—from within the cozy environs of Python.</p>
<p>Now, some actual instructions for installation and getting started with the language&#8230;</p>
<p><b>EASIEST WAY TO INSTALL EVERYTHING</b></p>
<p>After going through all the headaches documented below, I discovered that a company called Enthought maintains an <a href="http://www.enthought.com/products/epd.php">up-to-date Python distribution</a> for scientific computing that includes everything I need (except rpy2, which seemed to install easily enough atop it). They charge money for commercial/individual use, but provide a free download for academic use: follow the instructions <a href="http://www.enthought.com/products/epd.php">at the distribution website</a> to get a full 64-bit Python distribution with NumPy, SciPy, matplotlib, etc.</p>
<p>Only one bit of manual configuration was needed: the automated shell script didn&#8217;t correctly add their python to my path, so I had to add this to my shell profile (for most Mac OS X users, this is <code>~/.bash_profile</code>):</p>
<pre>
export PATH="/Library/Frameworks/EPD64.framework/Versions/7.0/bin:${PATH}"
</pre>
<p>Then, either open a new Terminal or type <code>source ~/.bash_profile</code>, and you can install, e.g., rpy2 with</p>
<pre>
easy_install rpy2
</pre>
<p>I don&#8217;t recommend following the rest of these instructions—skip to the end. But if you like doing things the hard way, you can&#8230;</p>
<p><b>Installing Python 2.7.1</b></p>
<p>On Mac OS X 10.6, this just means downloading the <del>fat 64-bit/</del><del>32-bit installer</del>10.6 installer from <a href="http://python.org/download/">the Python website</a> and running the installer. I did a custom install, checking the box about modifying my profile, which seemed to do the correct thing to my <code>PATH</code> in my <code>.zprofile</code> so that 2.7.1 gets run and not the system-included 2.6.1.</p>
<p><del>NOTE: I did this all with 64-bit first, which worked fine until I tried to use matplotlib. Unless you want to build matplotlib yourself from source, use the 32-bit version. The matplotlib binaries don&#8217;t work on 64-bit.</del></p>
<p>BUT WAIT: it turns out even the &#8220;32-bit installer&#8221; is actually 64-bit, and you need to configure it to run in 64-bit mode anyway. (See below.)</p>
<p><b>Fixing a Bug</b></p>
<p>There&#8217;s a bug in Python 2.7 on Mac OS X that prevents tabs from properly inserting in interactive mode; I found the solution <a href="http://stackoverflow.com/questions/4809820/tab-key-not-indenting-in-python">on stackoverflow</a>, which amounts to putting this in, e.g., <code>~/.pystartup</code>:</p>
<pre>
import readline
if 'libedit' in readline.__doc__:
   readline.parse_and_bind("bind ^I ed-insert")
</pre>
<p>and then setting the <code>PYTHONSTARTUP</code> environment variable (in your <code>~/.bash_profile</code>, <code>~/.zprofile</code>, etc.):</p>
<pre>
export PYTHONSTARTUP=$HOME/.pystartup
</pre>
<p><b>Installing pip to make everything else easier</b></p>
<p>Somehow the existence of a nice Python package repository escaped my notice for the first 24 hours: it&#8217;s called <a href="http://pypi.python.org">PyPI</a>, and everything I was looking for is there. To install things easily from PyPI, you can use a tool called pip.</p>
<p>Before installing pip, you need setuptools, which can be installed via the <a href="http://pypi.python.org/pypi/setuptools">instructions on PyPI</a>: first download the file, then run</p>
<pre>
cd ~/Downloads
sh ./setuptools-0.6c11-py2.7.egg
</pre>
<p>Then you can install pip. I first downloaded the <code>.tar.gz</code> from <a href="http://pypi.python.org/pypi/pip">the bottom of the pip homepage</a>, and then ran:</p>
<pre>
cd ~/Downloads
tar xzf pip-0.8.2.tar.gz
cd pip-0.8.2
python setup.py build
python setup.py install
</pre>
<p>Now, installing packages won&#8217;t be annoying.</p>
<p><b>Installing a FORTRAN compiler</b></p>
<p>Why would you want to do that? Because NumPy and SciPy require them.</p>
<p>Run <a href="http://r.research.att.com/gfortran-4.2.3.dmg">this installer from AT&#038;T Research</a>.</p>
<p><b>Installing packages</b></p>
<p><del>Refreshingly, all the packages I wanted to install Just Worked.</del> Everything <em>except matplotlib</em> can be successfully installed via pip.</p>
<p>I did the following at my shell prompt:</p>
<pre>
pip install numpy
pip install scipy
pip install rpy2
</pre>
<p>The last one depended on the fact that I had R installed in the standard location that you get with the OS X package installer for R. Nice to see that everything seems to be getting built fat (32-bit and 64-bit).</p>
<p><b>Installing matplotlib</b></p>
<p>The matplotlib package, it turns out, is a pain in the ass to build from scratch, and doesn&#8217;t work quite right from a <code>pip install</code>. Following the instructions at <a href="http://matplotlib.sourceforge.net/faq/installing_faq.html#installing-osx-binaries">the matplotlib website</a> led me to the following sequence of steps:</p>
<p>(1) Download <code>matplotlib-1.0.1-python.org-32bit-py2.7-macosx10.3.dmg</code> from the <a href="matplotlib-1.0.1_r0-py2.7-macosx-10.3-fat.egg">matplotlib Sourceforge site</a></p>
<p>(2) Run the installer.</p>
<p>(3) Add this line to your shell profile, since this matplotlib doesn&#8217;t work right in 64-bit mode, and I didn&#8217;t have the patience to figure out how to build a 64-bit one from scratch:</p>
<pre>
alias python="arch -i386 python"
</pre>
<p>(4) Change to a native Mac OS X plotting backend, since the default one is broken in this configuration, by putting the following into a file located at <code>~/.matplotlib/matplotlibrc</code>:</p>
<pre>
backend: macosx
</pre>
<p>By the way, this is why I hate open-source software. (I love it for many other reasons.)</p>
<p><b>Actually learning Python</b></p>
<p>I found the tutorial <a href="http://docs.python.org/tutorial/">at the Python website</a> to be quite readable and useful. I&#8217;ve also have glanced at pieces of <a href="http://diveintopython.org/toc/index.html">Dive Into Python</a>.</p>
<p>Of course, getting comfortable with a language means actually Doing Something, all the while looking up syntax and reference documentation every half-line of code until you remember things. With Python, it has taken me about a day to feel confident that I can basically do what I want—contrast this with R, the inner workings of which will always be a mystery to me, particularly now that I&#8217;m leaving it behind.</p>
<p>Here&#8217;s a little example of how easy it is to process CSV files efficiently, with a nice dictionary mapping from column names to values:</p>
<pre>
import csv
csvfile = open("/path/to/file", mode='rU')
reader = csv.DictReader(csvfile) # csv.reader to return a list
for row in reader:
    for k, v in row.items():
        # Do something with keys and values
    # Or do something with the whole row
csvfile.close()
</pre>
<p>Bizarrely, indentation is syntax: Python knows your for loop is over because you write a line at a lower indentation level. But this has a wonderful effect: fewer lines of code, meaning you can see more of your logic in less space, and you can deploy blank lines exclusively for &#8220;writing in paragraphs&#8221; and not for silly things like &#8220;end&#8221; or &#8220;}&#8221;.</p>
<p>The Python equivalent of the missing semicolon seems to be the missing colon—these appear when introducing an if, for, class, etc., etc.; at this point I&#8217;m still forgetting them about 30% of the time.</p>
<p>The official Python people seem to encourage you to use <em>spaces</em> for indentation, not tabs, but the important thing is to be consistent so you don&#8217;t confuse the interpreter. I, for one, will use tabs. Commence rotten tomato throwing by people with stars upon thars.</p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2011/03/10/first-steps-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Access: The Sooner the Better</title>
		<link>http://edbaskerville.com/2009/08/17/open-access-the-sooner-the-better/</link>
		<comments>http://edbaskerville.com/2009/08/17/open-access-the-sooner-the-better/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:26:42 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/?p=79</guid>
		<description><![CDATA[I was just browsing my Science Magazine RSS feed at home, and encountered this hilarious screen when I clicked to read the full article&#8230;]]></description>
			<content:encoded><![CDATA[<p>I was just browsing my Science Magazine RSS feed at home, and encountered this hilarious screen when I clicked to read the full article&#8230;</p>
<div id="attachment_80" class="wp-caption aligncenter" style="width: 310px"><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/08/openaccess.png"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/08/openaccess-300x285.png" alt="How Do I Get Access?" title="openaccess" width="300" height="285" class="size-medium wp-image-80" /></a><p class="wp-caption-text">How Do I Get Access?</p></div>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/08/17/open-access-the-sooner-the-better/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn revert equivalent in git</title>
		<link>http://edbaskerville.com/2009/05/26/svn-revert-equivalent-in-git/</link>
		<comments>http://edbaskerville.com/2009/05/26/svn-revert-equivalent-in-git/#comments</comments>
		<pubDate>Wed, 27 May 2009 00:57:25 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/?p=87</guid>
		<description><![CDATA[I keep wanting to type git revert to roll back changes to the last committed version of something—that&#8217;s how you&#8217;d do it in Subversion—but this isn&#8217;t right. This works instead: git reset --hard HEAD]]></description>
			<content:encoded><![CDATA[<p>I keep wanting to type</p>
<p><code>git revert</code></p>
<p>to roll back changes to the last committed version of something—that&#8217;s how you&#8217;d do it in Subversion—but this isn&#8217;t right. This works instead:</p>
<p><code>git reset --hard HEAD</code></p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/05/26/svn-revert-equivalent-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Classical Revolution Ann Arbor kickoff on Cinco de Mayo</title>
		<link>http://edbaskerville.com/2009/04/28/classical-revolution-ann-arbor-kickoff-on-cinco-de-mayo/</link>
		<comments>http://edbaskerville.com/2009/04/28/classical-revolution-ann-arbor-kickoff-on-cinco-de-mayo/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 03:17:17 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[classical revolution]]></category>
		<category><![CDATA[show]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/?p=76</guid>
		<description><![CDATA[I&#8217;m getting a first Classical Revolution chamber jam going next Tuesday in Ann Arbor! The first event will be at the Kerrytown Concert House, with other, non-concert house venues to come. If you&#8217;re interested in coming, come. If you&#8217;re interested &#8230; <a href="http://edbaskerville.com/2009/04/28/classical-revolution-ann-arbor-kickoff-on-cinco-de-mayo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m getting a first <a href="http://classicalrevolution.org/">Classical Revolution</a> chamber jam going next Tuesday in Ann Arbor! The first event will be at the Kerrytown Concert House, with other, non-concert house venues to come. If you&#8217;re interested in coming, come. If you&#8217;re interested in playing, let me know via Facebook or email.</p>
<p>Classical Revolution Ann Arbor<br />
Tuesday, May 5<br />
8 PM<br />
Kerrytown Concert House, 415 N Fourth Ave</p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/04/28/classical-revolution-ann-arbor-kickoff-on-cinco-de-mayo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XgridLite for Leopard</title>
		<link>http://edbaskerville.com/2009/02/26/xgridlite-for-leopard/</link>
		<comments>http://edbaskerville.com/2009/02/26/xgridlite-for-leopard/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 06:23:13 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[xgridlite]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/?p=64</guid>
		<description><![CDATA[The other day I released XgridLite for Leopard, something which should have happened about a year and a half ago. There are no substantial changes whatsoever, except that version 1.1 works on Leopard. However, it breaks Tiger support, so if &#8230; <a href="http://edbaskerville.com/2009/02/26/xgridlite-for-leopard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The other day I released <a href="http://edbaskerville.com/xgridlite">XgridLite for Leopard</a>, something which should have happened about a year and a half ago. There are no substantial changes whatsoever, except that version 1.1 works on Leopard. However, it breaks Tiger support, so if you haven&#8217;t upgraded yet—I suspect a small minority of the kind of people that use XgridLite—you should still use version 1.0.2.</p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/02/26/xgridlite-for-leopard/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>XgridLite: Dual Tiger/Leopard Functionality?</title>
		<link>http://edbaskerville.com/2009/02/03/xgridlite-dual-tigerleopard-functionality/</link>
		<comments>http://edbaskerville.com/2009/02/03/xgridlite-dual-tigerleopard-functionality/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 02:44:03 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[xgridlite]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/?p=83</guid>
		<description><![CDATA[After confirmation that things seem to work for others on Leopard, I went through and tried to make sure it would work on Tiger again too. I don&#8217;t have time to set up a Tiger test box right now, so &#8230; <a href="http://edbaskerville.com/2009/02/03/xgridlite-dual-tigerleopard-functionality/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After confirmation that things seem to work for others on Leopard, I went through and tried to make sure it would work on Tiger again too. I don&#8217;t have time to set up a Tiger test box right now, so I&#8217;d appreciate it someone who has a Tiger box would test this updated version:</p>
<p><a href="http://code.edbaskerville.com/xgridlite/XgridLite.prefPane.zip">XgridLite.prefPane.zip</a></p>
<p>Post your success/lack thereof in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/02/03/xgridlite-dual-tigerleopard-functionality/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XgridLite on Leopard, Test Version</title>
		<link>http://edbaskerville.com/2009/01/31/xgridlite-on-leopard-test-version/</link>
		<comments>http://edbaskerville.com/2009/01/31/xgridlite-on-leopard-test-version/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 21:05:21 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[xgridlite]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/?p=81</guid>
		<description><![CDATA[After debugging some weirdness, I have a version of XgridLite that works on Leopard, I think. Brave testers, download this file: XgridLite.prefPane.zip Then decompress and drag the prefPane into your /Library/PreferencePanes or ~/Library/PreferencePanes Let me know how it goes! FYI, &#8230; <a href="http://edbaskerville.com/2009/01/31/xgridlite-on-leopard-test-version/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After debugging some weirdness, I have a version of XgridLite that works on Leopard, I think. Brave testers, download this file:</p>
<p><a href="http://code.edbaskerville.com/xgridlite/XgridLite.prefPane.zip">XgridLite.prefPane.zip</a></p>
<p>Then decompress and drag the prefPane into your /Library/PreferencePanes or ~/Library/PreferencePanes</p>
<p>Let me know how it goes!</p>
<p>FYI, the weirdness I ran into goes something like this (as described in a message I just sent to the xgrid-users mailing list):</p>
<blockquote><p>Hi everyone (particularly Apple folks),</p>
<p>After being out of the loop for a while, I finally got around to getting XgridLite working on Leopard. (Test version about to be posted at code.edbaskerville.com, official release probably by Monday.)</p>
<p>In doing so, I ran into one weirdness that I thought someone might be able to explain. XgridLite simply calls xgridctl to get and set controller state, which seems simple enough. In Tiger, it was sufficient to do this as root using a setuid tool.</p>
<p>In Leopard, however, I found that status calls always returned that the controller was off:</p>
<p>daemon              state               pid<br />
======              =====               ===<br />
xgridcontrollerd    stopped</p>
<p>This was happening inside the setuid tool even when querying it via sudo as a regular user worked fine:</p>
<p>Agnos:~ ebaskerv$ sudo xgridctl c status<br />
daemon              state               pid<br />
======              =====               ===<br />
xgridcontrollerd    running             12656</p>
<p>To get to the bottom of this, I activated the root user on my system and tried it from a root shell, and, sure enough, I&#8217;m being told the controller is stopped:</p>
<p>sh-3.2# xgridctl c status<br />
daemon              state               pid<br />
======              =====               ===<br />
xgridcontrollerd    stopped</p>
<p>Miraculously, though, if you run xgridctl via sudo as root, all is fine:</p>
<p>sh-3.2# sudo xgridctl c status<br />
daemon              state               pid<br />
======              =====               ===<br />
xgridcontrollerd    running             12656</p>
<p>This gave me the workaround I needed: run xgridctl via sudo as root inside XgridLite. But I still have no idea *why* this is happening, so I&#8217;m writing purely out of curiosity. Why is it that running xgridctl status via sudo gives the correct status, while running as root directly does not? One more wrinkle: running xgridctl c start/stop seem to work fine inside my setuid tool (WITHOUT running via sudo), but do NOT work via a root shell!</p>
<p>Any wisdom would be appreciated.</p>
<p>Thanks,<br />
Ed</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/01/31/xgridlite-on-leopard-test-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two Million</title>
		<link>http://edbaskerville.com/2009/01/20/two-million/</link>
		<comments>http://edbaskerville.com/2009/01/20/two-million/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 04:20:45 +0000</pubDate>
		<dc:creator>ed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dc]]></category>
		<category><![CDATA[inauguration]]></category>

		<guid isPermaLink="false">http://edbaskerville.com/2009/01/20/two-million/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-9339a648-120d-4a5b-a286-9174403efd85.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-9339a648-120d-4a5b-a286-9174403efd85.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-94759d88-5bda-4b06-8bc5-13ba9dd659b5.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-94759d88-5bda-4b06-8bc5-13ba9dd659b5.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-e27fa406-87ad-4cf8-93a9-85631b55f1c8.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-e27fa406-87ad-4cf8-93a9-85631b55f1c8.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/p-640-480-6c1b9da3-29ef-4892-9a35-1e5aaa54a406.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/p-640-480-6c1b9da3-29ef-4892-9a35-1e5aaa54a406.jpeg" alt="" width="225" height="300" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-b5bd8b39-bb31-49ba-b945-3808432f6043.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-b5bd8b39-bb31-49ba-b945-3808432f6043.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-e702bfbb-3b09-4758-8c32-fdd18f82c1b5.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-e702bfbb-3b09-4758-8c32-fdd18f82c1b5.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-504ac24a-61bd-4043-9b82-d95d336c20a4.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-504ac24a-61bd-4043-9b82-d95d336c20a4.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
<p><a href="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-534d27d0-1380-4e7e-8edb-946fcdfb6113.jpeg"><img src="http://edbaskerville.com/wordpress/wp-content/uploads/2009/01/l-640-480-534d27d0-1380-4e7e-8edb-946fcdfb6113.jpeg" alt="" width="300" height="225" class="alignnone size-full wp-image-364" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://edbaskerville.com/2009/01/20/two-million/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

