<?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"
	>

<channel>
	<title>The weblog without a name</title>
	<atom:link href="http://www.pwan.org/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pwan.org/wp</link>
	<description>In this economy, all you get is tech posts...</description>
	<pubDate>Sat, 02 Jan 2010 18:40:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>How many bailouts are too many for a three year old ?</title>
		<link>http://www.pwan.org/wp/?p=52</link>
		<comments>http://www.pwan.org/wp/?p=52#comments</comments>
		<pubDate>Sat, 02 Jan 2010 18:40:08 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=52</guid>
		<description><![CDATA[Playing &#8216;pretend store&#8217; with my three-year-old nephew &#8220;R&#8221; last night.
R:  What do you want ?

J:  Some fresh figs please.

R:  Here are some fig. 
J:  How much do I owe you ?
R:  $10,000,000 !!!!
J:  What ?  I don&#8217;t need that much.  I need a bailout.
R:  What&#8217;s that ?
J:  A wheelbarrow full of money.
R:  OK.  Here it [...]]]></description>
			<content:encoded><![CDATA[<p>Playing &#8216;pretend store&#8217; with my three-year-old nephew &#8220;R&#8221; last night.</p>
<blockquote><p><em>R:  What do you want ?<br />
</em></p>
<p><em>J:  Some fresh figs please.<br />
</em></p>
<p><em>R:  Here are some fig. </em></p>
<p><em>J:  How much do I owe you ?</em></p>
<p><em>R:  $10,000,000 !!!!</em></p>
<p><em>J:  What ?  I don&#8217;t need that much.  I need a bailout.</em></p>
<p><em>R:  What&#8217;s that ?</em></p>
<p><em>J:  A wheelbarrow full of money.</em></p>
<p><em>R:  OK.  Here it is.  Tens of hundreds of million dollars !! What do you want next ?</em></p>
<p><em>J:  Another bailout.</em></p>
<p><em>R:  OK.  Here it is.  Hundred of million dollars !  What do you want now ?</em></p>
<p><em>J:  I ran out of money again.  Another bailout, please..</em></p>
<p><em>R:  What ! No ! Stop that ! </em></p>
<p><em>J:  OK, then I want a bonus.</em></p>
<p><em>R:  How much ?<br />
</em></p>
<p><em>J:  $10,000,000</em></p>
<p><em>R:  Too much ! What&#8217;s that for ? </em></p>
<p><em>J:  I&#8217;m too big to fail.</em></p>
<p><em>R:  Mooooooom !  Uncle Jude&#8217;s being silly again !</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=52</wfw:commentRss>
		</item>
		<item>
		<title>PXE-E61: Media test failure, check cable</title>
		<link>http://www.pwan.org/wp/?p=50</link>
		<comments>http://www.pwan.org/wp/?p=50#comments</comments>
		<pubDate>Tue, 29 Dec 2009 01:14:12 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[laptop]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=50</guid>
		<description><![CDATA[I was getting the message above on my laptop when I turned it on.
Surprisingly, whacking the bottom 4 times fixed it.   Go figure.
]]></description>
			<content:encoded><![CDATA[<p>I was getting the message above on my laptop when I turned it on.</p>
<p>Surprisingly, <a title="whack it good" href="http://www.nocrash.com/ncbbs/msgs/3247.shtml" target="_blank">whacking the bottom 4 times</a> fixed it.   Go figure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=50</wfw:commentRss>
		</item>
		<item>
		<title>-exclude-source-files with build_rpm</title>
		<link>http://www.pwan.org/wp/?p=47</link>
		<comments>http://www.pwan.org/wp/?p=47#comments</comments>
		<pubDate>Wed, 06 May 2009 12:29:16 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=47</guid>
		<description><![CDATA[In setuptools, the bdist_egg command has an -exclude-source-files option that is missing in the bdist_rpm command.
So what&#8217;s the selfish sod to do if he wants to keep from distributing his source in an RPM ?
Including the install script below worked for me.

python setup.py bdist_rpm --install-script=install.sh

where install.sh is

python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
&#160;
#goodbye py source
find $RPM_BUILD_ROOT -name [...]]]></description>
			<content:encoded><![CDATA[<p>In setuptools, the <a href="http://peak.telecommunity.com/DevCenter/setuptools#bdist-egg-create-a-python-egg-for-the-project">bdist_egg</a> command has an -exclude-source-files option that is missing in the bdist_rpm command.</p>
<p>So what&#8217;s the selfish sod to do if he wants to keep from distributing his source in an RPM ?</p>
<p>Including the install script below worked for me.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">python setup.py bdist_rpm --install-script=install.sh</pre></div></div>

<p>where install.sh is</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">--root</span>=<span style="color: #007800;">$RPM_BUILD_ROOT</span> <span style="color: #660033;">--record</span>=INSTALLED_FILES
&nbsp;
<span style="color: #666666; font-style: italic;">#goodbye py source</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$RPM_BUILD_ROOT</span> <span style="color: #660033;">-name</span> \<span style="color: #000000; font-weight: bold;">*</span>.py <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">'/\.py$/d'</span> INSTALLED_FILES</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=47</wfw:commentRss>
		</item>
		<item>
		<title>warning: &#8217;sqlstm&#8217; defined but not used</title>
		<link>http://www.pwan.org/wp/?p=41</link>
		<comments>http://www.pwan.org/wp/?p=41#comments</comments>
		<pubDate>Thu, 30 Apr 2009 12:46:25 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[oracle]]></category>

		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=41</guid>
		<description><![CDATA[At my current job, I had the misfortune of having to deal with some Oracle Pro*C code.  Since I&#8217;m a -Werror weenie, I was annoyed that this code was spitting out a &#8216;warning: &#8217;sqlstm&#8217; defined but not used&#8217; warning in all the proc generated source.  Here&#8217;s how I inhibited the warning.   [...]]]></description>
			<content:encoded><![CDATA[<p>At my current job, I had the misfortune of having to deal with some Oracle Pro*C code.  Since I&#8217;m a -Werror weenie, I was annoyed that this code was spitting out a &#8216;warning: &#8217;sqlstm&#8217; defined but not used&#8217; warning in all the proc generated source.  Here&#8217;s how I inhibited the warning.   </p>
<p>I added a new pc_common.h file</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// If you know a better way to avoid the 'sqlstm' defined but not used warning, I tip my hat to you.</span>
<span style="color: #339933;">#define AVOID_THE_UNUSED_SQLSTM_WARNING(X) void avoid_the_sqlstm_defined_but_unused_warning_for_ ## X () { sqlstm = sqlstm; }</span></pre></div></div>

<p>Then in some sample.pc that&#8217;s generating the warning:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#ifndef ORA_PROC</span>
	<span style="color: #339933;">#include &quot;pc_common.h&quot;</span>
AVOID_THE_UNUSED_SQLSTM_WARNING<span style="color: #009900;">&#40;</span>sample<span style="color: #009900;">&#41;</span>
<span style="color: #339933;">#endif</span></pre></div></div>

<p>The problem is that the generated proc code includes a static struct named &#8217;sqlstm&#8217;,  but then the generated code never references this struct.  Instead it uses a local sqlstm variable whenever it&#8217;s used elsewhere in the generateed code.  </p>
<p>The workaround adds a hopefully-unused function to the source that uses the static sqlstm struct.   This is enough for the compiler to mark it as being used, even though the function itself is never used. </p>
<p>However, I did have to introduce the argument to the macro to force a unique name for these functions, since the linker will complain about there being multiple functions with the same signature in in different files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=41</wfw:commentRss>
		</item>
		<item>
		<title>Haskell FFI bindings for Augeas</title>
		<link>http://www.pwan.org/wp/?p=33</link>
		<comments>http://www.pwan.org/wp/?p=33#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:05:52 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[haskell]]></category>

		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=33</guid>
		<description><![CDATA[I&#8217;ve published my first Haskell project on hackage.  Augeas, is a FFI binding for the Augeas API. I wrote it mainly to learn about Haskell&#8217;s FFI, and to keep busy while I was between jobs.  Also the API was small enough that it was a managable project.
Chapter 17 of Real World Haskell was very helpful [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve published my first Haskell project on hackage.  <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/augeas">Augeas</a>, is a <a href="http://www.cse.unsw.edu.au/~chak/haskell/ffi/">FFI</a> binding for the <a href="http://augeas.net/index.html">Augeas API</a>. I wrote it mainly to learn about Haskell&#8217;s FFI, and to keep busy while I was between jobs.  Also the API was small enough that it was a managable project.</p>
<p><a href="http://book.realworldhaskell.org/read/interfacing-with-c-the-ffi.html">Chapter 17 of Real World Haskell</a> was very helpful during the project, however it didn&#8217;t cover file pointers, which were needed for the aug_print method.</p>
<p>The <a href="http://www.haskell.org/haskellwiki/The_Monad.Reader/Issue2/Bzlib2Binding">Bzlib2 Binding article</a> in issue 2 of the Monad Reader, showed me how to do the Handle to CFile conversions,  but I ran into some problems with their handleToCFile method during testing.</p>
<p>In my aug_print test, I was confused why I could no longer write to the Handle after calling aug_print.  Eventually I found out that handleToFD <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-IO.html#v%3AhandleToFd">closes the Handle passed to it</a>.</p>
<p>I got around this by calling hDuplicate on the handle, and then calling handleToFD on the duplicate instead.</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">handleToCFile <span style="color: #339933; font-weight: bold;">::</span> Handle <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #cccc00; font-weight: bold;">String</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #cccc00; font-weight: bold;">IO</span> <span style="color: green;">&#40;</span>Ptr CFile<span style="color: green;">&#41;</span>
handleToCFile h m <span style="color: #339933; font-weight: bold;">=</span>
 <span style="color: #06c; font-weight: bold;">do</span> iomode <span style="color: #339933; font-weight: bold;">&lt;-</span> newCString m
&nbsp;
    <span style="color: #5d478b; font-style: italic;">-- Duplicate the handle, so the original stays open</span>
    <span style="color: #5d478b; font-style: italic;">-- after the handleToFd call closes the duplicate</span>
    dup<span style="color: #339933; font-weight: bold;">_</span>h <span style="color: #339933; font-weight: bold;">&lt;-</span> hDuplicate h
    fd <span style="color: #339933; font-weight: bold;">&lt;-</span> handleToFd dup<span style="color: #339933; font-weight: bold;">_</span>h
    fdopen fd iomode</pre></div></div>

<p>Also, I made sure to close the Fd as well, which the Bzlib2 Bindings article did not show:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">aug<span style="color: #339933; font-weight: bold;">_</span>print <span style="color: #339933; font-weight: bold;">::</span> Ptr Augeas  <span style="color: #5d478b; font-style: italic;">-- ^ Augeas pointer</span>
          <span style="color: #339933; font-weight: bold;">-&gt;</span> Handle      <span style="color: #5d478b; font-style: italic;">-- ^ Already opened file handle</span>
          <span style="color: #339933; font-weight: bold;">-&gt;</span> ByteString  <span style="color: #5d478b; font-style: italic;">-- ^ PATH</span>
          <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #cccc00; font-weight: bold;">IO</span> <span style="color: green;">&#40;</span>AugRet<span style="color: green;">&#41;</span> <span style="color: #5d478b; font-style: italic;">-- ^ return value</span>
aug<span style="color: #339933; font-weight: bold;">_</span>print aug<span style="color: #339933; font-weight: bold;">_</span>ptr fptr<span style="color: #339933; font-weight: bold;">_</span>out bs<span style="color: #339933; font-weight: bold;">_</span>path <span style="color: #339933; font-weight: bold;">=</span>
    <span style="color: #06c; font-weight: bold;">do</span>
      useAsCString bs<span style="color: #339933; font-weight: bold;">_</span>path <span style="color: #339933; font-weight: bold;">$</span> \path <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #06c; font-weight: bold;">do</span>
        out <span style="color: #339933; font-weight: bold;">&lt;-</span> handleToCFile fptr<span style="color: #339933; font-weight: bold;">_</span>out <span style="background-color: #3cb371;">&quot;w&quot;</span>
        ret <span style="color: #339933; font-weight: bold;">&lt;-</span> c<span style="color: #339933; font-weight: bold;">_</span>aug<span style="color: #339933; font-weight: bold;">_</span>print aug<span style="color: #339933; font-weight: bold;">_</span>ptr out path
        fflush out
        fclose out
        <span style="font-weight: bold;">return</span><span style="color: green;">&#40;</span>ret<span style="color: green;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=33</wfw:commentRss>
		</item>
		<item>
		<title>python-module-for-puppet</title>
		<link>http://www.pwan.org/wp/?p=29</link>
		<comments>http://www.pwan.org/wp/?p=29#comments</comments>
		<pubDate>Fri, 09 Jan 2009 21:41:53 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[open source]]></category>

		<category><![CDATA[puppet]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=29</guid>
		<description><![CDATA[I&#8217;ve been using the python-module-for-puppet to make sure my build environment machines have the python modules they need.
The modules been working as advertised, but unfortunately some of machines need to be running older versions of a couple packages, so I forked the project and added support for an optional $version argument so the easy_install command [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using the <a href="http://github.com/garthrk/python-module-for-puppet/tree/master">python-module-for-puppet</a> to make sure my build environment machines have the python modules they need.</p>
<p>The modules been working as advertised, but unfortunately some of machines need to be running older versions of a couple packages, so I <a href="http://github.com/jude/python-module-for-puppet/tree/master">forked the project</a> and added support for an optional $version argument so the easy_install command could use &#8220;name==version&#8221; style commands.</p>
<p>It&#8217;s the first time I&#8217;ve submitted changes via github, so I hope it did it right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
		<item>
		<title>So your wonky Indiana time zone is not mentioned in tzsetup-udeb ?</title>
		<link>http://www.pwan.org/wp/?p=22</link>
		<comments>http://www.pwan.org/wp/?p=22#comments</comments>
		<pubDate>Wed, 07 Jan 2009 22:00:43 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=22</guid>
		<description><![CDATA[A bunch of  wonky Indiana time zones, were added to pkg-glibc/tzdata over 19 months ago, (along with a number of other time zone changes) but they still haven&#8217;t surfaced in the tzsetup-udeb package, as of 1/7/2009.
As a result, if you&#8217;re in one of these odd Indiana counties, the tzsetup portion of the installation won&#8217;t display [...]]]></description>
			<content:encoded><![CDATA[<p>A bunch of  <a href="http://en.wikipedia.org/wiki/Time_in_Indiana" target="_blank">wonky Indiana time zones</a>, were added to pkg-glibc/tzdata <a href="http://svn.debian.org/viewsvn/pkg-glibc?rev=2332&amp;view=rev">over 19 months ago</a>, (along with a number of other time zone changes) but they still haven&#8217;t surfaced in the <a href="http://svn.debian.org/viewsvn/d-i/trunk/packages/tzsetup/">tzsetup-udeb</a> package, as of 1/7/2009.</p>
<p>As a result, if you&#8217;re in one of these odd Indiana counties, the tzsetup portion of the installation won&#8217;t display your time zone, but you can set it to the correct time zone after the install finishes.</p>
<p>I filled <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511153">bug 511153</a> after asking about it on the debian-boot IRC channel on irc.debian.org</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=22</wfw:commentRss>
		</item>
		<item>
		<title>Novalang Real World Haskell.</title>
		<link>http://www.pwan.org/wp/?p=11</link>
		<comments>http://www.pwan.org/wp/?p=11#comments</comments>
		<pubDate>Tue, 06 Jan 2009 20:06:17 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[haskell]]></category>

		<category><![CDATA[novalang]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=11</guid>
		<description><![CDATA[I attended the first session of the novalang sessions on Real World Haskell.  So far, I haven&#8217;t picked up too much, but we&#8217;ve only gone through the first two chapters.  It looks like a pretty good group, with a lot of smart folks attending. 
The group had a mixture of people using both [...]]]></description>
			<content:encoded><![CDATA[<p>I attended the first session of the <a href="http://groups.google.com/group/novalanguages/">novalang</a> sessions on <a href="http://book.realworldhaskell.org/read/">Real World Haskell</a>.  So far, I haven&#8217;t picked up too much, but we&#8217;ve only gone through the first two chapters.  It looks like a pretty good group, with a lot of smart folks attending. </p>
<p>The group had a mixture of people using both the physical book and the online version, so there was some confusion when someone would refer to something by page number.  It might cut down on some confusion if the HTML had anchor links to the pages in the book.</p>
<p>I was surprised by Exercise 1 at the bottom of chapter 2.  It had not occurred to me that last would have to return some element from within [a].  If it returned something else, like 42, then the type checker would catch this and make the signature something more specific like [a]->Int instead.</p>
<p>(It would also be nice if the online version included links to the exercises.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=11</wfw:commentRss>
		</item>
		<item>
		<title>New year / new blog</title>
		<link>http://www.pwan.org/wp/?p=4</link>
		<comments>http://www.pwan.org/wp/?p=4#comments</comments>
		<pubDate>Thu, 01 Jan 2009 20:14:20 +0000</pubDate>
		<dc:creator>jude</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pwan.org/wp/?p=4</guid>
		<description><![CDATA[One of my New Year&#8217;s Resolutions (from last year actually) is to revive this blog.  So after digging up the administrative password for the site, I decided to look into WordPress a little, and here&#8217;s what I came up with.
]]></description>
			<content:encoded><![CDATA[<p>One of my New Year&#8217;s Resolutions (from last year actually) is to revive this blog.  So after digging up the administrative password for the site, I decided to look into WordPress a little, and here&#8217;s what I came up with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pwan.org/wp/?feed=rss2&amp;p=4</wfw:commentRss>
		</item>
	</channel>
</rss>
