<?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>AsynchronousBlog</title>
	<atom:link href="http://www.asynchronous.org/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.asynchronous.org/blog</link>
	<description>Random stuff for search engines to index.</description>
	<lastBuildDate>Sat, 28 Nov 2009 16:10:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Champlain Valley Water Quality, 2009</title>
		<link>http://www.asynchronous.org/blog/archives/2009/11/28/champlain-valley-water-quality-2009</link>
		<comments>http://www.asynchronous.org/blog/archives/2009/11/28/champlain-valley-water-quality-2009#comments</comments>
		<pubDate>Sat, 28 Nov 2009 16:09:42 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[~/stuff/homebrew]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=103</guid>
		<description><![CDATA[I missed putting up the water quality numbers from this spring, but in the mean time it turns out the Champlain Water District has the Water Quality Reports up on the web. Unfortunately, they&#8217;re huge PDFs since they seem to be simply bitmap scans of the paper report. :( In any case, here&#8217;s the relevant [...]]]></description>
			<content:encoded><![CDATA[<p>I missed putting up the water quality numbers from this spring, but in the mean time it turns out the <a href="http://www.cwd-h2o.org/publications.html">Champlain Water District has the Water Quality Reports up on the web</a>.  Unfortunately, they&#8217;re huge PDFs since they seem to be simply bitmap scans of the paper report. :(</p>

<p>In any case, here&#8217;s the relevant homebrewer water quality details:</p>

<table border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr><td>Aluminum</td><td>0.056 mg/L</td></tr>
<tr><td>Alkalinity</td><td>57-74 ppm as CaCO3</td></tr>
<tr><td>Calcium Hardness</td><td>45-56 ppm as CaCO3</td></tr>
<tr><td>Total Hardness</td><td>61 ppm as CaCO3 (3.6 grains/gal)</td></tr>
<tr><td>Chloride</td><td>17 ppm</td></tr>
<tr><td>Foaming Agents</td><td>less than 0.1ppm</td></tr>
<tr><td>Total Organic Carbon (TOC)</td><td>2.10 ppm (1.49-2.74)</td></tr>
<tr><td>Conductivity</td><td>182 µS/cm (158-202)</td></tr>
<tr><td>pH</td><td>7.66 (7.4-7.94)</td></tr>
<tr><td>Total Dissolved Solids</td><td>113 ppm</td></tr>
<tr><td>Iron</td><td>less than 0.01ppm</td></tr>
<tr><td>Manganese</td><td>.006 mg/L (0 &#8211; 0.023)</td></tr>
<tr><td>Sodium</td><td>7.5ppm</td></tr>
<tr><td>Potassium</td><td>1.31 ppm</td></tr>
<tr><td>Sulfate</td><td>15 ppm</td></tr>
<tr><td>Silver</td><td>less than 0.005 ppm</td></tr>
<tr><td>Silica</td><td>1.4 ppm</td></tr>
<tr><td>Silicon</td><td>0.67 ppm</td></tr>
<tr><td>Bromide</td><td>less tahn 0.010 ppm</td></tr>
<tr><td>Iodide</td><td>less than 1 ppm</td></tr>
<tr><td>Flouride</td><td>0.96 mg/L (0.71 &#8211; 1.19)</td></tr>
<tr><td>Ammonium Ion</td><td>0.12 ppm (0.02-0.23)</td></tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2009/11/28/champlain-valley-water-quality-2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql[-bin]-5.1.40 ebuild</title>
		<link>http://www.asynchronous.org/blog/archives/2009/11/28/mysql-bin-5-1-40-ebuild</link>
		<comments>http://www.asynchronous.org/blog/archives/2009/11/28/mysql-bin-5-1-40-ebuild#comments</comments>
		<pubDate>Sat, 28 Nov 2009 15:50:41 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=100</guid>
		<description><![CDATA[I had a pressing need for mysql-5.1.40 to be installed for work reasons a couple of weeks ago, and found the state of mysql releases in gentoo to be lacking. I cobbled together the following ebuild using the binary RPM distribution from mysql.com. It should probably be called &#8220;mysql-bin&#8221;, but whatever. inherit eutils rpm &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I had a pressing need for mysql-5.1.40 to be installed for work reasons a couple of weeks ago, and found the state of mysql releases in gentoo to be lacking.  I cobbled together the following ebuild using the binary RPM distribution from mysql.com.  It should probably be called &#8220;mysql-bin&#8221;, but whatever.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">inherit eutils rpm
&nbsp;
<span style="color: #666666; font-style: italic;"># http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-5.1.40-0.glibc23.x86_64.rpm/from/pick</span>
&nbsp;
<span style="color: #007800;">MY_P</span>=MySQL-server-<span style="color: #800000;">${PV}</span>
&nbsp;
<span style="color: #007800;">SRC_URI</span>=<span style="color: #ff0000;">&quot;http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-<span style="color: #007800;">${PV}</span>-0.glibc23.x86_64.rpm
    http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-client-<span style="color: #007800;">${PV}</span>-0.glibc23.x86_64.rpm
    http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-shared-<span style="color: #007800;">${PV}</span>-0.glibc23.x86_64.rpm
    http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-<span style="color: #007800;">${PV}</span>-0.glibc23.x86_64.rpm&quot;</span>
<span style="color: #007800;">DESCRIPTION</span>=<span style="color: #ff0000;">&quot;MySQL-5.1.40 RPM&quot;</span>
<span style="color: #007800;">HOMEPAGE</span>=<span style="color: #ff0000;">&quot;http://www.mysql.com&quot;</span>
<span style="color: #007800;">LICENSE</span>=<span style="color: #ff0000;">&quot;GPL-2&quot;</span>
<span style="color: #007800;">SLOT</span>=<span style="color: #ff0000;">&quot;0&quot;</span>
<span style="color: #007800;">KEYWORDS</span>=<span style="color: #ff0000;">&quot;amd64&quot;</span>
<span style="color: #007800;">IUSE</span>=<span style="color: #ff0000;">&quot;&quot;</span>
&nbsp;
src_install<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    dobin usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
    dosbin usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
    dolib usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
    insinto <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>mysql
    doins usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
    insinto <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>aclocal<span style="color: #000000; font-weight: bold;">/</span>mysql
    doins usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>aclocal<span style="color: #000000; font-weight: bold;">/</span>mysql.m4
&nbsp;
    dodoc usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>MySQL-server-5.1.40<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
    doman usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man1<span style="color: #000000; font-weight: bold;">/*</span>
    doman usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man8<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
    insinto <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql
    doins usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/*</span>
    insinto <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>charsets
    doins usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>charsets<span style="color: #000000; font-weight: bold;">/*</span>
    insinto <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>english
    doins usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>english<span style="color: #000000; font-weight: bold;">/*</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#/etc/logrotate.d</span>
<span style="color: #666666; font-style: italic;">#/etc/logrotate.d/mysql</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2009/11/28/mysql-bin-5-1-40-ebuild/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>django timezone view handling</title>
		<link>http://www.asynchronous.org/blog/archives/2009/10/10/django-timezone-view-handling</link>
		<comments>http://www.asynchronous.org/blog/archives/2009/10/10/django-timezone-view-handling#comments</comments>
		<pubDate>Sat, 10 Oct 2009 15:39:38 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/homebrew]]></category>
		<category><![CDATA[~/stuff/programming]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=89</guid>
		<description><![CDATA[One simple way to handle user-time-zone localization in an app is to always store the timestamp in UTC, and localize viewing/editing of that timestamp in a specific timezone. By default, Django traffics in the single settings.py-configured timezone. Timezone handling appear incomplete. The two options you&#8217;ll run across are this snippet for a timezone-localizing filter and [...]]]></description>
			<content:encoded><![CDATA[<p>One simple way to handle user-time-zone localization in an app is to always
store the timestamp in UTC, and localize viewing/editing of that timestamp in
a specific timezone.</p>

<p>By default, Django traffics in the single settings.py-configured timezone.</p>

<p>Timezone handling appear incomplete.  The two options you&#8217;ll run across are
<a href="http://www.djangosnippets.org/snippets/183/">this snippet for a timezone-localizing filter</a>
and <a href="http://code.google.com/p/django-timezones/">django-timezones</a>.</p>

<p>django-timezones has support for a TimeZone model/view field, and a model/view LocalizedDateTimeField.  The View field, however, will only do the parse-time conversion of the datetime value in to the settings-defined TZ. This only solves half of the problem, since you still need to convert the settings-defined TZ into the user&#8217;s TZ, and there&#8217;s no component for that.</p>

<p>The following is a LocalizedDateTimeInput widget which will handle this last
step, building on django.forms.DateTimeInput and django-timezones&#8217; utility
code:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django <span style="color: #ff7700;font-weight:bold;">import</span> forms
<span style="color: #ff7700;font-weight:bold;">from</span> timezones.<span style="color: black;">utils</span> <span style="color: #ff7700;font-weight:bold;">import</span> adjust_datetime_to_timezone
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> LocalizedDateTimeInput <span style="color: black;">&#40;</span>forms.<span style="color: black;">DateTimeInput</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, tz<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>._tz = tz
        <span style="color: #008000;">super</span><span style="color: black;">&#40;</span>LocalizedDateTimeInput, <span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> render<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, name, value, attrs=<span style="color: #008000;">None</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">isinstance</span><span style="color: black;">&#40;</span>value, <span style="color: #dc143c;">datetime</span><span style="color: black;">&#41;</span>:
            value = adjust_datetime_to_timezone<span style="color: black;">&#40;</span>value, <span style="color: #483d8b;">'UTC'</span>, <span style="color: #008000;">self</span>._tz<span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;"># @fixme: output the string rep of the timezone, probably after the &amp;lt;input /&amp;gt;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">super</span><span style="color: black;">&#40;</span>LocalizedDateTimeInput, <span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: black;">render</span><span style="color: black;">&#40;</span>name, value, attrs<span style="color: black;">&#41;</span></pre></div></div>


<p>Unfortunately, you&#8217;ll need to add a level of indirection to your view Form constructors to bind the &#8216;tz&#8217; argument on the widget.  Instead of a normal:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> MumbleForm <span style="color: black;">&#40;</span>forms.<span style="color: black;">Form</span><span style="color: black;">&#41;</span>:
    name = forms.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    date = forms.<span style="color: black;">DateTimeField</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>


<p>You&#8217;ll want to do something like:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> MumbleForm<span style="color: black;">&#40;</span><span style="color: #dc143c;">user</span>, <span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>:
    tz = settings.<span style="color: black;">TIME_ZONE</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">user</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #008000;">hasattr</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">user</span>, <span style="color: #483d8b;">'get_profile'</span><span style="color: black;">&#41;</span>:
        tz = <span style="color: #dc143c;">user</span>.<span style="color: black;">get_profile</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">timezone</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">class</span> _MumbleForm <span style="color: black;">&#40;</span>forms.<span style="color: black;">Form</span><span style="color: black;">&#41;</span>:
        name = forms.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        date = LocalizedDateTimeField<span style="color: black;">&#40;</span>tz, widget=LocalizedDateTimeInput<span style="color: black;">&#40;</span>tz<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">return</span> _MumbleForm<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span></pre></div></div>


<p>You can see <a href="http://github.com/jsled/brew-journal/commit/e754b4097caaea50b62225a31ce71c81e244ba8b">more usage examples from the brew-journal commit</a>.</p>

<p>Any tips or improvements welcome, of course.</p>

<p><i>Update, 2009-11-28: </i> I finally got around to moving to using mysql instead of sqlite for this project, and discovered that the above solution needs one more piece.  The default LocalizedDatetimeField seems to return datetimes which are &#8220;[tz] aware&#8221; in python&#8217;s vernacular, but mysql complains that datetimes with a tz portion are not allowed.  So, we add a SafeLocalizedDateTimeField that returns &#8220;naive&#8221; datetimes instead:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> SafeLocalizedDateTimeField <span style="color: black;">&#40;</span>LocalizedDateTimeField<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> clean<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, value<span style="color: black;">&#41;</span>:
        val = <span style="color: #008000;">super</span><span style="color: black;">&#40;</span>SafeLocalizedDateTimeField, <span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: black;">clean</span><span style="color: black;">&#40;</span>value<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> val <span style="color: #ff7700;font-weight:bold;">is</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #008000;">None</span>:
            val = val.<span style="color: black;">replace</span><span style="color: black;">&#40;</span>tzinfo=<span style="color: #008000;">None</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> val</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2009/10/10/django-timezone-view-handling/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>configuring tomcat6 for https with cargo</title>
		<link>http://www.asynchronous.org/blog/archives/2008/10/16/configuring-tomcat6-for-https-with-cargo</link>
		<comments>http://www.asynchronous.org/blog/archives/2008/10/16/configuring-tomcat6-for-https-with-cargo#comments</comments>
		<pubDate>Thu, 16 Oct 2008 22:22:51 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/misc]]></category>
		<category><![CDATA[~/stuff/programming]]></category>
		<category><![CDATA[~/stuff/work/mysql]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/archives/2008/10/16/configuring-tomcat6-for-https-with-cargo</guid>
		<description><![CDATA[cargo is a nifty tool for launching containers from, say, ant. While it doesn&#8217;t contain official support for Tomcat6, the Tomcat5 support works just fine with Tomcat6. There is a property, cargo.protocol, where you can specify https, however, the resulting server.xml that it generates will not be quite correct. A hack-fix is to edit org/codehaus/cargo/container/internal/resources/tomcat5x/server.xml [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cargo.codehaus.org/">cargo</a> is a nifty tool for launching containers from, say, ant.  While it doesn&#8217;t contain official support for Tomcat6, the Tomcat5 support works just fine with Tomcat6.</p>

<p>There is a property, <code>cargo.protocol</code>, where you can specify <code>https</code>, however, the resulting server.xml that it generates will not be quite correct.  A hack-fix is to edit <code>org/codehaus/cargo/container/internal/resources/tomcat5x/server.xml</code> in the jar file to include «SSLEnabled=&#8221;true&#8221;».  As well, you might want to add the appropriate attributes for the relevant keyfile-path, otherwise, it seemed to use <code>$(HOME)/.keystore</code>, which I was happy to provide.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2008/10/16/configuring-tomcat6-for-https-with-cargo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Champlain Valley water analysis, Spring 2008</title>
		<link>http://www.asynchronous.org/blog/archives/2008/07/28/champlain-valley-water-analysis-spring-2008</link>
		<comments>http://www.asynchronous.org/blog/archives/2008/07/28/champlain-valley-water-analysis-spring-2008#comments</comments>
		<pubDate>Tue, 29 Jul 2008 00:14:42 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/archives/2008/07/28/champlain-valley-water-analysis-spring-2008</guid>
		<description><![CDATA[As a South Burlington homeowner (water-bill-payer, really), the Champlain Water District sends me a report about how their water is the best water. Of note to me as a homebrewer is the analysis of certain chemical properties of the water. Since a few google searches for this information basically turned up my previous post and [...]]]></description>
			<content:encoded><![CDATA[<p>As a South Burlington homeowner (water-bill-payer, really), the <a href="http://www.cwd-h2o.org/">Champlain Water District</a> sends me a report about how their water is the best water. Of note to me as a homebrewer is the analysis of certain chemical properties of the water. Since a few google searches for this information basically turned up my previous post and not <a href="http://www.cwd-h2o.org/publications.html">the actual source of the data</a>, here&#8217;s the data:</p>

<ul>
<li>aluminum: &lt; 0.06ppm</li>
<li>color: 2 units</li>
<li>alkalinity: 57-74 ppm as CaCO3</li>
<li>calcium hardness: 45-56 ppm as CaCO3</li>
<li>total hardness: 61 ppm as CaCO3</li>
<li>chloride: 17ppm</li>
<li>foaming agents: &lt; 0.1 ppm</li>
<li>total organic carbon: 2.04 pm (1.49-2.61)</li>
<li>conductivity: 192 micro-S/cm (156-194)</li>
<li><p>pH: 7.62 (7.39-7.79)</p></li>
<li><p>total disolved solids: 113 ppm</p></li>
<li>iron: &lt; 0.01ppm</li>
<li>manganese: .007ppm</li>
<li>sodium: 7.5ppm</li>
<li>potassium: 1.31 ppm</li>
<li>sulfate: 15 ppm</li>
<li>silver: &lt; 0.05ppm</li>
<li>silica: 1.4ppm</li>
<li>silicon: 0.67 ppm</li>
<li>bromide: &lt; 0.010 ppm</li>
<li>iodide: &lt; 1 ppm</li>
<li>flouride: 1.01 ppm (0.74 &#8211; 1.28)</li>
<li>ammonium ion: 0.15 ppm (0.01 &#8211; 0.32)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2008/07/28/champlain-valley-water-analysis-spring-2008/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Champlain Valley water anlysis, 2007</title>
		<link>http://www.asynchronous.org/blog/archives/2007/10/29/champlain-valley-water-anlysis-2007</link>
		<comments>http://www.asynchronous.org/blog/archives/2007/10/29/champlain-valley-water-anlysis-2007#comments</comments>
		<pubDate>Tue, 30 Oct 2007 03:06:03 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/homebrew]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=86</guid>
		<description><![CDATA[Since the previous water analysis from 2005, I&#8217;ve since bought a house, which means the Champlain Water District sends me a report about how their water is the best water. Of note to me as a homebrewer is the analysis of certain chemical properties of the water. Since a few google searches for this information [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="/blog/archives/2005/01/27/winooski_vt_water_mineral_content_analysis.html">the previous water analysis from 2005</a>, I&#8217;ve since bought a house, which means the <a href="http://www.cwd-h2o.org/">Champlain Water District</a> sends me a report about how their water is the best water.  Of note to me as a homebrewer is the analysis of certain chemical properties of the water.  Since a few google searches for this information basically turned up my previous post and not <a href="http://www.cwd-h2o.org/publications.html">the actual source of the data</a>, here&#8217;s the data:</p>

<ul>
<li>aluminum: &lt; 0.06ppm</li>
<li>color: 2 units</li>
<li>alkalinity: 42-56 ppm as CaCO3</li>
<li>calcium hardness: 45-56 ppm as CaCO3</li>
<li>total hardness: 61 ppm as CaCO3</li>
<li>chloride: 17ppm</li>
<li>foaming agents: &lt; 0.1 ppm</li>
<li>total organic carbon: 2.22 pm (1.60-3.1)</li>
<li>conductivity: 189 micro-S/cm (163-208)</li>
<li>pH: 7.56 (7.29 &#8211; 7.89)</li>
<li>total disolved solids: 113 ppm</li>
<li>iron: &lt; 0.01ppm</li>
<li>manganese: .007ppm</li>
<li>sodium: 7.5ppm</li>
<li>potassium: 1.31 ppm</li>
<li>sulfate: 15 ppm</li>
<li>silver: &lt; 0.05ppm</li>
<li>silica: 1.4ppm</li>
<li>silicon: 0.67 ppm</li>
<li>bromide: &lt; 0.010 ppm</li>
<li>iodide: &lt; 1 ppm</li>
<li>flouride: 0.97 ppm (0.71 &#8211; 1.21)</li>
<li>ammonium ion: 0.20 ppm (0.04 &#8211; 0.048)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2007/10/29/champlain-valley-water-anlysis-2007/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java array iteration</title>
		<link>http://www.asynchronous.org/blog/archives/2007/10/04/java-array-iteration</link>
		<comments>http://www.asynchronous.org/blog/archives/2007/10/04/java-array-iteration#comments</comments>
		<pubDate>Fri, 05 Oct 2007 00:08:00 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/programming]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=85</guid>
		<description><![CDATA[Java5 now has language support for iteration of the form: for &#40;Type var : someIterable&#41; &#123; ... &#125; As well, there is now an Iterable&#60;t&#62; interface, and Arrays are directly iterable, allowing you to write: String&#91;&#93; thingys = &#123;&#34;a&#34;,&#34;b&#34;,&#34;c&#34;&#125;; for &#40;String thingy : thingys&#41; &#123; ... &#125; At work, we have a collection of utility [...]]]></description>
			<content:encoded><![CDATA[<p>Java5 now has language support for iteration of the form:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>Type var <span style="color: #339933;">:</span> someIterable<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span></pre></div></div>


<p>As well, there is now an <code>Iterable&lt;t&gt;</code> interface, and Arrays are directly iterable, allowing you to write:</t></p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> thingys <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;a&quot;</span>,<span style="color: #0000ff;">&quot;b&quot;</span>,<span style="color: #0000ff;">&quot;c&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> thingy <span style="color: #339933;">:</span> thingys<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span></pre></div></div>


<p>At work, we have a collection of utility iterators, most written before these were available.  As such, we have an ArrayIter utility, and a ZipIterator, inspired by Python&#8217;s <a href="http://docs.python.org/lib/itertools-functions.html#l2h-1061">itertools.izip</a>.</p>

<p>I&#8217;ve been going through these classes and their usages on a lazy basis to update them to the new syntax.  I finally got around to a usage of the ZipIterator, which happened to compose an ArrayIter &#8230; it zipped together an array of String names with the results of a test.</p>

<p>So, I changed it to:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> names <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">&quot;foo&quot;</span>, <span style="color: #0000ff;">&quot;bar&quot;</span>, <span style="color: #0000ff;">&quot;baz&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">List</span> results<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Object</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> pair <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">new</span> ZipIterator<span style="color: #009900;">&#40;</span>names, results<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// ...</span></pre></div></div>


<p>No dice, says Java:</p>

<pre><code>/home/jsled/stuff/work/[...]TestMumble.java:46: cannot find symbol symbol  : constructor ZipIterator(java.lang.String[],java.util.List)
location: class com.spokesoftware.util.iterator.ZipIterator
for (Object pairObj : new ZipIterator(data, results))
</code></pre>

<p>WTF?  Okay, let me help you out:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Object</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> pair <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">new</span> ZipIterator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>Iterable<span style="color: #009900;">&#41;</span>names, results<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #666666; font-style: italic;">// ...</span></pre></div></div>


<p>FUCK YOU, says Java:</p>

<pre><code>/home/jsled/stuff/work/[...]/TestMumble.java:46: inconvertible types
found   : java.lang.String[]
required: java.lang.Iterable
for (Object pairObj : new ZipIterator((Iterable)data, results))
</code></pre>

<p>It turns out that the string &#8220;iter&#8221; isn&#8217;t even in the <a href="http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.7">text of the section about Arrays in the Java Language Spec</a>.  Array instances aren&#8217;t Iterable.  They&#8217;re a <a href="http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.14.2">special case in the handling of the for-each loop syntax</a>.</p>

<p>This code ended up as:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Object</span> pair <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">new</span> ZipIterator<span style="color: #009900;">&#40;</span><span style="color: #003399;">Arrays</span>.<span style="color: #006633;">asList</span><span style="color: #009900;">&#40;</span>names<span style="color: #009900;">&#41;</span>, results<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></div></div>


<p>Java is totally shitrude.</p>

<p><i>edit 2009-10-10: added some formatting/syntax highlighting of the java blocks</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2007/10/04/java-array-iteration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rstiki-1.1</title>
		<link>http://www.asynchronous.org/blog/archives/2007/02/05/rstiki-11</link>
		<comments>http://www.asynchronous.org/blog/archives/2007/02/05/rstiki-11#comments</comments>
		<pubDate>Tue, 06 Feb 2007 04:06:34 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/misc]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=84</guid>
		<description><![CDATA[Felix Wiemann of docutils was kind enough to write and point out that docutils doesn&#8217;t protect against various kinds of malicious markup and content inclusion. He notes that there are a couple of options to prevent such inclusion. While I don&#8217;t intend to use rstiki on a public-facing web server, others might, and docutils makes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ososo.de/">Felix Wiemann</a> of docutils was kind enough to write and point out that docutils doesn&#8217;t protect against various kinds of malicious markup and content inclusion.  He notes that there are <a href="http://docutils.sf.net/docs/howto/security.html">a couple of options to prevent such inclusion</a>.</p>

<p>While I don&#8217;t intend to use rstiki on a public-facing web server, others might, and docutils makes it very easy to disable such inclusion.  So, it does by default, now.</p>

<p><a href="/rstiki/">rstiki</a>-1.1 also sports a new link to the rST quickref.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2007/02/05/rstiki-11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rstiki &#8211; minimalist wiki using reStructuredText</title>
		<link>http://www.asynchronous.org/blog/archives/2007/02/03/rstiki-minimalist-wiki-using-restructuredtext</link>
		<comments>http://www.asynchronous.org/blog/archives/2007/02/03/rstiki-minimalist-wiki-using-restructuredtext#comments</comments>
		<pubDate>Sun, 04 Feb 2007 02:37:11 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/misc]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=83</guid>
		<description><![CDATA[I used to use phpwiki for a personal, behind-the-firewall wiki. It was simple, though it was many files, and gentoo packaged it. Then, there was a version upgrade that required a database and lost all my (handful of) content. I switched to pwyky because it was a single file, simple, and SBP wrote it. But [...]]]></description>
			<content:encoded><![CDATA[<p>I used to use phpwiki for a personal, behind-the-firewall wiki.  It was simple, though it was many files, and <a href="http://www.gentoo.org/">gentoo</a> packaged it.  Then, there was a version upgrade that required a database and lost all my (handful of) content.  I switched to <a href="http://infomesh.net/pwyky/">pwyky</a> because it was a single file, simple, and SBP wrote it.  But its syntax doesn&#8217;t support nested lists, and it&#8217;s not <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>.</p>

<p><a href="/rstiki/">rstiki</a> is a minimalist single-file CGI wiki, in python, which uses docutils to render reStructuredText markup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2007/02/03/rstiki-minimalist-wiki-using-restructuredtext/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wish (x10dev) 2.1.5 ebuild</title>
		<link>http://www.asynchronous.org/blog/archives/2006/11/26/wish-x10dev-215-ebuild</link>
		<comments>http://www.asynchronous.org/blog/archives/2006/11/26/wish-x10dev-215-ebuild#comments</comments>
		<pubDate>Sun, 26 Nov 2006 16:53:32 +0000</pubDate>
		<dc:creator>jsled</dc:creator>
				<category><![CDATA[~/stuff/unix]]></category>

		<guid isPermaLink="false">http://www.asynchronous.org/blog/?p=82</guid>
		<description><![CDATA[I got frustrated last week and fixed the wish-2.1.3 ebuild to install the /dev/x10 nodes into /lib/udev/devices/. It was relatively hard to find this out, but when traditional mknod-created nodes are in this directory, they&#8217;ll be copied into the otherwise-dynamic /dev tree at boot time. As such, wish finally boots cleanly. In the course of [...]]]></description>
			<content:encoded><![CDATA[<p>I got frustrated last week and fixed the wish-2.1.3 ebuild to install the
<code>/dev/x10</code> nodes into <code>/lib/udev/devices/</code>.  It was
relatively hard to find this out, but when traditional
<code>mknod</code>-created nodes are in this directory, they&#8217;ll be copied
into the otherwise-dynamic <code>/dev</code> tree at boot time.  As such,
wish finally boots cleanly.</p>

<p>In the course of trying to track down other system lockups, I upgraded to the 2.6.18 kernel, and wish-2.1.3 stopped building for me.  A devfs header file that it used was finally deprecated out of the module-building header directory.  Luckily, in the mean time, wish-2.1.5 was released without this dependence on devfs.  I re-generated the patches, and updated the bug to be an <a href="http://bugs.gentoo.org/show_bug.cgi?id=133631">ebuild for wish-2.1.5, a.k.a. x10dev</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asynchronous.org/blog/archives/2006/11/26/wish-x10dev-215-ebuild/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

